Part-based upkeep scripting
Posted: Wed May 09, 2018 11:18 am
We've been using part-based upkeep using this code for long time, and it seems to work ok: https://github.com/Voker57/freeorion/co ... 67e1440eb2
However, in recent version it fails with this rather cryptic error:
I looked through parse/IntComplexValueRefParser.cpp and saw it went through a refactor but essence seems to be the same. Any idea how to fix the macro?
However, in recent version it fails with this rather cryptic error:
Code: Select all
/opt/freeorion/share/freeorion/default/scripting/ship_hulls/SH_BASIC_MEDIUM.focs.txt:13:72: Parse error. Expected ) here:
slots = [
Slot type = External position = (0.65, 0.25)
Slot type = External position = (0.65, 0.55)
Slot type = Internal position = (0.35, 0.35)
]
buildCost = 20 * (1 + (0.002 * ShipPartsOwned empire = Source.Owner class = ShortRange) + (0.002 * ShipPartsOwned empire = Source.Owner class = FighterBay) + (0.002 * ShipPartsOwned empire = Source.Owner class = Armour) + (0.002 * ShipPartsOwned empire = Source.Owner class = Troops) + (0.002 * ShipDesignsOwned)) * (GameRule name = "RULE_SHIP_HULL_COST_FACTOR")
^
buildTime = 2
tags = [ "PEDIA_HULL_LINE_GENERIC" ]
location = Contains And [
Building name = "BLD_SHIPYARD_BASE"
OwnedBy empire = Source.Owner