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 »If you could add a new function to Halo Script what would it be?

Author Topic: If you could add a new function to Halo Script what would it be? (34 messages, Page 1 of 1)
Moderators: Dennis

Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 8, 2013 02:21 AM    Msg. 1 of 34       
I have the scripting language fully implemented in 12D now and I have written all the basic commands that you would expect. But I want to know what kind of stuff you guys want to see.

Posts from the other thread:
Quote:
And back on topic...

After quite a bit of debugging I've gotten the scripting engine running with basic functions.

Test Script:

(var boolean test_boolean false)
(var boolean test_boolean2 true)
(var int test_int 1)
(var int test_int2 125)
(var int test_int3 -10020)

(script all dormant "test"
(if test_boolean
(begin
(log "test boolean is true")
)
(begin
(log "test boolean is false")
)
)
(if (== test_int2 125)
(begin
(log "equals")
)
(begin
(log "not equals")
)
)
(log (<= 1 4))
)

Interpreter output:

- (script all dormant "test" <4> <10> <12> )
-- Call:If ID#4 Src: (if <-1> <1> <3>)
--- Call:Variable ID#-1 Src: test_boolean
--- Call:Begin ID#1 Src: (begin <0>)
---- Call:Log ID#0 Src: (log <-1>)
----- Call:Constant ID#-1 Src: test boolean is true
--- Call:Begin ID#3 Src: (begin <2>)
---- Call:Log ID#2 Src: (log <-1>)
----- Call:Constant ID#-1 Src: test boolean is false
-- Call:If ID#10 Src: (if <5> <7> <9>)
--- Call:Equals ID#5 Src: (== <-1> <-2>)
---- Call:Variable ID#-1 Src: test_int2
---- Call:Constant ID#-2 Src: 125
--- Call:Begin ID#7 Src: (begin <6>)
---- Call:Log ID#6 Src: (log <-1>)
----- Call:Constant ID#-1 Src: equals
--- Call:Begin ID#9 Src: (begin <8>)
---- Call:Log ID#8 Src: (log <-1>)
----- Call:Constant ID#-1 Src: not equals
-- Call:Log ID#12 Src: (log <11>)
--- Call:Lequal ID#11 Src: (<= <-1> <-2>)
---- Call:Constant ID#-1 Src: 1
---- Call:Constant ID#-2 Src: 4

And when I enter wake test into the console I get this in the log:

test boolean is false
equals
true

If you'll notice the interpreter output is quite informative now

And if you look closely you might find some built in casting. Mmmmmm girllllll. Look at that casting.

Writing custom functions is pretty easy to do. Though writing functions that stop the scripting language is a bit complex. (stuff like sleep and begin). I learned a lot about interpreting code like this though so next time it'll be better

In the end it's all functional so yay.


Quote:
Added some more functions:
spawn <tag path> <script id> <x> <y> <z> returns void
actor <script id> returns actorID
invoke <actorID> <function to invoke> <opt param0> <opt param1> <opt param2> etc... returns void

Spawn let's you spawn a actor by giving it's tag, the scripting name you want it to have and an x y z coord.
Actor let's you get an actor by it's script name. It returns the actor id.
Invoke lets you invoke a function on an actor in the world. Invoke functions are relative to the type of actor you are invoking on. All actors have basic invoke functions like "location" "rotation" "push" and "destroy". Bipeds have invoke functions like "jump" and "animation". Weapons have invoke functions like "ammo" and "fire".


Code I tested with to make sure everything was working.

(spawn "object/scenery/raichu.scenery" "Toasty" 0 0 0)
(sleep 120)
(invoke (actor "Toasty") location 0 0 -50)
(sleep 60)
(invoke (actor "Toasty") rotation 0 1.2 0)
(sleep 60)
(invoke (actor "Toasty") destroy)
(log "Toasty was a bitch")



