What I've been working on is adding National bonuses back to the game (German gains +10% firepower, French get +10% ROF, etc)
I added the bonuses as upgrades inherited by all the base unit types, like this:
Code:
^NationalBonuses:
FirepowerMultiplier@GERMANY:
UpgradeTypes: GermanyFP
Modifier: 110
DamageMultiplier@ENGLAND:
UpgradeTypes: EnglandARM
Modifier: 90
ReloadDelayMultiplier@FRANCE:
UpgradeTypes: FranceROF
Modifier: 90
SpeedMultiplier@UKRAINE:
UpgradeTypes: UkraineSP
Modifier: 110
GlobalUpgradable@France:
Upgrades: FranceROF
Prerequisites: FrenchROF
GlobalUpgradable@German:
Upgrades: GermanyFP
Prerequisites: GermanyFirepower
GlobalUpgradable@England:
Upgrades: EnglandARM
Prerequisites: EnglandArmor
GlobalUpgradable@Ukraine:
Upgrades: UkraineSP
Prerequisites: UkraineSpeed
^Vehicle:
Inherits@1: ^ExistsInWorld
Inherits@2: ^IronCurtainable
Inherits@3: ^SpriteActor
Inherits@4: ^NationalBonuses
Inherits@5: ^CrateBoons
FirepowerMultiplier@GERMANY:
UpgradeTypes: GermanyFP
Modifier: 110
DamageMultiplier@ENGLAND:
UpgradeTypes: EnglandARM
Modifier: 90
ReloadDelayMultiplier@FRANCE:
UpgradeTypes: FranceROF
Modifier: 90
SpeedMultiplier@UKRAINE:
UpgradeTypes: UkraineSP
Modifier: 110
GlobalUpgradable@France:
Upgrades: FranceROF
Prerequisites: FrenchROF
GlobalUpgradable@German:
Upgrades: GermanyFP
Prerequisites: GermanyFirepower
GlobalUpgradable@England:
Upgrades: EnglandARM
Prerequisites: EnglandArmor
GlobalUpgradable@Ukraine:
Upgrades: UkraineSP
Prerequisites: UkraineSpeed
^Vehicle:
Inherits@1: ^ExistsInWorld
Inherits@2: ^IronCurtainable
Inherits@3: ^SpriteActor
Inherits@4: ^NationalBonuses
Inherits@5: ^CrateBoons
This part works fine, my questions relate to Russia's bonuses, and how to grant the other nation's bonuses.
Regarding Russia's: is there no way to modify unit prices? I checked the wiki and unless I missed something, it seems that giving Russia discounted prices would involve making variants of every unit/building with a 10% markoff.
Right now, I'm using Faction specific production queues to give them a 10% build speed bonus on everything.
Regarding the other nation's bonuses: Is there a way to grant these upgrades on game start? Right now, my approach is to grant them with this code on the Construction Yard
Code:
ProvidesPrerequisite@ENG_Flavor
Factions: england
Prerequisite: EnglandArmor
ResetOnOwnerChange: true
ProvidesPrerequisite@FRA_Flavor
Factions: france
Prerequisite: FrenchROF
ResetOnOwnerChange: true
ProvidesPrerequisite@GER_Flavor
Factions: germany
Prerequisite: GermanyFirepower
ResetOnOwnerChange: true
ProvidesPrerequisite@UKR_Flavor
Factions: ukraine
Prerequisite: UkraineSpeed
ResetOnOwnerChange: true
Factions: england
Prerequisite: EnglandArmor
ResetOnOwnerChange: true
ProvidesPrerequisite@FRA_Flavor
Factions: france
Prerequisite: FrenchROF
ResetOnOwnerChange: true
ProvidesPrerequisite@GER_Flavor
Factions: germany
Prerequisite: GermanyFirepower
ResetOnOwnerChange: true
ProvidesPrerequisite@UKR_Flavor
Factions: ukraine
Prerequisite: UkraineSpeed
ResetOnOwnerChange: true
But this creates a few problems..
-Nations don't get their bonuses without a deployed construction yard.
-ResetOnOwnerChange can be bypassed by producing an MCV from a captured War Factory, allowing for players to get multiple national bonuses. (ResetOnOwnerChange isn't desirable on the WF itself)
Is there a more effective way to grant the upgrades that doesn't suffer from these two issues?
Unrelated to these issues, more of a general curiosity:
What is ORA's default tickrate for unit logic? Searching through the GitHub suggests 25, but many values in the base RA mod are directly copied from RA and its 15/s rate.