Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

[Tutorial] Sequence Modding

Made by modders for modders. Step-by-step instructions on how to achieve specific modding goals with ME3Explorer. We *strongly* encourage you to post new tutorials on the wiki.

[Tutorial] Sequence Modding

Postby The Fob » 05 Nov 2012, 08:51

Admin Note: This tutorial is deprecated and should be used with caution.

Hey everyone, as promised, here comes the sequence modding tutorial in chapters.
This starts out very basic so that as many people as possible can have a go at it. I’ll try to keep this as structure as possible but the methods I used were rather convoluted at times so I hope this will work out.
It’s a pretty rough draft, which I typed up in half an hour at this point. Please let me know if you detect errors. I will update, correct and improve this tutorial over the next couple of days whenever I have time, so please be patient with me, this may all take a while.

What you will need:
- The latest version of ME3Explorer of course
- A HEX editor and a base converter program. There are plenty around, eg HxD and the base converter from these forums. You can use the editor in the ME3Explorer but things get much easier if you have a couple of additional function like GOTO and advanced searches, etc.

Also, if you are just getting started with modding and this is the first time you are loading up the sequence editor or even ME3Explorer, I recommend you check out the first spoiler section in the OP of this thread. ByteMe provides a great example for a sequence mod with step-by-step screenshots. It's perfect to get an idea of what's what in the editor.

Nomenclature:
Just to establish a few names that will be used in this tutorial frequently:

Files: Actual files in the games install directory, as you can see them in the explorer. The main file type we will be dealing with are .pcc files. Those files consist of a Header, Lists and Objects. I recommend you have a lok at this site to see how they are organized.

Headers: Headers are small pieces of data at the beginning of e.g. a file. The contain global data of the file, e.g. how long it is, what sections it has, where those sections are and how long the sections are. We will mainly deal with the header of .pcc files. Find a byte by byte description on the site linked above.

Lists: There are 3 types of lists in .pcc files.
The first one is the name-list. It starts right after the header. It contains all the names that will be used by objects inside a .pcc file.
The second list is the import-list. It contains references to all the objects that are imported from other game files.
The third one is the export-list. It contains references to all the objects inside this .pcc file and stores vital data, such as the class of an object, it’s offset within the file and it’s size.
Check out the link above and scroll down to find byte-by-byte descriptions of the list entries. You might need that information later.

Objects: Objects are coherent data structures within files. They contain the game data in an organized form. Objects can be anything from animations, to materials, to meshes, to textures or audio. They contain of Properties and binary data (see below).

Properties: These are data entries inside of objects, setting specific values. An object usually has the following structure: 8 bytes to specify the name of the property as an integer number which is the entry in the name-list, next 8 bytes are again an entry in the name-list, that specifies the data type. Understanding properties is the key to sequence modding so look at this summery and explanation of properties by WV before you go on.
After that, we have the actual data values

Binary data: this is data that is used by other parts of the engine, like sound data, mesh or texture data, etc. their structure depends on the type of data you are looking at and can be hard to read. We will hardly ever use this kind of data here though.

Kismet – Sequences in the Unreal Development Kit (UDK):

Before we start, I need to give you a bit of background on the udk’s sequence editor, wich is called “Kismet”. Sequences basically determine the flow of a UE3 game. In sequences, it is specified what happens when and under which conditions. They work as a network of objects which are linked together by – you guessed it – links. An easy example for this would be that if the player touches a certain point in a level, you want the game to save and after that you want a cutscene to start. In that case, you need four basic objects.
1. A trigger (in this case a touch trigger) to start the sequence
2. A “Save Game” sequence object to save the game
3. The game need to know for whom to save the game, so you need to tell it that the game should be saved for the player. For this, you need a sequence variable that is linked to the “Save Game” sequence object.
4. A Sequence object that contains the information of the cut-scene. These are called “Interp” objects and we will cover those at a later time. For now, we’ll just treat it a regular object.

These three objects need to be linked. Usually, only the Output Links for an object are specified. This means that an object only stores the information for where the sequence should go after the object actions are finished.

