Page 1 of 1

How to MPC: example with Oldmombasa

Posted: Sat Feb 16, 2008 3:36 pm
by neodos
Hi, yeah yeah yeah, this was asked, don't say we are not sharing information blablabla but this tutorial is not easy to make, not easy to explain so if you can't make what will be explained here don't complain you were warned that this can't be explained from A to Z.

READ ALL OF THIS AND TRY BEFORE CRITIZING THIS TUTORIAL OR THIS METHOD

And also this is not a perfect way to edit halo 2 mapfiles so you might have bugs etc this is why we didn't know if we should release info or not.


What we need:

-Entity 1.6UE (or whatever you want but i'll be using this)
-Insolence
- Mystery app: http://forums.halomods.com/viewtopic.php?t=74515
-WinHex or any other good hexeditor that you know how to use
-ScriptTools
-A good knowledge of halo 2 maps which involves a user functionally brain.

-Clean 03a_oldmombasa.map
-Clean lockout.map
-Clean shared.map,sp_shared.map,mainmenu.map on your maps folder

XZodia's complete plugins:
http://forums.remnantmods.com/viewtopic ... 2464#p2464

1-Making the map loadable on Multiplayer(found by XZodia)

First of all we need to make the SP map loadable on MP you need to use Mystery app, open oldmombasa and don't modify the default settings, keep all, just clic convert:
Image

This basicaly will swap a few idents(dependencies) on matg that are the fp models and biped for players that are nulled out on the SP matg but needed for MP.


2.a- Adding Multiplayer: Adding multiplayer Widgets

1-Adding MP menu tags:

Open Entity,

-Open Lockout.map

Go to [wgtz]
Build multiplayer.info
Clic Parsed and recursive, save to a folder
Wait until it says ok.

Close the map

-Open Oldmombasa

Clic Build
Build the tag ui\multiplayer
Wait until it says "ok"

2-Relinking to MP menu:

Go to [matg]
Right clic
Display > Idents

Search "Widget collections"
Null out "ui\single_player"

Swap "Widget collection - Multiplayer"
to "ui\multiplayer"

This is what you should have now:
Image

3-Setting maptype to multiplayer:

Got to scnr
Open meta editor
Set the maptype to multiplayer on the enum:

Image

Clic save

2.b- Adding Multiplayer: Replacing SP English String Index and Table by MP English String table

We need to add the MP string table because it contains the MP menu strings that doesn't exist on the SP string table, by doing this the SID table won't point to the right offsets on the new(MP) string table so we won't have anymore message for pickup weapons, riding vehicles... but we will have an MP menu with text in it which is much more important.

This is a another reason of why we wouldn't like to release this, don't come complain "this sucks no pick up weapon message" because there are no apps to import/export string tables and SID tables that's all, we'll do it by Hex, if someone makes that app we could get all weapon pickup messages and mp menu with string working perfectly but actually not that kind of apps and i don't know programming.

1-Searching String Index/Table Offsets:

-Open Oldmombasa on Entity
Go to [matg]
Open meta editor

Scroll down to the bottom

Find these values:

Image

Copy those on a text file.

-Open Lockout on Entity
Go to [matg]
Open meta editor

Scroll down to the bottom

Find these values:

Image

2-Copying and Replacing English String Index and Table from Lockout to Oldmombasa :

A- Copying the lockout english string index and table into a new file

Open The HexEditor
Open Lockout

Position > Go To Offset 17799168
Which is the start offset for the string table

But we need to find the end of this,

-Search(Search> Find Text) for the word:
Bomb planted!

All the MP maps string table finish by that string.

Image

Which is the end of the string table at the offset 17847281


Now we are going to copy the English String Index and Table of lockout into a new file

We selec the string index and table
Edit > Define Block...

Image

And now:

Edit > Copy Block > Into a New File

Save the file.dat as lockout_strings.dat

You should now have a new window on Winhex which contains the selection we did, so the the english string index and table of lockout.
Keep this file you'll need it for others MPC ^^

Select all (CTRL+A)
The size is indicated at the right bottom 62992 bytes for lockout english string index and table.

On the hex editor close lockout.

B- Removing the Oldmombasa english string index and table

Open Oldmombasa on the hexeditor

Remember matg?

Image

Position > Go To Offset 133235712
Which is the start offset for the string table

Image

-Search(Search> Find Text) for the word:
Rotate Left/Right

All the SP maps string table finish by that string.


Image

The end of Oldmombsa string table is at offset 133278238


So we know that this is the size of the string index + string table for oldmombasa:
From 133223424
To 133278238

133278238-133223424= 54814 bytes

But lockout, well MP string index + string table size is about 62992 bytes

Which is more than the SP map strings

So we will need to overwrite a part of the japanse string table so we can "properly" add the MP strings

For this:
62992-54814=8178

We need + 8178

We will overwrite 8178 bytes after the end of the english SP string table and the japansese string table.

Start by selecting the block(which is olmombasa SP english string idex/table)
From 133223424
To 133278238
Image

Edit> Remove
Yes
OK

Go to offset:133223424

Remember we need +8178 so the MP string table/index can fit.

133223424 + 8178 = 133231602

Start by selecting the block(which is olmombasa SP english string idex/table)
From 133223424
To 133231602

Edit> Remove
Yes
OK


C- Replacing Oldmombasa SP string index and table by lockout MP string index and table

Fine now we go to the lockout_strings.dat file
Select all

Edit > Copy All > Normally

Return to the Olmombasa file

Select the offset 133348864

Edit > ClipBoard Data > Paste
OK

C- Updating new String Table/Index offsets size and string count

Fine we just replaced the SP strings by the MP strings but as the MP string index/table is bigger then the SP we'll need to update the string count, size and start offsets on oldmombasa matg.

Keep the hex editor open.

Open oldmombasa on Entity
Go to [matg]
Open Meta Editor

Replace the English string values as the same as lockout except for String Index and String table.

english string cout: 1846
English string table size: 48115

The start offset should be the same as it was on the original oldmombasa
String Index Offset:133223424

However the string table offset should logical have changed as the MP string table is bigger, we took from lockout, and first string of this table is "Lockout"

So use the search function on WinHex to find "Lockout" to get the string table starting offset
String Table Offset:find it xD

Set the japanese values to 0.

Clic Save!



3- Adding Mulg tag(found by XZodia)

Open oldmombasa in insolence.
On the SP maps there is a mulg tag indeed, but this one is EMPTY.
So we will use Insolence to rename the existing tag to something different then multiplayer\multiplayer_globals
Per example i'll rename the existing tag to multiplayer\multiplayer_xlobals

Re-open the map on Insolence , open oldmombasa and a clean lockout.
Transfer the mulg from lockout to oldmombasa.

Wait until it finish transfering.

Close insolence.

Optional:
You can to this after the first testing the map because mulg may not be transfered correctly and can freeze the map, it happened to me.

Now open entity go to [matg], show idents, swap the unsused mulg to the new MP mulg you just transfered, we need mulg so there are teams for players an ai, because in MP the enemies and allies are identified by team colors which are handled with mulg.

3- Fixing small bugs

Ok now we got MP menu, mulg there are a few bugs, insolence corrupted some sounds.

Go to [bipd] masterchief and nullout it foot tag because if you don't do this you can hear a corupted sound when you jump...

Now the MP menu, the [wgit] tags use the [unic] tags which point to the string table.
But some of the MP unic were already in the map before we transfered the MP [wgtz] because the SP used the same, and those are still pointing to the SP string table so if we don't fix those unic some menus will have corrupted strings or no strings at all.

To fix this it's easy, open lockout.map on entity and oldmombasa you are working on, go to unic tags, open meta editor on both, compare the existing tags on lockout that are on oldmombasa too(now almost MPC).

If you see for the same tag(that exist on both maps) a different value on oldmombasa
Change the English string offset and english string count as it is on lockout.
Check each [unic] tag that exist on both maps and always make sure that every [unic] tag on oldmombasa has the same value as on lockout for the english English string offset and english string count.

4- Removing cinematics by script editing

This is necesary to make the map playable on syslink, we need to remove cinematics how ever we need to keep the ai spawns by script working which means that we need to analyse and understand all the scripts for this SP map follwing the execution order is the logical way to do this.


I can't remember what i exaclty did when i removed cinematics on olmombasa, each SP map cinematics works differently, how those are executed stoped etc is always different so i'll try to guide you as best as i can with logical steps that can be used to attempt to remove cinematics on any other SP maps but i can't guarantee anything.

Open oldmombasa on Scripts tools.

Scroll down and find the script named "mission main" the type of this script is "startup" it's the first script that will be executed when the map is loaded.

This is the script:

Code: Select all

(script startup mission_main 
  (begin 
   (ai_allegiance player human) 
   (ai_allegiance covenant prophet) 
   (objectives_clear) 
   (if (> (player_count) 0) 
   (start))
  )
)
(if (> (player_count) 0) (start))
This execute the script called "start" if there is at least one player or more playing the map.

Close this window.


So next script we are going to look at is "start"
Open the script called "start"

Code: Select all

(script static start 
  (begin 
   (wake mission_start)
  )
)

This one execute the script called "mission_start"
Close it

Open the script "mission_start"

Code: Select all

(script dormant mission_start 
  (begin 
   (wake flashlight_control) 
   (cinematic_snap_to_black) 
   (cinematic_intro) 
   (wake e1_main) 
   (sleep 1) 
   (cache_block_for_one_frame) 
   (sleep 1) 
   (chief_recovery_sequence) 
   (wake chapter_title0) 
   (sleep 150) 
   (game_save) 
   (sleep_until (volume_test_objects tv_mission_end (players)) 8) 
   (set g_mission_over True) 
   (playtest_mission) 
   (sleep 15) 
   (sound_class_set_gain "" 0 15) 
   (cinematic_fade_to_white) 
   (sleep 15) 
   (game_won)
  )
)
Remove "(cinematic_snap_to_black)"
This make the screen go black and that the player cannot control the camera or move

Remove (chief_recovery_sequence)
This is another script wall, if you look at the script called " (chief_recovery_sequence) " it's just the script that makes
blurry vision after the cinematic, we don't need this and this could also create problems between host and player so we just remove it's execution from the mission_start script.

Remove (sound_class_set_gain "" 0 15)
If you don't they'll be a bug and no sound while playing...

Always remove the "game_save"(checkpoint) commands because it can cause again problems on syslink, and anyway we can't recover checkpoints on MP.

Now clic "Compile"


Open the script cinematic intro.

Now there's still the "Cinematic intro" we won't remove it from the mission_start because if we look at it:

Code: Select all

(script static cinematic_intro 
  (begin 
   (if (cinematic_skip_start) 
    (begin 
     (c03_intro)
    )) 
    (cinematic_skip_stop)
   )
)
This execute c03_intro script which is the real cinematic script that spawns bipeds, object, lights, etc for cinematics and also later clean the stuff, but this one is executing more script to to this.

So we just need, in this case, to remove the execution of the cinematic script, like this:

Code: Select all

(script static cinematic_intro 
  (begin 
   (cinematic_skip_stop)
  )
)
Clic compile

Return to the script "mission_start"

After cinematic_intro this script execute the script called: e1_main which is the first part of the mission script, it spawns ai etc don't touch it.

Close the script.

Hopefully this SP map has only one cinematic which was the intro cinematic we just removed, just one more little thing i did on the script called:
cinematic_skip_stop

Which is used everytime a cinematic ends or the player skip it.

Open it delete the text and paster this:

Code: Select all

(script static cinematic_skip_stop 
  (begin 
   (cinematic_skip_stop_internal)
  )
)
Compile.

I removed the (if (not (game_reverted))
(game_revert))

Because it can revert the game to last checkpoints, blablabla i don't really remember why but it caused problems so just do it :)

That's all for oldmombasa.

Now imagine others SP maps that have 2 or 3 or more cinematics, that's muchhhhh more complex because some scripts are so complex, you need to make suare that after each cinematic there is not need to switch sbsp,teleport players or spawn objects, and not mentioning that the script tools doesn't compile fine when the script have complex commands like "if" "and" ">" "<" "=" etc and just mess up everything.

Good luck and hopefully this helped and i hope to see some MPC mods BECAUSE I SHARE THIS SO PEOPLE MAKE MODS
Some of the members here were complaining about not info released?

Now please make an MPC map now i shared all i know to make MPC because this took me 4-5h to write :roll:

Thanks :)

