how to do random nations in diplo like in diplo infi by:dest:
-
- Terran Settler (Unemployed)
- Posts: 3
- Joined: Mon Jul 21, 2008 11:43 pm
how to do random nations in diplo like in diplo infi by:dest:
How would i make a randomizer beacon that will randomly select a nation for someone like in diplomacy infinity.
- Revan
- Terran Dropship Flight Attendant
- Posts: 154
- Joined: Wed Dec 26, 2007 11:15 am
Re: how to do random nations in diplo like in diplo infi by:dest:
You can do it with switches, although it requires several triggers. I checked the map and it was protected so I will just write downhow would I do it:
We need switches which are going to be randomized, so depending on the results the players can get a random country. We also need other switches which prevents the triggers from executing when they shouldn't.
First trigger:
Condition: Player x brings a Dark Archon to the location (where the beacon is)
Condition: "First Trigger" is cleared.
Action: Set "First Trigger". (Now this trigger won't run again until we clear this.)
Action: Randomize "Random Switch 1"
Action: Randomize "Random Switch 2"
Action: Set "Second Trigger Switch"
Action: Preserve Trigger
The following triggers can now run while the first can't. Two example from them:
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is cleared.
A: Remove/Move away/Give another player the Dark Archon.
A: Clear "Second Trigger Switch".
A: Give the French units for the current player
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is set.
A: Remove/Move away/Give another player the Dark Archon.
A: Clear "Second Trigger Switch".
A: Give the Italian units for the current player
Randomizing two switches can have 4 results (they can be cleared-cleared, cleared-set, set-cleared, set-set) so you'd have to make 4 triggers for each result. In the example you get Italy if both switches are set. But since there are more than four countries you should randomize 3 switches (8 possible results) or 4 (16 possible results).If there is 15 countries then make the two triggers give the same country to the player.
There is one problem with this though, it's that if another player gets the same result with the randomized triggers then he would get the country which is already rolled for another one. This can be prevented with adding another switch and making a new trigger for each result:
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is set.
C: "Italy is taken" is cleared.
A: Remove/Give another player the Dark Archon.
A: Clear "Second Trigger Switch".
A: Give the Italian units for the current player
A: Set "Italy is taken"
A: Clear "First Trigger" (So the first trigger can run, for a different player of course.
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is set.
C: "Italy is taken" is set.
A: Randomize "Random Switch 1"
A: Randomize "Random Switch 2"
A: Preserve Trigger
This will start the randomization again.
Well, try to do something like this, I haven't tested this, but it should work.
We need switches which are going to be randomized, so depending on the results the players can get a random country. We also need other switches which prevents the triggers from executing when they shouldn't.
First trigger:
Condition: Player x brings a Dark Archon to the location (where the beacon is)
Condition: "First Trigger" is cleared.
Action: Set "First Trigger". (Now this trigger won't run again until we clear this.)
Action: Randomize "Random Switch 1"
Action: Randomize "Random Switch 2"
Action: Set "Second Trigger Switch"
Action: Preserve Trigger
The following triggers can now run while the first can't. Two example from them:
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is cleared.
A: Remove/Move away/Give another player the Dark Archon.
A: Clear "Second Trigger Switch".
A: Give the French units for the current player
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is set.
A: Remove/Move away/Give another player the Dark Archon.
A: Clear "Second Trigger Switch".
A: Give the Italian units for the current player
Randomizing two switches can have 4 results (they can be cleared-cleared, cleared-set, set-cleared, set-set) so you'd have to make 4 triggers for each result. In the example you get Italy if both switches are set. But since there are more than four countries you should randomize 3 switches (8 possible results) or 4 (16 possible results).If there is 15 countries then make the two triggers give the same country to the player.
There is one problem with this though, it's that if another player gets the same result with the randomized triggers then he would get the country which is already rolled for another one. This can be prevented with adding another switch and making a new trigger for each result:
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is set.
C: "Italy is taken" is cleared.
A: Remove/Give another player the Dark Archon.
A: Clear "Second Trigger Switch".
A: Give the Italian units for the current player
A: Set "Italy is taken"
A: Clear "First Trigger" (So the first trigger can run, for a different player of course.
C: "Second Trigger Switch" is set.
C: "Random Switch 1" is set.
C: "Random Switch 2" is set.
C: "Italy is taken" is set.
A: Randomize "Random Switch 1"
A: Randomize "Random Switch 2"
A: Preserve Trigger
This will start the randomization again.
Well, try to do something like this, I haven't tested this, but it should work.
Signature can be found here.