Log in

View Full Version : My leaderless setup with /assist and KeyClone



supertux1
09-21-2008, 07:50 AM
I tried a dozen different ways to get targetting to work, setting main via /focus then using target=focustarget, setting a target then just /assist, and I've finally settled on something that works.

The concept is to /assist whichever toon is the effective main for every action that needs a target, and then just to cast normally with nothing special in [target=]

So the task then is 'how do we communicate to the rest of the alts which one of them is _currently_ the main'?

To do that, I use KeyClone hotstrings. With each keypress, KeyClone is setup to send a 'modified' version of that key press to all the clients with a combination of alt, shift and control.

It uses these three keys as binary selectors to communicate from which toon the key was pressed. Thus, all toons know who to assist.

This is the same thing as the leaderless / focusless setup previously discussed on the forums, except I've modified the macro part to do all the targetting in one line.

My Toons, all level 50 now!

Xpall/Asham/Bsham/Csham/Dsham

I use trinity bars for big macros and binding them to keys. Here it is:

/assist [nomod:ctrl,mod:alt,nomod:shift,target=Asham][nomod:ctrl,mod:alt,mod:shift,target=Bsham][mod:ctrl,nomod:alt,nomod:shift,target=Csham][mod:ctrl,nomod:alt,mod:shift,target=Dsham[nomod:ctrl,nomod:alt,mod:shift,target=Xpall]

/cast [help,nodead,exists] nice spell; [harm,nodead,exists] nasty spell, etc...

Note that when the key is pressed on the 'main' no ctrl/alt/shift combination is sent so the /assist line does nothing and the mains target is not changed.

The only issues I've had so far is that when quickly switching targets it doesn't always work, some of the toons remain on their previous target, but slow down the button mashing a little and it works. :)

I think this is a server side limitation due to lag and the clients not getting the new target at the same time or quick enough. (Going to be a problem no matter what the targetting solution is.)

I wrote a Perl script that writes my keyclone hotstring files and edits the whitelist for me too.

I wrote a batch file that uses junction.exe to have only one copy of the game's big data files and addons, but makes as many clones as I wish without wasting disk space.

I got another batch file which copies over WTF settings from a designated 'main' account and then renames the directories and even does a search and replace inside of the .LUA saved variables files too.

(You'd be surprised how many addons record the account name, and toon name inside of their files so that simply copying them from a main won't work.)

sthar
09-21-2008, 10:00 AM
Any chance that you would be able to share the "I got another batch file which copies over WTF settings from a designated 'main' account and then renames the directories and even does a search and replace inside of the .LUA saved variables files too." batch file? Would rly make it so much easier adjusting settings.

supertux1
09-21-2008, 06:20 PM
@ECHO OFF


REM this is fixwtf.bat


SET WOWDIR1=C:\WOW1
SET WOWDIR2=C:\WOW2
SET WOWDIR3=C:\WOW3
SET WOWDIR4=C:\WOW4
SET WOWDIR5=C:\WOW5

SET REALM=Elune
SET PERLSCRIPT=C:\MultiBox\fixtoon.pl

SET CLONE1A=Account1
SET CLONE1T=Toon1

SET CLONE2A=Account2
SET CLONE2T=Toon2

SET CLONE3A=Account3
SET CLONE3T=Toon3

SET CLONE4A=Account4
SET CLONE4T=Toon4

SET CLONE5A=Account5
SET CLONE5T=Toon5

SET WOWDIRT=%WOWDIR1%
SET CLONETA=%CLONE1A%
SET CLONETT=%CLONE1T%

SET BACKUPDIR=C:\MultiBox\BACKUPT

echo Backing Up Character and Account WoW Macros
mkdir %BACKUPDIR%

copy /Y %WOWDIR1%\WTF\Account\%CLONE1A%\macros-cache.txt %BACKUPDIR%\macro1.bak
copy /Y %WOWDIR2%\WTF\Account\%CLONE1A%\macros-cache.txt %BACKUPDIR%\macro2.bak
copy /Y %WOWDIR3%\WTF\Account\%CLONE3A%\macros-cache.txt %BACKUPDIR%\macro3.bak
copy /Y %WOWDIR4%\WTF\Account\%CLONE4A%\macros-cache.txt %BACKUPDIR%\macro4.bak
copy /Y %WOWDIR5%\WTF\Account\%CLONE5A%\macros-cache.txt %BACKUPDIR%\macro5.bak