For a more detailed overview, I recommend these web pages:
Fundamentals (I recommend you start at the chapter "Working with Sequences")
Examples
Reerence table
I definitely recommend you go through the fundamentals (first link) before you continue here. It will make things a lot easier and more clear.

Sequence modding:
Open up the ME3Explorer, click Tools and open up a Sequence editor. Click File->Load and load a .pcc file which contains a sequence, you are interested in changing. The program will load the sequence and display it in the large main window. Hold the left mouse button down to scroll around in the space. Hold the right mouse button down to zoom in or out. When a sequence is first loaded, all the trigger will be displayed in the upper row, all the sequence actions and events will be displayed in the middle row and all the sequence variable will be displayed in the bottom row. In each node, you can see it’s links displayed. Those links are classified in two groups, output links (on top) and variable links (below). If these links limk to another object within the sequence, there will be line from the link to that object. That way, the whole network is displayed.
Example Image:
Image

You first task is to “un-knot” the sequence. You can move nodes via drag and drop. Start with a trigger, move it up and follow the line that starts at the “Out” link to find the next object in the sequence. Move that one up in a good position, find the next one (and maybe also variable that are linked) and so on until you can make sense of the whole picture. I’d recommend starting with a simple sequence to practice before moving on to too complicated stuff.
Once you have the sequence in a proper order, it should be pretty easy to figure out what happens when.

Editing:
First step: decompress the pcc file.
Note: pcc files in DLC packages are already decompressed when you extract them with the DLCExplorer so if you edit a DLC, you can skip the decompression step.
Before you can edit a pcc file in a HEX editor, you need to decompress it with the PCC Repacker developer tool in the ME3Explorer. Simply open the tool, click the button "Select pcc file to decompress" and choose the file you want to edit. Note that this procedure increases the file size of you pcc file. So if you want to use it in the game again, you need to compress it again once you are done (with the same tool) or you have to run the TOC.bin updater tool so that the game can use the decompressed file (the second option is the better one since it allows easy editing in the future).

Now you can decide where you want to make a change. Say you want to skip the “Save Game” part in the previous example, the easiest way to do it is to change the out-link of the touch trigger to link directly to the Interp-object.
We don’t have an inbuilt editor for the ME3Explorer yet so we’ll have to do it the hard way for now.
Look up the number is the top left corner in the objects. These numbers are the object positions in the .pcc files export-list. You can see that the number in the out-link property of an object already tells you where it is linking to. Note down the out-link value that you want to change.
Now, click Tools in the ME3Explorer menu and open a PCC-Editor 2.0. Click File –Load and load the same .pcc file. Find the object, for which you want to change the out-link in the export list.
If you want to use an external HEX editor, for editing files, open it now and also load the file. I am going to assume that you work with an external HEX editor for this tutorial.
In the PCC-Editor 2.0, where you selected your object, click View in the Menu and select “Properties”. In the section “Meta Data” look for th entry “Offset”. Copy that number and use the GOTO function in your HEX editor to find the object there (Note: The offset is displayed in decimal base, so set your GOTO function to dec).
Now we have to find the out-link value. There are three things to consider when doing this:
1. You need to convert the number you noted down from the sequence editor into HEX base with a base converter
2. ME3 file are using little endian coding. Basically this means that bytes are reversed. A byte sequence that is 12 34 56 78 would be 78 56 34 12 in little endian, so after converting, you have to make that change as well.
3. The sequence editor shows you the same number as the PCC-Editor 2.0 will show you for any object. However, the ME3Explorer starts counting at 0 (like most software). The udk starts counting at 1. That means that you will have to add 1 to any object number you see in the sequence editor. E.g. if your out-link value in the sequence editor is 1546, then the number you need to convert is 1547.

