User Tools

Site Tools


moddingfaq

Modding FAQ

Frequently Asked Questions to Demise of Nations Modding.

How do I restrict troops, e.g. "War Elephants" to only Carthage?

1. module.config: create a new research item. Set the option “buildable” to 'n' to prevent anyone for being able to acquire that trait.

invent(57): Trait_Carthage
  desc: Carthaginian cultural trait.
  type: ... buildable=n ...
  view: ...
invent-end!

2. module.config: assign that trait to Carthage only:

nation(2): Carthage ...
  type: invents=57 ...
  ...
nation-end!

3. module.config: last but not least, restrict the war elephants to be buildable only if that trait is present:

schema(20): War_Elephants ...
  spec: 
    ...
    gen: ... needsInvents=57 ...
    ...
  spec-end!
  ...
schema-end!

moddingfaq.txt · Last modified: 2015-05-24 00:26 by noblemaster