AI War 2:Xml Modding Modular Ships

From Arcen Wiki
Revision as of 19:55, 20 February 2022 by X4000Chris (talk | contribs)
Jump to navigation Jump to search

Modular ships have come to AI War 2 as of version 3.900! This guide is meant for folks who already understand how to design a non-modular unit, and it explains all the differences and new things that are specific to modular ships.

Overview

  • Modules are defined as an inseparable part of the ships that use them.
    • If you want to share a module between multiple ships, you'll either need to use copy_from (xml inheritance) or literally copy the xml.
  • Modules are all systems, but not all systems are modules.
  • There is a general limit of 254 systems, which also means 254 modules.
    • That said, if you're adding more than 50 or so, the player is probably going to have a bad time.
  • You can include non-module systems on a modular ship, and you can also default modules on at certain mark levels.
  • The ship will have a certain starting budget for modules (that can be zero), and a certain number of added module points per mark level (can also be zero, but both can't be zero for the ship to still be modular).
    • Players allocate these module points on modules of various costs, and that's how they customize their ship.

Defining Systems As Modules

Normally, when a unit is assigned a system, it will always be a part of that ship (or available on that ship for only certain mark levels, perhaps). These types of systems are still present of course, and you can have these on a modular ship, too. For any system that is just to be an inbuilt normal part of a modular ship... do everything normally! Skip anything module-related and it will just be a core part of the ship and not available on the modules select screen for players.

For any modules that you want to define, however, those will all be systems. And THOSE systems have a number of specific attributes that are required to correctly identify them as a module, as well as stating how the module will be used.

  • module_point_cost: This is the first key attribute that tells the entire system that "hey, I'm a module, I am normally not going to be a part of this ship unless a player selects me. And if the player selects me, this is how many module points it will cost."