Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8 9

Author Topic: Extended item viewscreen, custom item descriptions and ASCII art 5.1 beta  (Read 31192 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #90 on: January 29, 2015, 06:38:28 am »

Can this be done for buildings too? I mean getting a description/more info?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Raidau

  • Bay Watcher
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #91 on: January 29, 2015, 07:18:33 am »

Can this be done for buildings too? I mean getting a description/more info?

Within this script it can be done if you view an item that is part of the building's structure, and the script then checks the appropriate file. But simple pop-up script would be better.
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #92 on: January 29, 2015, 07:25:41 am »

Can this be done for buildings too? I mean getting a description/more info?

Within this script it can be done if you view an item that is part of the building's structure, and the script then checks the appropriate file. But simple pop-up script would be better.
Actually there is a really cool way to do that. And i'm still working on that (tweaking some stuff to get it right).
What i mean is that with most tools there is no indication that there is a key that does something. Such a popup on building would be trivial to add (just keybinding with correct context/focusstring) and a bit of magic that checks which one you have selected but the main thing is that player must know about it somehow.
So i'm musing on doing something big (it would take more work but would change how everybody does many scripts) or just faking it like here . The problem with second part is that sometimes you can accidentally exit back to vanilla screen though it's not such a big problem if you are only displaying some additional keybindings...

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #93 on: January 29, 2015, 07:39:03 am »

I know that workflow shows the hotkeys at the bottom in any workshop menu, so a "press alt z for description" would be pretty useful.

Showing a little popup window with a picture of the buildings, name, skills used, and a short text description of what it does.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Raidau

  • Bay Watcher
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #94 on: January 29, 2015, 08:53:08 am »

Showing a little popup window with a picture of the buildings, name, skills used, and a short text description of what it does.



^
I have similar script that I wrote for adventure mode, still quite usable, yet a bit abandoned and old :) It recognizes creatures under cursor in adventure mode (talk and look mode) and the creature selected in UI. Im still looking forward to expand my old script someday. Now when I know how to use widgets I think I can even build classic RPG equipment and summary screen, like this




I have a big question for Warmist... How to add new hotkey hint strings to the bottom of the existing screen without forcing a new window on top? The examples are plugins such as sort and stocks
« Last Edit: January 29, 2015, 09:24:34 am by Raidau »
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #95 on: January 29, 2015, 08:58:41 am »

I think that's only possible with plugins, not scripts. You'd need to compile something in C for that, not just a .lua script.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #96 on: January 29, 2015, 09:26:18 am »

I think that's only possible with plugins, not scripts. You'd need to compile something in C for that, not just a .lua script.
There is two ways. One is as Meph says - plugin written in c++ and compiled. That is the big idea i was talking about. Build one big plugin that does that centrally.
Other idea works only for workshops: you intercept the call to fill the sidebar and replace it with your own. That is how it works in the example i had before.

Raidau

  • Bay Watcher
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #97 on: January 29, 2015, 09:44:58 am »

I think that's only possible with plugins, not scripts. You'd need to compile something in C for that, not just a .lua script.
There is two ways. One is as Meph says - plugin written in c++ and compiled. That is the big idea i was talking about. Build one big plugin that does that centrally.
Other idea works only for workshops: you intercept the call to fill the sidebar and replace it with your own. That is how it works in the example i had before.

Did you replace the whole sidebar? Not just the choice list?
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #98 on: January 29, 2015, 11:33:08 am »

Did you replace the whole sidebar? Not just the choice list?
Yup whole sidebar.

Raidau

  • Bay Watcher
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #99 on: January 29, 2015, 11:43:18 am »


Quote
Yup whole sidebar.

So you have your jobs library finished and fully functional ? :) Can you properly issue any job using lua?
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #100 on: January 29, 2015, 01:19:59 pm »


Quote
Yup whole sidebar.

So you have your jobs library finished and fully functional ? :) Can you properly issue any job using lua?
Nope. Just some special jobs. But the idea is that you don't need to cover it fully and you could pass through interesting keypresses.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #101 on: January 29, 2015, 07:05:45 pm »

Script continues to be awesome; I look forward to future development.  So here's a couple of notes, on issues I've found:

Running 5.0 beta and flicking through a few items (pick, barrel, axe, etc.), I get this console output:
Spoiler (click to show/hide)
Given that I'm not using the debug option, maybe it should be quieter?

The ascii image for "copper pick" was huge, and overflowed the screen - I couldn't actually tell what it was.  I think a standard image size would be required, and suggest that 15x45 tiles (assuming a standard 8x12 px tile, the most common thanks to vanilla DF and TwbT, that's a 2:1 ratio) would be best most maximum compatibility across window sizes. 

If this seems to be too small, there are two obvious options:  upscale (eg by simple integer multiples), or have multiple images available.  If the latter, I think it would be worth making the syntax more complex to move everything to a single (json?) file, rather than seeing an explosion in the number of required files.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #102 on: January 29, 2015, 07:10:21 pm »

+1 for small, standardized image sizes. People don't need to see an image to know what it is, the image should accompany the much more important text as a little extra on the side. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Raidau

  • Bay Watcher
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #103 on: January 29, 2015, 08:45:34 pm »

OOPS the image of the pick is actually was not supposed to be there XD just was testing the converer.

You can make smaller images using Custom Workshop Workshop, it allows you to directly see the tiles you draw. The new format is supported by the script. (Note the format tag on top, it makes script read numbers instead of showing all the text as is:
Code: [Select]
<FORMAT:NB_ASCII>
[32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32]
[32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32]
[32:32:32:32:32:214:196:194:196:196:194:196:196:196:196:196:196:196:196:196:196:196:196:196:219:219:179:32:32:32:32:32]
[32:32:32:32:32:211:196:196:196:196:196:196:196:196:196:196:196:196:196:196:196:196:196:196:219:219:179:32:32:32:32:32]
[32:32:32:32:32:32:32:0:0:0:0:32:32:32:32:32:32:32:32:32:32:32:32:32:178:178:179:32:32:32:32:32]
[32:32:32:32:32:32:32:0:32:0:0:32:32:32:32:32:32:32:32:32:32:32:32:47:176:176:179:32:32:32:32:32]
[32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:211:196:196:196:217:32:32:32:32:32]
[32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32]
[32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32]

Turns into:


This is an example of my crude picture drawing. I tried to draw a hand holding the hatchet but gave it up :) just a quick example.

Id like to know how to align a lua screen to the side, currenly it is always shown in the center of the screen...
« Last Edit: January 29, 2015, 08:53:29 pm by Raidau »
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Antikythera

  • Bay Watcher
    • View Profile
Re: Extended item viewscreen, custom item descriptions and ASCII art 4.2 beta
« Reply #104 on: January 30, 2015, 03:57:41 pm »

obviously you've put a lot of work into this and its seems well received by the experienced players in the community;

 however it is included in the LNP and is on by default. I couldn't work out how to turn it off.

I looked at a dwarfs thoughts and preferences and couldn't get out of the screen. all I saw was ascii art (over the text I wanted to read) and some text at top and bottom "dfhack" and "ascii view". no "esc = exit" which I saw in this thread and may be a more recent addition. when I googled "dfhack ascii view turn off" I wasn't able to find anything.

finally found this thread after half an hour.
Logged
Pages: 1 ... 5 6 [7] 8 9