Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 12 13 [14] 15 16 ... 24

Author Topic: Roses' Script, System, and Utilities Collection (07/06/2021)  (Read 91432 times)

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #195 on: March 27, 2017, 01:12:06 pm »

I promised a release and I hate to dissapoint, so here it is. For simplicity sake I am going to break the release up into parts and release them over the next couple of days. First up is the Journal GUI!

Journal GUI: This GUI allows you to browse all in game buildings, creatures, items, inorganic materials, organic materials, plants, and reactions. It displays the relevant information in a (hopefully) conviniently readable format. Note that the layout and such is easily changed, so any suggestions for moving things around, changing wording, or adding information can easily be handled. Below is a set of screen shots showing how the Journal works, including an example for each of the previously mentioned categories.

Typing gui/journal in the command line will open up a window like this (Food is not currently supported)
Spoiler: Journal (click to show/hide)
Selecting one of the categories (for this example Creatures) will open up another window with some selection options
Spoiler: Selection (click to show/hide)
After selecting the options you want for display (right now the options are fairly limited, but more will be added with time and requests) a list of objects will appear (note that most information for creatures is stored at the caste level)
Spoiler: Objects (Creatures) (click to show/hide)
If available a red message will appear on the top of the right side telling you to press enter for more detailed information (currently only available for Creatures -> Castes)
Spoiler: SubObjects (Castes) (click to show/hide)

Spoiler: Buildings (click to show/hide)
Spoiler: Items (click to show/hide)
Spoiler: Inorganics (click to show/hide)
Spoiler: Organics (click to show/hide)
Spoiler: Plants (click to show/hide)
Spoiler: Reactions (click to show/hide)

In the future I would like to add the ability to include an image in any of the journal entries (for an example see this post). Work still needs to be done for the butcher and extra butcher objects for creatures, and better layout control for all of it. Ideally I will be able to link all of the objects together so that if a building needed a specific material you would be able to select that material and it would take you to it's object page so that you would be able to figure out where it is and how to get it.

Up next will be the Detailed Unit Viewer, with Class System support
Logged

ragundo

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #196 on: March 27, 2017, 01:21:58 pm »

Amazing !!!!
PTW
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2017)
« Reply #197 on: March 28, 2017, 12:03:13 pm »

Time for release number 2! So here is the Detailed Unit Viewer (DUV), unfortunately trying to link the DUV into the Class System caused some unforeseen errors to appear so I had to roll back a couple of changes. What this means is you can view the class information of a creature, but you can't yet change classes.

Typing gui/detailed-unit will bring up the main screen which shows;
Spoiler: DUV Main (click to show/hide)

On the bottom of the screen you will see different key options, currently the available options are for Attributes, Classes, Syndromes, and Thoughts/Preferences.
Spoiler: Attribute Details (click to show/hide)
Spoiler: Class Details (click to show/hide)
Spoiler: Syndrome Details (click to show/hide)

In the future I will be adding interaction, health, and relationship information tabs, along with a complete tie-in with the Class System so you will be able to change classes, learn spells and traits, and all other Class System related options.

Up next will be the expanded Random Creature Creator (RCC) along with it's new and improved ReadMe

EDIT: Just realized I forgot to do a final commit to master branch this morning, so hold off on checking out the DUV until I get home and can upload the most recent version.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #198 on: March 29, 2017, 04:01:31 pm »

Alright, todays release will be the Random Creature Creation (RCC) script. Note that this script required Python 3+

First I would like to give a little preamble, if you are looking for a random creature generator that just works (and works well) I can't recommend Knight Otu's work enough. It is very good. While both of these scripts have the same end purpose, the generation of random creatures, they have a fundamentally different mode of reaching that purpose. Knight Otu's scripts read your raws and generates creatures based on what you have there. The RCC instead relies on templates that you provide and gives more control over the generation, but also requires a lot more work. For this reason I have dubbed this a creature creator instead of generator since it requires you to actually create the creatures (or in this case the templates that become creatures).

A complete ReadMe is provided with the script, but below is an outline of the RCC;

First up are templates, these are what are read in and then chosen from. The exact method for how templates are chosen is covered in the ReadMe, but basically it will pick one template from each category, and make a creature out of those templates. Here is an example of what some HEAD and MATERIAL templates look like
Spoiler: Templates (click to show/hide)

When you have all of your templates created that you want, running the program generates a GUI for added input. Within the GUI there are several things you can modify. A complete list of what each object is can be found in the ReadMe. Mousing over a field will also give you a brief description of it's purpose in case you forget.
Spoiler: GUI Main Page (click to show/hide)

In addition to the changes that can be made on the front page of the GUI there are also several side menus. These menus let you change things like, which templates are actually available to use, and other more complex changes.
Spoiler: GUI Side Menus (click to show/hide)

Finally selecting Generate Creatures will create a file for the given number of creatures you wish to generate. If instead you select Sample Creature it will create a single creature and output it's raws for you to check that things are working how you expect them to.
Spoiler: Sample Creature (click to show/hide)

