Welcome to Open Carnage

A resource for gamers and technology enthusiasts, with unique means of rewarding content creation and support. Have a wander to see why we're worth the time!

Sign in to follow this  
Followers 0
Kavawuvi

HaloMD's console apparently accepts (short) scripts

When trying to enable commands like sv_name and some other cool things for client servers, nil had accidentally caused HaloMD to treat everything as a script. I made this a topic, because I wondered how useful this would be for anyone.

http://protonnebula.com/misc-files/vids/scriptconsole.mp4

In the video, I used all of these:

(begin (sv_map_reset) (sleep 30) (sv_map_reset) (sleep 30) (sv_map_reset))
(begin (sv_map_reset) (sleep 30) (sv_map_reset) (sleep 30) (sv_map_reset) (cls))
unit_kill (unit (list_get (players) 0))
(begin (rcon 123 sv_map_reset) (sleep 30) (rcon 123 sv_map_reset) (sleep 30) (rcon 123 sv_map_reset))

Know that it will fail if invalid syntax is given. If you were to miss parenthesis somewhere, or some other syntax error, it won't do anything. Of course, it can also crash, like if you used unit_kill in ui.map or something when a player is nonexistent or otherwise dead. The topmost command also does not need outside parenthesis, so one could use "begin (...) (...)" instead of "(begin (...) (...))". I included the parenthesis because it's good form.

The console can only show so much text onscreen, and the buffer is fixed length, so long scripts aren't useful. However, I could make a HaloMD plugin that allows script files to be bound to one command, like a count of three script.

WaeV, Samuco, swamp and 1 other like this

status.png?customhost=ProtonNebula.com:1

status.png?customhost=ProtonNebula.com:2

status.png?customhost=ProtonNebula.com:2

competent.png

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Could you increase the buffer to allow longer scripts?

Yes, but the buffer is already big enough that Halo can't fit it all onscreen. I'd just send scripts directly to the command handler instead. Edited by 002

status.png?customhost=ProtonNebula.com:1

status.png?customhost=ProtonNebula.com:2

status.png?customhost=ProtonNebula.com:2

competent.png

Share this post


Link to post
Share on other sites

If anyone's wondering, I was trying to find the branch that disallowed sv_name, sv_password and the like from working on non-dedis, and ended up either nopping a couple of jumps, or altered a boolean or two. Had also gained access to commands like medusa, but had no idea about scripts \=.

Share this post


Link to post
Share on other sites

This is awesome! Even if it doesn't stay part of HaloMD's feature set, at least one tool should offer this sort of functionality.

My idea was being able to insert a whole text file into Halo's script handler, so one could run Halo scripts with a plugin. Since it wouldn't be limited to the console's small buffer (since it's from the file, not the console prompt), one could put a full-sized script and execute it on the fly without ever needing to compile anything or build any cache file.

Floofies likes this

status.png?customhost=ProtonNebula.com:1

status.png?customhost=ProtonNebula.com:2

status.png?customhost=ProtonNebula.com:2

competent.png

Share this post


Link to post
Share on other sites

My idea was being able to insert a whole text file into Halo's script handler, so one could run Halo scripts with a plugin. Since it wouldn't be limited to the console's small buffer (since it's from the file, not the console prompt), one could put a full-sized script and execute it on the fly without ever needing to compile anything or build any cache file.

Sure, that sounds doable. Write up a quick demo app as a proof of concept?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.