Skip to content

Overload2664/esfpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Warscape Hotseat Tool

A tool that allows you to create hotseats for total war games.

Supported Games

  • Total War: Empire
  • Total War: Napoleon
  • Total War: Shogun II
  • Total War: Rome II
  • Total War: Attila

Online battles should be possible for Total War: Napoleon and Total War: Shogun II with the drop-in battle option. Also it may be possible to have online battles using head to head mode. Only been tested with Total War: Attila.

Run

You can either use the ready Windows version or run the script manually. To use the ready Windows version, download this file and after extracting it, run the file run.bat.

To run manually, clone the repo and run the hotseat_gui.py script:

git clone https://github.com/Overload2664/esfpy.git
cd esfpy
python3 src/hotseat_gui.py

I recommend using PyPy istead of CPython as it's noticeably faster. (Done automatically if you use the ready Windows version)

How to Use

Video

Prerequiste

First you have to patch your game to able to save at any given time in campaign, follow this guide.

Initiate

After doing the prerequiste, create a save file in a supported game. Run the program and first choose which game the save file belongs to, then select the desired save file. This could take a bit (in my decent PC it sometimes took about 20 seconds) and consume a fair about of RAM (something like 4 GBs depending on the save file). Press Mark Humanity and choose factions you want to be humans. In Empire and Napoleon, you have to mark all factions as humans else you get a crash so press Mark All As Human instead. Then press save, head back and press save in the options menu and save the file.

Going next turn

After a player finishes their turn, make a save file from the game. Open the save file with the program and press Mark All As Playable then save the file. Open the save file in the game and press next turn. This should make the game pause on the next player's turn. Now save the game (if it's grayed out then that means you haven't patched the game). Open the new save file with the program again. Press Mark All As Not Playable first then press Mark Playables. Choose the faction that the next (human) player belongs to (note that after doind this, only one faction should be selected there). Press save and head back. Press Set Vision and select the same faction you selected for playables. Press save and head back. Press save in the options menu and make the save file. Now run the new save file in the game. It should be the next (human) player turn! After finishing each players turn, repeat the same steps to get to the next player's turn.

Online battles

For Total War: Napoleon and Total War: Shogun II, you should be able to engage in online battles with the drop-in battle option. For Total War: Attila, and possibly other titles, you can play online battles by leveraging head to head mode. Do as follow:

  1. First, have a sample head to head campaign generated by whatever players. (any from the same game and campaign should do)
  2. Then in the hotseat campaign, before pressing to attack an army, make a save of the game. Open the newly created savefile with the tool. Press Mark Playables and mark the defender faction as playable (there should be two playable factions after this, the attacker and the defender). Save, head back and press Multiplayer Conversion and choose the multiplayer save file from the first step. Then fill out the players info*, I recommend that you do it twice: One time the attacker is player 1 and the defender is the player 2 and vice versa. What the order determines is who gets to host the game and only player 1 can, so by having both versions you can let the other player host in case we encounter an issue. After filling players info, press Import to Multiplayer and save to a file. Send this file to both players, it's important that both have it or othersise the other player can't join.
  3. Launch the game and press Resume As Host and choose the save file we just created. The other player should be able to join and launch the head to head campaign normally. Initiate attack and press manually resolve (plus the other player should press manually resolve). After the battle is finished and players went back to the campaign, save the game.
  4. Launch the tool and open the hotseat save file (not the multiplayer save file). Press Multiplayer Conversion and choose the multiplayer save file that was saved in step 3, then after the file got loaded press Import To Single. Head back and press Mark Playables and mark the other player as unplayable again. Save then head back and save to a file.
  5. Open the new save file and you should be able to play as normally.

*: Steam name and steam id should be obvious, you can get both from a player's steam profile. Faction should match the ones in Get All Factions. Politics may or may not be needed depending on the game (it is needed on Attila but not Shogun II, I don't know about the rest). It varies from faction to faction, and you can see it in Show Politics although that only shows the first player's Politics. I recommend before beginning the hotseat to make a campaign of all factions that are going to be used and open them with the tool and see what's written for them in Politics. They generally follow a pattern though so you may be bale to figure it out. If you don't want to deal with any of these, have the same players initiate a new head to head campaign with the same factions corresponding to the hotseat and used it for step 2. You don't need to fill anything in the entries afterwards.

Diagnostics

  • If the game crashes, then that could be due to either not marking a faction as human or choosing a minor faction (the ones that you normally can't choose).
  • If the screen looks weird, you can't control anything and/or the turn order is stuck, then that could be due to choosing different factions for vision and playable or having more than one faction chosen as playable.

Known Issues

  • Fog of War acts up in the first turn. The severity depends on the game. You can either disable FoW (using the tool) for the first turn or just start the hotseat from turn 2. Either way a compromise has to be made.
  • Sometimes playing as a minor faction (the ones that you normally can't choose) crashes the game. (Maybe fixable with mods?)
  • Can't do diplomacy with other human players if the AI refuses your offers. Possibly fixable with mods, currently I've only found one for Attila though. Attila Mod.
  • Between humans' turns, AIs can make diplomacy with others and instead of you accepting or refusing their offers, an AI makes the decisions for you instead. (Maybe fixable with mods?)
  • Camera's zoom level sometimes freezes when you reach a player's turn. Just quick save and reload.
  • Program takes considerable time and memory to read or write a save file. Unfortunately this is due to my design choices and the programming language this is written in.

Bug Report and Contact

If you encounter an issue or want to ask a question, open an issue or join the Discord server.

Credits

Special thanks to Tomasz Wegrzanowski for his awesome guide, none of this would've been possible without it. Also credits to EditSF, used the tool immensely.

About

python library for ESF (total war)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors