Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help Me Help You.  (Read 1254 times)

Help Me Help You.
« on: December 24, 2012, 04:39:00 am »

I just want some quick generation of items, creatures, everything I can add or change sometimes. Writing RAWs is relatively easy, but time consuming. So I'm just going to write a simple VB program to generate them for me. This will take a few days of my time, but you can help speed it up if you can give me a simple list.

I just need a list of TOKENS sorted by which can be anything and which are hard-coded and can't be changed. Mush of the time writing the program will require going through the modding references to compile this information, since it's not organized for this sort of thing.
Logged

MiamiBryce

  • Bay Watcher
    • View Profile
Re: Help Me Help You.
« Reply #1 on: December 24, 2012, 09:38:53 am »

I'm not exactly sure what you're goal is, but you may be unaware of this:

http://www.bay12forums.com/smf/index.php?topic=103360.0

If it does not already do what you need, there is an XML file in the download which lists which tokens belong in which tokens you can use to work on your own tool.  However, if it doesn't do what you are looking for I would suggest you clearly define your goal/purpose and expected manners of use to BradUffner so he may take into consideration what you want to do and possibly implement it in the program (he appears to be a professional programmer).

Since you mentiond "simple VB program" here's a shameless plug of something I am messing with because I wanted to see if coming at modding form a particular direction could be done:

http://www.bay12forums.com/smf/index.php?topic=120098.msg3852928#msg3852928

The goal of what I'm writing is to give a solid base from which others, like you, can work from so you don't have to create a lot of the basic stuff (like a class to read/parse raw files).  It only version 0.0.2.  It only loads and displays language_words.txt and descriptor_color_standard.txt.  You can modify them, but not yet save them.  I have a list of things to refactor to bring it to 0.0.3, then in 0.0.4 I hope to have it reading in material_template_default.  I then expect to have more refactoring to bring it up to 0.0.5.  At that point I think I'd be ready to write up the documentation for the configuration files and throw what I have up on DFFD as either a starter for someone else or a general reference on how to use the power of .Net to do your work for you.  I don't think that I would stop at 0.0.5 though because I keep having ideas.

Cheers



Logged
Re: Help Me Help You.
« Reply #2 on: December 24, 2012, 01:12:30 pm »

Yeah, I've seen RAW Explorer. It's just a text editor at it's core.

What I am making is a simple GUI driven tool to allow quick generation of items, civs and creatures by just having the user define all the variables they want to give like the item/creature's name, size, materials, etc and then compile all their creations into their own set of RAWs so people can easily customize every already moddable aspect of the game without even knowing how to mod RAWs directly.

It seems yours is about the same, but just like the other (unfinished and stopped updated about a year ago) tool that was trying to do what I am doing have an interface that really isn't easy to read. The other one also required installed Python and a bunch of libraries for Python and ain't nobody got time for that!

Here's a screen of what I am working on; keep in mind I started this last night and I am creating the interface as I collect the data I need:

Logged

MiamiBryce

  • Bay Watcher
    • View Profile
Re: Help Me Help You.
« Reply #3 on: December 24, 2012, 02:18:32 pm »


Yeah, I've seen RAW Explorer. It's just a text editor at it's core.

What I am making is a simple GUI driven tool to allow quick generation of items, civs and creatures by just having the user define all the variables they want to give like the item/creature's name, size, materials, etc and then compile all their creations into their own set of RAWs so people can easily customize every already moddable aspect of the game without even knowing how to mod RAWs directly.

I'll have to admit in being confused as to how you can create what you are saying you want to create without it also being "a text editor at it's core."  That being said...


There is a file in the Raw Explorer (\RawExplorer-Beta-11\Data\TokenDefinitions.xml) which lists all of the tokens and which tokens they can appear on, in addition to what data type the tokens are (caution, I don't think it's 100% correct).  It should be able to answer most all of your questions, at least well enough to get an alpha version of your program out.

