A way to prevent specific units from entering allied territories?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

A way to prevent specific units from entering allied territories?

panguitch
Is there a way to prevent a specific unit type from entering allied territories?

The relationship definitions let you change this, but only on a universal basis, not for specific units.

I thought movementLimit might be it, but it limits by the number of units, not by the territory type (owned or allied).

Ideas?

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: A way to prevent specific units from entering allied territories?

crazy_german
I found a way to do this a while back. It was originally intended for trains, but also works here. First, you need a trigger to give any territory controlled by a nation to have a certain territoryEffect. For example, any time a territory is controlled by Russia at the end of its turn, it gains the territory effect "Russian Controlled".

Another trigger fires at the start of any russian ally's turn, it sets the following property within the "Russian Controlled" territoryEffect attachment
                        <option name="unitsNotAllowed" value="infantry:artillery:tank:etc"/>
This prevents the ally from moving those unit types into Russian territory.

At the end of the ally's turn, we reset the unitNotAllowed to something meaningless
                        <option name="unitsNotAllowed" value="factory"/>
(assuming factory has 0 movement, this property has no effect at all). This allows Russia to move its units within its borders, and for enemies to invade Russian territory.

Would this allow what you are trying to do?
Correctly crazy, disingenuously German
Reply | Threaded
Open this post in threaded view
|

Re: A way to prevent specific units from entering allied territories?

panguitch
Hmm, I could do that.

It's only one unit type. But there are 281 territories it can move to. And 10 players across three alliances. That would require a ton of code.

Add to this the fact that politics is an option, even if rarely used. This means that relationships can be fluid, compounding the complexity of an approach like this.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: A way to prevent specific units from entering allied territories?

crazy_german
I wouldn't use the above for just 1 unit, and politics makes it much more complicated (so would terrain, if you have included that in the map). I can't think of a way without using a ton of triggers, sorry
Correctly crazy, disingenuously German
Reply | Threaded
Open this post in threaded view
|

Re: A way to prevent specific units from entering allied territories?

Cernel
In reply to this post by panguitch
If you are not using canals for anything else, you can make 1 canal for each single land-anything connection (more than 500 canals, in your case) and exclude all units but the one you wanna limit; then set that all relationships but War (or whatever you want) don't allow going through canals.
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: A way to prevent specific units from entering allied territories?

panguitch


Shucks. I do have one canal already, and allies do need to be able to pass through.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: A way to prevent specific units from entering allied territories?

RogerCooper
Terrain might be a simple solution. You could simply have a terrain type of each nation's territory with a territoryeffect barring the units from the other nations.
Reply | Threaded
Open this post in threaded view
|

Re: A way to prevent specific units from entering allied territories?

panguitch
I'm afraid for that to work I'd also have to have a truckload of triggers changing the terrain types of all the territories as the game progressed, since I don't just want it based on original ownership.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world