Modding Dune Legacy
It is currently possible to change a number of values for units and structures as well as the tech tree.
How to mod unit/structure values?
Inside the Dune Legacy settings directory (see FAQ) is a folder called data. Dune Legacy will look for a file <settings-directory>/data/ObjectData.ini and read various unit/structure parameters from there. A skeleton file containing the official values to base further changes upon can be downloaded from here.
What can be changed?
For each structure/unit there is one section in ObjectData.ini containing all the properties of that particular structure/unit. Additionally there are two sections default structure and default unit containing fallback values. Given a property name prop the following keys are checked for existence in order when determining prop's value for unit unit1 of house h:
- unit1/prop(h)
- unit1/prop
- default unit/prop
The following properties are available for structures, units or both:
- Enabled: Is this unit/structure available (starting units/structures, construction yard, factory, starport, reinforcement)?
- HitPoints: What is the maximum health of this structure/unit?
- Price: How much does this structure/unit cost?
- Power: How much power do this structure require. Wind traps have negative values because they produce power?
- ViewRange: How much terrain is revealed when this structure is placed/this unit is moved?
- Capacity: How much spice can this structure contain?
- WeaponDamage: How much damage does the weapon of this unit/turret have?
- WeaponRange: How far can this unit/turret shoot?
- WeaponReloadTime: How many frames does it take to reload the weapon?
- MaxSpeed: How fast can this unit move?
- TurnSpeed: How fast can this unit/turret turn around?
- BuildTime: How much time does the production of this structure/unit take?
- InfSpawnProp: What is the probability (in percent) that a infantry soldier is spawn on destruction?
- Builder: In what structure can this structure/unit be built in? One of Invalid, Construction Yard, Barracks, WOR, Light Factory, Heavy Factory, Hightech Factory
- TechLevel: What is the minimum required tech level (=mission) for this structure/unit to be available?
- UpgradeLevel: What upgrade level (0,1,2,...) must the builder be in to make this structure/unit available?
- Prerequisite: What other structures have to exist for this structure/unit to be available?
It depends on the unit/structure if a value is ignored. e.g an unarmed unit will ignore the value of WeaponRange.
What about multiplayer games
For multiplayer games every player has to have the same object values. Otherwise the game will get asynchronous.