New modinfo.tdf parameters

New modinfo.tdf parameters

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

New modinfo.tdf parameters

Post by trepan »

I'm adding the following parameters to the modinfo.tdf format: shortName & version

Code: Select all

  struct ModData {
    string name;        // ex:  Original Total Annihilation v2.3
    string shortName;   // ex:  OTA
    string version;     // ex:  v2.3
    string description; // ex:  Little units blowing up other little units
    ...
  };
The parameters are easily accessible to C++ through the modInfo
class, and are available to the lua scripts through the Game table
(Game.modShortName and Game.modVersion).
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

I'll also be adding the mutator tag (so as to allow
the shortname tag to remain the same across mutators).

(lua access via Game.modMutator)

example:

Code: Select all

[MOD]
{
  Name=Complete Annihilation r666 (Deployment);
  ShortName=ca;
  Version=r666;
  Mutator=deployment;
  Description=Complete Annihilation Deployment;

  ModType=1;

  NumDependencies=1;
  Depend0=ca-r666.sdz;
}
Last edited by trepan on 22 Aug 2007, 04:03, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ive also 2 new tags to add: game and shortgame.

game is the game the mod belongs to, so for XTA/AA/BA/CA/etc youd have:

Code: Select all

game=Total Annihilation;
shortgame=TA;
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Post by REVENGE »

Great stuff, thanks you guys.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

adding tags now.
Post Reply

Return to “Engine”