# Thread: Hot Seat Mod - Beta Release

1. ## Hot Seat Mod - Beta Release

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:
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
Of course, battles between two players have to be automatically resolved. Remember, this is only a Beta.

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...

2. ## Re: Hot Seat Mod - Beta Release

amazing!!! but could you include a simple readme for those of us who dont get how to do this type of stuff? ie how to get it to run, a semi-detailed way to change the order of the turns, and a list of things to go through to get the game handed over right, like so:

1. do all of the stuff you wish to do in your turn

2. hit "end turn"

and then tell us how to save it, and how to send it and so on

this is great work and i will try and figure out how to do it!!

thanks
stichmaster1

3. ## Re: Hot Seat Mod - Beta Release

Exellent work Myrddraal as always, you keep making this game better and better

4. ## Re: Hot Seat Mod - Beta Release

Well like I said, this is only a 'hot - seat' version of the script, so its for several players on one computer. It will still have to be adapted for use over the net. Thats why its a hot-seat mod.

Well this is how it runs:

Player one does everything they want to in their turn, then hits end turn.
The computer stops the AI sequence just before the beginning of player two's turn.
At this point, swap players, and hit escape when your ready. Control is then passed to player two, who does the same.

You can see why this will need adapting for play over the net as you can't save in between turns as the escape key is reserved for handing over control.

But I will adapt it, either by making the save menu appear automatically, or by getting rid of pressing escape etc.

NOTE: don't press escape whilst the AI is still taking its turn, make sure it has stopped.

I just noticed that I got rid of the instructions for the several turns a year script when I uploaded the new script generator. I will upload them again and adapt them for this, its really not that different.

5. ## Re: Hot Seat Mod - Beta Release

2 questions

2. Can players play each other.

6. ## Re: Hot Seat Mod - Beta Release

Not to overplay it in any sense, but this is going to allow me to make the mod that I originally got into modding to make.

Bravo, and need I say, Encore!

7. ## Re: Hot Seat Mod - Beta Release

I'll try to make one though, and yes players can play against each other on the same computer.

8. ## Re: Hot Seat Mod - Beta Release

So is this correctly; I can play a turn, let AI, and when second player is I save the game and send it to him/her. Then he/she can do the same etc. etc.

But we can also fight battles against eachother on LAN/MP right? We can just disband the units that where lost right?

9. ## Re: Hot Seat Mod - Beta Release

This sounds great. Excellent progress towards the "ideal MP campaign" we have all been waiting for so long. If I read this right you can - even as it is now - play over the net by saving the game before you end your turn, email the savegame and let the next player end your turn and continue his (we do, of course, all trust each other not to cheat ).

But could you explain - in simple words for someone who gave up programming long ago when he moved from his C64 to a PC - how to make this work ? I mean I copy the text of the script you have provided above, then where to I copy it to and what do I do to determine factions etc ?

Looks really good - cant wait to try this out.

10. ## Re: Hot Seat Mod - Beta Release

No I ment when player A attacks player B do they fight on a battle field or is it resolved for them?

11. ## Re: Hot Seat Mod - Beta Release

@Nigel

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
you chose your factions at the third line after the first break, and the sixth line after the break, i think

also, how do you implement this into the game? i mean how do you get it so that when you start a campaign this script will run?

thanks
stichmaster1

12. ## Re: Hot Seat Mod - Beta Release

Myrddraal gives some instructions about how to use scripts such as this one in his More than two turns in a year - release.

13. ## Re: Hot Seat Mod - Beta Release

Well actually, ER I lost those instructions when I uploaded the new script gen. I'm looking for someone who downloaded it before then to send them to me. If someone has them, please post them here...

14. ## Re: Hot Seat Mod - Beta Release

Unfortunately at this early stage, battles between the two players must be Auto Resolved but remember:

This is only a Beta/Alpha Release
Its work in progress. Eventually, all will be possible...

15. ## Re: Hot Seat Mod - Beta Release

hey Myrddraal is this beta version availiable for download and if so where can i get it from i would love to get my hands on it. hot seat mod is like my dream come true for RTW and MTW. =)

16. ## Re: Hot Seat Mod - Beta Release

There is no download yet. Its a "do it yourself mod". These are the instructions from the several turns a year script:

The following is a method for increasing the number of
turns in one year.

CONTENTS
- HOW TO INSTALL
- HOW TO USE
- NOTES

--------------------------HOW TO INSTALL--------------------------

1.
First, download the script generator and use it to generate a script called descr_script in the show me folder. This is where you set the start and end dates and the number of turns you want per year [b]NOTE: There will only be one turn for winter or else aging is affected, so if you mod is in cold climates, I would recommend you have about 4 turns a year max (one 'season' for winter).

2.
Open the file export_descr_advice.txt in the Data
folder.
Search for

Code:
AdviceThread
Help_Campaign_Keyboard_Shortcuts_Scroll_Thread
Select the entire section (from ;--------- to Text)
and replace it with:

Code:
;------------------------------------------
GameArea Campaign

