Bay 12 Games Forum

Please login or register.

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

Author Topic: Creature Moding GUI First File Preview  (Read 8312 times)

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Creature Moding GUI First File Preview
« on: July 19, 2008, 11:03:58 am »



Ok the first pre-alpha creature was chewed on and left for dead by the system today.
Here is the data i got, it's not sorted and some values was passed trough even if the shouldn't.

Without further ado. The broken Vanilla Alpha test Creature.
Spoiler (click to show/hide)

The things that made it trough that shouldn't seems to mostly be tags i havn't handled completly yet.

This isn't hooked up to the gui yet, but could just as well have been in theory.

Ps a better version already exist with better tabing.


A more cleaned up and fixed version.
Spoiler (click to show/hide)
« Last Edit: July 27, 2008, 04:33:12 pm by TheSpaceMan »
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Sean Mirrsen

  • Bay Watcher
  • Resident GM
    • View Profile
Re: Creature Moding GUI
« Reply #1 on: July 19, 2008, 11:12:00 am »

I'm doing (or trying to do) one in Visual Basic, integrated into ModBase. It's not just for creatures though. And it has to reshuffle the entire raws to save stuff.

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Creature Moding GUI
« Reply #2 on: July 19, 2008, 11:32:26 am »

Maybe we should exchange information, help each other out while still trying to achive our goals on diffrent fronts leaving more possibilites for a success? Sounds like a deal?

Ps.
I think you could reach your goals before me, VB got faster GUI access and filemanagment.
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

Dr. Melon

  • Bay Watcher
    • View Profile
Re: Creature Moding GUI
« Reply #3 on: July 19, 2008, 04:05:50 pm »

I would personally choose Visual C# 2008 Express; read/write times are very very fast, and it's very easy to do file operations; also, the built in GUI editors are handy for this sort of task.
Visual Basic is a good choice also, but I've found it difficult in the past to expand.
Logged

Cthulhu

  • Bay Watcher
  • A squid
    • View Profile
Re: Creature Moding GUI
« Reply #4 on: July 19, 2008, 05:20:09 pm »

If someone manages to make this, it will own.
Logged
Shoes...

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Creature Moding GUI
« Reply #5 on: July 19, 2008, 05:46:47 pm »

The problem is that i haven't worked that much with C# sure it is easy to use, can't deny it from a GUI standpoint. But there are some logical limatations (no use of pointers for intance) and rules that i am not used with from C++ as well as i haven't done any real Windows style file ops before. The problem with c++ on the other hand is geting my hands on a working GUI API since i don't want to fall in the MFC trap and even if i would choose MFC i can't use it at the moment in my express edition. Adding to this that QT, wxWidgets and some API on F really didn't like visual studio express 2008 made lots of things harder. Looks like i might have to write some win32 code on my own.
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: Creature Moding GUI
« Reply #6 on: July 19, 2008, 06:12:34 pm »

Is there a complete list of how the creatures are built? I know i could just watch the creature file but they just contains examples of creatures i am talking about:

