Storing unit data - My advice

Archived discussions related to Transport Empire. Read-only access only.

Moderator: Transport Empire Moderators

Locked
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Storing unit data - My advice

Post by GoneWacko »

Hmm well Since we are probably going to be using INI files I wanted to show you some stuff...

C&C Tiberian sun, Redalert 2 and Yuris revenge all use the same engine, and it works like this:

there is the Rules.INI file, which has a lot of variables about stuff that is activated, and it also has the 'unit' information and settings. for example:

snippet of the rules.ini file from Yuri's Revenge, Battle fortress information:
;Battle Fortress
[BFRT]
UIName=Name:Battlefortress This is the key that refers to code from the STRINGS file for Yuri's Revenge, where all text is located.
Name=Battle Fortress Name of the vehicle, obsolete for the game
Prerequisite=GAWEAP,GATECH Stuff that is needed to build it.
-------------- more stuff below
Primary=20mmRapid
Strength=600
Category=AFV
Armor=heavy
IsTilter=yes
TooBigToFitUnderBridge=true
TechLevel=10
Sight=6
Speed=4
PipScale=Passengers
Passengers=5
OpenTopped=yes;passengers can shoot out
SizeLimit=2;1 ;gs like half track and Blackhawk. Terror Drones and Brutes are allowed in.
CrateGoodie=yes
Crusher=yes
OmniCrusher=yes;gs can crush things not normally crushable
Owner=British,French,Germans,Americans,Alliance
Cost=2000
Soylent=2000
Points=50
ROT=5
IsSelectableCombatant=yes
AllowedToStartInMultiplayer=no
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=BattleFortressSelect
VoiceMove=BattleFortressMove
VoiceAttack=BattleFortressAttackCommand
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=BattleFortressMoveStart
EnterTransportSound=EnterTransport
LeaveTransportSound=ExitTransport
Maxdebris=3
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=CrusherAll;gs OmniCrush handles crushing tanks and such, this handles walls
ThreatPosed=40 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
DamageSmokeOffset=100, 100, 275
Weight=3.5
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ZFudgeColumn=8
ZFudgeTunnel=13
Size=6
OmniCrushResistant=yes; so Crusher can crush Crushable, OmniCrusher trumps Crushable=no, and then OmniCrushResistant trumps OmniCrusher
anyhow, we could use this kind of a setup as well! The game knows what's a unit and what is not by a list of all units. like this:

another snippet in the ini file:
[VehicleTypes]
1=AMCV;Allied MCV
2=HARV
3=APOC
4=HTNK
5=SAPC
6=CAR
7=BUS
8=WINI
9=PICK
10=MTNK
11=HORV
12=TRUCKA
13=TRUCKB
14=CARRIER
15=V3
16=ZEP
17=DRON
------- etc etc
Right... still on tracks??

Then there's the ART.INI file that has exactly the same names ( like [MCV] and [DRON]) but has information about what graphics to show and how to show them.
[MCV] ; Allied MCV
Cameo=MCVICON <-- the image for building the unit (in the sidebar)
Remapable=yes <-- are the shades of red to be changed into the player's color?
Voxel=yes <-- is this a voxel? (the way the engine generates it's units it by using a voxel engine...)
There's LOADS more like the place where the cannons should fire from, stuff like that...

hope you guys are still getting it :D
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Storing unit data - My advice

Post by orudge »

GoneWacko wrote:Hmm well Since we are probably going to be using INI files
Says who? That's currently undecided. XML would have several advantages, but is more complicated. INI files do have the advantage that they are very simple.
User avatar
rein
Traffic Manager
Traffic Manager
Posts: 132
Joined: 12 Jan 2003 17:16
Location: Poland - Czestochowa

Post by rein »

ehh... final word: ini files
if someone will have time to convert data loading to xml ones, no problem, but i'm not taking it on

disscusion xml vs. ini took place already, isn't it?
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

hmm... well... I thought It was going to be INI... But since i'm not around @ this forum much (I'm not feeling as exited about the project as you guys do), I don't know of all the discussions going on... I'm simply giving my advice about INI's...
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

I'm for INI ... I don't like XML ... :wink:
what are you looking at? it's a signature!
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

XML is great and powerfull stuff if you know how to get to work... I've read about XSL or something
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

I have to learn MatML ... :roll:
what are you looking at? it's a signature!
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

XML does have the advantage that there are already mechanisms in place for exporting XML data into a variety of formats. However it has the disadvantage that someone's gonna have to sit down one night and write a DTD. Not a particularly pleasant job.
Bugzilla available for use - PM for details.
User avatar
mp3Pro
Tycoon
Tycoon
Posts: 1392
Joined: 21 Jan 2003 14:49
Location: My own home, Sc
Contact:

Post by mp3Pro »

ini makes it easy for the end user to edit too
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

I think XML is just as easy. We could always write a small tutorial document when the game is going gold :)
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

maybe a poll ??? can you create a pool in this topic ?


EDITED: LOL ....I did it again :roll:
Last edited by SHADOW-XIII on 04 Mar 2003 15:08, edited 1 time in total.
what are you looking at? it's a signature!
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

p00l? WTF?
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

What about a poll? That is much easier voting!
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

oh a poll :mrgreen: I guess thats wat shadow meant :P
I don't think it's up to the forum members to decide, but the programmers should take a look @ what's the easiest thing to program...
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

Easiest to program isn't necessarily the best solution. I'd suggest we take a look at some XML parsers and see how hard it would be to implement it though.
User avatar
Hajo
Route Supervisor
Route Supervisor
Posts: 420
Joined: 17 Jan 2003 09:52

Post by Hajo »

orudge wrote:Easiest to program isn't necessarily the best solution. I'd suggest we take a look at some XML parsers and see how hard it would be to implement it though.
Volker evaluated the Xerces parser to be used for Simutrans' MakeObj tool and it seems to work fine.

But Xerces is a huge package, you might want to to find a smaller XML parser.

c.u.
Hajo
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

Ya know what? Let's make our own hahaha

Topic locked, Lua scripts will configure Transport Empire (14112006).
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
Locked

Return to “Transport Empire Development Archive”

Who is online

Users browsing this forum: No registered users and 20 guests