Page 1 of 1

UnitName useless tag? (unit FBI file)

Posted: 18 Dec 2006, 13:35
by TradeMark
Where is UnitName used for?
Edit: .give uses unit filename.

So is it bad if i replace all unitname values with objectname value?

I need this information for my online mod editor program, please reply if you know something!

Posted: 18 Dec 2006, 14:00
by Argh
So far as I know, UnitName is useless. However... lemme check the source...

So far as my grep searches can find, this is not a variable used by Spring at all.

Posted: 18 Dec 2006, 14:04
by KDR_11k
Strange, I think a unit didn't work when the unitname tag didn't match the filename for me.

Posted: 18 Dec 2006, 14:17
by TradeMark
I found this from source:

\rts\Sim\Units\UnitDefHandler.cpp

Code: Select all

ud.name = tdfparser.SGetValueMSG("UNITINFO\\UnitName");
...
ud.armorType=damageArrayHandler->GetTypeFromName(ud.name);
?? :S

Does armors use unitname then?

Posted: 18 Dec 2006, 14:22
by Nemo
armor.txt uses the unitname. I thought it was useless a few months back, and didn't bother changing it from the template fbi I was using for a few of my infantry. They were bulletproof because they recieved the default damage that applied to armor. So yes, unitname is used.


I could be wrong, but I think that the .cob files also have to use the unitname..? They might just match the name of the fbi file though.

Posted: 18 Dec 2006, 14:32
by Argh
Ah. So much for my grep skills :roll: I think I'd better go to sleep now :-)

Posted: 18 Dec 2006, 14:35
by AF
I'd make sure the unit fbi filename is the same as this tag as AIs rely on them being the same a lot of the time.

Posted: 18 Dec 2006, 14:45
by TradeMark
I tested now, and .give command uses unit FILENAMES !!

Jesus, this is a MESS...

So... armors uses unitname, .give and scripts uses filename, models uses objectname... :lol:

Posted: 18 Dec 2006, 14:51
by Argh
Welcome to Spring, the land of inconsistent code and combinations of same being used for very specific purposes ;)

Posted: 18 Dec 2006, 14:56
by TradeMark
So when the new RTS engine is ready? :|

Posted: 18 Dec 2006, 14:59
by Relative
TradeMark wrote:So when the new RTS engine is ready? :|
When it's done.

Posted: 18 Dec 2006, 14:59
by Argh
I dunno. Bug JC about it- he hasn't done anything here for awhile, so one assumes he is probably working on OSRTS now. Hopefully.

Posted: 18 Dec 2006, 15:03
by AF
You mean CE? (Command Engine)

Posted: 18 Dec 2006, 15:07
by Argh
Oh good, they picked a non-sucky name ;)

Posted: 18 Dec 2006, 16:49
by hawkki
OSRTS would have been better imho.

Commander engine would also have been cooler then command engine. Command engine reminds me of command prompt.

edit:man, after writing this post i had to re-read the thread topic a few times... we are a bit OT here :oops:

Posted: 18 Dec 2006, 21:05
by PauloMorfeo
Liik here, it is quite usefull for a start:
http://taspring.clan-sy.com/wiki/Units:FBI
UnitName

This is the internal name of your unit. ...

Posted: 18 Dec 2006, 23:08
by Fanger
so useless tag is not useless?