Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Keeping track of bodyparts and their names?  (Read 1050 times)

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Keeping track of bodyparts and their names?
« on: April 25, 2010, 06:00:16 am »

Is it just me that have a problem of keeping track of the names of body parts and all other stuff that is not currently in focus in the current file i have open. Specialy when you need to search for said name if it really exists...

Maybe I am just slow. To help myself I am working on writing up a program in C# that parse the object folder and extract all body part names into a list, later to be extended to contain more detailed data. Like hirarchical view of the bodyparts and their containts bps etc.

I am considering extending this to be a pregame validator that will give me a warning and file row.

But I am wondering is something like this already out there?
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Keeping track of bodyparts and their names?
« Reply #1 on: April 25, 2010, 06:45:18 am »

Do you mean the parts in the body_***.txt files? Honestly I just keep them in my memory, but this kind of program can be useful.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Keeping track of bodyparts and their names?
« Reply #2 on: April 25, 2010, 07:34:26 am »

Yeah. And in theory since you have a list of all the body parts, it wouldn't be hard to parse all creatures and report any bodypart that doesn't match up.

Or even body parts that are not used.
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Keeping track of bodyparts and their names?
« Reply #3 on: April 25, 2010, 07:38:21 am »

Quote
it wouldn't be hard to parse all creatures and report any bodypart that doesn't match
The game already does that (I mean errorlog.txt).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Keeping track of bodyparts and their names?
« Reply #4 on: April 25, 2010, 08:21:28 am »

Quote
it wouldn't be hard to parse all creatures and report any bodypart that doesn't match
The game already does that (I mean errorlog.txt).


Yeah but that isn't untill startup.
I just prefer to know the errors before I start what ever application is supposed to use my changes.
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Keeping track of bodyparts and their names?
« Reply #5 on: April 25, 2010, 08:24:46 am »

So it looks like crap and it doesnt really do anything except ordering all the bodyparts and creatures in Alphabetical order i each list.

It's a start but this will require some design desitions etc to actually make it somewhat useful. But atleast the data is being parsed and populated into each correct list.

Spoiler (click to show/hide)
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Keeping track of bodyparts and their names?
« Reply #6 on: April 25, 2010, 09:38:22 am »

Quote
Yeah but that isn't untill startup.
I just prefer to know the errors before I start what ever application is supposed to use my changes.
Oh that would be good. If you could include other stuff it would be good too. It's not easy to start the game every time just to see obvious errors.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Keeping track of bodyparts and their names?
« Reply #7 on: April 26, 2010, 01:40:09 am »

I am just learning how the tree view controler works. Then I will populate the tree view in best possible way.
I am not sure if i should keep the files in memory or just reparse everything.
Keeping files in memory would probably add more problems since people probably would edit the files and do a reparse.
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Keeping track of bodyparts and their names?
« Reply #8 on: April 27, 2010, 02:34:33 pm »

Damn there is a lot of data.
Wrote the program so it will parse and build the tree based on all files hirarchaly based on tabs.
This seems to be harder then it sounds, purely out of the sheer size of data. We talk about 1.7 mb of text, that might not sound much to some people but we talk 1.7miljon letters. but thats still 283 333 six letter words. I started it about 5 minutes ago and I am still waiting for the first break down so I can see logical errors in the parsing and populating of the tree.

I will break this down in to the possibility to parse selected files instead. Since most people when working with creatures won't need language info.

Edit:

Ok. Slight bug with pop push. It will only step forward, not backward. So all body parts are under each other rather then on one row.

Edit2:
Ok slightly better, still got some blank spaces in the Tree.
Spoiler (click to show/hide)
« Last Edit: April 27, 2010, 03:42:47 pm by TheSpaceMan »
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?