davidlallen
Deity
I have a pickup truck unit in my mod which is highly configurable by promotions. You can add a machine gun, armor, eventually an anti-tank gun, etc. (I hope to have different art for the different combinations but that is a volunteer effort.) There is a technology, engines, which enables a few of the promos and also enables a city building, garage. Today the garage gives new wheeled units a few XP, like a barracks.
My original idea was that as the truck is out in the wilderness gaining experience, it can immediately add on the machine gun, armor etc promotions without coming back to the city. But, players hardly ever use the garage and I was thinking of removing it. Last night I had a different idea: what if these various promos can only be added *in* a garage. That is, the unit would go out, get experience, and then come back to the garage to have the new weapons or armor added. That definitely fits the feel of a truck gradually getting more weaponized.
For this to work, the truck needs to have certain promotions available in the field, and certain additional promotions available only when it is in a city with a garage.
Has anybody ever tried to use python to dynamically control which promotions are available based on the location of the unit? If there was a gameutils callback like canPromote/cannotPromote, like unitCannotMoveInto, this would be trivial. I cannot find any related callback. Any suggestions on how to accomplish this?
My original idea was that as the truck is out in the wilderness gaining experience, it can immediately add on the machine gun, armor etc promotions without coming back to the city. But, players hardly ever use the garage and I was thinking of removing it. Last night I had a different idea: what if these various promos can only be added *in* a garage. That is, the unit would go out, get experience, and then come back to the garage to have the new weapons or armor added. That definitely fits the feel of a truck gradually getting more weaponized.
For this to work, the truck needs to have certain promotions available in the field, and certain additional promotions available only when it is in a city with a garage.
Has anybody ever tried to use python to dynamically control which promotions are available based on the location of the unit? If there was a gameutils callback like canPromote/cannotPromote, like unitCannotMoveInto, this would be trivial. I cannot find any related callback. Any suggestions on how to accomplish this?