The script currently comes with a wide variety of templates and the raws that would be required to actually use the creatures, but these are simple provided for examples. In the future I will include all of the templates and raw files that I am using for the current mod I am working on, but I thought it would be better to get the script out so that others could make their own templates if they wanted.

Up next will be the new and improved wrapper script, unfortunately this change is not backwards compatible, but the parts that need to be changed can easily be done by a Find/Replace command.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #199 on: March 31, 2017, 05:14:42 pm »

I decided to postpone the wrapper update until this weekend since it relies on tables that have changed in the newest DFHack version. So this weekend I will port all of my scripts to the newest version and release the wrapper update at the same time
Logged

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #200 on: April 01, 2017, 10:19:48 am »

Awesome stuff Roses. Possibly expect PMs pestering you for info.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #201 on: April 01, 2017, 06:50:47 pm »

Awesome stuff Roses. Possibly expect PMs pestering you for info.

Of course, also feel free to ask questions here, since more than one person might have the same question.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #202 on: April 19, 2017, 10:34:34 am »

Alright I am going to be pushing a release in the next couple of days. This release will be different than others as it will be DFHack version specific. With the change in the unit data structure several of my scripts stopped working (as some have pointed out). Now I know that an official release of DFHack 43.05 hasn't come out yet, but the beta version is pretty stable, so after this release if you want to use my scripts you will need to be running DF and DFHack 43.05.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #203 on: May 04, 2017, 12:41:17 pm »

Sorry I haven't uploaded recently. Work got crazy this last week. But I am still chugging along. I've fixed up the test run script so that it will be much easier in the future to find out what scripts need updating, and to make sure all 50+ scripts and 200+ functions are working correctly. I have also added the ability to change classes, learn spells, and gain feats directly to the Detailed Unit Viewer (DUV). Which brings a question to mind;

If you were playing a game and it had a spell book, would you expect the spell book to show you all spells, only spells available to your class, or only spells that are available to your class and you already know? I am trying to figure out the best way to organize all the information and I keep going back and forth. Note that there are two different "Spell Books", one that is accessible from the DUV, and on the is accessible from the Journal. For the Journal version I am just listing every spell so that it acts more like a compendium of information. The DUV version is the one I am having trouble deciding on.

EDIT: Well I have decided to have all three display options available through a simple toggle. You will be able to see all spells, only spells you know, only spells that are active, only spells for your current class, spells you can learn.
« Last Edit: May 04, 2017, 05:07:49 pm by Roses »
Logged

Amostubal

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #204 on: May 22, 2017, 07:31:14 am »

awesome work Rose.  My only question, is there a central location for documentation?  I've been scanning scripts and I have an "idea" of what is going, but not enough to "know" what's going on.  Its hard to understand how they mesh together. 

one error:  the top of base/roses-init: it states to put it in DFHack.init... but that is outside of the range where persist-tables can operate, so it errors on the first actual line of code.  Shouldn't it be put at the top of onLoad.init, when a map is actually loaded and persist-tables can operate?
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #205 on: May 22, 2017, 09:12:45 am »

awesome work Rose.  My only question, is there a central location for documentation?  I've been scanning scripts and I have an "idea" of what is going, but not enough to "know" what's going on.  Its hard to understand how they mesh together.

Unfortunately the documentation writing has not kept up with the script writing, I was working on more detailed information, the start of which can be found here for scripts and here for functions, but some information is out of date and some is just missing (I'm really hoping to work on better documentation, but it's sooo boring...). The ReadMes in the Git repo should be the most up to date versions for the Class, Civilization, and Event Systems. Please feel free to ask as many questions as you want in this thread, I am happy to answer them, it will also probably help me write documentation since it will give me an idea of where questions are, what needs to be better documented (or documented at all), and eventually what I can improve on.

Note that most of my scripts and such are not as plug and play friendly as other modders/script writers. Not only is there a certain lack of polish, but most have way more functionality than a standard user would ever use, with options that are really only there for my own use. For example you can use syndromes to track changes made by certain scripts so that you can remove those changes with other scripts, i.e. If you have a script that gives a unit +2000 strength for 600 ticks, you can have a "dispell" script that removes the buff, but also knows to correctly remove the callback for reverting the unit's strength. These types of options and such are for when I get my act together and actually publish my "spell" repository I am working on.

one error:  the top of base/roses-init: it states to put it in DFHack.init... but that is outside of the range where persist-tables can operate, so it errors on the first actual line of code.  Shouldn't it be put at the top of onLoad.init, when a map is actually loaded and persist-tables can operate?

You are indeed correct, that line was placed there before I really understood the differences between the various init files and what DFHack was really doing. It just has never been changed. I will get that updated ASAP.
Logged

Amostubal

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #206 on: May 22, 2017, 09:52:32 am »

