Author Topic: CoXMacroDrive [Program+Source]  (Read 8383 times)

Takinalis

  • Boss
  • ****
  • Posts: 107
CoXMacroDrive [Program+Source]
« on: March 16, 2014, 01:18:13 AM »
This post is the place to get CoXMacroDrive.
CoXMacroDrive - Version - 1.0.6.0 - Somewhat Tested

TIPS: Assume Cameraman should be running at all times. Cameraman is a program built by Codewalker. It is not included.

If launching a large map without filtering, get ready for a hang. When a hang happens, kill CoXMacroDrive.exe and XYZ.exe. Might be helpful to clear commands from the data directory.

NOTE: MAJOR CHANGE/(temporary?) workaround required.
CoXMacroDrive is now entirely dependent upon one use of /bind_load (as well as /accesslevel 9 same as before) upon entering the game. Without this command manually being entered COXMacroDrive WILL NOT FUNCTION.

I am sorry, I don't know how to make this for Macs  :'(
CoXMacroDrive is a program that monitors the file name output of the defunct costume_save command and drives some pretty cool macro and text iostream stuff from it.
Download
https://dl.dropboxusercontent.com/u/28521507/CoXMacroDrive.zip
Source Code
Included. Authored with Visual DialogScript 5.0 - Cross compatible with VDS 4.0
Requirements
Everything works in i24. Some functions may be limited in i23.
Instructions
1. Unzip package. Copy everything to your City of Heroes directory. Launch the correct CoXMacroDrive batch file.
2. Once in the game type /accesslevel 9 and press enter.  This is mandatory.
3. Once in the game type /bind_load and press enter.  This is mandatory.
4. Once you have entered the game, give "/popmenu coxmd" a  run through.
5. Come back here and review all the stuff below.
COMMANDS
All commands are preceded with "/costume_save ". This is what CoXMacroDrive monitors. This particular command is defunct and saves an old comma separated value version of your costume to the data directory. The contents of the file are not important. The name of the file is.
SPECIAL NOTE ABOUT DASHES: Dashes are actually a work around (excepting the fx color parameter) for MENU ITEMS. You can't have spaces in a costume_save in a menu item. You can in a macro button a bind or through typing in the command line. The reason for this has to do with quotation nesting.
/costume_save fx
This command accepts four primary parameters separated by dots, with the final command having spaces replaced by dashes.
Colors - 0 to 255, modifies Color1. "255-255-255" is max Red Green and Blue. Alternately "Default" can be used.
Costume - the costume we are modifying for the fx to be added or removed from.
FX - with "/" replaced with "."
Additional command string -  space replaced with dash.
Example: /costume_save fx.MyToon.Default.V_COV.ENEMYPOWERS.ARCHVILLAINS.SCIROCCO.SCIROCCO_SWORD.FX.seqbits-EMOTE-PROFILE-WEAPON-COMBAT-AXE-ATTACK-CHOP
/costume_save fxhold
This command is similar to the fx command above. It accepts three parameters. This is used when we don't know which costume to apply the fx to yet.
Colors - 0 to 255, modifies Color1. "255-255-255" is max Red Green and Blue. Alternately "Default" can be used.
FX - with "/" replaced with "."
Additional command string - space replaced with dash.
Example: fxhold.Default.V_COV.ENEMYPOWERS.ARCHVILLAINS.SCIROCCO.SCIROCCO_SWORD.FX.seqbits-EMOTE-PROFILE-WEAPON-COMBAT-AXE-ATTACK-CHOP
/costume_save fxapply
Applies the fxhold command to a costume. Takes one parameter.
Costume - Name of costume to apply to.
Example: /costume_save fxapply.MyToon-With-Dashes-Instead-of-Spaces
/costume_save move
Makes your avatar move forward for a limited number of seconds. One parameter.
Number of Seconds - [int] number of seconds to run forward.
Example: /costume_save move.5
/costume_save scale
Changes the scale of a costume. 300 is rougly 18 feet. 600 is about 36 feet. -50 is about 3 feet. two parameters.
Costume - Name of costume to apply to.
Scale - Scale number.
Example: /costume_save scale.MyToon.300
/costume_save seqbits
Seqbits hang. Alot. Sometimes sending them through macrodrive helps. It's an art. Seqbits space replaced with dash.
Seqbits - seqbits to be parsed.
Example: /costume_save seqbits.EMOTE-PROFILE-WEAPON-COMBAT-AXE-ATTACK-CHOP
/costume_save skdelay
Sets the sendkey delay for macros. One parameter.
Delay - delay as number.
Example: /costume_save skdelay.250
/costume_save teleport
Teleports your character.  This is considered a map command.  Relies upon xyz.exe created by me with Cheat Engine 6.2. - included. six parameters. xyz.ct source included.
X Whole Number - The whole number of X.
X  hundredths - hundredths of X.
Y Whole Number - The whole number of Y.
Y hundredths - hundredths of Y.
Z Whole Number - The whole number of Z.
Z hundredths - hundredths of Z.
Example: /costume_save teleport.130.48.320.01.-319.63
/costume_save spawnfile
Sets the folder to save spawn data to for later respawns. This is considered a map command. One parameter. Spawn files are stored in the root of the City of Heroes directory in a folder called mapspawn.
Spawn File - Spawn file to be created and stored as variable for saving mobs.
Example: /costume_save spawnfile.5thColumnCave30
/costume_save ydiff
Sets the offset of Y in storing spawn placements. This is considered a map command.  If the camera is attached to your avatar you need to have this set to the height of your character. This can be found by pressing F3 and going to Y 0. Launch Cameraman. Value of Y listed is the height of your character. Two parameters.
Offset Y whole number - Whole number value of offset.
Offset Y hundredths - hundredths value of Y.
Example: /costume_save ydiff.5.43
/costume_save tarry
Sets the maximum tarry value of NPC respawns by X and Z.  This is considered a map command.  One parameter.
Tarry value - value of tarry.
Example: /costume_save tarry.50
/costume_save xyznote
Allows you to add a note into the line items of spawnfile. This is considered a map command.  One parameter space replaced with dash.
Note - note-with-dashes-instead-of-spaces
Example: /costume_save xyznote.This-is-sparta-can't-exclaim-because-bad-mojo-for-files
/costume_save faction
Adds a faction tag to spawned mob names. Because I use this in my tabletop RPG for targeting (target_name Enemy). One parameter.
Faction - faction of targets saved to spawnfile. Technically SHOULD be Villain - Hero - Rogue or Vigilante. I usually just use Enemy or Ally.
Example: /costume_save faction.Ally
/costume_save group
Adds a group tag to spawned mob names. Because I use this in my tabletop RPG for targeting (target_name Longbow). One parameter.
group -group of targets saved to spawnfile.
Example: /costume_save group.Longbow
/costume_save storespawn
Stores the value of X Y and Z and spawnfile.txt. Relies on cameraman, if cameraman is not running a Longbow Agent will tell you.
Stores the values of group faction and parameters to spawnfile.txt.  Three parameters.
Model - Model of spawn
Name - Name of spawn
Additional - additional commands with space replaced with dash.
Example: costume_save storespawn.Longbow_Male_Group_01_Minion_01.Longbow.mov-SHOTGUN_ALERT_A
/costume_save spawnnow
Spawns a spawn folder specified by by parameter with delay parameter. Three parameters.
Folder - the folder to spawn.
Delay - the delay for send keys.
Filter - Things to exclude from the spawn, and the percentage chance for them to be excluded. Each filter is separated by a dash, and each filter percentage is separated from the filter by an underscore.
Global Filter - Percentage chance for any non-filtered item to be excluded.
Example: /costume_save spawnnow.sampler.250.NPC_50-Car_75.25
/costume_save clrxyznote
Clears the xyznote. No parameters.
/costume_save clrfaction
Clears the faction. No parameters.
/costume_save clrgroup
Clears the group. No parameters.
/costume_save close
Closes CoXMacroDrive but leaves the client active. CoXMacroDrive usually closes when the client closes.

1.0.0.2 updates
/costume_save storemov
Applies mov to last storespawn. One parameter.
Mov - mov specified.
Example: costume_save storemov.mov-shotgun_alert_a
/costume_save storeseqbits
Applies seqbits to last storespawn. One parameter.
Seqbits - seqbits parameters.
Example: costume_save storeseqbits.seqbits-EMOTE-PROFILE-WEAPON-COMBAT-AXE-ATTACK-CHOP

1.0.0.3 Updates
/costume_save delspawn
Removes the last entry from the current spawnfile file. No parameters.

1.0.0.4 Updates
/costume_save fxoneshot
Same as /costumesave fx, but fires once and removes the fx from the costume file. This should be considered the preferred fx apply method in most scenarios.
Colors - 0 to 255, modifies Color1. "255-255-255" is max Red Green and Blue. Alternately "Default" can be used.
Costume - the costume we are modifying for the fx to be added or removed from.
FX - with "/" replaced with "."
Additional command string -  space replaced with dash.
Example: /costume_save fxoneshot.MyToon.Default.V_COV.ENEMYPOWERS.ARCHVILLAINS.SCIROCCO.SCIROCCO_SWORD.FX.seqbits-EMOTE-PROFILE-WEAPON-COMBAT-AXE-ATTACK-CHOP

1.0.3.1 Updates
/costume_save delaycmd
Two parameters. Delay and command, requires dashes instead of spaces
Delay - Number of seconds as integer.
Command - Command string with dashes for spaces.
Example: /costume_save delaycmd.5.target_name-liberty$mov-dance1
/costume_save fire1
Applies fx. Three parameters, target as integer, power and continued command string.
Target as Integer - 0 = self, 1 = target
FX - with / replaced by .
Continued Commands - With dashes - instead of spaces.
Example: /seqbits COMBAT STRONG CAST ARCHITECT ONE$$target_name liberty$$costume_save fire1.0.POWERS.COLDCONTROL.ICEBLAST.fx$$costume_save delaycmd.1.seqbits-BRAWLING-QUICK-HIT-WEAPON$$costume_save delaycmd.1.unselect

1.0.4.2 Updates
/costume_save toonatcamera
Placed the player avatar at the camera. No parameters.
Example: /costume_save toonatcamera

1.0.5.6 Updates
/costume_save demospawn
Does NOT actually spawn a map. Launches a new process to handle standard processing. Converts a cohdemo to a map text file for the spawnnow command.
Example: /costume_save demospawn.Outbreak1

Version 1.0.0.1 - Removed debug message from group command.

Version 1.0.0.2 Added storemov and duplicate command storeseqbits (actually same code).

Version 1.0.0.3 Added delspawn and delxyz commands

Version 1.0.0.4 Minor bug fixes. Added fxoneshot command.

Version 1.0.0.5 Code refactoring. Added string replace $,$$ for continued command strings.
(/costume_save fxoneshot.Leon.Default.powers.energyblast.energyblast.fx.seqbits-COMBAT-RAPIDBLAST$target_name-enemy$seqbits-BRAWLING-QUICK-HIT-WEAPON)

Version 1.0.0.6 Bug fix.

Version 1.0.0.7 Bug fix.

Version 1.0.1.7 Major code refactoring. Converted all SendKey commands to keybind modifications. This caused /bind_load to become a requirement to use the program but eliminated several undesirable behaviors.

Version 1.0.1.7b Include keybinds.txt

Version 1.0.1.8 Minor change of skdelay call.

Version 1.0.1.8b Fixed incorrect version include of xyz.exe

Version 1.0.2.9 Cross compatible code, VDS4, VDS5. Eliminated Spawnfolders[mobs.txt][xyz.txt] combined to spawnfile.txt. Some floating functions for future updates not yet active. Fixed bug with storespawn when faction not set. Spawnfolder command defunct. Storexyz command defunct. Storefile command added.

Version 1.0.3.0 Code refactoring. Minor bug fix. Code tabulation.

Version 1.0.3.1 - Major Bug fixes. Fixed PVDS Launchers. Added Fire1 command. Added Delaycmd command. Permanent binds for turn_left calls. YAW stored to spawnsaves. Changes to coxmd popmenu. Changes to skdelay. NOTE: Random YAW for tarry no longer working. May add feature later.

Version 1.0.3.1b - Uploaded zip file to the correct folder, so it can actually be downloaded.

Version 1.0.4.2 - Added toonatcamera command. Project achieved steady state.

Version 1.0.4.3 - Minor bug fix.

Version 1.0.4.4 - Changed default skdelay to 250. Even though most (90%) computers can handle skdelay of 25, mine cannot so I have to assume that some other folks out there would struggle with 25 as well.

Version 1.0.4.5 - Corrected id10t error. Skdelay set back to 25.

Version 1.0.5.6 - Updated spawnnow command to include filters. Added already defunct under documented fastspawn command. Added demospawn command that parses cohdemo files.

Version 1.0.5.7 - Fixed runaway process bug from 1.0.5.6 when using demospawn command.

Version 1.0.5.8 - Fixed bug that killed teleport process. Fixed bug that caused error 25.

Version 1.0.5.9 - Speedturn modification, filter ratios now actually work for Spawnnow.

Version 1.0.6.0 - Added global exclusion ratio filter to spawnnow.
« Last Edit: March 29, 2014, 02:29:00 AM by brandoncomputer »
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive
« Reply #1 on: March 16, 2014, 04:32:08 AM »
Spawn and Save modification of NPC Menu.
https://dl.dropboxusercontent.com/u/28521507/npc.mnu

Thanks to batqueen for working on this MFH!
« Last Edit: March 18, 2014, 02:54:53 PM by brandoncomputer »
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive
« Reply #2 on: March 16, 2014, 05:36:50 AM »
Movement menu modified for storemov
https://dl.dropboxusercontent.com/u/28521507/mov.mnu
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive
« Reply #3 on: March 16, 2014, 05:43:53 AM »
If someone can test the costume_save function on a Mac and see if there's any output to the data folder I'd appreciate it. I just want to know if someone could hack together something for Mac users in the future... I don't even know if Macs have a language that supports SendKeys. The iostream functions should be easy enough.
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive
« Reply #4 on: March 17, 2014, 06:47:16 PM »
Spawnnow tips:

Either turn F5 on OR turn selectanyentity 1

Turning up skdelay helps for janky spawns.
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #5 on: March 18, 2014, 10:43:38 PM »
Please be sure all your spawns in mobs.txt line up with a point in xyz.txt.

I am going to recode to make these two files one file, and move away from directories. Upon request I might make a combine utility.

The reason for this is I am probably going to make a small community project to get the maps populated.

Let me know if you're interested in helping.

This is not a server project. Think of it as a memorial.
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #6 on: March 18, 2014, 10:59:47 PM »
With an upcoming code refactor I am going to make the script compatible with Personal VDS 4.0

pvds40 can be downloaded here. http://www.dialogscript.com/downloads/pvds400.exe
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #7 on: March 19, 2014, 04:47:10 PM »
Upcoming code refactor to remember YAW in map placements  ;D

Hmm... will slow down mapspawns significantly. Maybe an option... or something.
Valkyrie Blade - Virtue Server

Ice Trix

  • Boss
  • ****
  • Posts: 184
Re: CoXMacroDrive [Program+Source]
« Reply #8 on: March 19, 2014, 11:58:01 PM »
Looks great, and I cant wait to try it out.

Suggestion: Include a readme.txt of your post in the zip file.

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #9 on: March 20, 2014, 03:04:26 PM »
OK, don't get too involved in making NPC maps yet. More development to come.
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #10 on: March 21, 2014, 05:35:45 PM »
Expecting to post some updates today.

Should fix the problem with mapspawns, I didn't know there was a problem 'cause I usually have been running in debug mode ;(
Has to do with the speed that the client loads the bind file, CoXMD thought the load was finished before it was.

Come to think of it, this bug might have caused an untold number of janky behaviors.

Also should fix the PVDS Launchers, which are broke.
« Last Edit: March 21, 2014, 05:44:05 PM by brandoncomputer »
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #11 on: March 21, 2014, 10:50:43 PM »
Version number wrong LoL!

I'll just get the next one wrong as well to make up for it. Because two wrongs make it right!

Next version will be either 1.042 or 1.051.
« Last Edit: March 21, 2014, 11:56:50 PM by brandoncomputer »
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #12 on: March 22, 2014, 06:41:58 AM »
Steady state?

Means it's pretty well finished barring help from outside or learning about a unresolved bug, or new functionality added to icon or new data discovery about the client.

Have fun!

Please post your frustrations, difficulties or help request here.
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #13 on: March 22, 2014, 04:55:14 PM »
Strange, /bind_load doesn't seem to work from a menu item!  :o

At least not when chained together with other commands.

Is it just me?

Caused me all kinds of confusion this morning!

Menu "INIT"

{   

           Option "Initialize" "access_level 9$$shownewtray$$cleartray$$macro 1 costume_save move.1$$macro 2

costume_save move.2$$macro 3 costume_save move.3$$macro 4 costume_save move.4$$macro 5 costume_save move.5$$macro 6

costume_save move.6$$macro Maps popmenu Maps$$macro Contacts popmenu Contacts$$macro Mov popmenu Mov$$macro NPC popmenu NPC

$$macro Ply popmenu Players$$macro Combat popmenu Combat$$macro FX popmenu fx$$bind_load"
}
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #14 on: March 22, 2014, 10:17:13 PM »
OK... I was looking through a demorecord file... and I thought to myself "I can totally make a special command in CoXMacroDrive to process these"

Now, not precisely correct.

What I can do, is process them as mapspawn files. I can make NPC placements happen.

If it's popular, I might even make a costume parser ;p

Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #15 on: March 26, 2014, 04:49:19 AM »
Update:

Been working on a demorecord distiller that works EXTREMELY well, but I had added filters to it. Now I've realized that the demorecord distiller doesn't need filters, the spawner does.

Learned how to dramatically decrease rotation seek times, made a map that used to take 6 hours to spawn now take 1 hour. This is due to most mobs (on large maps) now having a rotation seek time of 0!

I would really really really (really! No I mean it!) appreciate people posting download links to demorecords.

I have the ones by Megajoule (sp?) BLESS HER!!  and a scarce few others.

Thanks!
« Last Edit: March 26, 2014, 04:57:42 AM by brandoncomputer »
Valkyrie Blade - Virtue Server

saipaman

  • Elite Boss
  • *****
  • Posts: 921
Re: CoXMacroDrive [Program+Source]
« Reply #16 on: March 26, 2014, 05:51:36 PM »
The link below takes you to three demos that I posted:

https://spideroak.com/browse/share/COX_DEMOS/2000/RECORDS_COX/Demos/

You can either download them all at once or highlight each one and use the download option on the right.

The dropship and protest demos might be more intense than you are looking for.  The Cryptic Lounge demo was recorded in Faultline in the hidden room.  It may be too tame for you.

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #17 on: March 27, 2014, 01:30:32 AM »
Thanks saipaman!

 ;D
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #18 on: March 27, 2014, 04:18:04 AM »
rewriting distiller  :-\
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #19 on: March 28, 2014, 02:33:40 AM »
Going to update spawnnow command to optimize mapspawns. As soon as my head stops hurting from 1.0.5.6
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #20 on: March 28, 2014, 03:01:13 AM »
Please do not download 1.0.5.6. HUGE bug.
Valkyrie Blade - Virtue Server

Takinalis

  • Boss
  • ****
  • Posts: 107
Re: CoXMacroDrive [Program+Source]
« Reply #21 on: March 28, 2014, 11:22:36 PM »
When spawning large maps, especially those derived from demorecords, be very very liberal in applying FILTERS.

Imperial City will get about half spawned before your client crashes.

HOWEVER

Ignore doors. Ignore Cars. Filter out 75% of critters named NPC... and you'll get further.

The client will crash because the server used to remove objects outside of a certain distance... our client can't do this by itself.  Even if it could, because my spawner spawns by YAW (mentioning this because target_custom_far alive could give you the furthest target with selectanyentity 1) it wouldn't matter. The objects would have to spawn by sequence, and when you went to that far area your spawns would be gone anyway.

SO!! FILTER FILTER FILTER!

HMMM... may make an algorithm to calculate creature spawnables! Also might test on varying computers to estimate max spawns.

Then with a must include list...  yeah. Slightly less popped maps may be possible if I can get a fairly accurate read on maximum objects on a map in the client.

Yeah. Full research is out of scope. I go back to work Monday  :-\ WHAT I WILL DO though is add a master filter variable. That way every object will be rolled for. So spawn 50%, 75%, etc.
« Last Edit: March 28, 2014, 11:30:43 PM by brandoncomputer »
Valkyrie Blade - Virtue Server

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: CoXMacroDrive [Program+Source]
« Reply #22 on: July 05, 2015, 12:48:20 AM »
Takinalis,

This looks awesome, I want to definetly try some of this out, as I am setting up a PnP with  Icon as a virtual table top, some of this does look a little bit daunting. Is there a more comprehensive use case/example showing all the commands being used together to help set up a table top?

 

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: CoXMacroDrive [Program+Source]
« Reply #23 on: July 06, 2015, 03:04:57 AM »
ok, so grokking coxmacro after a bit of playing around. think everything is working except loading spawns, will continue to play around.