You can of course go through the trouble and decode the whole object, using the references in the name list until you find the out-link value but I am going to tell you the dirtier but quicker way to do it.
Once you have your number in little endian HEX base bytes and once the cursor of you HEX editor is set to the beginning of your object of interest, search for the out-link value in your HEX editor. You should find it just a couple of lines after the start of the object. Usually there the 8 bytes before it read “04 00 00 00 00 00 00 00”. A few lines below, there should be byte code that reads “79 00 85 00 84 00”, which reads as “O.U.T.” in ASCII code (ASCII code is displayed on the right side in most HEX editors).
When you are confident that you found your value, change it to the new one, the one where you want the object to link now (the Interp-object in our example). Of course, you need to convert that number into little endian HEX values as well and do not forget to add a 1 to it as well (e.g. your target object is 331, then you need to write in the value 332, which would be “00 00 01 4b” in big endian, which would be “4b 01 00 00” in little endian)

Save the file, go to the sequence editor and click-File-Load again to reload your file. You will have to un-knot your sequence again to check if your object link has been changed properly. You should now see the new value in the out-link property of your object and the line should also go to your new target object.

Congratulations. You have successfully finished your first sequence mod.

… to be continued.

The Fob has been thanked by:
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Sequence Modding

Postby The Fob » 13 Feb 2013, 05:15

hello everyone,
So, finally, I get to write another chapter on my sequence modding tutorial. This episode will be about streamingstates and how to modify how the game loads levels. This is quite a bit more advanced than the first chapter so bear with me here.
First I should say, I have only tested this to a very small extent so I am not sure if things work like this all the time but anyway, here we go.

When you look at the sequence editor, you will see a lot of objects call "SetStreamingState". Check the variable links of these objects and you will see a link to a name object which holds the name of the StreamingState that is set.
Now what are StreamingStates? They are basically states the game goes through while you are playing it. The state you are currently in determines which pcc files are currently loaded into memory. They can be in different modes. E.g. a pcc file can be laoded but not yet visible or it can be all the way loaded and visible. The advantage for the game is that you can already load a level while the player is not yet there. It gets loaded in the background while the player is still moving in the old level and he'll never know about it (well, actually in ME3 you will. While playing, just pay attention to the lower right corner of the screen while walking around. At certain points, you may see a small "loading" icon appearing. That means you have just triggered a new StreamingState). Mow, once you actually get to the new level, all the game need to do is set it to visible and BAM, you have your level transition with barely any loading times.
But how do we change things here? Well, the trick is to find the source file where it is determined which streaming states load what. When you go through your BioD pcc files for example, you will usually find different files that lead you through the plot. E.g. for the ending, you have files like BioD_End002_400Guardian.pcc which contains all the data for the conversation with the catalyst and a BioD_End002_500Choice.pcc, which contains all the data for the part of the level when you finished the conversation with the catalyst and get to choose your ending. However, there is one file that is just called BioD_End002.pcc without any addition. THis is sort of a master file that binds the "sub-files" together. And that's where we'll find what we are looking for.
Check out object 160 to 174. They are all called BioTriggerStream. They all contain a large structure call StreamingStates (all given as references to the name list of zourse). In this structure, you can find all the streaming states that get triggered by these objects and for each streaming state, it is listed which file gets to be set in a certain mode (e.g. loaded, visible, etc.). It's a bit cumbersome to check all these references in the name list but once you do, you will see that the structure of it is pretty simple.
So you have a BioTriggerStream that determines which files are loaded, unloaded etc. in each of their streamingstates and once they are triggered, the StreamingStates themselves get set within the pcc "sub-files" like e.g. BioD_End002_500Choice.pcc. The beauty of it for us is that we can now simply change the name for any file in any StreaminState within the BioTriggerStream object and the new file will be loaded when that StreamingState is set in one of the sub-files.
This is how I loaded the Synthesis memorial scene after the destruction ending in MEHEM for example.

One more thing: How do the BioTriggerStream object get activated in the first place? Easy, they have a trigger location in the level architecture. Just check the object properties in the PCC Editor and you will see a property called "location" which has the x, y and z coordinates in the level for that particular BioTriggerStream object. Change those coordinates and you will change where in the level the stream gets initiated.

