Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Creature Tokens  (Read 1571 times)

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Creature Tokens
« on: June 17, 2010, 10:06:09 am »

Heya, I decided to start work on a utility that would make creature modding (and possibly plants, too, at a later time) a much more newbie-friendly affair.

The unfortunate thing is that the wiki page is severely lacking explanation of what things do.

So here I'll put up some development progress and stuff, but I'll primarily be asking questions about some of the tokens.


I'm going down the list alphabetically, so here's what I've got after my start.

How exactly are [ALL_ACTIVE], [DIURNAL], [NOCTURNAL], and [CREPUSCULAR] related to each other?
What is the usage of [ALTTILE]? Wiki says it has no arguments and that it's related to [TILE], but there is no [TILE] token on the list and it puzzles me that such a token wouldn't have any arguments.

So anyway, here's a screenshot of the interface so far. Nothing pretty or anything; there'll be a list of checkboxes to mess with booleans like [ALCOHOL_DEPENDANT], [PET_EXOTIC], and such, a nice list of textboxes, combos, and sliders for any tokens that have arguments, there'll be a list box to choose what creature to edit (or add/delete a creature) and it'll detect them all automatically when the user specifies the location of their raw\objects folder.

I know it's not much yet, but don't worry. It'll get there.



Be forewarned that I did start a utility of a somewhat similar nature for another game (dunno if anyone here knows anything about the SWBF2 MODL Chunk Editor that was going on at Gametoast, but that was mine) and I started to get fed up with the complete lack of correct documentation on the file format, so I basically gave up. Don't kill me if this project suffers a tragic fate. The more accurate my references, though, the less exceedingly annoying trial-and-error type of stuff I have to do. Please help me out!



NOTE: I am developing this application with cross-platform in mind.

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Creature Tokens
« Reply #1 on: June 17, 2010, 01:18:55 pm »

Nothing has changed visually at this point, so no screenshot, but I've got the code for reading the data from a raw\object\ directory in place.

I'm not even going to try to set up a materials/body structure system; instead, for this as well as unwavering support for future versions or DF, it adds all tags that the editor doesn't recognize to what will be an extra textbox where you can edit this unrecognized data by hand, or even simply type in tokens that you don't feel like hunting down in the interface.

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Creature Tokens
« Reply #2 on: June 17, 2010, 02:37:54 pm »

[ALL_ACTIVE][DIURNAL][NOCTURNAL][CREPUSCULAR]
Well for starters, I am not sure how day and night cycles work at all on DF, even through playing, but in case you didn't know...
All active is well... active all the time.
Diurnal is during "day" the creature is active
Nocturnal is during "night" the creature is active
Crepuscular is during "twilight" the creature is active
There is also...
MATUTINAL and VESPERTINE
Matutinal is during "dawn" the creature is active
Vespertine is during "evening" the creature is active

How exactly these come into play, I'm not quite to sure. I would assume that it is around that time that the creature would be around the map and do stuff. Someone who's done testing with this might be able to tell you more. I have however noticed no difference in putting it on dwarfs.

[ALTTILE] or when in use [ALTTILE:'&']
Dwarf has [CREATURE_TILE:1]

So if a dwarf was to be shown with alttile as well I would assume it would flash between that... dwarf tile and the & in this case.
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Creature Tokens
« Reply #3 on: June 17, 2010, 02:48:11 pm »

Since adventure mode has a day and night cycle, I imagine those time-related tags would effect when creatures will ambush you. I doubt they have an effect in fortress mode.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Creature Tokens
« Reply #4 on: June 17, 2010, 02:51:12 pm »

I haven't really ever played adventure mode, so that'd explain a lot.

Yeah, I think zero effect in fort mode.
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Creature Tokens
« Reply #5 on: June 17, 2010, 03:47:45 pm »

Awesome, thanks for the help.

At the moment I'm trying to figure out what's preventing the file reading function from being called.

I'll put up a screenshot when I get it working just to show something. When it works, it should populate my little list with a load of creature names that it read from all the raws.

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Creature Tokens
« Reply #6 on: June 17, 2010, 03:50:47 pm »

Just a heads up, I have a list of tons of tokens in my guide (see sig, forum one)

I also have a list of all the vanilla creatures that are moddable/show up in the raws.
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Creature Tokens
« Reply #7 on: June 17, 2010, 06:01:23 pm »

Hm, reading a file is taking crazy long right now. I dunno why, gotta find out. It's taking 5 minutes to read just the first file in my raws folder. (56 kb) And it doesn't even have any creature data in it that it needs to try and process.

EDIT: Well, I put in something that makes it run in an acceptable amount of time, but I'm still not satisfied. Such simple parsing has no excuse to be taking so long.
« Last Edit: June 17, 2010, 06:04:59 pm by madk »
Logged

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Creature Tokens
« Reply #8 on: June 17, 2010, 06:09:05 pm »

I'm of no help there dude... haha. Hope you get done whatever it is you wanna do.
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Creature Tokens
« Reply #9 on: June 17, 2010, 06:25:53 pm »

Dang, for some reason, appending a character to the end of a string in an array takes a heck of a lot longer than doing the same operation on a string that's not a member of an array. In short, problem solved.

But I've got another problem: somehow, my parser only found 2 creatures in all the raws. Additionally, it didn't get their names or ALCOHOL_DEPENDANT tokens like it was supposed to. The fact that it found 2 as opposed to none, all, or nearly all, is very frightening.



The interface is just placeholder right now. It will be much better organized than this when all is accounted for :P

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Creature Tokens
« Reply #10 on: June 17, 2010, 06:28:07 pm »

Was it looking for creatures with alcohol dependent? Cause I know there is near none of those. Dwarf being the only vanilla one I can think of.

I don't know any creatures using ALTTILE as well.
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Creature Tokens
« Reply #11 on: June 17, 2010, 06:31:04 pm »

Purring maggots use alttile (they alternate between { and }), I don't think there are any others. I don't know how your little doohickey is set up, but I'm fairly sure there's only two creatures that either have [ALCOHOL_DEPENDANT] or [ALTTILE:], which might explain the results.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Creature Tokens
« Reply #12 on: June 17, 2010, 07:24:16 pm »

Right now how it works is when it sees "CREATURE" on any line in the file, it searches all the tokens to find out if one of them is a [OBJECT:CREATURE] token. If it is, it reads all the tags until it encounters the next OBJECT token, then basically goes back to step 1 from here. I haven't even got it set to be reading ALITTILE yet, currently it's just there to keep the interface a bit less bland.

Because I can,

Spoiler (click to show/hide)

Shaostoul

  • Bay Watcher
  • Expanding your universe.
    • View Profile
    • Shaostoul Patreon
Re: Creature Tokens
« Reply #13 on: June 17, 2010, 07:36:39 pm »

What if you made it search for...

[CREATURE:DWARF] for example

Could you make it looks for [CREATURE:XXX]

X being variable. (different creature...)

Then get name from the variable?
Logged
I mod games and educate others how to do so as well, if you'd like to learn join my Discord and you can join a bunch of like minded individuals. (Presently modding Space Engineers and No Man's Sky.)

Looking into modding DF? This forum guide & wiki guide may still be a good start!

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Creature Tokens
« Reply #14 on: June 17, 2010, 09:41:29 pm »

For the record, because of the way the raw parser looks for files (creature objects, for example, have to be in a file with a name like creature_xxx.txt), you're never going to have more than one [OBJECT:xxx] in a file, so you don't have to make it stop when it comes to a different kind of object.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.
Pages: [1] 2