isInfrastructure capture and give back to a specific player

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

isInfrastructure capture and give back to a specific player

Frostion
Question:
A specific unit type across the map is “isInfrastructure” and is sometimes standing on a territory of an ally, like a flag pole belonging to an allied player.

(In this case, on my map, we are talking about an “SS-Legion” flag pole infrastructure unit that generates SS recruitment resources for Germany to use)



This unit is of course also capturable by Allies.

But in case of it being captured by allies, and then being captured back by a non-German Axis player, I want it to be handed over immediately to player Germany.

How can this be coded?
Reply | Threaded
Open this post in threaded view
|

Re: isInfrastructure capture and give back to a specific player

crazy_german
Look at TWW, see whenCapturedGoesTo. It's like original territory but more specific. This means that territory will always go to Germany though. The only other way I can think of is to have triggers remove Italian SS centers and add German ones
Correctly crazy, disingenuously German
Reply | Threaded
Open this post in threaded view
|

Re: isInfrastructure capture and give back to a specific player

hepster
You are correct... In TWW all of those instances the ownership is dictated by the territory ownership... and then the units revert to them.

Out of curiousity what does that unit turn into if captured by an enemy?
“A man can never have too much red wine, too many books, or too much ammunition”― Rudyard Kipling
Reply | Threaded
Open this post in threaded view
|

Re: isInfrastructure capture and give back to a specific player

Frostion
hepster wrote
Out of curiousity what does that unit turn into if captured by an enemy?
Well, the plan is that the unit stays the same (as SS recruitment potential), but the Allied player will not be able to do anything with it or the resources generated (which I plan to remove from allies by triggers).

I guess the answer to my original question is a ton of triggers
Reply | Threaded
Open this post in threaded view
|

Re: isInfrastructure capture and give back to a specific player

crazy_german
You could also try this
                <option name="whenCapturedChangesInto" value="any:any:true:FakeSSStation:1"/>

And then making a fake SS station unit with the following
                <option name="whenCapturedChangesInto" value="any:any:true:RegularSSSTation:1"/>

The fake station could do nothing (or something!). So instead of using triggers for the allies' SS resources, the unit just changes, then changes back if re-captured. This might take less code, just an idea

Correctly crazy, disingenuously German
Reply | Threaded
Open this post in threaded view
|

Re: isInfrastructure capture and give back to a specific player

hepster
Why not have the unit destroyed when captured and triggered to be replaced if the territory is re-claimed by that side?

Then you could simply use a trigger to have the unit appear back in that terr.  once owned.
“A man can never have too much red wine, too many books, or too much ammunition”― Rudyard Kipling
Reply | Threaded
Open this post in threaded view
|

Re: isInfrastructure capture and give back to a specific player

crazy_german
@Hepps
That would require that the engine (and the players) remember where all the camps were, which isn't easy to do.

I think what Frostion wants is for Germany to be able to build these camps in newly conquered territory. So lets say Germany captures Greece, puts one in Greece, then the UK captures Greece, then Italy retakes it. He wants a german camp to be in Greece, even though Greece would be owned by Italy. Also, the UK needs to not get the benefits of the camp while it controls Greece.

So if you have 2 units, X and Y. X creates resources/ builds units/ whatever. Y does nothing other than get captured
X becomes Y when captured
Y becomes B when captured
This should loop so that the unit is always an X if axis controlled, but Y if allied controlled

So germany builds X in greece.
United Kingdom takes greece, the X becomes Y. Y does nothing, but its still on the map. So players can still easily see that Greece holds an SS camp,
Italy takes greece, the X becomes Y. Then, at the end of italy's turn the Italian X is removed, and a German X is placed by triggers

I think this would achieve what Frostion wants, while being as simple as possible to code and easy for players to use. It would require one condition and one trigger per territory per axis nation that isn't Germany (I'm assuming max 1 camp per territory)
Correctly crazy, disingenuously German