Scripting a Local Game?

For all the help you need with Armagetron!
Post Reply
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Scripting a Local Game?

Post by sinewav »

Is it possible? I think the answer is no because I would probably be doing it already. If it is possible, can someone point me to a guide?
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Scripting a Local Game?

Post by Light »

sinewav wrote:Is it possible? I think the answer is no because I would probably be doing it already. If it is possible, can someone point me to a guide?
I believe the 0.4 client has the SPAWN_SCRIPT command that may work for you. No guarantee as I have never tried a local game with scripting. Alternatively, I could throw a server up for you and give you FTP access to the configs, but offline may work. In fact, I'll go try it out quick and I'll reply here if it does.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Scripting a Local Game?

Post by Light »

The 0.4 client cannot. I forgot that my servers are sty+ct, so that client may be capable of it in a local game. I thought 0.4 servers pulled the script stuff from sty+ct, but idk .. So, my advice would be to try the sty+ct client, or I'll be happy to provide you a server to play around it. If you set max players to 1, it's basically gonna be a local game since you won't hit lag for the reasons of other players. It would also be running on a decent 8 core CPU, so maybe even better than local depending on your build. :P
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Scripting a Local Game?

Post by Light »

Just pulled the latest sty+ct client as well, and the SPAWN_SCRIPT command is nowhere to be found in a local game.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Scripting a Local Game?

Post by Lucifer »

You could try looking into the Ruby bindings. They've been sorta code-rotting, though, and may not work. I have no idea what's implemented there, though.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Scripting a Local Game?

Post by sinewav »

Ah, bummer. Thanks for looking into this. I thought since the client has the "Host Game" option that there were some server capabilities. I don't have the desire to learn Ruby. If I can't just throw a PHP or Python script in there I'm not going to bother. I might be able to get around the limitation using map/config rotation.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Scripting a Local Game?

Post by Light »

Lucifer wrote:You could try looking into the Ruby bindings. They've been sorta code-rotting, though, and may not work. I have no idea what's implemented there, though.
It would probably be easier to just run a server and connect locally. As long as you don't forward the ports, nobody's gonna join your game. If they're on Windows, I think they just open an exe file and call it done. Custom connect on 127.0.0.1 port 4534 (I think ..).
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Scripting a Local Game?

Post by Lucifer »

Light wrote: It would probably be easier to just run a server and connect locally. As long as you don't forward the ports, nobody's gonna join your game. If they're on Windows, I think they just open an exe file and call it done. Custom connect on 127.0.0.1 port 4534 (I think ..).
You shouldn't even need to custom connect. The LAN broadcast system works pretty well.

Sinewav: I agree that I'd rather have python bindings. The decision was made by "whoever was going to implement scripting first", which was made by DLH, and we support that decision because he actually did that work. :)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Scripting a Local Game?

Post by Light »

Lucifer wrote:You shouldn't even need to custom connect. The LAN broadcast system works pretty well.
Forgot about that one. :P I never do LAN games for AA.
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Re: Scripting a Local Game?

Post by voodoo »

I use to made a few experiment with this one:
https://code.launchpad.net/~armagetrona ... sty+ct+lua

Dunno if kyle still have a server up somewhere but I was starting some experiment running flower power and catfight using lua scripting. The idea is that you can bind a script to a map (map_file_name.lua) and setup callbacks on ladderlog events. That was still experimental though.
Post Reply