copy /Y %WOWDIR1%\WTF\Account\%CLONE1A%\%REALM%\%CLONE1T%\ macros-cache.txt %BACKUPDIR%\tmacro1.bak
copy /Y %WOWDIR2%\WTF\Account\%CLONE2A%\%REALM%\%CLONE2T%\ macros-cache.txt %BACKUPDIR%\tmacro2.bak
copy /Y %WOWDIR3%\WTF\Account\%CLONE3A%\%REALM%\%CLONE3T%\ macros-cache.txt %BACKUPDIR%\tmacro3.bak
copy /Y %WOWDIR4%\WTF\Account\%CLONE4A%\%REALM%\%CLONE4T%\ macros-cache.txt %BACKUPDIR%\tmacro4.bak
copy /Y %WOWDIR5%\WTF\Account\%CLONE5A%\%REALM%\%CLONE5T%\ macros-cache.txt %BACKUPDIR%\tmacro5.bak

echo Backing Up Template Account WTF

rd /s /q %BACKUPDIR%\WTF
mkdir %BACKUPDIR%\WTF
xcopy %WOWDIRT%\WTF\*.* %BACKUPDIR%\WTF /e /y /o /h /i /g /r /k /x

echo Removing ALL WTF Directories

rd /s /q %WOWDIR1%\WTF
rd /s /q %WOWDIR2%\WTF
rd /s /q %WOWDIR3%\WTF
rd /s /q %WOWDIR4%\WTF
rd /s /q %WOWDIR5%\WTF

md %WOWDIR1%\WTF
md %WOWDIR2%\WTF
md %WOWDIR3%\WTF
md %WOWDIR4%\WTF
md %WOWDIR5%\WTF

echo Copying WTF Settings from Template Account

copy %BACKUPDIR%\WTF\Config.wtf %WOWDIR1%\WTF\Config.wtf
copy %BACKUPDIR%\WTF\Config.wtf %WOWDIR2%\WTF\Config.wtf
copy %BACKUPDIR%\WTF\Config.wtf %WOWDIR3%\WTF\Config.wtf
copy %BACKUPDIR%\WTF\Config.wtf %WOWDIR4%\WTF\Config.wtf
copy %BACKUPDIR%\WTF\Config.wtf %WOWDIR5%\WTF\Config.wtf

xcopy %BACKUPDIR%\WTF\Account\%CLONETA%\*.* %WOWDIR1%\WTF\Account\%CLONE1A% /e /y /o /h /i /g /r /k /x
xcopy %BACKUPDIR%\WTF\Account\%CLONETA%\*.* %WOWDIR2%\WTF\Account\%CLONE2A% /e /y /o /h /i /g /r /k /x
xcopy %BACKUPDIR%\WTF\Account\%CLONETA%\*.* %WOWDIR3%\WTF\Account\%CLONE3A% /e /y /o /h /i /g /r /k /x
xcopy %BACKUPDIR%\WTF\Account\%CLONETA%\*.* %WOWDIR4%\WTF\Account\%CLONE4A% /e /y /o /h /i /g /r /k /x
xcopy %BACKUPDIR%\WTF\Account\%CLONETA%\*.* %WOWDIR5%\WTF\Account\%CLONE5A% /e /y /o /h /i /g /r /k /x

echo Renaming Toons

rename %WOWDIR1%\WTF\Account\%CLONE1A%\%REALM%\%CLONETT% %CLONE1T%
rename %WOWDIR2%\WTF\Account\%CLONE2A%\%REALM%\%CLONETT% %CLONE2T%
rename %WOWDIR3%\WTF\Account\%CLONE3A%\%REALM%\%CLONETT% %CLONE3T%
rename %WOWDIR4%\WTF\Account\%CLONE4A%\%REALM%\%CLONETT% %CLONE4T%
rename %WOWDIR5%\WTF\Account\%CLONE5A%\%REALM%\%CLONETT% %CLONE5T%

