Digger resource requirements?
Closed this issue · 3 comments
This commented out section of Expansion2_Units.xml hints that the Digger is incomplete. I think it would be more appropriate to give it the same requirements as the generic Infantry, since that's what they did for the Minas Geraes and the P51. (I suspect that the Niter they mention here is a leftover from an earlier stage of development.)
<Row UnitType="UNIT_BRAZILIAN_MINAS_GERAES" ResourceCost="1" ResourceMaintenanceType="RESOURCE_COAL" ResourceMaintenanceAmount="1"/>
<!-- TODO:/REMOVE: Need to bring in Austrialian content! <Row UnitType="UNIT_DIGGER" ResourceCost="10" ResourceMaintenanceType="RESOURCE_NITER" ResourceMaintenanceAmount="1"/> -->
<Row UnitType="UNIT_AMERICAN_P51" ResourceCost="1" ResourceMaintenanceType="RESOURCE_ALUMINUM" ResourceMaintenanceAmount="1"/>
Base game (year 2018)
There is a column StrategicResource in the Units table that specify which resource is needed to create the unit. Only common units have (like Swordsman, Knight, Tank, etc.) All unique units are resource-free. Civilopedia lists that resource as required.
Gathering Storm.
Strategic resources overhaul. There is a new table Units_XP2 with columns:
- ResourceMaintenanceAmount & ResourceMaintenanceType
Maintenance is "per-turn" cost - applies to a subset of common units - seems like it is based on a resource type: coal, oil, aluminum, and uranium. - ResourceCost (amount)
ResourceCost is "one-time" when creating and applied a) to uniques as "half" of the original cost b) a subset of common units that use horses, iron and niter. Warning! Only uniques that replace common units have this cost. Unique uniques (i.e. no replace unit) are usually resource-free.
Previously-free units are listed as both zero-cost and zero-maintenance.
Now, assuming the above was the intent, then:
- Not all uniques have ResourceCost.
- What is the purpose of StrategicResource field?
Ad. 2. Civilopedia shows
- Cost as amount taken from Units_XP2 but resource type is taken from Units.StrategicResource
- Maintenance as data from Units_XP2
Looks like it remains its original purpose i.e. resource needed to create a unit, also allowing for a different resource as maintenance.
Exceptions: common units - none
Exceptions: uniques
- UNIT_AMERICAN_ROUGH_RIDER - replaces Cuirassier but has no resource cost; for comparison - Polish Winged Hussar has res cost; not in Units_XP2; there was no replace in the base game, Cuirassier was added later, probably that is why it is still free.
- UNIT_DIGGER - replaces Infantry but has no resource cost nor maintenance; not in Units_XP2; Digger was replacing Infantry from the start; that line TODO:/REMOVE: Need to bring in Austrialian content! Row UnitType="UNIT_DIGGER" ResourceCost="10" ResourceMaintenanceType="RESOURCE_NITER" ResourceMaintenanceAmount="1" could mean that it was supposed to be not-free.
- UNIT_MAORI_TOA - replaces Swordsman but has no res cost; it is in Units_XP2 with 5 ResCost; however - it is free since introduction, and it was introduced in XP2 along with other units that are not free like Black Army or Mandekalu Cavalry
- UNIT_GERMAN_UBOAT - replaces Submarine but has no res cost nor maint; not in Units_XP2; I think they simply forgot about this one...
- UNIT_INDONESIAN_JONG - not in Units_XP2, no res; same as Digger - no changes to Khmer & Indo DLC 's units in XP2.
Summary: there are 5 units that would need to be changed, and it is a bit too much to treat as an error. The line at Digger can also mean that yes, the devs considered adding a resources but they eventually abandoned the idea, hence "REMOVE" in the comment. All previously released DLCs got _Expansion2.xml files for XP2 changes so there as certainly an opportunity to update the Digger or Jong.
Also, the current setup is not erroneous in any way nor it breaks any fundamental rules. The specific behavior for the above units can be considered an error or just a unit flavor - seems also subjective.