PDA

View Full Version : EDU switcher for custom battle



hoom
10-18-2007, 07:16
THE EDU SWITCHER IS NOW SUPERCEEDED BY THE TRIVIAL SCRIPT ENGINE INCLUDED IN EB 1.1

(I figure this is probably a bit better place for this than buried in the main forum (https://forums.totalwar.org/vb/showthread.php?t=93169))

Intro
With EB having a separate EDU for playing Custom Battles & Multiplayer, the apparent need arose for an automated switcher for those who are lazy or those who get fuzzy about technical stuff.
I've written up two variants of batch file which perform this function.

How it works
There are two versions, menu driven & simple, choose which you want & use the code for that.

What the menu driven version does:
1: Menu gives several options, you can set for the mode you want on its own or set & then run EB. You can also exit with or without starting EB.
2: When setting modes, the game copies the EDU files from the "\EB\mp custom game edu" & "\EB\sp game edu backup" directories, renaming where apropriate.
It always overwrites the EDU in the "\EB\Data" folder but leaves the "\EB\mp custom game" edu & "\EB\sp game edu backup" copies unchanged.
3: When it starts the game it uses the following commandline options: -mod:eb -nm -show_err

What the simple version does:
1: Swaps in the Custom Battle or Multiplayer EDU.
2: Starts the game.
3: The window stays open in the background & when the game exits, it swaps back to the Campaign Mode EDU.

Instructions

1: Open Notepad.
2: Copy & Paste the relevant code (see below) into Notepad.
3: Save As "swap_edu.bat" (or whatever, just keep the .bat at the end).
4: Copy the .bat file to the same directory as the RomeTW.exe for your EB v1.0 install.
5: Make a shortcut & put it where you like to launch EB from.

The Code

Simple version:

@echo off
rem -EDU swapper for EB v1.0
rem -MK2.2
rem -by hoom 14 Oct 07
rem -tested on Windows XP, should work on other Windows versions but not tested
rem -feel free to use and alter as needed, its a very basic .bat file...
rem -Note: place this file in the same directory as your RomeTW.exe

rem -set for custommp EDU & start EB
echo Configuring EB for Custom Battle or Multiplayer then starting EB
echo.
@echo on
copy ".\EB\mp custom game edu\custom_edu.txt" .\EB\Data\export_descr_unit.txt
@echo off
rem -endstart
echo.
echo Now starting EB
echo.
echo This batch window should be left open until EB exits
echo to enable automatic reset to Campaign Mode
rem -start EB
call .\RomeTW.exe -mod:eb -nm -show_err

copy ".\EB\sp game edu backup\export_descr_unit.txt" .\EB\Data\export_descr_unit.txt
exit

Menu driven version:

@echo off
rem -EDU swapper for EB v1.0
rem -MK1.21
rem -by hoom 14 Oct 07
rem -tested on Windows XP, should work on other Windows versions but not tested
rem -feel free to use and alter as needed, its a very basic .bat file...
rem -Note: place this file in the same directory as your RomeTW.exe

rem -menu
:menu

rem -options
echo.
echo =================EDU swapper=================
echo 1 Campaign Mode
echo 2 Campaign Mode and start EB
echo 3 Custom Battle or Multiplayer
echo 4 Custom Battle or Multiplayer and start EB
echo 5 Exit and start EB
echo 6 Exit without starting EB
echo.

rem -the choice code
set choice=
set /p choice=choose an option:
rem if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto campaign
if '%choice%'=='2' goto campaignstart
if '%choice%'=='3' goto custommp
if '%choice%'=='4' goto custommpstart
if '%choice%'=='5' goto endstart
if '%choice%'=='6' goto end
echo '%choice%' is not valid, please try again
echo choose a number 1 to 6:
goto menu

rem -set for campaign EDU
:campaign
cls
echo.
echo You chose to configure EB for Campaign Mode
echo.
@echo on
copy ".\EB\sp game edu backup\export_descr_unit.txt" .\EB\Data\export_descr_unit.txt


@echo off
echo.
echo EB is now configured for Campaign Mode
goto menu

rem -set for campaign EDU & start EB
:campaignstart
cls
echo You chose to configure EB for Campaign Mode then start EB
echo.
@echo on
copy ".\EB\sp game edu backup\export_descr_unit.txt" .\EB\Data\export_descr_unit.txt


@echo off
goto endstart

rem -set for custommp EDU
:custommp
cls
echo.
echo You chose to configure EB for Custom Battle or Multiplayer
echo.
@echo on
copy ".\EB\mp custom game edu\custom_edu.txt" .\EB\Data\export_descr_unit.txt


@echo off
echo.
echo EB is now configured for Custom Battle or Multiplayer
goto menu

rem -set for custommp EDU & start EB
:custommpstart
cls
echo You chose to configure EB for Custom Battle or Multiplayer then start EB
echo.
@echo on
copy ".\EB\mp custom game edu\custom_edu.txt" .\EB\Data\export_descr_unit.txt


@echo off
goto endstart

rem -endstart
:endstart
cls
echo.
echo Now starting EB
echo This batch window should stay open until EB exits
echo to enable automatic reset to Campaign Mode.Mode
rem -start EB
start .\RomeTW.exe -mod:eb -nm -show_err

exit

rem -end without starting EB
:end
cls
echo.
echo You chose to exit without starting EB
pause
exit
Remember: If you use the menu version to swap the EDU files, make sure you run it & choose Campaign Mode when you want to play Campaign Mode!
Bad things happen if you try to play Campaign Mode with the Custom Battle EDU :skull:

THE EDU SWITCHER IS NOW SUPERCEEDED BY THE TRIVIAL SCRIPT ENGINE INCLUDED IN EB 1.1

overweightninja
10-18-2007, 13:01
Interesting, I'll certainly give this a try, sounds pretty useful!
Cheers!

TWFanatic
10-18-2007, 14:27
Hmm...I'm not sure if I understand entirely. Can't you accomplish the same thing by simply swapping out the files manually? It only takes 10 seconds.

hoom
10-19-2007, 11:43
Oh absolutely you can do exactly the same thing manually.

This just does it automatically for those who are lazy & those who get fuzzy about technical stuff :lam:

Mouzafphaerre
10-19-2007, 13:31
.
Thanks dear DOS nerd! It was good old days I had playing with my endless batch-files. XP's commands differ somewhat. Will have to study. :computer:
.

different_13
10-19-2007, 20:04
Just wanna say I've been using this since the moment I got 1.0 to work, and it's a godsend.

iceman7291
10-21-2007, 20:08
Thanks man, much appreciated.

praetoria
10-22-2007, 01:36
I am sorry, I am still unclear about what this actually does. I mean, I know that it switches the files that i can replace manually, but why do i need to do that? why do these files need to be copied over, there wasn't anything in the readme about that. I just don't understand what the Sp back up and etc. actually do for the game and why everyone is trying to figure out how to switch them.

hoom
10-22-2007, 04:38
They need to be switched if you want to play a Custom Battle or multiplayer with proper units available.

Using the Campaign EDU to play a Custom Battle, the game engine can't handle the number & variety of units available, particularly the various regionals & gives you a bizarre mix of available units.

So the EB team made a separate EDU for playing Custom Battle which restricts each faction to more historically used units.

Spartan Soldier
12-29-2007, 20:34
Is It working with Rome-ALX.exe too?

hoom
01-02-2008, 08:04
If the files are in the same directories, yes it'll work but I don't have the Alexander expansion so I have no way to check.

If they are in different directories you only need to change the paths for the files.

Spartan198
03-26-2008, 14:41
I've tried putting swap_edu.bat in both the Total War main folder and the EB folder,but I keep getting an error saying "Windows cannot find 'EBmecho'. Please make sure you typed the name correctly, and try again."

hoom
03-29-2008, 22:45
Seems like a space or enter replaced by an 'm' somehow.

Right click -> edit on the .bat file.

Check the lines, you'll probably find one looking like this:

echo Now starting
EBmecho.
Where it should look like this:

echo Now starting EB
echo.

If you can't find it just clear it out & re-copy the contents from my earlier post.

Spartan198
03-30-2008, 03:24
Thanks,hoom.

chairman
04-07-2008, 01:35
If I just wanted to switch out the files on my own where would I find the campaign edu? Also, in the FAQ it says something about renaming this and then move the mp custom to the EB/Data folder; what exactly is the order I need to do this in?

Thanks

Chairman

bovi
04-07-2008, 21:04
This ought to be obsolete in 1.1. The Trivial Script should be able to switch them around for you.

hoom
04-07-2008, 23:32
In the light of release of EB 1.1 incorporating a 'trivial script engine' that allows such things as swapping the EDU:
THE EDU SWITCHER IS NOW SUPERCEEDED BY THE TRIVIAL SCRIPT ENGINE INCLUDED IN EB 1.1

It was always my hope that EB would build in this sort of functionality so being there now, this unofficial mod is no longer needed :beam:

AymericNikator
04-20-2008, 14:23
Talking about it, could someone explain me how to make it work for 1.1 please? I want to use the new first cohort so bad ! :help:
Thanks