While this can be a pretty powerful method, obviously, you have to be extremely careful when modifying this kind of stuff because you are now dealing with a lot of inter-dependencies between different files. E.g. you change the location of your BioTriggerStream object but the game tries to already set a StreamingState that has not been triggered yet because you changed the location and you game will crash.

The Fob has been thanked by:
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Sequence Modding

Postby The Fob » 13 Feb 2013, 05:39

I am going to go ahead and post the next chapter right away since this is kind of belongs to the previous one anyway.

So by now, we know how to modify sequences and how to modify how games are loaded. But how do we modify how different sequences in different pcc files interact with each other? For example, I said in the previous post that BioD_End002_400Guardian deals with the catalyst conversation abd BioD_End002_500Choice.pcc deals with everything between that conversation and the actual ending sequence but how does the game go from one file to the next?
The answer is simple: Remote Events!
There are two types of sequence objects which are relevant here: ActivateRemoteEvent objects and RemoteEvent objects.
The former activates the remote event (who would have guessed) and the latter "receives" it.
Both objects have a EventName property (just have a look at the properties in the PCC Editor). Once an ActivateRemoteEvent object is reached in a sequence, the event happens on a global scale. This means the game searches in all loaded sequences for a RemoteEvent object with the same name in it's EventName property and starts the corresponding sequence from there.
E.g. in the main sequence of BioD_End002_400Guardian.pcc (From the Extended cut, not Leviathan) you can find object 1282. It's a SeqAct.ActivateRemoteEvent object with the EventName Property RE_CATALYST_CONV_DONE. In BioD_End002_500Choice.pcc in the main sequence, you can find object 1894, which is a SeqEvent.RemoteEvent object and in it's EventName property you'll also see the name RE_CATALYST_CONV_DONE.
This means if object 1282 is actived in the main sequence of BioD_End002_400Guardian.pcc, the game will search in all loaded sequences for a RemoteEvent with the same name. Because the StreamingStates are set in such a way that BioD_End002_500Choice.pcc is loaded and visible at that time, object 1894 gets triggered and the main sequence of that file can go from there.

This is why you have to be careful when modding StreamingStates. Always make sure that any remote events are that might get triggered are renamed as well to fit the new loaded files. In case of the MEHEM memorial scene for example, I had to rename the RemoteEvent that started it from Run_Memorial_Green to Run_Memorial_Red for it to get triggered after the destruction ending.



Of course there are also other possibilities to trigger a sequence in a newly loaded pcc file. E.g. most sequences have a "LevelIsLive" object. This one will basically be triggered as soon as the pcc file is set to visible by the StreamingStates.
Other may just have touch triggers that are linked (by variable links) to a certain location in the level (similar to the BioTriggerStream objects in the last chapter). There are also other trigger like e.g. a certain object taking damage (this is how shooting the catalyst can trigger the refuse ending for example).
As I wrote in my first chapter, when you first open a sequence in the sequence editor, all the triggers for a sequence (including RemoteEvent objects) will be displayed in the upper one of the three rows in which objects are organized. Just have a look through some sequences to find different triggers. Most of them are pretty self-explanatory.

The Fob has been thanked by:
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Sequence Modding

Postby Mimi » 13 Feb 2013, 17:04

Ooooooooooh, I haven't read that yet but I know I'm gonna like it :D
Thanks so much for carrying on with this :)
So forgive me if your recent posts are answering this, but I was wondering if there would be a way to move the breath vid from after JP to before it (pre-EC).
I looked at the Epilogue.pcc file, but unfortunately, no vid objects are displayed in the sequence editor. I was hoping to switch links around.
The vid is nested in the InterpGroup, and it seems those objects never appear in the Sequence Editor.
Sorry if this is sort off-topickish, just wondering if you had tried something of the kind.
User avatar
Mimi
Modder
 
Posts: 69
Joined: 11 Dec 2012, 19:05
Has thanked: 28 time
Have thanks: 3 time

Re: Sequence Modding

Postby The Fob » 14 Feb 2013, 00:28

