Difference between revisions of "AI War 2:Xml Modding Modular Ships"

From Arcen Wiki
Jump to navigation Jump to search
Line 11: Line 11:
 
* 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).
 
* 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.
 
** Players allocate these module points on modules of various costs, and that's how they customize their ship.
 +
 +
=== Defining A Unit As Modular, And Giving It A Budget ===
 +
 +
Before you can do anything with the systems themselves, and before a ship will show the Module button in the fleet management window, you need to mark a ship as modular.  To do that, you give it a module budget, either right off, or over time as mark levels increase. 
 +
 +
It is possible to design ships that don't become modular until some mark level by giving a zero or negative starting module budget, and then giving positive module points per mark level.  Let's not make it too complex on players, though.
 +
 +
* '''module_points_from_start''': This attribute goes on the modular unit, and says its starting budget.  It can be any number, and the scale does not matter.  If you want players to spend 50 points per module, and 100 for expensive ones, you can do that.  Generally I would say smaller numbers are easier to understand, however. 
 +
** Usually module costs of 1 for cheap, 2 for normal, 4 for expensive, and maybe something higher for Very Expensive (tm) seems like it will handle most cases.
 +
** You can use different module point scaling on different units, if you need to.  All of the modules are baked into the unit they are a part of, as is the module budget, so it's a self-contained formula per unit.
 +
 +
* '''module_points_added_per_mark_level''': This is optional, but lets players earn more module points as their unit marks up.  This is generally going to be highly desirable, but it's going to lead to extra power creep.  Each module is getting more powerful as the player levels up, AND they're getting more modules?  Make sure to account for that in your balance if that's how you do things.
 +
** An alternative to the power-creep approach is having everything be available from mark 1, and it's just a matter of which loadout is chosen.  This duplicates the concept of things like the Riot Control Cruiser from AI War Classic, whereas the "more module budget over time" is more like champions.
 +
 +
Anyhow, for the ship itself, this is literally all you need to add, so that's pretty simple.  The complexity comes in the systems.
  
 
=== Defining Systems As Modules ===
 
=== Defining Systems As Modules ===

Revision as of 19:02, 20 February 2022

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 A Unit As Modular, And Giving It A Budget

Before you can do anything with the systems themselves, and before a ship will show the Module button in the fleet management window, you need to mark a ship as modular. To do that, you give it a module budget, either right off, or over time as mark levels increase.

It is possible to design ships that don't become modular until some mark level by giving a zero or negative starting module budget, and then giving positive module points per mark level. Let's not make it too complex on players, though.

  • module_points_from_start: This attribute goes on the modular unit, and says its starting budget. It can be any number, and the scale does not matter. If you want players to spend 50 points per module, and 100 for expensive ones, you can do that. Generally I would say smaller numbers are easier to understand, however.
    • Usually module costs of 1 for cheap, 2 for normal, 4 for expensive, and maybe something higher for Very Expensive (tm) seems like it will handle most cases.
    • You can use different module point scaling on different units, if you need to. All of the modules are baked into the unit they are a part of, as is the module budget, so it's a self-contained formula per unit.
  • module_points_added_per_mark_level: This is optional, but lets players earn more module points as their unit marks up. This is generally going to be highly desirable, but it's going to lead to extra power creep. Each module is getting more powerful as the player levels up, AND they're getting more modules? Make sure to account for that in your balance if that's how you do things.
    • An alternative to the power-creep approach is having everything be available from mark 1, and it's just a matter of which loadout is chosen. This duplicates the concept of things like the Riot Control Cruiser from AI War Classic, whereas the "more module budget over time" is more like champions.

Anyhow, for the ship itself, this is literally all you need to add, so that's pretty simple. The complexity comes in the systems.

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."