Page 1 of 1

Allow storage FBI tags to override commander=1 auto-storage

Posted: 27 Aug 2007, 21:55
by Nemo
Essentially, I'd like for the storage FBI tags (EnergyStorage=x; MetalStorage=x;) to override the storage that a unit adds when it has the commander=1 tag. The issue right now is that you can not have multiple commander units without really screwing up resources, since every new unit with the commander=1 tag adds the default amount of storage (so if you started with 5k/5k resources, another commander adds another 5k/5k storage).

I don't mind if the commander tag stays tied to default storage (this needs to happen in order to maintain backwards compatibility), but it would be awesome of the storage tags overrode the storage that the commander tag includes.

As it stands right now, if you want to have multiple commanders as part of your game design, you either have to design around the massive storage that each new commander brings, or say "this game only works with default settings of 1k/1k" and give the commanders suitable NEGATIVE storage. Ugly workarounds ftl!

Posted: 27 Aug 2007, 22:24
by Guessmyname
'ello Nemo!

Also: Yes, this would be good. However, Epic Legion's game design requires this to not be the case, because in 'Legions, you can replace your original commander if he dies (happens often), and the storages returning with the new commander is rather important.

Posted: 27 Aug 2007, 22:37
by Nemo
You mean storage beyond the default 1k/1k or 10k/10k that you get already?

If so, yeah, there's a problem. If not, then like I said - just let the storage tags override - if you don't want them, don't use them.

Posted: 27 Aug 2007, 23:06
by Guessmyname
Good thinking!

Posted: 28 Aug 2007, 06:49
by KDR_11k
Have you tested this? IIRC the storage is only applied to the unit that's defined as your commander in the sidedata.tdf, independent of the commander tag. Hoever it would still be useful to force the com to have specific storage levels with the lobby defined resources being only the starting amount of actual resources or even totally ignored.

Re: Allow storage FBI tags to override commander=1 auto-stor

Posted: 28 Aug 2007, 09:53
by smoth
In gundam my commander has:
MetalStorage=1000000;
EnergyStorage=1000000;

The lobby sets the starting storage. It doesn't give fuck all what you have in the fbi.


As far as being able to build a commander unit that will not boost the storage, make a com that has less storage and make that one buildable.


Unless I am misunderstanding you nemo

Posted: 28 Aug 2007, 09:56
by AF
Lua gadgets can fix that by forcing a particular storage value.

Posted: 28 Aug 2007, 10:19
by smoth
AH HA! Forgot about that! lol, thanks af.

Posted: 28 Aug 2007, 12:18
by Tobi
Changed by: tvo
Changed at: Tue 28 Aug 2007 12:03:37
Branch: trunk
Revision: 4259

Changed files:

* trunk/rts/Game/GameSetup.cpp
* trunk/rts/Game/GameSetup.h
* trunk/rts/Game/StartScripts/CommanderScript.cpp
* trunk/rts/Sim/Units/UnitDefHandler.cpp

Comments:

* The TDF tags MetalStorage and EnergyStorage now
override the StartMetal and StartEnergy specified in
the startscript, instead of the other way round.

If MetalStorage or EnergyStorage isn't specified the
default values for commander units are StartMetal and
StartEnergy. For other units the default remains 0.
Note that this DOES break compatibility for mods that defined an insane value for MetalStorage/EnergyStorage like XTA (both storages are set to 20).

To restore (almost) the old behaviour, remove the MetalStorage and EnergyStorage tags from commander units.

This fixes a bug too: http://spring.clan-sy.com/mantis/view.php?id=611

Posted: 28 Aug 2007, 17:29
by Nemo
Awesome, thanks Tobi!

Posted: 28 Aug 2007, 20:15
by smoth
bwa ha ha! AWESOME!

Posted: 29 Aug 2007, 02:28
by Snipawolf
Danke sehr!

Posted: 29 Aug 2007, 20:32
by Dragon45
I guess deltasiege games are good for something
that was my bug report btw, gimme some credit B)