Unit Structure Data

User avatar
Alexandra
Posts: 21
Joined: Sun Jun 19, 2011 12:22 pm

Re: Unit Structure Data

Postby Alexandra » Wed Jun 29, 2011 10:25 am

Yeah I have been thinking about an more classic system with object types.
I'll attach the file when im done, and I guess it's the easiest way.

Each Object/Unit, whatever it is has always an required header:
-----------------------------------------------------------------------------------
UNIT_ID = 1
INT_NAME_LENGTH = 5 (If your data files will be in text and your game can understand all data without size pointers you can remove the length properties)
INT_NAME = VILLM
GAME_NAME_LENGTH = 15
GAME_NAME = Villager (Male)
-----------------------------------------------------------------------------------
All objects will share this header nomatter what type as its required by the game to read the entry from
But here comes the system I talk about:
-----------------------------------------------------------------------------------
OBJECT_TYPE = HUMANOID
-----------------------------------------------------------------------------------
This will declare the type of object, now I will categorize all data tags I shown in the first file belonging to a humanoid character and leaving out all things that have not todo with it, examples: sheep conversion, placement terrain.

The object types I have in mind:
-----------------------------------------------------------------------------------
1 = HUMANOID
2 = BUILDING
3 = SIEGE_WEAPON
4 = ANIMAL
5 = RESOURCE
6 = PROJECTILE
7 = CORPSE
8 = OBJECT_COMPLICATED (This will have more stats assigned, relics are an example of complicated objects, they can be clicked, etc.)
9 = OBJECT_SIMPLE (These are simple unclickable objects with far less stats, like rocks, flowers, ruins, etc)
10 = FLAG (Some special stats like Line of sight, player ownership, etc.)
-----------------------------------------------------------------------------------
I will categorize all data tags belonging to each object type.

User avatar
Alexandra
Posts: 21
Joined: Sun Jun 19, 2011 12:22 pm

Re: Unit Structure Data

Postby Alexandra » Thu Jun 30, 2011 12:58 am

I have finished my work on all Object types.
I have added an zipped excel file that shows columns with all properties belonging to each object type

So, the unit type indicator will choose what list to use you can make the unit with.
Ofcourse there can also be an option with custom that the object only have the properties that have been assigned to it.
An empty object would result in a - no name - slot with no further data atall

American conquest works like this too, you have to build up each game object with properties you want to use :)

Edit:
Actually I think this can be the best way of all you can get :)
Each object is set up with the things you specify, this will be the least data consuming and most fast option if this is possible.
For example, if you don't set a garrison capacity number, the game won't mind it, this will save aload of data and time, if you think like that, you realize that you don't have to declare over and over to the game that garrison capacity is 0
Attachments
Unit Types.zip
(6.45 KiB) Downloaded 24 times
Last edited by Alexandra on Thu Jun 30, 2011 12:06 am, edited 2 times in total.

User avatar
blejdaq
Posts: 46
Joined: Sat Jun 18, 2011 9:33 pm

Re: Unit Structure Data

Postby blejdaq » Thu Jun 30, 2011 3:44 am

Exhausting but good. I didn't think of many of the properties whose are required. It has to be adjusted and mainly simplified (for example the selection shape properties collection) but it's good. Can you modify it be Object Oriented compliant? That means every property can be mentioned only once (maybe twice if really needed). For example: there are many occurences of the properties CREATION_STRING or TOOLTIP_ID - move them to some ancestor category and make every object that needs them inherit from this category.

User avatar
Alexandra
Posts: 21
Joined: Sun Jun 19, 2011 12:22 pm

Re: Unit Structure Data

Postby Alexandra » Thu Jun 30, 2011 9:53 am

First wanted to know if the last option would be possible to only assign statistics to an object if theyre needed?
This will eliminate alot of data from each object and you can decide how simple or complicated it is.

Btw ill do some test in my excel file with the unit types columns, I will sort everything alphabetically and will fish out all matches

User avatar
blejdaq
Posts: 46
Joined: Sat Jun 18, 2011 9:33 pm

Re: Unit Structure Data

Postby blejdaq » Thu Jun 30, 2011 2:14 pm

It's required to only assign needed properties to an object (or rather to a class of an object). I will make an example too because i think there are some misunderstandings.

User avatar
Alexandra
Posts: 21
Joined: Sun Jun 19, 2011 12:22 pm

Re: Unit Structure Data

Postby Alexandra » Thu Jun 30, 2011 10:51 pm

Well this is my version in my mind of what I mean, I'll take a Tree as example:
This object will only have the things assigned to it that are needed:

UNIT_ID = TREE_1
GAME_NAME = Forest Tree
TOOLTIP_ID = Forest Tree
UNIT_CLASS = TREE
GRAPHIC_STAND = TREE_1_STAND
GRAPHIC_DIE = TREE_FALL
UNIT_SIZE_HEIGHT = 0.300
UNIT_SIZE_WIDTH = 0.300
EDITOR_SIZE_HEIGHT = 0.300
EDITOR_SIZE_WIDTH = 0.300
SELECTION_SHAPE_USED = YES
SELECTION_SHAPE_HEIGHT = 0.300
SELECTION_SHAPE_WIDTH = 0.300
SELECTION_SHAPE_TYPE = 0
SELECTION_SHAPE_COLOR = 255
HP_BAR_HEIGHT = 1.500
SHOW_HP_BAR
ENABLE_UNIT_SELECTION
LIFE = 20
VISIBLE_ON_EXPLORED_AREA
DEATH_MODE = 1
ICON_ID = 1
MINIMAP_COLOR = 56
TERRAIN_RESTRICTION_TYPE = 8
DEATH_UNIT_ID = 2
RESOURCE_STORAGE_TYPES_AMOUNT = 1
RESOURCE_STORAGE_TYPE_1 = WOOD
RESOURCE_STORAGE_TYPE_1_AMOUNT = 100
RESOURCE_STORAGE_TYPE_1_DECAY = 0
RESOURCE_STORAGE_TYPE_1_MODE = 1

This will only assign the attributes nessesary and won't declare disabled attributes that won't be used anyways.

User avatar
blejdaq
Posts: 46
Joined: Sat Jun 18, 2011 9:33 pm

Re: Unit Structure Data

Postby blejdaq » Fri Jul 01, 2011 1:10 pm

So what would be the next step?
Last edited by blejdaq on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason:  

User avatar
blejdaq
Posts: 46
Joined: Sat Jun 18, 2011 9:33 pm

Re: Unit Structure Data

Postby blejdaq » Fri Jul 01, 2011 1:33 pm

Just for example some time ago i was coding simple villager and found out he can have one of 8 roles and in every role he can be in one of 9 modes (with exceptions) and every combination has its own graphics (although some graphics is reused between more combinations):

Image

So this adds two more realtime properties (role and mode).
Last edited by blejdaq on Fri Jul 01, 2011 1:35 pm, edited 1 time in total.


Return to “Engine”

Who is online

Users browsing this forum: No registered users and 1 guest

cron
„Muži nedovedou ocenit vlastní ženy. To přenechávají druhým.“ Oscar Wilde