Two things I'd like to bring up before you get too far.  First, I think there's be a tendency to over-use xml in our modding configuration files.  We forget that Toady often adds tokens, etc, and our tools need to continue to live on long after we've moved on.  The people who will be adjusting these configuration files will be people more used to Toady's square bracket delimited files, not XML.  Second, (which builds on the first) is that the GUI needs to be flexible enough that someone can add a new token or object type to a configuration file and it appear in the application.

I hesitate to post these two 0.0.2 files as they are very, very rough and what I'm going to clean up next, but here is what i call my "dataset_0_34_11.txt", it is the configuration file I use to build the dataset (tables, columns, relations) etc that the 34.11 raw files would be loaded into:
Spoiler (click to show/hide)

The first thing I'd want anyone to take away from this is the files look exactly like what modders are used to, just tokens they may be unfamiliar with.  However, with only one table (the Files table) being hard-coded in the application it would be a fairly simple task for anyone used to editing DF raws to add additional tables and relations.  You can even see how I've maintained the same structure with the name being the first line and starting with an [OBJECT:?] token.  This allows the exact same class that reads a raw file to read in my dataset configuration for me.  (I should put a note here, I'm 99.99% sure that if you added a new token to BradUffner's Raw Explorer it would automatically appear as an option without him having to change any internal code.)

The second thing I'd want anyone to take away from this is that what you see in the screen shots in my 'teaser' thread are auto-generated from the data set.  The only thing not dynamically generated is the form, the menustrip, and the tabcontrol.  All of the tabpages, datagridviews, and datagridcolumns are created based on the datasets file above.  (Again, I should note that BradUffner's Raw Explorer probably does this two, it's just his project is more tree-view oriented and mine is more datagridview oriented).


The next file is what I call my "datamapping_0_34_11.txt", it is the file used to map the values being read into through a raw file to the dataset created above.  It is primarily inspired by the TokenDefinitions.xml but adjusted to fit the design philosophy I'm trying out.  I'll list it here as a spoiler, but you may not want to concentrate on it too much.
Spoiler (click to show/hide)

The way that it differs from the file it's insipired by are two.  First, it's not XML, it's formatted like a DF raw file.  Two, it has a SECTION for each object type (LANGUAGE, COLOR_DESCRIPTOR).  One of the things I'm going to look at in the refactoring for 0.0.3 is - if data types are on this file, can I not make the dataset from this file.  If I can not, is it double-work to maintain the data type in two places?

Cheers
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Help Me Help You.
« Reply #4 on: December 24, 2012, 03:28:46 pm »

ptw

(I'm not going to use it because raw modding for me is definitely not time-consuming, but I'm always willing to help)
« Last Edit: December 24, 2012, 03:30:22 pm by Putnam »
Logged

Bloax

  • Bay Watcher
    • View Profile
Re: Help Me Help You.
« Reply #5 on: December 24, 2012, 04:05:53 pm »

