How to edit halo:Pc scripts

Tutorials for the PC version of Halo 1.
Post Reply
conure




Enthraller Articulatist 250

Posts: 365
Joined: Sun Apr 17, 2005 8:37 pm
Contact:

How to edit halo:Pc scripts

Post by conure »

Tools needed 1. Open HPS and go into the files menu and hit "preferences". Once open set your "Tag script syntax?" to yes and hit save. Like so in my picture below

http://i43.photobucket.com/albums/e381/ ... cture1.jpg

2. Once you are done with that open up a10.map, expand the scripts and select "x20_post". You will notice that the decompiled code looks like this

Code: Select all

(script stub void x20_post
 <-7018> ( </-7018>
 <-7017> begin </-7017>
 <-7021> ( </-7021>
 <-7020> print </-7020>
 <-7019> joe's cool ass cinematic </-7019>
)
http://i43.photobucket.com/albums/e381/ ... cture2.jpg

Now what that tells us is what part of the script is affected by what syntax chunk. For instance the "print" command is -7021/-7020. You may be confused by what i just said, what i means is that every command has 2 parts to it. It has a 8 and a 9, the -7021 is the 8 part and the -7020 is the 9 part. For decompilation purposes i use the 9 as it holds the string, but its engine identity is the same as the 8 so to change a command you need to change both the 9 and the 8.

That is probably confusing if you have never done this before so dont get caught up on it and just follow the tutorial and you will probably come to understand what i mean.

3. In the "script type" drop down select continuous.

http://i43.photobucket.com/albums/e381/ ... cture3.jpg

4. Expand the "x20_post" script bit.

Now what we want to do here is change the x20_post script from

Code: Select all

(script stub void x20_post
 (begin
  (print " joe's cool ass cinematic")
 )
)
to

Code: Select all

(script continuous void x20_post
 (begin
  (game_speed 2)
 )
)
As you can see we only need to change a handful of syntax parts, specifically -7021, -7020, and -7019.

5. First we need to find the engine value of "game_speed", to do this open up the "ComDat.xml" in the folder hps is in. If you do a search for "game_speed" you find this xml node

Code: Select all

 <ScriptCommand>
  <EngineId>255</EngineId>
  <EngineCommand>game_speed</EngineCommand>
 </ScriptCommand>

from this we know that its engine identity is 255. Now select -7021 and changes its engine identity from 28 (print) to 255 (game_speed), and hit enter to save. Now go to -7020 and do the same thing.

6.Now we have to edit the value of -7019 so that it is a float equal to 0.5, and not a string. Now bear with me because as i was doing this i found out something new bout syntaxs so you will have do something weird in a minute.

In the syntax change the engine identity to 6 (in a 0 based index the type "Real" is #6), value type to "real", and the script value to 1073741824.
Now we made it 1073741824 because that is the value of a integer that would be the value of a "real" that is 2. If you are using a version above 0.5 you wont need to do this because i plan to fix the code right after i post this.

That is all there is to doing a simple script edit. If you have any questions please post them and i will do my best to answer them, and i do realize this script didnt cover much but its hard to explain without specific questions regarding it.
Halomods member wrote:tags meta? There is no such thing for Halo PC.
User avatar
Philly




Collaborator

Posts: 3607
Joined: Thu Oct 12, 2006 9:08 am

Post by Philly »

It's good to read something, and then realise that you didn't understand a word, isn't it?
Scripting is something I'd love to go into, but it just looks too hard for me. So, what does this script edit do?
For anybody still wondering where FTD has gone, here it is.
conure




Enthraller Articulatist 250

Posts: 365
Joined: Sun Apr 17, 2005 8:37 pm
Contact:

Post by conure »

Philly wrote:It's good to read something, and then realise that you didn't understand a word, isn't it?
Scripting is something I'd love to go into, but it just looks too hard for me. So, what does this script edit do?
Changes the game_speed to 2, this makes the game go twice as fast.
It seems to be a little glitchy in game were it works sometimes but other times doesnt, might help if it was made a "startup" script and not continuous.

Edit: and no that isnt good, this is hard for me to explain to someone who hasnt done it before. If you wana learn this stuff i suggest you just read through the scritps and look at the syntax values.
Halomods member wrote:tags meta? There is no such thing for Halo PC.
User avatar
hiheyhello





Posts: 781
Joined: Sun Oct 07, 2007 11:03 am
Location: ontario

Post by hiheyhello »

i didn't understand any of that.. im not the computer smart type..
conure your so smart :), but i do think it would prove useful.
Tural wrote:I like to pretend I have friends.
User avatar
Pepsi




Snitch! Wordewatician 500

Posts: 2052
Joined: Thu Dec 28, 2006 11:11 pm
Location: Stalking Hamp With A PipeWrench

Post by Pepsi »

i totally forgot about this conure!! :cry: :cry: :cry:

consider us even cause you never finished my library UI sounds. :wink:
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

how does this not make sense. here go learn html...and youll pick this up in a blast. (even though i have forgotten all the html i have ever learned) lol.

anyways good tutorial. makes sense to me.
User avatar
Patrickh




Wordewatician 500

Posts: 1173
Joined: Wed Mar 14, 2007 4:53 pm

Post by Patrickh »

Andrew_b wrote:how does this not make sense. here go learn html...and youll pick this up in a blast. (even though i have forgotten all the html i have ever learned) lol.

anyways good tutorial. makes sense to me.
what does this have to do with html?
with this, it's all about xml and hsc.

This is very cool btw conure, especially once idiots like me figure out how to expand tree branches :P
Image
conure says: or i could jsut incase my shoes in papar mache, followed by my dog
|||Lethargy||| Mr. Mohawk|||
|||feel free to contact me via PMs, AIM, MSNM, or Xfire if you have any questions|||
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

html is coding. kinda gets you used to coding. atleast it helped me :P
User avatar
Pepsi




Snitch! Wordewatician 500

Posts: 2052
Joined: Thu Dec 28, 2006 11:11 pm
Location: Stalking Hamp With A PipeWrench

Post by Pepsi »

First off, this has nothing to do with html period. Its not even close. The closest thing it would mildly resemble as a web based language would be php and maybe css, but thats on looks alone not function.

These are XML based as Patrick has said before. HTML and XML may look kinda the same but operate on totally different aspects.

Watch this vid andrew ...

http://youtube.com/watch?v=NLlGopyXT_g

I tried to show you it a few nights on Xfire but UPS kept spamming TOOL vids so it might have been lost in the convo. You might get your mind blown and learn something along the way :wink:
Life is not how you survive the storm, but how you dance in the rain
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

couldnt follow the video...to tired.

anyways all i was implying is. The structure of html will help you familiarize yourself with the structure of scripting. and html is one of the most basic languages so its easy for nubs to learn

in html you open tags and close em. same with scripting
(script startup blah
(command)
)

HTML:
<html>
<body><P>Blah</P></body>
</html>

see closing what you open. thats all i was saying. it just helps a bit. Or it helped me.
User avatar
Pepsi




Snitch! Wordewatician 500

Posts: 2052
Joined: Thu Dec 28, 2006 11:11 pm
Location: Stalking Hamp With A PipeWrench

Post by Pepsi »

so your telling me that if i know where arguments <begin> and </end> i will know more about scripting.

No andrew, I would know where to stop editing. Knowing HTML does not clue you in on scripting. Yes, the opening and closing arguments are the same structure but what about everything in the middle? How does HTML refer to that? Give me some more examples then of more HTML instances besides argument opening/closings in scripting and you might have a valid argument.

Honestly, I still think your rushing to compare the two since they look alike on one thing.

Also, your HTML is lacking..

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Andrew's Blah Page </TITLE>
<META NAME="Generator" CONTENT="phpBB WYSIWYG Editor">
<META NAME="Author" CONTENT="Pepsi">
<META NAME="Keywords" CONTENT="Pepsi, Andrew, HTML, Conure, Script">
<META NAME="Description" CONTENT="Conure's Tutorial on Scripting">
</HEAD>
<BODY BGCOLOR=#000000>
<P>
<CENTER>
<FONT COLOR="#77000">Blah? Heh.</FONT>
</CENTER>
<P>
</BODY>
</HTML>

After all this im done arguing with you. Im dropping it. If you want to mislead people then go right ahead. Btw, That basic page I just wrote? I don't see scripting anywhere in it.
Last edited by Pepsi on Sun Jan 13, 2008 4:25 am, edited 2 times in total.
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

Ahha. my forgotten html codes. lol.

I never said they used the same coding in the middle. i just said they open and close like scripts :P
User avatar
Philly




Collaborator

Posts: 3607
Joined: Thu Oct 12, 2006 9:08 am

Post by Philly »

^^^^
He's right. Learning how to open and close elements properly is a basic, yet useful skill to learn, which can be applied to more than HTML coding. For me, learning the HTML basics has made it easy enough to understand the XML files that are extracted with HMT metadata, and the plugins that power the program. So, HTML coding and scripting are related, they just look different, and use different characters.
For anybody still wondering where FTD has gone, here it is.
conure




Enthraller Articulatist 250

Posts: 365
Joined: Sun Apr 17, 2005 8:37 pm
Contact:

Post by conure »

To be honest scripting is ugly, and i say that after it having been my first "language". The more i learn to code in RB the hard it is for me to script cause it just doesn't seem right. Also html fails at scripting, i say xml (or at any rates thats how i am gona implement script injection) watch this....

Code: Select all

<root>
 <Script TypeAttr="begin" ReTypeAttr="void" NameAttr="LawlsScript">
  <ScrCommand CommandAttr="Sleep" KidArgAttr="short:5"/>
 </script>
</root>
Now thats a lot more akin to scripting then HTML will ever be. Even if HTML may help you with coding ideas it doesn't necessarily help you with specifically scripting.
Halomods member wrote:tags meta? There is no such thing for Halo PC.
Post Reply