How to MPC: example with Oldmombasa

Posted: Sat Feb 16, 2008 4:08 pm
by Aumaan Anubis
I stopped reading halfway XD

Dude, that's a huge tutorial. Props for commitment :wink:

How to MPC: example with Oldmombasa

Posted: Sat Feb 16, 2008 4:14 pm
by neodos
Yeah thanks XD

How to MPC: example with Oldmombasa

Posted: Sat Feb 16, 2008 4:16 pm
by NotZachary82
indeed ^_^

but on the script part, when you say "close it" do you delete the script or simply close the script editor :?

but incredible job ;)

How to MPC: example with Oldmombasa

Posted: Sat Feb 16, 2008 4:36 pm
by neodos
Simply close the script (compiler)editor.

How to MPC: example with Oldmombasa

Posted: Sat Feb 16, 2008 10:27 pm
by CaptainPoopface
This looks like it was a tremendous amount of work to put together.

I would love to see all the SP maps (or as many as possible) converted to MPC and released as a map pack.

Now that the information is public, we can divide and conquer. Is it too much to hope for?

How to MPC: example with Oldmombasa

Posted: Tue Feb 19, 2008 9:54 am
by bumlove
Thanks very much neodos, it looks like it took longer to write this than to do a mpc map, right people the information is here,