Nah not that off topic since I wanted to make a list of interesting objects next anyway, so this kinda fits rather well.
To answer your question first though, you are correct. The videos are usually (always to my knowladge) embedded in Interp objects and this is where it gets really complicated. Interp objects are basically preset animation objects (as in in game videos, created with BW's version of the UE3's matinee tool) and have a lot of "sub-objects" that they are dependent on. They also interact somehow with dialogue nodes on the corresponding language files (for the English version these are the XYZ_LOC_Int.pcc files) and with Wwise sound banks in the sound streaming files. How exactly this happens, I am not sure and that is a problem because I still have trouble controlling the overall timing within these animation scripts. Sometimes it works rather well (e.g. I could just change the overall time of the Interp object that controls Shepards final conversation with Anderson and the subsequent heavenly elevator ride to the catalyst to cut out the elevator part for MEHEM) but other time it doesn't work as well. E.g. I tried to prolong the timing of the epilogue videos in order to get my extraction scene in but that really messed up the whole structure. There must be an overall timer there somewhere but it's not in the place where I think it should be and so I haven't found it yet.
Why do I tell you all of this? Because the easiest way for you to get the breath scene before the jungle planet would be not to copy and paste the whole interp object but simply do a video manipulation. You'd just have to be really careful with the timing (i.e. throw something else out of the epilogue that is just as long). I guess you culd try to just concatinate the scene to the last video and hope that it works out but it might very well not.
A further disadvantage of this method is of course that you can't discriminate between male and female Shep in that case (not such a big deal for the breath scene IMO).
I think at the moment, this is the way to do it though. Eventually, it would be fantastic if we could construct an interp editor that gives us something similar to the sequence editor for interp objects, i.e. shows us all the relevant sub-objects (like interpActors, etc.) and their relation to one another. I think the trick in understanding Interp objects lies in UE3's matinee editor (see a user guide here) but it will still take some considerable amount of research to figure all this out.
Anyway, hope that helps a little (or at least, shows my current state of knowladge/ignorance about this issue).


EDIT: Oh, almost forgot, to make things a bit more interesting (and for the sake of clarity), not all Interp related Objects have to be part of a matinee sequence. E.g. hereyou can see how InterpActors fit into a level structure.

