This is the hot seat mod script. Its only a beta version so no readme etc. Its just a script I put together. It will later be adapted to realise Swoosh So's Net Based Multiplayer Campaign.
At the moment, it works like this:
Press end turn - The game runs until player 2s faction where it halts
Press escape - control is handed to player 2.
It works fine as a hot-seat mod, although it will still need adapting for a net based campaign because you can only save during the turn itself as the escape key is reserved in the period where you have pressed end turn.
Some notes: It doesn't work if the two factions are next to each other in the turn sequence. So you need to change this in descr_strat.txt.
Some thoughts:
There are some problems with this system if you want some AI controlled factions. During half of the AI's turns' one faction is officially in control, so if an AI makes a diplomatic proposal or attacks player 2 this is resolved automatically. Of course if all factions are human controlled this problem does not arise. Unfortuantely you can't yet have all factions under human control because of the problem of having two factions next to each other in the turn sequence. But don't worry about that, I think I have a solution...
Here is the script:
Of course, battles between two players have to be automatically resolved. Remember, this is only a Beta.Code:;Hotseat script by Myrddraal Beta Version script ;Set up counters declare_counter loop ;Used to keep script running set_counter loop 1 declare_counter faction ;Used to determine who's turn it is set_counter faction 1 declare_counter waitcounter ;Used to stop the script swapping control between the two factions back and forth set_counter waitcounter 1 declare_counter esckeystolen ;Used to check what the escape key is supposed to do set_counter esckeystolen 0 suspend_during_battle on ;Make sure the script doesn't stop working after a battle ;--------------------------------------------------------------------- monitor_event ButtonPressed ButtonPressed end_turn ;The user presses the end turn button.... if I_CompareCounter faction = 1 console_command halt_ai germans ;Stops the AI at the start of the German turn if faction = 1 end_if if I_CompareCounter faction = 2 console_command halt_ai romans_julii ;Stops the AI at the start of the Julii turn if faction = 2 end_if steal_esc_key on ;Stops the escape key from bringing up the menu so that it can be used to switch control set_counter esckeystolen 1 end_monitor ;--------------------------------------------------------------------- monitor_event EscPressed TrueCondition ;Player then presses esc to control the next faction. and I_CompareCounter esckeystolen = 1 set_counter waitcounter 0 if I_CompareCounter faction = 2 and I_CompareCounter waitcounter = 0 console_command control romans_julii ;If currrently controlling the germans, switch to the Julii. set_counter faction 1 set_counter waitcounter 1 end_if if I_CompareCounter faction = 1 and I_CompareCounter waitcounter = 0 console_command control germans ;If currently controlling the Julii, switch to the germans. set_counter faction 2 set_counter waitcounter 1 end_if steal_esc_key off ;Set the esc key back to menu. set_counter esckeystolen 0 end_monitor while I_CompareCounter loop = 1 ;Make sure the script doesn't end end_while terminate_script
Use this script as a show_me script. If your not clear on how to do this, I'll post more info later, but I don't have time right now...
Bookmarks