echo Replacing Template Account Name and Template Toon Name in Addon LUA Variable Files.

perl %PERLSCRIPT% %WOWDIR1%\WTF\Account\%CLONE1A% %CLONETA% %CLONE1A% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR1%\WTF\Account\%CLONE1A% %CLONETT% %CLONE1T% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR2%\WTF\Account\%CLONE2A% %CLONETA% %CLONE2A% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR2%\WTF\Account\%CLONE2A% %CLONETT% %CLONE2T% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR3%\WTF\Account\%CLONE3A% %CLONETA% %CLONE3A% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR3%\WTF\Account\%CLONE3A% %CLONETT% %CLONE3T% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR4%\WTF\Account\%CLONE4A% %CLONETA% %CLONE4A% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR4%\WTF\Account\%CLONE4A% %CLONETT% %CLONE4T% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR5%\WTF\Account\%CLONE5A% %CLONETA% %CLONE5A% macros-cache.txt
perl %PERLSCRIPT% %WOWDIR5%\WTF\Account\%CLONE5A% %CLONETT% %CLONE5T% macros-cache.txt

echo Copying Macros Back

copy /Y %BACKUPDIR%\macro1.bak %WOWDIR1%\WTF\Account\%CLONE1A%\macros-cache.txt
copy /Y %BACKUPDIR%\macro2.bak %WOWDIR2%\WTF\Account\%CLONE2A%\macros-cache.txt
copy /Y %BACKUPDIR%\macro3.bak %WOWDIR3%\WTF\Account\%CLONE3A%\macros-cache.txt
copy /Y %BACKUPDIR%\macro4.bak %WOWDIR4%\WTF\Account\%CLONE4A%\macros-cache.txt
copy /Y %BACKUPDIR%\macro5.bak %WOWDIR5%\WTF\Account\%CLONE5A%\macros-cache.txt

copy /Y %BACKUPDIR%\tmacro1.bak %WOWDIR1%\WTF\Account\%CLONE1A%\%REALM%\%CLONE1T%\ macros-cache.txt
copy /Y %BACKUPDIR%\tmacro2.bak %WOWDIR2%\WTF\Account\%CLONE2A%\%REALM%\%CLONE2T%\ macros-cache.txt
copy /Y %BACKUPDIR%\tmacro3.bak %WOWDIR3%\WTF\Account\%CLONE3A%\%REALM%\%CLONE3T%\ macros-cache.txt
copy /Y %BACKUPDIR%\tmacro4.bak %WOWDIR4%\WTF\Account\%CLONE4A%\%REALM%\%CLONE4T%\ macros-cache.txt
copy /Y %BACKUPDIR%\tmacro5.bak %WOWDIR5%\WTF\Account\%CLONE5A%\%REALM%\%CLONE5T%\ macros-cache.txt

pause

supertux1
09-21-2008, 06:21 PM
#!perl
use File::Copy;

# Recursively change a string in bunch of text files
# Usage: fixtoon.pl path fromstring tostring


my $dirname = $ARGV[0];
my $fromstring = $ARGV[1];
my $tostring = $ARGV[2];
my @skiplist = ($ARGV[3]);


recurse_dirs($dirname);

sub recurse_dirs
{
my ($dir) = @_;
print "Looking in $dir\n";
opendir(DIR, "$dir") or die "Can't open: $!\n";
my @alldir = readdir(DIR);
closedir(DIR);
foreach $file (@alldir) {
if (($file eq "..") || ($file eq ".")) { next; }
my $fullpath = $dir."\\".$file ('file://%22.$file/');
if (-d $fullpath) {
recurse_dirs($fullpath);
} else {
if ( grep { $file eq $_ } @skiplist) {
print "Skipping $fullpath\n";
} else {
fixfile($fullpath,$fromstring,$tostring);
}
}
}
}


sub fixfile {
my ($file,$from,$to) = @_;
if (open(my $fh,$file)) {
my $newfile = "$file.tmp";
if (open(my $fh2,">$newfile")) {
while ( my $line = <$fh> ) {
if (($line =~ m/\/target/i) || ($line =~ m/\/cast/i) || ($line =~ m/\/assist/i )) {
print "Ignoring Line $line\n";
} else {
if ($line =~ m/$from/i ) {
print "Fixing line in $file\n";
$line =~ s/$from/$to/ig;
}
}
print $fh2 $line;
}
close($fh2);
}
close($fh);
unlink($file);
move($newfile,$file);
}
}

