Author Topic: AI War macros  (Read 3417 times)

Offline Cyborg

  • Master Member Mark III
  • *****
  • Posts: 1,926
AI War macros
« on: June 02, 2013, 03:04:06 PM »
glovepie is my favorite macro software. Freepie is a decent competitor as well and only getting better.


Yes I realize that the former has a very eccentric author, but let's ignore that and just focus on the modding capability.


The problem we are trying to solve here is typing everything a million times is really annoying. Let's face it, 100,000 metal doesn't go very far these days, and who wants to type it over and over? So here is a script that will bind a cheat code to a single key. Great for beta testing and for folks who find this sort of thing amusing.



Quote
Keyboard.NumLock=swallow(keyboard.Apostrophe)
Keyboard.ScrollLock=swallow(keyboard.Semicolon)
Keyboard.ScrollLock=swallow(keyboard.o)


If keyboard.o
press(keyboard.Enter)
Release(keyboard.Enter)
press(keyboard.e)
Release(keyboard.e)
press(keyboard.n)
Release(keyboard.n)
press(keyboard.e)
Release(keyboard.e)
press(keyboard.r)
Release(keyboard.r)
press(keyboard.g)
Release(keyboard.g)
press(keyboard.i)
Release(keyboard.i)
press(keyboard.z)
Release(keyboard.z)
press(keyboard.e)
Release(keyboard.e)
press(keyboard.Enter)
Release(keyboard.Enter)
wait .5 seconds
end if


If keyboard.Apostrophe
press(keyboard.Enter)
Release(keyboard.Enter)
press(keyboard.m)
Release(keyboard.m)
press(keyboard.e)
Release(keyboard.e)
press(keyboard.t)
Release(keyboard.t)
press(keyboard.a)
Release(keyboard.a)
press(keyboard.l)
Release(keyboard.l)
press(keyboard.Space)
Release(keyboard.Space)
press(keyboard.h)
Release(keyboard.h)
press(keyboard.e)
Release(keyboard.e)
press(keyboard.a)
Release(keyboard.a)
press(keyboard.d)
Release(keyboard.d)
press(keyboard.Enter)
Release(keyboard.Enter)
wait .5 seconds
end if


If keyboard.Semicolon
press(keyboard.Enter)
Release(keyboard.Enter)
press(keyboard.o)
Release(keyboard.o)
press(keyboard.h)
Release(keyboard.h)
press(keyboard.m)
Release(keyboard.m)
press(keyboard.Enter)
Release(keyboard.Enter)
wait .5 seconds
end if
Kahuna strategy guide:
http://www.arcengames.com/forums/index.php/topic,13369.0.html

Suggestions, bugs? Don't be lazy, give back:
http://www.arcengames.com/mantisbt/

Planetcracker. Believe it.

The stigma of hunger. http://wayw.re/Vi12BK

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: AI War macros
« Reply #1 on: June 10, 2013, 04:44:05 PM »
Yea, I know I've spent more dev time than made sense pasting in "metal head" way too many times just to keep a test build from stalling out...

Anyway, this thread inspired the following that just came out in the 6.045 release:

Quote
* Added new chat command "load_script:(filename)" where you replace (filename) with the name (without extension) of a .txt file in your RuntimeData/ChatScripts/ directory.  When run, this command will treat each line in that file as a chat line from you, including commands and cheats.
** So for example you could have a file named "test.txt" in the ChatScripts directory, with the lines:
***cmd:enable cheats
***cleanup aisle three
***ilostit,FighterII,-12300,6700,84,0
***ilostit,BomberII,-10300,4700,84,8
** And then execute that by entering "load_script:test" (without the double quotes, of course) in the chat box and pressing enter.  The result is that it would wipe the currently viewed planet and spawn a group of fighters versus a group of bombers.  This is probably useful for balance testing, among other things.

So you could definitely use this for 30 applications of "metal head" or 50 of "activate the omega" or whatever.  Creating the file initially is a minor task, but I imagine no moreso than creating one of those macro files :)

Edit: of course, this doesn't bind it to a key, but it does save you from piecing the cheats together one letter at a time.
« Last Edit: June 10, 2013, 04:45:55 PM by keith.lamothe »
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Aklyon

  • Core Member
  • *****
  • Posts: 2,089
Re: AI War macros
« Reply #2 on: June 10, 2013, 04:53:03 PM »
Edit: of course, this doesn't bind it to a key, but it does if you make a keypress macro to macro your macro
;)

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: AI War macros
« Reply #3 on: June 10, 2013, 04:55:40 PM »
Edit: of course, this doesn't bind it to a key, but it does if you make a keypress macro to macro your macro
;)
The game will absolutely let you make an infinite loop with this, by the way, so careful with that ;)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,557
Re: AI War macros
« Reply #4 on: June 10, 2013, 11:02:16 PM »
Now if only ilostit allowed an optional parameter specifying which player a ship would spawn for (defaulting to the player who typed in the command, like it does now), then we could use this script to "stage" battles for balance testing purposes or just playing around. ;)

Offline Oralordos

  • Sr. Member Mark III
  • ****
  • Posts: 434
  • Suffering from Chronic Backstabbing Disorder
Re: AI War macros
« Reply #5 on: June 11, 2013, 01:01:49 AM »
It does, look in the release notes for the current version.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,557
Re: AI War macros
« Reply #6 on: June 11, 2013, 01:27:16 AM »
It does, look in the release notes for the current version.

Oh, I didn't see that. :P

Thanks. :)

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: AI War macros
« Reply #7 on: June 11, 2013, 11:17:28 AM »
For once, TechSY730, I was ahead of you ;)  You were the specific player in mind when I added that argument, though it's pretty useful for my purposes too.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!