What goes into a creature, what parts are esential for it to work, what parameters do they take, whitch once is non combinable and what dependencies are there (for instans bodyparts use a separate file for it's data?)

Is there a list like this?
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: Creature Moding GUI
« Reply #7 on: July 19, 2008, 06:26:30 pm »

The creature definitely should have:
[CREATURE:ID]
[NAME:] - the creature's name
[TILE:] - the tile which represents the creature
[COLOR:] - the color of the creature tile
[POPULATION_NUMBER:] - I guess it's important, it shows how many creatures can appear on a map per year
[PREFSTRING:] - is essential for the reference in dwarves' thoughts
[BODY:] is essential if you need it to have any type of body, it's skipped for vermin and they're considered as a "while part body" (I don't think it's destructable in ways other than with vermin_hunter or via bridge-smashing)
[MAXAGE:] if you want your creature not to be immortal, if you skip it it won't die of an old age
[ATTACK:] if you want your creature to have any type of attack
[SIZE:] - you definitely need it if it's not a vermin, I think if you skip it it's set to default 7 but you'd better define it
[BIOME:] if you want your creature to appear somewhere, FANCIFUL creatures in vanilla are used for reference only and lack this tag
[SWIMS_INNATE]/[SWIMS_LEARNED] if you want your creature to be able to swim in any way

Other tokens are definitely totally optionable.
http://www.dwarffortresswiki.net/index.php/Creature_tokens

P.S. Sorry for typos/bad grammar if there were any, it's 3:30 AM here and I'm drunk.

P.S. The df uses the following raw system: different types of things are in different files, and which thing is in the file is determined by [OBJECT:TYPE] in the beginning, where the TYPE shows what does this file contains.
As long as BODY type if different from CREATURE, it's described in separate files.
The BODY type should have

[BODY:ID] - id of the bodypart which is referenced in [BODY:ID1:ID2:ID3:<...>:IDX] in the creature file.
[BP:BPID:bpname]<[tokens]> - where BPID = just an id for the bodypart part (which can be referenced in attack*) and <[tokens]> is the list of tokens which describe the bodypart
http://www.dwarffortresswiki.net/index.php/Body_tokens

* The attack uses some bodypart of creature and it can be described in 2 ways:
[ATTACK:MAIN:BYTYPE:STANCE:kick:kicks:1:2:BLUDGEON]
or
[ATTACK:MAIN:BYTOKEN:RLA:punch:punches:1:2:BLUDGEON]

The 1st example means that for that attack any bodypart (random from existant) with [STANCE] token will be used.
The 2nd example means that for that attack the certain bodypart with id [BP:RLA:right lower arm] will be used
There's a description of attacks on the creature tokens page.
« Last Edit: July 19, 2008, 06:35:48 pm by Deon »
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: Creature Moding GUI
« Reply #8 on: July 21, 2008, 04:17:56 am »

Thank you. I now got all the unique variables in code. (263 diffrent attributes????)
It's going to take a while to make anything useful out of it that allows user input.
My first trial will be a mutant generator. That simply will take alla the current creatures and randomly mutate them with som value changes (makeing them non intelegent and violent while changing the attributes)

The ALTTILE said it will flash between the ordinary TILE and the ALTTILE?
That would make it possible to have a green m and the ordinary creature symbol (what it mutade from) being shown at the same time (well flashing between them)?
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: Creature Moding GUI
« Reply #9 on: July 21, 2008, 05:06:54 am »

Right. Just like "!" on dwarves with moods or dehydration/hunger symbol etc.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Sean Mirrsen

  • Bay Watcher
  • Resident GM
    • View Profile
Re: Creature Moding GUI
« Reply #10 on: July 21, 2008, 10:14:26 am »

Yes, ALTTILE will allow flashing at a constant rate (think of it as a two-frame anim), but only in one color.
« Last Edit: July 21, 2008, 10:18:41 am by Sean Mirrsen »
Logged

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: Creature Moding GUI
« Reply #11 on: July 21, 2008, 04:34:44 pm »

The problem is that i haven't worked that much with C# sure it is easy to use, can't deny it from a GUI standpoint. But there are some logical limatations (no use of pointers for intance) and rules that i am not used with from C++
I should hope you have a very good reason for using pointers in C++, as opposed to references or auto_ptr (both of which, while not the same, are far better than pointers; references in C++ are essentially the same as in C#, albeit not garbage collected.

Quote
as well as i haven't done any real Windows style file ops before.
There is no "Windows style of file ops" when it comes to .NET. You just use the File class.

Quote
The problem with c++ on the other hand is geting my hands on a working GUI API since i don't want to fall in the MFC trap and even if i would choose MFC i can't use it at the moment in my express edition. Adding to this that QT, wxWidgets and some API on F really didn't like visual studio express 2008 made lots of things harder.
Sounds like a bad reason to use C++ to me.

Quote
Looks like i might have to write some win32 code on my own.
Or make your life easier and just use .NET.

There is very little reason to use C++ outside of code that is necessarily highly performant. This would be a shockingly bad use of C++.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Creature Moding GUI
« Reply #12 on: July 22, 2008, 04:38:36 am »

The more interesting stuff:
Most of the bool values for a Vanilla creature are set now. I have a way to handle all attributes in a simular way even if they contain diffrent data. I have a friend hooking up the gui part of it, so I'll probably just make a lib that can be linked too that he'll use.

The less intresting stuff
I rather not spend the time learning the small differences between C# and C++ when i could use that time to get most of the core functionality done. You allways have the possibility to design your own system in C# if you like it, I won't try too stop you, rather i encurage you. The problem doesn't really lie in the gui or in the pointers or the speed. The real problem is building the layout of the code in a way that can handle the massive amount of data that one creature is (and later multiple creatures), without limiting the entire design to creatures in the long run. This could be done in any language, or script, or paper and pencil if the person is dedicated enough.

If you listen to all the "shouldn't do that" attitude on the internet then nothing would ever be done. I am sure you are a good programmer and you have some valid points. This isn't pointed specificly at you, I have just learned with time that if you spend less time listeing to people with "can't do" attitude you find ways to make stuff work your own way.

I rather do something well in a Language I fell that I know, then doing something that will turn out really bad becouse I am not sure about the fundamental rules in some of the areas. I would use C# more, if it just allowed an easy access to LIBs and DLLs made in C++, and this isn't what this thread should be about.
« Last Edit: July 22, 2008, 04:43:43 am by TheSpaceMan »
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?

ChJees

  • Bay Watcher
    • View Profile
Re: Creature Moding GUI
« Reply #13 on: July 22, 2008, 04:54:33 am »

C++
Code::Blocks
wxWidgets + Some fucking around to get it work
Boost Library

Then you are set to go :P. (I offically made apps that way.)
Logged

TheSpaceMan

  • Bay Watcher
    • View Profile
    • http://www.digital-lifeform.com
Re: Creature Moding GUI
« Reply #14 on: July 23, 2008, 05:36:43 am »

I'll strap a ICreature.h Interface into the mix, and will give access to the lib and interface when I am done with it, that way people could just link to it and create creatures in their code anyway they would like. Without haveing to do the binds and loading saveing part. Thats what I am considering at least.
Logged
Poking around with a DFParser.
Bodypart names, creatures names in one easily overviewable place.

Oh my new (old) picture?
Pages: [1] 2 3