Also, we already know most of the objects that determine how animation sequences are played back (e.g. see here. The problem is that especially the videos are a bit more tricky. E.g. there are objects related to them (IIRC, they are called TrackBinkMovie or something, don't have my files here at them moment, sorry) but hat exactly they do, I don't know.
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Sequence Modding

Postby Mimi » 14 Feb 2013, 08:33

About the breath scene, that's what I did already :D
http://www.youtube.com/watch?v=N0wLBA1GTY4

It's no problem, it's working 100%, it's just that when I create the bik file it takes forever because it includes:
> the original End03_LondonRedOutro
> blank
> ShepAlive.bik (female version)
> my new sequence.

So it would be so much more lightweight for me (you know what I mean about vid conversion problems, right?) and also a lot "cleaner" if we could tell it to play that vid here instead of there.
But if not, nevermind.

Back on your topic, I'm almost positive I found an object featuring an overall duration, like for instance the part that starts from shooting the tube to the end of End03_LondonRedOutro.bik.
It's a duration "envelope" and then in the tree under it you've got child objects the added durations of which are equal to the global one. Is that what you're looking for?
User avatar
Mimi
Modder
 
Posts: 69
Joined: 11 Dec 2012, 19:05
Has thanked: 28 time
Have thanks: 3 time

Re: Sequence Modding

Postby The Fob » 14 Feb 2013, 11:48

Ah right, I got confused there in my last post I think. My timing problem in that case had to do with the music, not the videos. Different problem.
But anyway, I'd say the way you did it is probably the best way to do it atm. You can't really use the original breath scene very well anyway because you have it customized with your music and the extra stuff like Kaidan's voice, etc. Wouldn't know an easy way to add thet other than importing it with the vid right now.
Btw, I am assuming the the jungle planet scene in your mod is in game, right? If you were so inclined, you could use my sequence tutorial above to load the synthesis version of the jungle planet scene there. Just use femShep as EDI and you'll even get them to stand arm in arm at the end. Just a suggestion there. Great work by the way!
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Sequence Modding

Postby Mimi » 14 Feb 2013, 14:58

The Fob wrote:Ah right, I got confused there in my last post I think. My timing problem in that case had to do with the music, not the videos. Different problem.
But anyway, I'd say the way you did it is probably the best way to do it atm. You can't really use the original breath scene very well anyway because you have it customized with your music and the extra stuff like Kaidan's voice, etc. Wouldn't know an easy way to add thet other than importing it with the vid right now.
Btw, I am assuming the the jungle planet scene in your mod is in game, right? If you were so inclined, you could use my sequence tutorial above to load the synthesis version of the jungle planet scene there. Just use femShep as EDI and you'll even get them to stand arm in arm at the end. Just a suggestion there. Great work by the way!


Yeah, you're probably right, well the idea would have been to use the exact same vid but to replace the sound and music and change the duration for the whole thing.
My aim was really to make a mod for everyone, not only Kaidan romancing femSheps. So the more the game handles by itself, the better.

Thanks, haha, yeah, I know that, but that's not really Shepard fitting :D - I just like that they're standing there, it's the perfect image that finally makes me able to say goodbye and leave them.
Ideally, I wanted Shepard as Joker (because his limping would have made her look wounded), but I couldn't make it work.
User avatar
Mimi
Modder
 
Posts: 69
Joined: 11 Dec 2012, 19:05
Has thanked: 28 time
Have thanks: 3 time

Re: Sequence Modding

Postby The Fob » 10 Mar 2013, 02:01

Alright people, it's time for another chapter.
Today we'll cover how to transfer an object from one sequence to another. In fact, this is not limited to sequences, you can change any object from any parent folder to another this way.

Why would you want to do that? It may be that an object you want in your sequence does not exist in it but it exists in another one. Even if you clone the other object, you still need to transfer it into your sequence. (Depending on the script for object cloning, it may even be that you need to do some of the steps below in order to properly insert the cloned object into it's original sequence as well, I am not sure).

Ok, so in order for a sequence to recognise an object properly, five conditions must be met:
1. The object must be parented to this sequence in the export list
2. The class counter must be unique within the sequence
3. The object itself must contain a link to the sequence in it's ParentSequence property
4. The sequence must contain a link to the object in it's SequenceObjects property
5. The object must be deleted from the SequenceObjects property of the sequence, you took it out of

Before I go into all of these points in detail, let me tell you a word or two about export lists. They will become important later so it's good to be familiar with them.

Export list entries look like this:
Code: Select all
00-03 (Int32): Package (entry in import table (negative value))
04-07 (int32): unknown
08-0B (int32): Link (i.e. sequence/parent folder)
0C-0F (Int32):Class Name (entry in nametable)
10-13 (Int32): Class counter
14-1F (ulong): Flags
20-23 (Int32): Datasize
24-27 (Int32): Dataoffset
28-2B: unknown
2C-2F (Int32): Int32 Count
30-30+20+(count*4): unknown

and here is a random example of one:
Code: Select all
97 FF FF FF 00 00 00 00 BD 18 00 00 2C 08 00 00
03 00 00 00 00 00 00 00 00 00 00 00 01 00 07 00
D2 03 00 00 6B 0C 86 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00

In this case, the object uses the package 104 from the import list (FF FF FF 97 = -105; remember that links to objects in the export and import list are always the value -1 so it refers to 104)
It's parent seuence is object 6332 in the export list (00 00 18 BD -1)
It's class name is 2093 (00 00 08 2C)
It's class counter is 2 (00 00 00 02)
It's flags for Transactional, LoadForClient, LoadForServer, LoadForEdit are set, see here (Warranty Voider's first post)
It's data size is 976 (00 00 03 D2)
It's offset is 8785003 (00 86 0C 6B)

Now, about these 5 conditions I talked about above:
How to meet all of them? Well, one at a time:

Condition 1:
- Find the objects entry in the export list. If you are using a HEX editor, it's easiest to search for the objects offset in little endian HEX bas (the offset can be found in the _Meta section of the object properties in the PCC Editor 2.0
- Change the bytes "08-0B (int32): Link (i.e. sequence/parent folder)", so that they link to your inteded target sequence

Condition 2:
- Find the objects entry in the export list.
- Note down the bytes "00-03 (Int32): Package (entry in import table (negative value))"
- Go to the beginning of the export list and search for the byte values you noted in the step above
- For each object you find in the export list, that uses this package, note down the bytes "10-13 (Int32): Class counter"
- Go back to your the object you want to change.
- Cange the bytes "10-13 (Int32): Class counter" to a unique number that you haven't seen while searching through the export list (do not use 00 00 00 00 or 01 00 00 00 (in little endian))

Condition 3:
- Find the object you want to transfer (the actual object, not the entry in the export list this time)
- Find the property ParentSequence (usually it's the last property)
- Change the value of the property to link to the new sequence, you want the object to be in

Condition 4:
- Find the sequence object of the sequence you want to put your object into (the actual object, not the export list entry)
- Copy the whole sequence object and paste it at the very end of the file (yes, at the end of the whole file) note down the new offset of the sequence object
- Find the sequence object's entry in the export list and change it's offset to the new offset you just noted down.
- Go back to the sequence object (the new one you just created at the end of the files.
- Find the Property SequenceObjects
This property is an arrayproperty. It has the following structure
Code: Select all
00-03 (int32): Property name (the entry for SequenceObjects in the namelist)
04-07 )Int32): Property type (the entry for ArrayProperty)
08-0B (Int32): Array size (the size of the array, i.e. the number of bytes from position 0C to the end of the array)
0C-0F (Int32): Number of elements in the array

- Add an int32 to the end of the array with a link to the object you want to insert into the sequence. Make sure you insert the new value, do not overwrite existing bytes.
- Change the "Array size" and "Number of elements" bytes of the Property to account for your new addition ("Array size" +4 and "Number of Elements" +1)
- Go back to the export list entry of your sequence object
- Modify the bytes "20-23 (Int32): Datasize", to account for the extra bytes you just put into the object (+4).
- Update the PCConsoleTOC.bin with the larger file size for this pcc file

Condition 5:
Basically, this is the same procedure as in condition 4, only this time you get to delete an array element instead of adding one.
- Find the sequence object of the sequence you want to put your object into (the actual object, not the export list entry)
- Find the Property SequenceObjects
- Find and delete the int32, linking to the object you want to transfer
- Change the "Array size" and "Number of elements" bytes of the Property to account for your deletion ("Array size" -4 and "Number of Elements" -1)
- At the end of the sequence object, insert 4 bytes with the value zero (as in 00 00 00 00). This is to make sure the offsets for all objects that come after this one do not change and still fit with the export list
- Find the export list entry of your sequence object
- Modify the bytes "20-23 (Int32): Datasize", to account for your changes (-4)

And that's it. You successfully transferred an object from one sequence to another. Congrats!
Now, of course, you still have to change it's links and values to fit in. Use the previous chapters of this tutorial to see how.

By the way, if you are interested in dialogues, specifically, you should definitely check out mnn's overview. It's a bit technical but it covers all the bases very well.

The Fob has been thanked by:
User avatar
The Fob
Modder
 
Posts: 702
Joined: 08 Oct 2012, 04:37
Has thanked: 242 time
Have thanks: 212 time

Re: Sequence Modding

Postby user2929 » 13 Mar 2013, 16:18

In simple words:with sequences - can you make a game to stream all the casual outfits as armors? Can you add more enemies to fight in a mission?
user2929 - one man army against legion of console commands. Windows XP 32bit SP3
User avatar
user2929
User
 
Posts: 127
Joined: 25 Aug 2012, 18:10
Has thanked: 27 time
Have thanks: 26 time

Next

Return to Modders' Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

suspicion-preferred