Bay 12 Games Forum

Please login or register.

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

Author Topic: Modding Tool: Raw Explorer - Beta 13 - Updated 4/25/2013 - (It's BACK!)  (Read 166078 times)

Reudh

  • Bay Watcher
  • Perge scelus mihi diem perficias.
    • View Profile

I believe that the tab breaks are purely so it's easier for us to read, and has no real effect on the code; not unlike the way a lot of programming languages are written.
« Last Edit: April 22, 2012, 05:08:01 am by Reudh »
Logged

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

Ok, I need some more help from an experienced creature modder with understanding some of the tokens so that I can come up with a syntax for defining them.

I'm looking at tokens like "TENDONS" and "BLOOD".  The wiki ways they have 2 arguments, a material and a healing rate, but all instances of them I've seen in the raws have 3 arguments with the 1st always being "LOCAL_CREATURE_MAT".  Is the wiki just wrong about the arguments, or does the local_creature_mat act as a flag in some way and combine with the 2nd argument to say "draw this material from the local object", and get treated as a single argument by the game?  Can there be things in there other than LOCAL_CREATURE_MAT?
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

Also I want to make sure that I understand BODY_DETAIL_PLAN correctly.  It's always the objectId of something from the body_detail_plan, followed by a variable number of arguments?  Where are the values of those arguments drawn from (materials?), ie, when I populate the list box of available choices for those arguments, what should they be?
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

Windpoison

  • Bay Watcher
    • View Profile

Ok, I need some more help from an experienced creature modder with understanding some of the tokens so that I can come up with a syntax for defining them.

I'm looking at tokens like "TENDONS" and "BLOOD".  The wiki ways they have 2 arguments, a material and a healing rate, but all instances of them I've seen in the raws have 3 arguments with the 1st always being "LOCAL_CREATURE_MAT".  Is the wiki just wrong about the arguments, or does the local_creature_mat act as a flag in some way and combine with the 2nd argument to say "draw this material from the local object", and get treated as a single argument by the game?  Can there be things in there other than LOCAL_CREATURE_MAT?
Exactly, LOCAL_CREATURE_MAT is part of the material.
So LOCAL_CREATURE_MAT:UBERFLESH is treated as one argument, like INORGANIC:IRON would be.
Logged

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

Exactly, LOCAL_CREATURE_MAT is part of the material.
So LOCAL_CREATURE_MAT:UBERFLESH is treated as one argument, like INORGANIC:IRON would be.

Well... That makes things more interesting.  I'm not sure how I'm going to handle that.  It's definitely going to involve a rewrite of the argument parser since splitting of the argument string in to an array delimited by ":" and using the index won't cut it any more.  Well, that's a problem to be solved another day.
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

It's amazing what you discover when you accidentally hit a key combination sometimes....  I thought I had notepad focused and hit ctrl-F, but the token grid in raw explorer was focused instead. It popped up a little search panel that I never knew was built in to the grid!  So, yeah, new feature! yay!
Spoiler (click to show/hide)
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

Beta 2 has been released! Download is in the first post.
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

This version has additional syntax for some of the more advanced definitions.
the BODY_DETAIL_PLAN token for example, is defined as having 1 argument that pulls it's values from the body_Detail_plan objects.  However the usage it's self is defined as being a list args type (meaning it has an unfixed number of arguments), with typedata "[lookup:tissue:~self~]".  This means that every argument after the 1st(fixed) argument is a lookup of a tissues defined on the current object. This is what lets BODY_DETAIL_PLAN look like "VERTEBRATE_TISSUE_LAYERS:SKIN:FAT:MUSCLE:BONE:CARTILAGE".

*UPDATE*
Finally managed to find the documentation on the "material" argument type that's been giving me so many nightmares here http://dwarffortresswiki.org/index.php/DF2012:Material_token.  Ok... I think I can make this happen...
« Last Edit: April 23, 2012, 12:03:14 am by BradUffner »
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

I think I have a solution worked out that will properly handle the Material type arguments for tokens.  It's going to involve quite a bit of refactoring and rewriting to make it all work together, so the next release will probably be a week or more away.  I have branched the code so that I can make bug fixes to the current Beta 2 version without issue as I work on the next version.  This is going to add a new argument type to the definition editor (material).

Does anyone know of any other tokens that act the same way as materials do, as far as them being made up of a smaller number of "sub tokens"?

*UPDATE*
It looks like "item" types behave almost the same way http://dwarffortresswiki.org/index.php/DF2012:Item_token.  My plan should cover those as well.  I just need to make a new argument type for each kind of token argument that can do this.
« Last Edit: April 23, 2012, 03:18:13 pm by BradUffner »
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

Wow, that was easier than I thought!
Spoiler (click to show/hide)
There are still several kinks to work out, but it's not looking like it will be too hard to do after all.

The hardest part was parsing the token and correctly interpreting the dynamic arguments.  Now that that's out of the way I can build a really nice editor for it.
« Last Edit: April 23, 2012, 04:23:32 pm by BradUffner »
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

Alexander86

  • Bay Watcher
    • View Profile

This is awesome! Great work!
Logged

inEQUALITY

  • Bay Watcher
  • Living On the Mirror's Edge
    • View Profile

I have been meaning to jump back into working on the mod I had promised some people forever ago, but keep getting turned of by the sheer unfriendliness of even something like Notepad++ (<ind you, the first mod I ever started with I made using plain old Notepad. Never. Again.) so this is a greatly appreciated tool. Thanks for your work in doing this.  :D
Logged
Quote from: Carl Sagan
It does no harm to the romance of the sunset to know a little bit about it.
If the magma cannon doesn't count, they aren't proper scientists.

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio

Fun with Editors!
Spoiler (click to show/hide)


More options:
Spoiler (click to show/hide)
Spoiler (click to show/hide)

It's smart enough to know that if you are editing a Creature you can't use "LOCAL_PLANT_MAT", and no "LOCAL_CREATURE_MAT" when editing plants.  The reaction materials are also only available when editing a reaction object.
« Last Edit: April 24, 2012, 03:54:46 am by BradUffner »
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

BradUffner

  • Bay Watcher
  • BradUffner has begun a mysterious construction.
    • View Profile
    • Gump Studio
Re: Modding Tool: Raw Explorer (Beta 3 - Updated 4/24/2012 - Materials!)
« Reply #193 on: April 24, 2012, 05:32:58 pm »

Beta 3 is now available in the first post!
I managed to get the material token working far easier than I was expecting, which is the main focus of this version.
Many other bugs have been cleaned up as well.  Raw Explorer should no longer crash when it encounters an undefined token (sorry about that).

The Material picker is still a little wobbly, it will sometimes allow you to select invalid combinations depending on the order you choose them.  If you always go from top to bottom it should be ok.  This will improve as time goes on.  It also doesn't support materials in reactions that use "GET_MATERIAL_FROM_REAGENT" just yet, that'll be in the next version.  Support for item tokens is coming next.
Logged
Raw Explorer - Easily navigate and edit your raw files via GUI! - http://www.bay12forums.com/smf/index.php?topic=103360.0
Tile Genie - Merge multiple tilesets - http://www.bay12forums.com/smf/index.php?topic=77724.0

Windpoison

  • Bay Watcher
    • View Profile
Re: Modding Tool: Raw Explorer (Beta 3 - Updated 4/24/2012 - Materials!)
« Reply #194 on: April 25, 2012, 04:00:27 pm »

You are awesome! Making a program to help with modding, with little modding experience yourself! Urist McWindpoison salutes you.
Logged
Pages: 1 ... 11 12 [13] 14 15 ... 37