Dummy buildings in lua for applying REQUIREMENT_PLAYER_HAS_BUILDING

Feofilakt

Chieftain
Joined
Oct 22, 2019
Messages
36
Hello. There is no standard way to apply modifier in lua. I've came up with approach that allows it for player (and city maybe):
  1. add dummy building
  2. add requrement "REQUIREMENT_PLAYER_HAS_BUILDING"
  3. add modifier that depends on this requrement
  4. in lua create dummy building in any city (capital for example)
The problem is that concrete requrement only checked by game on building create, not on remove (or pillage). So I can apply modifier, but cannot cancel it. I really need help of experienced modders in this approach improvement.
 
Top Bottom