RE: Modding Help
Posted: Sun Sep 20, 2015 3:32 pm
by Shannon V. OKeets
Many of the tables are 'hard-coded' in the program. I wasn't trying to create a WIF Mods kits, but I made a lot of the various elements of the game available to players as CSV (comma separated values) files. But there is a bunch of stuff that remains as internal data lists. Time and cost to build units, for example. Also production multiples for major powers and all the combat tables. The following are in the module ProductionTables.pas.
===
BaseProductionMultiple: array[TMajorCountries, 1939..1948] of Extended =
((0.75, 0.75, 1, 1.25, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5), // Germany.
(0.5, 0.75, 1, 1.25, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5), // Italy.
(0.75, 1, 1, 1.25, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5), // Japan.
(0.5, 0.75, 1, 1.25, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5), // Vichy.
(0.25, 0.5, 0.5, 0.75, 0.75, 1, 1, 1, 1, 1), // China.
(0.5, 0.75, 1, 1.25, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5), // CW.
(0.5, 0.75, 1, 1.25, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5), // France.
(0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25), // USA.
(0.25, 0.5, 0.5, 0.75, 1, 1.25, 1.5, 1.5, 1.5, 1.5)); // USSR.
UnitFixedCost = [fpConvoy, fpPilot, fpRetrainPilot, fpFactory, fpFort1,
fpOffensive];
UnitFixedTime = [fpConvoy, fpPilot, fpRetrainPilot, fpFactoryRepair,
fpOilRepair, fpNavalRepair, fpNavalRepairSub, fpFactory,
fpFort1, fpOffensive];
ForcePoolTime: array[TForcePool] of Byte =
(
2 { fpInfantry }
, 2 { fpInfantryD }
, 3 { fpCavalry2 }
, 3 { fpCavalry2D }
, 3 { fpCavalry3 }
, 3 { fpCavalry3D }
, 4 { fpParatroop }
, 4 { fpParatroopD }
, 4 { fpAirLanding }
, 5 { fpAirCav }
, 3 { fpMarine }
, 3 { fpMarineD }
, 3 { fpMountain }
, 3 { fpMountainD }
, 3 { fpSki }
, 5 { fpEngineer }
, 3 { fpInfantryHQ }
, 4 { fpArmorHQ }
, 1 { fpMilitia }
, 1 { fpTerritorial }
, 2 { fpGarrison }
, 3 { fpMotorized }
, 3 { fpMotorizedD }
, 3 { fpMechanized }
, 3 { fpMechanizedD }
, 4 { fpArmor }
, 4 { fpArmorD }
, 4 { fpArmoredMarine }
, 5 { fpArmoredParatroop }
, 3 { fpFieldArtillery4 }
, 3 { fpFieldArtillery5 }
, 4 { fpFieldArtillery6 }
, 3 { fpAntiTank3 }
, 3 { fpAntiTank4 }
, 4 { fpAntiTank5 }
, 3 { fpAntiAir4 }
, 3 { fpAntiAir5 }
, 2 { fpSupply }
, 0 { fpLeader }
, 2 { fpWarlord }
, 6 { fpCarrier }
, 6 { fpLightCarrier }
, 6 { fpBattleship }
, 5 { fpCruiser }
, 2 { fpASWEscort }
, 3 { fpASWNCarrier }
, 4 { fpAmphibious }
, 3 { fpNavalTransport }
, 3 { fpLiner }
, 4 { fpConvoy }
, 3 { fpSubmarine }
, 4 { fpFrogmen }
, 2 { fpFighter2 }
, 3 { fpFighter3 }
, 4 { fpCarrierAir0 }
, 4 { fpCarrierAir1 }
, 4 { fpCarrierAir2 }
, 2 { fpNavalAir2 }
, 3 { fpNavalAir3 }
, 4 { fpNavalAir4 }
, 2 { fpLandAir2 }
, 3 { fpLandAir3 }
, 4 { fpLandAir4 }
, 5 { fpLandAir5 }
, 2 { fpAirTransport2 }
, 3 { fpAirTransport3 }
, 4 { fpAirTransport4 }
, 1 { fpSubHunter }
, 1 { fpVWeapon }
, 1 { fpABomb }
, 6 { fpSynthOil }
, 2 { fpFactoryRepair }
, 2 { fpOilRepair }
, 2 { fpNavalRepair }
, 2 { fpNavalRepairSub }
, 0 { fpConstruction }
, 0 { fpConstructionSub }
, 3 { fpPilot }
, 0 { fpRetrainPilot }
, 4 { fpFactory }
, 5 { fpFort1 }
, 3 { fpOffensive }
);
var
ForcePoolCost: array[TForcePool] of Shortint = // For 1st cycle only
(
3 { fpInfantry }
, 2 { fpInfantryD } // D indicates a division sized unit
, 2 { fpCavalry2 } // 2 indicates that the corps unit costs 2 BPs
, 1 { fpCavalry2D }
, 3 { fpCavalry3 }
, 2 { fpCavalry3D }
, 5 { fpParatroop }
, 3 { fpParatroopD }
, 2 { fpAirLanding }
, 8 { fpAirCav }
, 5 { fpMarine }
, 3 { fpMarineD }
, 4 { fpMountain }
, 2 { fpMountainD }
, 2 { fpSki }
, 3 { fpEngineer }
, 5 { fpInfantryHQ }
, 8 { fpArmorHQ }
, 2 { fpMilitia }
, 2 { fpTerritorial }
, 2 { fpGarrison }
, 4 { fpMotorized }
, 2 { fpMotorizedD }
, 5 { fpMechanized }
, 3 { fpMechanizedD }
, 6 { fpArmor }
, 4 { fpArmorD }
, 4 { fpArmoredMarine }
, 8 { fpArmoredParatroop }
, 4 { fpFieldArtillery4 }
, 5 { fpFieldArtillery5 }
, 6 { fpFieldArtillery6 }
, 3 { fpAntiTank3 }
, 4 { fpAntiTank4 }
, 5 { fpAntiTank5 }
, 4 { fpAntiAir4 }
, 5 { fpAntiAir5 }
, 3 { fpSupply }
, 0 { fpLeader }
, 2 { fpWarlord }
, 2 { fpCarrier }
, 1 { fpLightCarrier }
, 2 { fpBattleship }
, 1 { fpCruiser }
, 1 { fpASWEscort }
, 1 { fpASWCarrier }
, 3 { fpAmphibious }
, 2 { fpNavalTransport }
, 2 { fpLiner }
, 1 { fpConvoy }
, 1 { fpSubmarine }
, 1 { fpFrogmen }
, 2 { fpFighter2 }
, 3 { fpFighter3 }
, 0 { fpCarrierAir0 }
, 1 { fpCarrierAir1 }
, 2 { fpCarrierAir2 }
, 2 { fpNavalAir2 }
, 3 { fpNavalAir3 }
, 4 { fpNavalAir4 }
, 2 { fpLandAir2 }
, 3 { fpLandAir3 }
, 4 { fpLandAir4 }
, 5 { fpLandAir5 }
, 2 { fpAirTransport2 }
, 3 { fpAirTransport3 }
, 4 { fpAirTransport4 }
, 1 { fpSubHunter }
, 1 { fpVWeapon }
, 1 { fpABomb }
, 7 { fpSynthOil } // Place holder, the actual cost varies by unit.
, 4 { fpFactoryRepair }
, 4 { fpOilRepair }
, 0 { fpNavalRepair }
, 0 { fpNavalRepairSub }
, 0 { fpConstruction }
, 0 { fpConstructionSub }
, 2 { fpPilot }
, -1 { fpRetrainPilot }
, 8 { fpFactory }
, 2 { fpFort1 }
, 15 { fpOffensive }
);