A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Serpent

Author Topic: Serpent (2 messages, Page 1 of 1)
Moderators: Dennis

Joined: May 24, 2018

Brrrrrrring Ha!

Posted: Mar 15, 2019 01:59 PM    Msg. 1 of 2       
Here is a little fun project I did last month. This provides an alternative syntax for writing Halo scripting languages that is more similar to Lua than Lisp. Note that this doesn't add anything to the Halo scripting language, as I can't really make it do things you couldn't do before. I am planning on adding loops, though Halo's limited script stack size will mean you have to use these loops sparingly.

Here's an example Hello World script:
global string hello_world = "hello world"

startup start
developer_mode = 127
if (4 + 1) > 4
print("5 is greater than 4!")
elseif 5 / 0
print("wait, what?")

When parsed and converted into Halo script, it results in this script:
(global string hello_world "hello world")(script startup start (set developer_mode 127)(if (> (+ 4 1)4)(begin (print hello_world)(print "5 is greater than 4!"))(if (/ 5 0)(print "wait, what?"))))

The resulting script can then be compiled by Sapien into Halo Custom Edition. Unnecessary spaces and quotation marks are stripped and removed.

Again, this does not allow you to do anything you couldn't do in HSC before, but it may make scripting easier for people who are not used to Lisp. In the end, it's just a fun little project.

If you actually do want to use this, you will need Python. This might be a dealbreaker for some of you as Python can be really hard to install for some people, but if people are interested, I may make a more portable version later.

Source and further documentation: https://github.com/Kavawuvi/serpent

Edited by Kavawuvi on Mar 15, 2019 at 02:02 PM

Joined: Apr 3, 2011

I hope i'm out of the way

Posted: Mar 21, 2019 07:32 PM    Msg. 2 of 2       
Hey this is pretty damn neat. The HSC always looked like a mess of parenthesis to me. This is definitely an acceptable alternative.


Previous Older Thread    Next newer Thread

Time: Tue April 23, 2019 1:23 PM 172 ms.
A Halo Maps Website