I undestand you. I am also demoralized.
I suggested almost the same thing earlier:
"function" { "type":<hardcoded special building string>,
"subtype":
"val":
}
The only difference that with subtype i can change hardcoded functionality, like
“type”:“cover_of_darkness”,
“val”:6 //radius of darkness
Or
“type”:“god of fire”,
“subtype”:“creature.robocop”,
“val”:15 //bonus to growth
“type”: “wall_of_knowledge”,
“subtype”:“primarySkill.attack”,
“val”:3
This way we can get new buildings without bonus system, using only hardcoded functionality.
Or
“type”: “CASTLE”,
“val”:70 //growth in percent to creatures in town
It’s a long work, but this is easy to implement and to incorporate into hardcoded logic not BuildingID, but building->type field.
PS I want to start with boats tomorrow.
I want to add instead of getBoatType string std::string getBoat() with names of DEFs (AB00_.def etc).
For objects it will return standard 3 def names of ships.
For Town/Hero Instance it will take boat animnation path from “faction”.
In faction it will look like
"boat":{
"animation":"newCoolBoat"
}
Later this section will be extended with cost of ship, and with special abilities like “FLYING”:true, “movementBonus”:200 etc.
I looked through sources, adding new boat animation can be made easy, as i estimate.