Quote:
And final bit of stuff for today (I've been constantly interrupted today by life )

New script functions:
add <value> <value> returns addition of the 2 values
set <variable> <value> returns void
while <boolean> <do> returns void
until <boolean> returns void

Shouldn't have to explain the first two.
While will continually run it's <do> parameter until the boolean is false.
Until will sleep until the <boolean> parameter is true.

Test code:

(script all dormant "whiletest"
(log "testing while")
(while (< test_int4 30)
(begin
(log "Still running...")
(set test_int4 (add test_int4 1))
(log test_int4)
)
)
(log "done!")
)

(script all dormant "sleepuntiltest"
(log "sleeping until test_boolean2 is true)
(until test_boolean2)
(log "test_boolean2 is now true so now we can continue!")
)

(script all dormant "settestbool2"
(set test_boolean2 true)
)

Both are working as expected.


Dumb AI
Joined: Sep 18, 2011

Dead.


Posted: Jul 8, 2013 02:23 AM    Msg. 2 of 34       
The OS ones (that are used most often) would be nice to have.

Doesn't match your criteria but they would be quite useful.
Edited by Dumb AI on Jul 8, 2013 at 02:27 AM


Masters1337
Joined: Mar 5, 2006

halonaminator's unfortunate idol


Posted: Jul 8, 2013 02:46 AM    Msg. 3 of 34       
How bout al the stock commands before new ones?


MatthewDratt
Joined: Sep 11, 2010

TAKEDOWN IS OUT MattDratt.com


Posted: Jul 8, 2013 02:57 AM    Msg. 4 of 34       
(object_create_anew_at_flag [object] [flag]) - creates a new object at a flag
(camera_dof <value> ) - set depth of field in a cinematic
(camera_set_at_speed [camera point] [starting speed] [camera point 2]) - starts a camera at a specific speed heading towards camera point 2. Would then run much like the regular camera. If doesn't find another camera point in the script soon it would then stop at camera point 2. If there is another script soon, it would carry on


Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 8, 2013 03:02 AM    Msg. 5 of 34       
Quote: --- Original message by: Masters1337
How bout al the stock commands before new ones?


I'm going to devote a day to writing a drak ton of them at once. Will put in all the useful halo ones and any requests that I get.

Making new commands is easy sauce. I just extend the script call class and fill in the code for execute and return methods.


Quote: --- Original message by: Dumb AI

The OS ones (that are used most often) would be nice to have.

Doesn't match your criteria but they would be quite useful.
Edited by Dumb AI on Jul 8, 2013 at 02:27 AM


Not familiar with OS. Details?
Edited by Not Inferno on Jul 8, 2013 at 03:03 AM
Edited by Not Inferno on Jul 8, 2013 at 03:04 AM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Jul 8, 2013 03:29 AM    Msg. 6 of 34       
Quote: --- Original message by: Not Inferno
Quote: --- Original message by: Dumb AI

The OS ones (that are used most often) would be nice to have.

Doesn't match your criteria but they would be quite useful.
Edited by Dumb AI on Jul 8, 2013 at 02:27 AM


Not familiar with OS. Details?

https://code.google.com/p/open-sauce/wiki/Doc_Halo1_NewScriptInterfaces


Go grab random H2 ones too. If you dont have H2's hs_doc.txt, here it is
http://www.mediafire.com/view/avdodgfuajexmam/H2V_-_hs_doc.txt

Sine, Cosine, Tangent, etc. Things to detect exactly which player, touched what keys such as jump, fire, etc (Player_action tests are useless in MP lol, need to know who did what). Things where the host can set all the clients global to something, and something for clients to set a hosts global (so they can communicate any information without a security hole like rcon) of course, then you'd have to add public and private globals so the clients couldnt effect what they aren't meant too.


Storm
Joined: Dec 19, 2011

Send memes to www.loganpaul.com/cliffhanger


Posted: Jul 8, 2013 06:04 AM    Msg. 7 of 34       
Night/Day function

Allow the game to scroll through day and night events to spice up the multiplayer and single player experiences.

Suggestions for the function name:

day_night_cycle <boolean>

set_time_day <time of day in ms>

set_time_night <time of night in ms>


Hobbet360
Joined: Jan 10, 2012

ProTools > ToolPro


Posted: Jul 8, 2013 06:48 AM    Msg. 8 of 34       
object_set_as_ragdoll <object_name> <boolean>


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Jul 8, 2013 04:37 PM    Msg. 9 of 34       
Quote: --- Original message by: hobbet360
object_set_as_ragdoll <object_name> <boolean>



Why would this be a script command? why not just incorporate it into the game? so that it's part of the whole dying thing. You die, it plays a nice little animation, now your bodies limp. Though a command to turn it on or off would be pretty cool. Something like.

(unit_enable_ragdoll <unit> <boolean>)

Anyway, just a suggestion.
Edited by grunt_eater on Jul 8, 2013 at 04:38 PM


Xtralaos
Joined: Jun 1, 2013

"I AM THE GREATEST!"


Posted: Jul 8, 2013 04:44 PM    Msg. 10 of 34       
Well... I don't know any commands but I sure wish there will be possiblities for Sprinting or using special things like Jetpacks/Promethean Vision/etc without having to sacrifice existing commands (Ex: Crouch)
Edited by Xtralaos on Jul 8, 2013 at 04:45 PM


Hobbet360
Joined: Jan 10, 2012

ProTools > ToolPro


Posted: Jul 8, 2013 09:09 PM    Msg. 11 of 34       
Quote: --- Original message by: grunt_eater

Quote: --- Original message by: hobbet360
object_set_as_ragdoll <object_name> <boolean>



Why would this be a script command? why not just incorporate it into the game? so that it's part of the whole dying thing. You die, it plays a nice little animation, now your bodies limp. Though a command to turn it on or off would be pretty cool. Something like.

(unit_enable_ragdoll <unit> <boolean>)

Anyway, just a suggestion.
Edited by grunt_eater on Jul 8, 2013 at 04:38 PM


Idk...

I JUST WANT THINGS TO FLOP!!! xD


Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 9, 2013 01:54 AM    Msg. 12 of 34       
YOU SHALL HAVE FLOP!

Just finished up converting all my rotation code to quaternion (http://en.wikipedia.org/wiki/Quaternion) so that JBullet3d would properly integrate with stuff.

Results:
http://www.youtube.com/watch?v=r2wrey_U4kg

:D

With the base rigid body physics engine in place I can add in vehicle physics and ragdoll.
Edited by Not Inferno on Jul 9, 2013 at 01:54 AM


1bobsam1
Joined: Mar 18, 2010

I win. You lose.


Posted: Jul 9, 2013 05:16 AM    Msg. 13 of 34       
Add in Screen Space Ambient Occlusion, please.


Dwood
Joined: Oct 23, 2007

Judge Ye Therefore


Posted: Jul 9, 2013 10:05 PM    Msg. 14 of 34       
Add the scripting ability to change player huds, bitmaps, or bsp textures, sky, etc. Those are fairly simple datum_index changes, imo but I don't know if you're using Halo's tag system or not.


renegade343
Joined: Jun 26, 2012

CE3 Stage Modeler, Editor, and Writer


Posted: Jul 9, 2013 10:39 PM    Msg. 15 of 34       
Some of the functions from HAC2 and Open Sauce like multiple grenades, equipment (you'll see what I mean this Saturday), multi-team vehicles, bookmarked servers, vehicles you can stand on while moving...
All that fun stuff. Is that possible with 12D?


Dwood
Joined: Oct 23, 2007

Judge Ye Therefore


Posted: Jul 10, 2013 12:22 AM    Msg. 16 of 34       
First person legs.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Jul 10, 2013 01:22 AM    Msg. 17 of 34       
A better tracking system for players in multiplayer, the ability to track the children and creations of a specified player(weapons, projectiles, ect)


Aer
Joined: Jun 1, 2013

ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn


Posted: Jul 10, 2013 01:47 AM    Msg. 18 of 34       
exchange the weapons with IA, and secondary weapon (elite with rifle/sword) too


Hobbet360
Joined: Jan 10, 2012

ProTools > ToolPro


Posted: Jul 10, 2013 02:20 AM    Msg. 19 of 34       
Proper net code? (just going along with the suggestions)

More floppier flop.


Captain Obvious
Joined: Aug 8, 2011

My avatar quote is not very interesting.


Posted: Jul 10, 2013 03:27 AM    Msg. 20 of 34       
An optional game mode that allows infinite inventory instead of 2 guns


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Jul 10, 2013 10:35 AM    Msg. 21 of 34       
Well you can add i think up to 4 or 5 in a scenario file. But think about it, where would masterchief put 93 guns? And what would happen when he ran out of ammo with one? Or had two shots left and you wanted to ditch it, but when you go to pick up another weapon it just adds a new slot. Sifting through them would be to time consuming and annoying to find the right one before you got killed. I mean, maybe for an open world game. But not here.

Just my opinion.


Dumb AI
Joined: Sep 18, 2011

Dead.


Posted: Jul 10, 2013 10:55 AM    Msg. 22 of 34       
Quote: --- Original message by: Dwood
First person legs.

COD still doesn't have first person legs.

Speaking of FP stuff, I say it would be cool to allow multiple animations that are meant for the same purpose (more than one firing animation, more reload and melee animations, etc)


Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 10, 2013 12:36 PM    Msg. 23 of 34       
Going to answer as many of these at once as I can.

(object_create_anew_at_flag [object] [flag]) - creates a new object at a flag
Already exists as (spawn <tag> <sid> <x> <y> <z>)

(camera_dof <value> ) - set depth of field in a cinematic
Planning on having it so you can create your own post processing shaders and apply them at will. So this will be possible (and more :o)

(camera_set_at_speed [camera point] [starting speed] [camera point 2])
Should be possible.

https://code.google.com/p/open-sauce/wiki/Doc_Halo1_NewScriptInterfaces


Go grab random H2 ones too. If you dont have H2's hs_doc.txt, here it is
http://www.mediafire.com/view/avdodgfuajexmam/H2V_-_hs_doc.txt

Sine, Cosine, Tangent, etc. Things to detect exactly which player, touched what keys such as jump, fire, etc (Player_action tests are useless in MP lol, need to know who did what). Things where the host can set all the clients global to something, and something for clients to set a hosts global (so they can communicate any information without a security hole like rcon) of course, then you'd have to add public and private globals so the clients couldnt effect what they aren't meant too.


Detecting keys, will do. Server <-> Client communication is already partiallyd one. I can add more to it as I go. I'll look through those two sets of commands as well.

Night/Day function
Already partially there. Probably won't be a script function but just a part of the scenario (that sync ofc)

object_set_as_ragdoll <object_name> <boolean>
Possible to do but won't be a script function per say. You can just spawn ragdolls in.

Well... I don't know any commands but I sure wish there will be possiblities for Sprinting or using special things like Jetpacks/Promethean Vision/etc without having to sacrifice existing commands (Ex: Crouch)


Should be possible. Though Promethean vision would require a lot of work.

Add in Screen Space Ambient Occlusion, please.
Already possible. Would just have to stick an SSAO shader into the post processing.

Add the scripting ability to change player huds, bitmaps, or bsp textures, sky, etc. Those are fairly simple datum_index changes, imo but I don't know if you're using Halo's tag system or not.


Huds: possible.
Bitmaps on models: not possible due to model instancing
BSP: textures... maybe.
Sky: possible


Some of the functions from HAC2 and Open Sauce like multiple grenades, equipment (you'll see what I mean this Saturday), multi-team vehicles, bookmarked servers, vehicles you can stand on while moving...
All that fun stuff. Is that possible with 12D?

Most of that stuff is engine stuff. All that is possible within the source.


First person legs.

Can do.

A better tracking system for players in multiplayer, the ability to track the children and creations of a specified player(weapons, projectiles, ect)

I'll look into that.


exchange the weapons with IA, and secondary weapon (elite with rifle/sword) too

I'll add a command to swap equipment for players and AI.


Proper net code? (just going along with the suggestions)

That was done a long time ago haha.

An optional game mode that allows infinite inventory instead of 2 guns

Not really a scripting thing but it should be possible. I'm going to rewrite my inventory management code so, idk.


Speaking of FP stuff, I say it would be cool to allow multiple animations that are meant for the same purpose (more than one firing animation, more reload and melee animations, etc)

That's a coding change but good idea, will do.


renegade343
Joined: Jun 26, 2012

CE3 Stage Modeler, Editor, and Writer


Posted: Jul 10, 2013 01:30 PM    Msg. 24 of 34       
Don't external server apps like SAPP do that, already?


GLaDOS
Joined: Dec 6, 2011

Testing you.


Posted: Jul 10, 2013 03:06 PM    Msg. 25 of 34       
How about Cinematic Subtitles?


SOI_7
Joined: Mar 23, 2012

Welcome to the true man's world


Posted: Jul 10, 2013 03:35 PM    Msg. 26 of 34       
Quote: --- Original message by: GLaDOS
How about Cinematic Subtitles?

This can actually be done using Chapter Titles, but unluckily you can't exceed a certain number of phrases :/


Mangenkyo
Joined: Jul 14, 2009

Yep!.. i know i'm in Space..


Posted: Jul 10, 2013 06:54 PM    Msg. 27 of 34       
Quote: --- Original message by: SOI_7
Quote: --- Original message by: GLaDOS
How about Cinematic Subtitles?

This can actually be done using Chapter Titles, but unluckily you can't exceed a certain number of phrases :/


Exactly, that IS the problem...


Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 10, 2013 11:14 PM    Msg. 28 of 34       
Just finished working for today..
Added cubemap support.
Added UV rotation + animation.

https://www.youtube.com/watch?v=hAOwZ4Yib8c&feature=c4-overview&list=UUfB9IEEK0vis5-OImwOIUyQ
Edited by Not Inferno on Jul 10, 2013 at 11:15 PM


OrangeJuice
Joined: Jan 29, 2009

Documentation and debug.txt


Posted: Jul 11, 2013 04:24 AM    Msg. 29 of 34       
Mouse-wheel walking speed, like in SplinterCell

Speed based sound and sound-based stealth and sound-level aware AI?
Edited by OrangeJuice on Jul 11, 2013 at 04:25 AM


Hobbet360
Joined: Jan 10, 2012

ProTools > ToolPro


Posted: Jul 11, 2013 06:10 AM    Msg. 30 of 34       
Quote: --- Original message by: OrangeJuice

Mouse-wheel walking speed, like in SplinterCell

Speed based sound and sound-based stealth and sound-level aware AI?
Edited by OrangeJuice on Jul 11, 2013 at 04:25 AM


Just came back from playing Chaos Theory. :P

I LIKE MY AVATAR!!! :D
Edited by hobbet360 on Jul 11, 2013 at 06:11 AM


Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 12, 2013 12:47 AM    Msg. 31 of 34       
New video:
http://www.youtube.com/watch?v=ig9gPviYrsw&feature=youtu.be

Worked on stuff. Added distance based fog as parameters in the BSP tag:

*snip*
//Skybox for this bsp
sky<graphics/model/sky/halo clear sky.model>

//Information about the distance fog in the sky
fogStart<32>
fogEnd<512>
fogDensity<0.4>
fogColor<0.07,0.22,0.66,1.3>
*snip*


Also imported the halo pistol cubemap. Works great. Though apparently halo does it's cubemaps in order:
x y -x -y z -z

Where my engine does:
x -x y -y z -z

So I had to swap the images around a bit to figure it out. :P
Might be an OGL vs DX thing.


Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 13, 2013 12:14 AM    Msg. 32 of 34       
New video:

www.youtube.com/watch?v=mvHELhzEM5c

Made a simple 2 state sky (Mid Day - Mid Night) to test this out.
A normal sky would need at least 4 states (Morning - Mid Day - Evening - Mid Night) to look right :P
The system is modular so you could have a sky with 12 states if you wanted.


P3
Joined: Dec 2, 2011


Posted: Jul 13, 2013 11:01 AM    Msg. 33 of 34       
Is it possible for you to make it so you could play as different characters with other people for multiplayer? Like elite, flood, spartan, brute, you know. Stuff like that in the same game of course. Like a vs game. Maybe like an infection game where you turn into flood or something.


Not Inferno
Joined: Jun 1, 2013

Nigrish


Posted: Jul 15, 2013 11:25 PM    Msg. 34 of 34       
Alright so some under the hood changes today:

- Unified all 3d stuff to floats. I had a sort of half and half mix of floats and doubles and I was constantly casting between them. Now 100% floats. This was suggested by someone who knows a lot more about game engines than me.

- Tag reading has been unified. I'm going to make all tags use the same syntax loosely based on JSON (thanks flibit for the suggestion :P)

- The shader scalar system has been opened up and you can now have up to 27 scalar floats fed into a shader This will allows you to do whatever the drak you want with that. Shader scalars are like the A OUT, B OUT stuff in halo tags. You can give a shader a float and it'll use it in rendering. Common uses would be turning on and off lights on a warthog or making tire treads spin based on the warthogs speed, or making numbers on an ammo counter move. ETC ETC ETC ETC

Quote: --- Original message by: Mootjuh

Is it possible for other light sources to kick in when it gets dark?
Edited by Mootjuh on Jul 13, 2013 at 06:56 AM


Sort of yes, there are 3 types of lights currently.
Glow lights, Line lights, and Sun light. Glow and line lights can be created and drakked with at will (fully dynamic lights). Sun light is set when you load the BSP.

Quote: --- Original message by: P3
Is it possible for you to make it so you could play as different characters with other people for multiplayer? Like elite, flood, spartan, brute, you know. Stuff like that in the same game of course. Like a vs game. Maybe like an infection game where you turn into flood or something.


Yup, you could code a gamemode like that pretty easy.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 7:11 AM 172 ms.
A Halo Maps Website