who is doing what map?

we don't want 10 space station releases

How to MPC: example with Oldmombasa

Posted: Tue Feb 19, 2008 11:18 pm
by Grimdoomer
I think neodos and zxodia should be incharge of making a map pack......

How to MPC: example with Oldmombasa

Posted: Wed Feb 20, 2008 12:35 am
by NotZachary82
indeed.

*edit: :shock: 3volved MPC mods!

How to MPC: example with Oldmombasa

Posted: Wed Feb 20, 2008 5:51 am
by neodos
What? what di you just said?

:evil:
people ask for information, i spend 4 hours on this and you want me and XZodia to do this?

You should do that mappack, if i release the information the purpose of my tutorials is seeing people use it for ther mods! :arrow:

How to MPC: example with Oldmombasa

Posted: Wed Feb 20, 2008 12:21 pm
by bumlove
exactly what I thought neodos, I was going to post saying something like you said but held back as I didn't want to be seen as too much of a trouble causer,

space station will make an excellent mpc map, I myself am going to attempt new mombassa (the scarab) if anyone else has started this one please let me know

How to MPC: example with Oldmombasa

Posted: Wed Feb 20, 2008 5:03 pm
by neodos
No no one is doing mpc ;)

Scarab won't work on syslink btw because it's scripted :( but try to do the mpc anyway ^^

Re: How to MPC: example with Oldmombasa

Posted: Sun Feb 24, 2008 3:39 pm
by neodos
Did you replaced the string table/index ?

For unic you just need to compare the tags of lockout with your MPC map, and set the values of unic mpc as on the lockout unic's.

Re: How to MPC: example with Oldmombasa

Posted: Sun Feb 24, 2008 8:05 pm
by XZodia
Shock120 wrote:xzodia, got Unicode strings in mystery, my eyes hurt looking :roll: :x
that wish may come true...although not in the very near future...

Re: How to MPC: example with Oldmombasa

Posted: Wed Mar 19, 2008 3:20 am
by neodos
YaY for people asking for information to be released and they don't do anything with it, yay...

[/sarcasm]

Re: How to MPC: example with Oldmombasa

Posted: Wed Mar 19, 2008 3:47 am
by NotZachary82
i used it XP

Re: How to MPC: example with Oldmombasa

Posted: Wed Mar 19, 2008 4:24 am
by neodos
I don't see any new mpc mod released :/

Re: How to MPC: example with Oldmombasa

Posted: Wed Mar 19, 2008 4:53 am
by Aumaan Anubis
Would me giving NotZachary82 a 3 day ban make you feel better?

Since, of course, he didn't release a mod of MPC.

:p

Re: How to MPC: example with Oldmombasa

Posted: Wed Mar 19, 2008 3:11 pm
by NotZachary82
i never release mods =X

Re: How to MPC: example with Oldmombasa

Posted: Wed Mar 19, 2008 4:06 pm
by neodos
NotZachary82 wrote:i never release mods =X
Sucks to hear that :(

Re: How to MPC: example with Oldmombasa

Posted: Wed Mar 19, 2008 6:15 pm
by OwnZ joO
I don't know about scripts much because I was never really interested in them, but if somebody knows quite a bit about them and not how to program I might write a program dealing with them if you want.

Re: How to MPC: example with Oldmombasa

Posted: Thu Apr 28, 2011 1:10 pm
by sabu
Yeah I'm trying to do this but it's not making a bit of sense at the part where we're adding Lockout's data into The Singleplayers Map/
For instance:

Code: Select all

Spacestation

English String Count			1540
English String Table Size		44366
English String Index Offset		182226432
English String Table Offset		182239232

English String Index Offset Start 	182226432
English String Table Offset End 	182283596
English String Table Offset End New	182232229

English String Table Offset Difference 	57164


Lockout 

English String Count			1846
English String Table Size		48115
English String Index Offset		17784320
English String Table Offset		17799168

English String Index Offset Start 	17784320
English String Table Offset End 	17847281

English String Table Offset Difference	62961


File Difference				5797
So I'm doing a different map other than the one you're giving an example on, seeing as this is my first time attempting this I should have just stuck primarily with copying your example first so I can get the hang of it for other maps.

My questions are:

We obtain our new English String Index/Table Offset by adding the difference between the two (Lockout's and Singleplayer's Index/Table) which then you want us to add the difference to the Index? Why aren't we adding it to the Table Offset? Seeing as when adding the difference to the Index doesn't even give us a greater difference than the default ending Table...

Anyways I did exactly everything you said at that point and when trying to open my map in entity for the next part, it's all corrupted.

Also
C- Replacing Oldmombasa SP string index and table by lockout MP string index and table

Fine now we go to the lockout_strings.dat file
Select all

Edit > Copy All > Normally

Return to the Olmombasa file

Select the offset 133348864

Edit > ClipBoard Data > Paste
OK
How're you getting 133348864 as an offset number when your last offset numbers were

Code: Select all

From 133223424
To 133231602

Re: How to MPC: example with Oldmombasa

Posted: Fri Apr 29, 2011 3:19 pm
by neodos
I don't remember at all, though after re reading maybe I got that wrong, you're not supposed to go to the offset "133348864" but 133223424 and paste from that offset(133223424) the lockout string table/index.

Try that.

Re: How to MPC: example with Oldmombasa

Posted: Fri Apr 29, 2011 5:32 pm
by sabu
Maybe you mistyped it wrong? I was getting confused for a bit on how out of no where you got those numbers. I haven't attempted anything further yet after my map wouldn't work because I wanted to see what you were going to say first. However seems to me what you're saying is paste from that offset so ill attempt again and see what I come up with.

Re: How to MPC: example with Oldmombasa

Posted: Fri May 06, 2011 11:08 pm
by neodos
Yup sorry I mistyped, I meant paste indeed.