well I forked your github to my pc, this morning... decided to update all the scripts in MDF to the most recent version... now chasing down the few errors i know exist because of the data-structural change from 43.03 to 43.05. I can send some pull requests on things I spot as I go through here, possibly even pass it through a DFHack version check so that both codes can exist side by side without error, so its forward/backward compatible.  Its not many errors, at the moment, but I'm sure I will find more as I test out the script region.

Additionally, I type as fast as I read, so I could start creating usage blocks at the start of the scripts, based on what I see in them; then you can just suggest corrections. I read lua code and dfhack structure fairly well and it would be a learning experience.  adding such documentation, may assist people in understanding what is going on inside the script and what they need called for different things.  Dealing with MDF... I've discovered inter-dependencies that I didn't know existed.  I could do it in my downtime around my other projects (you got to take breaks, lol).
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #207 on: May 22, 2017, 10:11:34 am »

well I forked your github to my pc, this morning... decided to update all the scripts in MDF to the most recent version... now chasing down the few errors i know exist because of the data-structural change from 43.03 to 43.05. I can send some pull requests on things I spot as I go through here, possibly even pass it through a DFHack version check so that both codes can exist side by side without error, so its forward/backward compatible.  Its not many errors, at the moment, but I'm sure I will find more as I test out the script region.

Additionally, I type as fast as I read, so I could start creating usage blocks at the start of the scripts, based on what I see in them; then you can just suggest corrections. I read lua code and dfhack structure fairly well and it would be a learning experience.  adding such documentation, may assist people in understanding what is going on inside the script and what they need called for different things.  Dealing with MDF... I've discovered inter-dependencies that I didn't know existed.  I could do it in my downtime around my other projects (you got to take breaks, lol).

If you want to add some comments and know how to use Git I don't mind at all looking through pull requests. Right now I'm not using great Git practice since I am updating dozens of files at a time with a single commit message, but oh well.

I actually have been working on updating to 43.05 myself (mainly the removal of the unit.relations struct). I should say that I have already updated on my local machine, I'm just working on getting this run-test script to work flawlessly so in the future if any changes are made (either to DFHack or to DF's inner working itself) I can quickly find them and correct/account for them. I suppose now that the official DFHack version has been updated to 43.05 I should just push the necessary changes to make it work. I'm not too concerned about backwards compatibility, I suppose if someone feels super strong about it I can offer it, but personally my plan was always to keep my scripts up to date with the most recent non-beta version of DFHack.

EDIT: Also wanted to say that I have gotten class changing, spell learning, and feat adding put into the Detailed Unit Viewer. Screenshots will be coming soon, but currently when you look at a unit and select Class Details you will see a list of available classes, colored green if the unit has experience with the class, yellow if they don't, you can also toggle all classes, or just classes that are available to your civ (if using the Civilization System), the classes that the unit can not become will be colored red. Hitting enter on a class will give you a prompt asking if you want to change, and will then switch the units class.

Spells are similar, with the view toggalable between all spells, known spells, and class available spells. You can then toggle these on and off. For most mods I expect all known/available spells will want to be toggled so when changing classes that is the default. But you can also specify that a class can only have a certain number of spells active at one time (default to infinity). This will allow a spell system that functions more like D&D Mages where you can only have a certain number active, in the future it would be interesting to make a D&D Sorcerer like system where instead of a certain number of spells active you have a certain number of uses per time period, but that is much more complicated.

Feats function basically the same except that they cost "Feat Points" to learn, and are permanent once learned (No Respeccing!) The current number of feat points available are displayed on the feat page so you can see what that unit has.

Like I said, screenshots to better illustrate all of these changes will be coming "soon", I am basically just playing with layout and positioning. (it's hard to create a custom GUI placement when everyone has different monitor sizes, resolutions, and some play in windowed vs fullscreen)
« Last Edit: May 22, 2017, 11:44:25 am by Roses »
Logged

Amostubal

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #208 on: May 22, 2017, 11:37:26 am »

Great! well I got to churn through a few errors real quick and drop an update (I broke MDF, accidentally, somewhat)...  but I'm getting back on track, I will look at it latter today/the week;  see where I can pitch in some assistance, in between everything else on my plate ;)
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (03/28/2016)
« Reply #209 on: June 08, 2017, 11:17:29 am »

So, in addition to providing an updated release for the new DFHack version this weekend, I am also re-releasing the utility Modding with Excel (MWE). Basically it is a python script that will read in raw txt files and convert them to csv. Or it will read in a csv file and convert it to a raw file. Below you will find an example for inorganics;

The conversion process from raw -> csv -> raw
Spoiler (click to show/hide)

A larger look at what the csv file looks like (large image)
Spoiler (click to show/hide)

Currently the program handles buildings, inorganics, items, plants, and reactions. I am working on getting it set up to handle creatures, but they are much more complicated than anything of the other raws. Interactions and templates should be easy enough to handle, just haven't gotten around to it yet. Expect an update this Saturday or Sunday.
Logged
Pages: 1 ... 12 13 [14] 15 16 ... 24