Item
Help_Campaign_Keyboard_Shortcuts_Scroll_Text_01
Uninhibitable
Verbosity 0
Threshold 1
Attitude Normal
Presentation Default
Title four_turns_Title
Script scripts\show_me\descr_script.txt
Text four_turns_Text1

3.
Open export_descr_advice_enums.txt in the Data folder.
Add to the bottom of this file the following text:

Code:
four_turns_Title
four_turns_Text1
4.
Add to the bottom of this file the following text:

Code:
;-------------------

{four_turns_Title} Four turns a year

{four_turns_Text1}
To finish loading the four turns a year script, clickon the 'Show me how' button. Remember, you must do
this every time you load a saved game.
5.
Now go to Data\world\maps\campaign\imperial_campaign
(or whichever campaign you want to apply the script
to)
Create a new text file called descr_script.txt
containing the following text:

Code:
script
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
end_script
7.
Now open descr_strat.txt in the same folder and add
the following lines to the bottom of the file

script
descr_script.txt

Installation complete.

--------------------------HOW TO USE--------------------------

When starting a new campaign, the script should
automatically run after about one second. You must
relaunch the script each time you load the game. To
run the script, when starting a new campaign, or when
A panel will appear with a list of shortcuts. In the
top right hand corner, click on the question mark.
'show me how' button. Once this is done, play as
usual.
Remember that this must be done not only at the start
of the campaign, but also each time you load the saved
game.

--------------------------Notes--------------------------

Many thanks go to those at the www.totalwar.org forums
who helped me develop the ideas used in this script.
If you wish to officially use this script in a mod,
you are very welcome to, but please inform me as I
like to know how my work is put to use.

Myrddraal
Instead of using the script generator, use the script in my first post. Good luck.

17. ## Re: Hot Seat Mod - Beta Release

Thanks Myrddraal,

if I understand that right, I only need to do point 5. and 7. (there is no 6.) and use the hot-seat script instad of the one listed under 5.

I'll give it a try and see how this works.

18. ## Re: Hot Seat Mod - Beta Release

Yeah.. this just isn't working for me. Jst post a thread when the final version is done.

19. ## Re: Hot Seat Mod - Beta Release

Instead of part 1, you should take the script and save it as a text file under data\scripts\show_me called descr_strat.txt

The rest is all necessary, though you can replace four_turns by hot_seat if you like, and you can change the short description of it. Otherwise each part is ready.

I agree Zalmoxis, the full realease will be clearer than this, this is just a taster for those who know a bit about scripting really.

20. ## Re: Hot Seat Mod - Beta Release

I'm curious about the faction numbering eg, if I_CompareCounter faction = 1

Is this just an internal id number used within the code (so any faction could be 1 or 2) or does it relate to the faction turn sequence in the game?

Edit: Also, I'd like to change the process by which the script is activated (activate it from a different AdviceThread, use a different trigger etc.) but I'm concerned about the effect that turning advice off might have. Is there some way I can ensure that the advisor will always appear even if the player has deactivated advice?

21. ## Re: Hot Seat Mod - Beta Release

I did everything from step 2 to 7. And the 'instea of part 1' you just posted. But now my game crashes to desktop after the loading screen (so it crashes before the intro).

Any idea what might be wong?

22. ## Re: Hot Seat Mod - Beta Release

yeah im having the same problem as Cealin, i copied to whole script into a txt file named descr_script.txt, saved it in the show me folder then followed all steps posted above only changin the name from four_turns to multi_player and it CTD on start up before the intro. i am sure i changed the name and text thingy every where it appeared so help please.

23. ## Re: Hot Seat Mod - Beta Release

OK, theres no point me going through all this. I will upload the files as they should be from a fresh install. That should sort the probs out...

24. ## Re: Hot Seat Mod - Beta Release

Great :D, thanks for your work.

25. ## Re: Hot Seat Mod - Beta Release

hey i got it too work BUT when u end turn and press escape to do whateva it just brings up the menu thingy i dont understand. do u have to choose the other players faction or should is it just a matter of pressing the escape button when u reach the faction of ur choice could someone explain please i have the script running and wokring just dont know who to get multi player working

26. ## Re: Hot Seat Mod - Beta Release

Sorry, but I'm so eager to try it :)

27. ## Re: Hot Seat Mod - Beta Release

There is no download, as part of following Myrddraal's instructions in his long post above (using the code in the first post instead of that asked for in step 1) you will construct the files that you need.

However, as he says, this is a beta version - a taster for people who are already familiar with scripting. If you can't get it to work straight off the bat then you are in good company (myself included!) so you may have to wait until development can proceed a little further.

28. ## Re: Hot Seat Mod - Beta Release

Epistolary Richard, I'm refering to this;

Originally Posted by Myrddraal
OK, theres no point me going through all this. I will upload the files as they should be from a fresh install. That should sort the probs out...
I did all the instructions as I said in a post before, but my game crashes before the intro.

29. ## Re: Hot Seat Mod - Beta Release

Ah, I see what you mean. We await with bated breath.

30. ## Re: Hot Seat Mod - Beta Release

any progress on this recently? or is this thread destined to fade away

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Single Sign On provided by vBSSO