I know you're starting on this, but it'd be classy if you could have an explanation display if you hold your mouse over a field. (Can't think of any examples. :s)

Because like, Velocity Multiplier is actually in the thousandth precision mark, i.e. 2500 is actually 2.5x, 3452 is 3.452.
And that would be some good info to just have to refer to.

You could also have (?) icons to the right of the fields, or even both. Though those should probably explain what that field affects.
Logged

oh_no
Re: Help Me Help You.
« Reply #6 on: December 25, 2012, 04:53:24 am »

I know you're starting on this, but it'd be classy if you could have an explanation display if you hold your mouse over a field. (Can't think of any examples. :s)

Because like, Velocity Multiplier is actually in the thousandth precision mark, i.e. 2500 is actually 2.5x, 3452 is 3.452.
And that would be some good info to just have to refer to.

You could also have (?) icons to the right of the fields, or even both. Though those should probably explain what that field affects.

I will definitely be using tool tips to help explain everything. I'll probably be changing most of the labels themselves just to better explain certain things. Right now, everything is just bare bones so I can easily keep track of what's what.

Quote
I'll have to admit in being confused as to how you can create what you are saying you want to create without it also being "a text editor at it's core."  That being said...

All the tools that claim to do what I am doing, don't. Every one I've seen doesn't generate any RAW data; they just highlight/colorize the syntax and you still end up manually writing out most of the RAW file yourself. My tool will allow every single part of RAW file creation to be done with a few clicks and user input. Fill out the form, press a button, BAM; new item. People who don't want to take the time to learn all the tokens and syntax of a RAW should be able to use it without any advanced explanation.
« Last Edit: December 25, 2012, 04:58:28 am by TheCoolSideofthePIllow »
Logged

MiamiBryce

  • Bay Watcher
    • View Profile
Re: Help Me Help You.
« Reply #7 on: December 25, 2012, 03:12:42 pm »

Okay, I understand where you're coming from.  I realize I have a tendency to be long-winded and over detailed, so I have to ask, did I successfully answer your question?  (As an addendum I do believe that the TokenDefinitions.xml from the Raw Explorer includes tooltip type of text).

I have a question about how your tool would work.  Normally if a dabbling modder decided he wanted to add a new weapon, he'd have to use a text editor to add the item at the end of the items_weapons.txt then add the WEAPON token to the entity he wanted to use it.  I see by the screenshot you posted a user can design a weapon, but then what?  Does it put it in the items_weapons.txt for them?  Does it let them pick which entities should have access to it and automatically update those entities with the correct WEAPON tag?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Help Me Help You.
« Reply #8 on: December 25, 2012, 07:35:02 pm »

(you could always put it in a new file)
Re: Help Me Help You.
« Reply #9 on: December 26, 2012, 11:45:28 am »

Okay, I understand where you're coming from.  I realize I have a tendency to be long-winded and over detailed, so I have to ask, did I successfully answer your question?  (As an addendum I do believe that the TokenDefinitions.xml from the Raw Explorer includes tooltip type of text).

I have a question about how your tool would work.  Normally if a dabbling modder decided he wanted to add a new weapon, he'd have to use a text editor to add the item at the end of the items_weapons.txt then add the WEAPON token to the entity he wanted to use it.  I see by the screenshot you posted a user can design a weapon, but then what?  Does it put it in the items_weapons.txt for them?  Does it let them pick which entities should have access to it and automatically update those entities with the correct WEAPON tag?

Like the poster above says: You can create a new file. It also isn't that hard to add new lines to an existing text file.

It will work like this, in steps:

1) User fills out the forms on the tab for what they want to make. Weapons use the weapons tab, armor the armor tab and so on.

2) After filling out the form, there will be 2 buttons: Save and Export. Save will save the form data for later use and allow the user to continue making items.

3) After the user has created all the items they want to add, they then click Export and it will create a new set of files to use or optionally add them to existing RAWs where applicable.

Eventually, I will also allow importing of RAWs and just allow total editing of all the existing items without directly editing the RAWs in notepad.

When editing/creating a new ENTITY, all your created items will be in the list of tags you can check off to add to that entity. I haven't gotten to entity creation itself yet, however, since it has the most variables, many of which come from the other sets of data (items, creatures, etc).
« Last Edit: December 26, 2012, 11:47:29 am by TheCoolSideofthePIllow »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Help Me Help You.
« Reply #10 on: December 26, 2012, 01:55:43 pm »

Creatures also have those ridiculous variables, btw, mostly in terms of materials, tissues and body.

I would probably develop in this order, considering dependencies:

1. Items
2. Materials
3. Buildings
4. Reactions
5. Descriptors
6. Plants
7. Body
8. Tissues
9. Body detail plans
10. Creatures
11. Entities
12. Creature variations
Re: Help Me Help You.
« Reply #11 on: December 26, 2012, 08:34:32 pm »

Creatures also have those ridiculous variables, btw, mostly in terms of materials, tissues and body.

I would probably develop in this order, considering dependencies:

1. Items
2. Materials
3. Buildings
4. Reactions
5. Descriptors
6. Plants
7. Body
8. Tissues
9. Body detail plans
10. Creatures
11. Entities
12. Creature variations

I assume this is in order of the items with the most variables dependent on other items? It looks like it from what I've found so far looking into what I need. This is probably how I will construct my workflow :D
Logged