PDA

View Full Version : making Single player maps?



Warningshot3
January 28th, 2008, 10:04 PM
Is it possible? Yes it is!

Ok this is what I did.

1st I created a new scenario file with h2tool because tool includes one script. the only visable scripts in h2sapien with the debug_scripting is startup ones, HG must have made the others invisible to try and stop us but don’t be fooled they are there.

2nd I opened the scenario in h2sapien

3rd I opened winhex and opened up the ram, h2sapien, entire memory.

4th found the offset to the hex value that holds the size of the pre compiled scripts, it was 3C, changed it to 01FF, saved winhex, went to sapien and saved that too. (see h2sapien fragments the scenario file in the ram so when I changed the hex value and saved sapien it would go pass the end of the fragmented part and take extra bytes with it and then restructures the .scenario file with the extra 65000 bytes. Much faster then having to do it manually. Luckily for me the fragmented part ended right after the existing script in the scenario otherwise this wouldn’t work.

5th I opened up the .scenario file into winhex and zeroed out the extra bytes in the script area. It starts with (script static unit player0 (unit (list_get (players) 0))) and ended about 65000 bytes later.

6th I entered my stupidly long scripts into the zeroed out area and made sure that there is no 00 terminators in the script area, the 00 hex value will make sapien stop reading the scipts. Oh yeah I then saved winhex.

My stupidly long script



(script static unit player0 (unit (list_get (players) 0)))

(script static void cinematic_fade_from_white_bars
(begin
(cinematic_stop)
(cinematic_show_letterbox_immediate True)
(camera_control False)
(fade_in 1 1 1 15)
(sleep 15)
(player_enable_input True)
(player_camera_control True)
)
)


(script startup mission_01a
(begin
(player_disable_movement false)
(player_camera_control true)
(if (game_is_cooperative)
(game_won))
(objectives_clear)
(ai_allegiance player human)
(fade_out 1 1 1 0)
(hud_enable_training False)
(ai_dialogue_enable False)
(unit_set_maximum_vitality (player0) 30 1)
(camera_control true)
(sleep 1)
(cache_block_for_one_frame)
(sleep 2)
(cinematic_fade_from_white_bars)
(hud_cinematic_fade 1 0.5)
(cinematic_show_letterbox False)
)
)

7th fired up h2sapien and did “debug_scripting 1”, “script_recompile” and sometimes I do “run_game_scripts” if I need to test the scipts. I then saved h2sapien.

8th built a cache file aka packaged the level, put it into h2 vista map directory and replaced a singleplayer map, opened up h2, loaded up the map and blam! a working singleplayer map.

The only way to quit the map is to quit h2, that’s cuz I don’t have the sp UI tags and even if I did h2tool wont add them to the map cuz im packaging the map as multiplayer and that’s the only kind of map h2tool allows.

Pyong Kawaguchi
January 28th, 2008, 10:20 PM
Its not possible in h2v.. Also, mp maps wont work as sp maps because it isnt set up properly Locked pl0x anyways, h2v is fail, move to ce...

Warningshot3
January 28th, 2008, 10:33 PM
ok... but lets say i have unlocked tools (sapien guerulla and tool), what would need to be set up in order to make a SP map?

Martini-562
January 29th, 2008, 11:22 AM
quick question then, do you have unlocked tool, sapien and guerilla?
if not, I bet your not gonna succeed

EDIT: I didnt really read the first post sorry.

I think you'll have to look at the maps themselves if you eventually get something that allows you to view them. unless of couse someone has allready secretly made a h2v SP map

p0lar_bear
January 29th, 2008, 07:30 PM
You need the ability to script checkpoints, cutscenes, and do it as though you were scripting for the XBox version, and be able to compile the scripts into your scenario. As far as I know, there is no compiler for Halo 2 scripts, as h2sapien doesn't provide the means, and nobody cares enough about H2V to make one.

CanadianPanda
January 29th, 2008, 10:38 PM
Theres is no tool "YET" for singleplayer modding!

(Hides in his closet with flash like and laptop...I dont have anything in the process)


okay fine yes there is something in the process but youll have to wait and see!

Warningshot3
January 30th, 2008, 12:14 AM
@ m-562, I dont have unlocked tools.

@ p0lar_bear, thanks.

@ canadianPanda, nice.

well in a nutshell what im trying to do is get a muliplayer map to work in sp by changing the scenario file after compiling but because there isnt a good h2v tools i cant do much so im trying it on the xbox.

im sure its a script thats needed but there is so many in sp maps i just cant find the ones needed. also why does zanzibar have cinematic, diffuculty and other scripts?

CanadianPanda
January 30th, 2008, 07:03 AM
Isnt it the only one that has something that happens wehn you press a button build into the level? (meaning the gate) I dont really know i was just curious.

Kornman00
January 30th, 2008, 04:40 PM
you can't make a default MP map run as a SP map in H2V. The map would have to be rebuilt for the SP layout (on xbox it didn't matter). Yes I know I'm being vague.

Vicky
January 30th, 2008, 05:15 PM
Yes I know I'm being vague.

What's new? :P

Warningshot3
January 30th, 2008, 09:14 PM
thanks Kornman00. so hex editing is a waste of time?

Kornman00
January 31st, 2008, 12:20 PM
yeah

armoman92
February 2nd, 2008, 06:33 PM
what does " [nutshell] " code do???

Warningshot3
February 2nd, 2008, 10:43 PM
absolutely nothing.

Warningshot3
February 5th, 2008, 07:32 AM
sry for the double post but i just have to say that i finally got a script compiled in h2sapien and works in game.


http://img100.imageshack.us/img100/5973/yeahthatsrightpj9.jpg

beele
February 5th, 2008, 08:45 AM
Did you try to get in in game and not just in sapien?

Warningshot3
February 5th, 2008, 09:05 AM
yeah the script works in game.

When h2tool creates a scenario file it put the script (script static unit player0 (unit (list_get (players) 0))) into the file, I then hex edited the scenario file, found the script and edited it to (script startup gravity_hack (physics_set_gravity 0.1)) then went into sapien entered debug_scripting 1 and there it is. I built a cache file and it worked in game. The scripts are stored in text format and every time sapien starts up it recompiles the scripts in the scenario file. just one thing though, the lengh of the script needs to stay the same (58 characters long)

and yes i know that (script static unit player0 (unit (list_get (players) 0))) doesnt show up in the debug scripting menu thing and i dont know why, it might be a global script?

beele
February 5th, 2008, 09:41 AM
Cool, I only need to learn scripting then :)

Warningshot3
February 5th, 2008, 09:49 AM
should be easy, just look at halo 2 xbox scripts. i use scripttools, idk where i got it though