davidlallen
Deity
I have a mod where you cannot enter fallout, unless you have a certain promotion. I am using python unitCannotMoveInto. It is only a couple of lines of code, basically, if the plot is fallout, and you do not have the "rad-immune" promotion, then you cannot move into the plot. This is working.
But, it slows the game down tremendously. Like, by a factor of 5: from the same start position, the game takes 150 minutes to autoplay 350 turns. When I disable that python callback, then the game takes only 30 minutes.
I stumbled across the unit xml flag FeaturePassableTechs. Maybe I can use this to get the same effect. I give the fallout feature <bImpassible>1, and then give every unit the following:
What that *should* do is make fallout impassible, except when the owning player of this unit has the medicine tech. That is almost the same effect as using a promotion, close enough.
However, the above two changes seem to have no effect. The unit with this code still cannot move into fallout when I have the medicine tech.
There are no units I can find in the vanilla game, or in any mod for that matter, which use this flag. Is it possible this flag was never implemented in the code? Or is it possible there is some third thing I need to do, which I missed?
My playtesters like the restriction that you cannot move into fallout, but I don't want to give a 5x longer turn runtime just for this.
Any suggestions?
But, it slows the game down tremendously. Like, by a factor of 5: from the same start position, the game takes 150 minutes to autoplay 350 turns. When I disable that python callback, then the game takes only 30 minutes.
I stumbled across the unit xml flag FeaturePassableTechs. Maybe I can use this to get the same effect. I give the fallout feature <bImpassible>1, and then give every unit the following:
Code:
<FeaturePassableTechs>
<FeaturePassableTech>
<FeatureType>FEATURE_FALLOUT</FeatureType>
<PassableTech>TECH_MEDICINE</PassableTech>
</FeaturePassableTech>
</FeaturePassableTechs>
What that *should* do is make fallout impassible, except when the owning player of this unit has the medicine tech. That is almost the same effect as using a promotion, close enough.
However, the above two changes seem to have no effect. The unit with this code still cannot move into fallout when I have the medicine tech.
There are no units I can find in the vanilla game, or in any mod for that matter, which use this flag. Is it possible this flag was never implemented in the code? Or is it possible there is some third thing I need to do, which I missed?
My playtesters like the restriction that you cannot move into fallout, but I don't want to give a 5x longer turn runtime just for this.
Any suggestions?