supertux1
09-21-2008, 06:22 PM
@ECHO OFF

REM This script uses junction.exe to make 5 separate
REM copies of WoW that share the same WoW game data
REM files and addons. (The big files.)

REM Set WOWARCHIVE to a complete backup copy of the game w/Addons.

REM This will be copied to a 'root' master folder and the big game
REM alt/clone game folders will be hard linked to this root copy.

REM Each game instance can still have their own writable files and
REM directories. (WTF,Errors,Cache,Logs) etc...

REM Each game instance will share the game program data files and addons.

REM Note that junction.exe can only link directories and not files
REM so the top level WoW executables are copies. (couple meg, not bad.)

SET WOWARCHIVE=C:\WOWARCHIVE

SET WOWROOT=C:\WOWROOT
SET WOWDIR1=C:\WOW1
SET WOWDIR2=C:\WOW2
SET WOWDIR3=C:\WOW3
SET WOWDIR4=C:\WOW4
SET WOWDIR5=C:\WOW5

SET WOWDIRT=%WOWDIR1%

SET BACKUPDIR=C:\MultiBox\BACKUP2

SET JUNCTION=C:\Windows\System32\junction.exe

rd /s /q %BACKUPDIR%\WTF
mkdir %BACKUPDIR%\WTF
xcopy %WOWDIRT%\WTF\*.* %BACKUPDIR%\WTF /e /y /o /h /i /g /r /k /x

rd /s /q %WOWROOT%
rd /s /q %WOWDIR1%
rd /s /q %WOWDIR2%
rd /s /q %WOWDIR3%
rd /s /q %WOWDIR4%
rd /s /q %WOWDIR5%
md %WOWROOT%
md %WOWDIR1%
md %WOWDIR2%
md %WOWDIR3%
md %WOWDIR4%
md %WOWDIR5%

xcopy %WOWARCHIVE%\*.* %WOWROOT%\ /E

echo \Data\ > %WOWROOT%\excludes.txt
echo \Interface\ >> %WOWROOT%\excludes.txt
echo \WTF\ >> %WOWROOT%\excludes.txt
echo \excludes.txt\ >> %WOWROOT%\excludes.txt

xcopy %WOWROOT%\*.* %WOWDIR1% /E /EXCLUDE:%WOWROOT%\excludes.txt
xcopy %WOWROOT%\*.* %WOWDIR2% /E /EXCLUDE:%WOWROOT%\excludes.txt
xcopy %WOWROOT%\*.* %WOWDIR3% /E /EXCLUDE:%WOWROOT%\excludes.txt
xcopy %WOWROOT%\*.* %WOWDIR4% /E /EXCLUDE:%WOWROOT%\excludes.txt
xcopy %WOWROOT%\*.* %WOWDIR5% /E /EXCLUDE:%WOWROOT%\excludes.txt

%JUNCTION% %WOWDIR1%\Data %WOWROOT%\Data
%JUNCTION% %WOWDIR2%\Data %WOWROOT%\Data
%JUNCTION% %WOWDIR3%\Data %WOWROOT%\Data
%JUNCTION% %WOWDIR4%\Data %WOWROOT%\Data
%JUNCTION% %WOWDIR5%\Data %WOWROOT%\Data

%JUNCTION% %WOWDIR1%\Interface %WOWROOT%\Interface
%JUNCTION% %WOWDIR2%\Interface %WOWROOT%\Interface
%JUNCTION% %WOWDIR3%\Interface %WOWROOT%\Interface
%JUNCTION% %WOWDIR4%\Interface %WOWROOT%\Interface
%JUNCTION% %WOWDIR5%\Interface %WOWROOT%\Interface

echo Done. Follow up with fixwtf.bat now.

pause

supertux1
09-21-2008, 06:27 PM
There it is, basically, unpolished and will probably need modification if you want to use it on _YOUR_ system, but you get the general idea.

I couldn't post my keyclone hotstring maker script because it was too big. :(