How to make custom levels
8 years ago
Bretagne, France

It was discovered a while ago that level files are just XML files easy to edit. Then, megadrive identified the software the levels mare made on. Next, prettz managed to get us all the assets of the game and finally, thisishowmymindworks found a software allowing us to mod the game. Using all these ressources, we can now make our own custom levels. Of course, since the game was not programmed for that it's a little bit tricky.

I'll then try explaining how to make custom levels as easily as possible. For the moment we are still limited to what we can do but i'll update everything as soon as possible.

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ¤ I) Setting-up the level editor ¤ ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

First, start by downloading Ogmo editor ( http://www.ogmoeditor.com/ ). Then download these files that will be necessary to work with the editor. https://www.dropbox.com/s/4b3lkrtmmtfo3bl/OTS%20level%20editor.zip?dl=0 (keep all these in the same folder)

After downloading everything, open ogmo then go to Project->Open Project...->OTS level editor.oep You should get this:

http://puu.sh/jv4XL/d1f841b52e.png

Before starting to create your level you have to set-up it's properties. Go to Level->Level Properties... Here, you can configurate these level properties:

Level Size: The level size. You can have bigger level but it makes level transitions more complicated so, i would highly suggest not using it. Backgound: Change the background of the level rain: Choose if there will be rain in the level. thunder: Choose if there will be thunder in the level. message: If you want a pop-up message to be triggerred after entering the area, put its label here. See the "Adding custom text" section. messageOnce: Not important. darkness: Choose if there will be darkness in the level. right/left exit: See the "Connecting multiple levels" section music: Choose the music that will be played during the level.

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ¤ II) How to create your own levels ¤ ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

After finishing the set-up, you can start to make the levels. Go back to the main tab and look at the layers on the upper left of the screen. They correspond to different layers of the level. I'll start by explaining the more important one:

Solid: With this layer you create the solid blocks of the level. Basically, everything your character can touch, walk on, etc... For example:

http://puu.sh/juzlH/ee8b8c02e6.png

(Warning! Slopes are not solid block)

Left click on a block make it solid and right click do the opposite. You also have different tool in the upper right corner to help you.

https://cdn.tutsplus.com/gamedev/authors/porter/ogmo-editor-guide-07.png

Front: This layer contain the tiles of the level. Make sure the Tileset is set to "Front01" in the Tile Palette. The tiles are all the blocks you see on the screen when you play. Solid Block are all invisible so you should probably put tiles on all your solid blocks. (unless you want to make invisible wall or stuff like this) In order to do that, choose a type of block in the tile palette in the bottom left corner then click on the square when you want to put it. For example:

http://puu.sh/jv6sc/896da49f31.png

Same as before, you have different tools in the upper right corner to help you.

https://cdn.tutsplus.com/gamedev/authors/porter/ogmo-editor-guide-08.png

Objects: This layer contain all the interactive stuff you can encounter. To put them on the level, it's the same as for the tiles, click the entities then click on the level but if you want to remove them you'll have to use the eraser tool.

For example:

http://puu.sh/jv5Dv/98628206b3.png

Warning! The comportment of some objects is different depending on what's written in the "selection" tab (bottom right corner) which appear when you select an object.

door: If it's a door you go into, uncheck "exit" then write the coordinate of the level the door makes you go to in "destinationX\Y". If it's a door you exit, check "exit". The coordinate of a level are in it's name. All level have a x_y.oel name with (x,y) their coordinate. door2: Enter an id for the door. It will open when you'll talk with the alienGuard npc with the same id. door3: It's the door that closes when the boss spawn. I have no idea how it works so avoid using it. brute: If you want it to face right, let side=1. If you want it to face left, put side=-1. block fragile: If you check "extra fragile" you'll get it's extra fragile equivalent. all npc except grigori: Put the label of the message they'll say. See the "Adding custom text" section. alienGuard: Enter the id of the door they will open when talked to. sp_messageArea: Put the label of the message that will trigger when entering the area. See the "Adding custom text" section.

Note that for the slopes you need to put the object AND the tile otherwise you'll get invisible slopes. Moreover, lava/water are handled a bit differently than other objects. Instead of putting a lava/water in each square you should only put one and then use the "resize" tool on them.

And finally, you also have some tools for this layer

https://cdn.tutsplus.com/gamedev/authors/porter/ogmo-editor-guide-09.png

(Ignore "Add node/Insert Node". Also, the "resize" option only works on: water, lava, reference, bg_mountais, sp_messagearea and sp_endgame.)

Finally, we finish we the less important layers:

Reference: In this layer, just choose if you want to put the "reference" entity in the level or not. It gives a little cool effect in the level. All OTS levels have it even if it's not really noticeable. FarBack: In this layer you can put one of the four bg_mountain if you want. Back: Make sure the tileset is set to Back01 in the Tile Palette. In this layer you choose the tile that will appear in the background. BackDetails: I don't understand this one yet. Ignore it. BackDrop: In this layer you can put any object starting with "bd_". They are backgrounds details. FrontDetails: Make sure the tileset is set to Details01 in the Tile Palette. In this layer you add little details to the level and the front tiles.

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ¤ III) Integrating your level into the game ¤ ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

After finishing your level, the next step is to integrate it into the game in order to play it. First, go to level->Save your level as... and save it as "x_y.oel" with (x,y) being the coordinate of your level. Be carefull not choosing an already used coordinate in the game unless you want to overwrite a specific level. The less intrusive way of putting your level into the game is by making a door at the starting area that goes into the level (in this case, don't forget to add an exit door where you want the player to start your level). In order to do so, go to Level->Open level... and open the level 5_5.oel (the starting area) in the game level directory (C:\Program Files (x86)\Steam\SteamApps\common\outtheresomewhere\level).

http://puu.sh/jwqLB/ca74bec6dd.png

Then add a door leading to your level as i explained before, save then exit. (Of course don't forget to have an exit door in your level) After finishing everything, add your level into the game level folder and if everything was done correctly you should be able to play it.

http://puu.sh/juATE/77984b281d.jpg

http://puu.sh/jv5Wq/7d3f115c5a.jpg

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ¤ IV) Connecting multiple levels ¤ ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

So, now you know how to make a level. That's great! But that's not enough. You probably want to make multiple levels connected between each other. Here are the three ways of doing it:

Using screen transitions: First, you need to know a little bit more about level coordinate. All level are saved as x_y.oel with (x,y) being their coordinate. These coordinates represent the position of the level on this giant map:

http://puu.sh/jxtoh/26798337dd.png

I put in black all coordinates used by the game. You can find the full map with all levels and their coordinates here https://www.dropbox.com/s/5dmvb0e2uh6vywq/OTS-Map_num.png?dl=0 (made by Timbouton)

When moving from a level to another using screen transiton it's the same as moving from one case on this giant map to another. So: if you're in level x_y.oel and exit to the right you'll appear in level (x+1)y.oel if you're in level x_y.oel and exit to the left you'll appear in level (x-1)y.oel if you're in level x_y.oel and exit up you'll appear in level x(y-1).oel if you're in level x_y.oel and exit down you'll appear in level x(y+1).oel

For example, here is level 19_4.oel and it's surronding.

http://puu.sh/jxubj/d072585856.png

Using Doors: As explained before, you can put door leading to a specific level. If this level contains an exit door, you'll appear there. If this level doesn't contain anything, you'll appear on the same level coordinate of the door you entered. (I highly suggest putting an exit door anyway)

Using special transition: It's used only once in the game. Here:

http://puu.sh/jxv99/d74693b441.jpg

It's when you want to bypass the game transition system. You can only do it for righ/left transition. In order to do that, go to level->Level properties... and write in right_exit the name of the level ("x_y") you want to transition to when you go the right. Same thing for left.

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ¤ V) Adding custom text ¤ ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

In this section, i'll explain how to add custom text (Room names, NPC dialogue, pop-up messages) into your custom levels. Since these data are stored deep into the ots.swf file we need to use another software in order to edit them: JPEXS Free Flash Decompiler (https://www.free-decompiler.com/flash/download/)

After installing the software, launch it then open the "ots.swf" file in the gmae folder. (Don't forget to keep a back-up, all the game code is in this file!) The only files we're interested in are these two:

http://puu.sh/pTvHx/c3ae7e73b4.png

Right click on them then choose "export selection". This will create a folder on your computer called "binaryData" with a copy of these files. You can then open them with a text editor and modify them.

Let's break down these files: 57_assets.XmlAssets_MESSAGES_XML.bin The first part of the file contains all the pop-up messages of the game. These are the messages that appears in the game after you entered a room. Their syntax are <label> <timer value="0.5"/> <once value="true"/> <text portrait="yuri"> <en>Message in English.</en> <br>Message in Portuguese?</br> <fr>Message in French.</fr> <hue>I have no idea what this is.</hue> </text> </label>

label-> This is a tag to identify the message. Make sure that all your text have an unique one. timer value -> The time it wil take to trigger the message after you entered the level. once value -> Don't touch it. text portrait -> Who is talking. Usually it's yuri for these messages. <en/br/fr/hue> -> The message in the different languages. If you only use one language just put the same text everywhere. You can change the color of the text using {color:#FFFFFF}, forcing a line break using \n and changing the text speed using {cooldown:5}. (bigger number=slower text with 1 being the default speed)

For example, the first message of the game has this syntax: [quote] {color:#F2960B}Captain's Log:{color:#FFFFFF}\nIt looks like I've landed on an inhospitable planet. I have to find a way to fix my ship and defeat {color:#FF0000}{cooldown:5}Grigori{cooldown:1}{color:#FFFFFF}, for the sake of Mother Planet!</en> [/quote] giving us http://puu.sh/pTwWa/5eac7002ed.png

The second part of the file contains all the NPC messages of the game. Their syntax is pretty similar: <label statistic="alien"> <text portrait="worm"> <en>Message in English.</en> <br>Message in Portuguese?</br> <fr>Message in French.</fr> <hue>I still have no idea what this is.</hue> </text> </label>

Don't forget to put the label and choose a matching text portrait with the NPC (worm/wormGurad/treeMan)

Finally, the file also has the texts for other triggers with very similar syntax.

After finishing all the modifications, go to JPEXS Free Flash Decompiler right click on the file 57_assets.XmlAssets_MESSAGES_XML.bin then replace it with your modified version. http://puu.sh/pTxUK/aba1d344c1.png Then, don't forget to put the label of the new messages you made into your custom levels. For a message triggered after entering a level -> Put its label into level>level properties>message For a message triggered after entering an area of a level -> Select the area (object) then enter the label into the "message" section. For a NPC talk -> Select the NPC (object) then enter the label into the "message" section.

65_assets.XmlAssets_ROOM_NAME_XML.bin This file is way easier to deal with. All the rooms names are here with the sintax <r10x6> <en>English name</en> <br>Portuguese name?</br> <fr>French name</fr> <hue>??????????</hue> </r10x6> "r10x6" means that's the message associated to the room 10_6.oel. So put the right coordinates and your text. After finishing editing the file you can put it back into ots.swf as described above and that's it!

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ¤ IV) Miscellaneous ¤ ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

Another use for OGMO is to edit game levels. If you want to do this you may notice that some levels can't be opened in OGMO and other correspond to nothing in the actual game. Here is why:

Unopening levels: 10_5.oel: The most complicated one. The line causing issue is line 13: <rect x="0" y="-1" w="26" h="1" /> It adds a line of invisible solid blocks above the level and OGMO doesn't like it. If you want to edit the level you need to remove this line with notepad, edit the level, then put the line back.

12_6.oel The line causing issue is line 245:

<!-- <sp_messageArea id="11" x="288" y="0" width="160" height="160" /> -->

You can just remove it. It affects nothing in the game.

25_5.oel The line causing issue is line 81:

<!-- <env_blockFall id="10" x="160" y="256" /> -->

You can just remove it. It affects nothing in the game.

27_6.oel The line causing issue is line 46:

<!-- <sp_messageArea id="15" x="96" y="64" width="32" height="192" message="" /> -->

You can just remove it. It affects nothing in the game.

Unknow levels: 20_5(new).oel It's an alternate version of 20_5 that was never used in the final game.

20_6.oel It's the foundation of a level that never made it into the final game that you were supposed to access from 20_5(new). The level is still here but unaccessible.

31_6.oel It's an alternate version of level 36_1.oel. Once again, it's unaccessible in the game.

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ¤ Final Words ¤ ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

Thank you for everyone who helped making this! Thank you megadrive, prettz and thisishowmymindworks for identifying all the software needed to make this possible. Thank you Timbouton for making the map with coordinates. It helps a lot when messing around with the game levels. Thank you Natos for testing all this and making the first custom level you can find here: http://www.speedrun.com/ots/thread/k0o7u

If you have trouble, questions, you don't understand something or want more detail on something else, ask away!

P.S. if after modifying the game file you're unsured of what you did it you can just uninstall the game then reinstall it. Steam even keep your save files!

Edited by the author 6 years ago
PrettzL likes this

rezoons, you are a hero~

Is it possible to have custom dialogue messages at all?

How do you set what map a door exits to?

Victoria, Australia

prettz I'm assuming the coordinates you enter in are globally over the entire map, which could get difficult and tedious to work out.

Sweden

:) //

More about this at the meeting (which is, if anyone didnt know, in 9 hours, to join connect to: #otsRuns on freenode.net)

Bretagne, France

From what i've seen, you can trigger any dialogue of the game you want but can't make your own. Sorry.

About the door, each level has it's own set of coordinate. It's in it's tittle. 1_1.oel means that the level has (1,1) has it's coordinate.

The door i added in the first level is coded like this: <env_door id="13" x="512" y="288" destinationX="1" destinationY="1" exit="False" /> Which send the player to the level 1_1, the one you create.

If you want to create a door to a new level you make. For example, enter 2 in destination X and 3 in destination Y.

http://puu.sh/jv1pA/21f7998ad9.png

This door will lead to the level 2_3.oel.

Bretagne, France

I just updated everything. You'll have to downloading all the images files again ( http://puu.sh/jv4Vo/3b991de576.zip )

Creating the level is now a bit more complex but importing it into the game is now really easy.

I added tile details, fences, glass, moving block with pic on it, mirror, breakable block and breakable platform.

You can also now edit the level properties.

Bretagne, France

Another update. The editor is basically finished. They are still 2~3 things i didn't managed to implement but they are minor stuff. You can now modify directly the game levels using ogmo:

http://puu.sh/jwrbP/a4ba93d4b2.png

The only exceptions are level 12_6 and 27_6.

I still need to explain screen transitions.

PrettzL likes this

Regarding doors again:

When you set a door to drop you in to a level as in your example x2 y3 where does it put you in level 2_3? Can you control that specifically where it will place you on the grid OF level 2_3?

Bretagne, France

You have to put an exit door in level 2_3 and it will put you on that exit door. So yes, you can control specifically where it will place you.

PrettzL likes this

If you do not place a door does it default to any specific part of the grid of the level where you exit?

Bretagne, France

Yes, it default on the same level coordinate of the door you entered.

http://puu.sh/jwM2d/963defafa5.jpg

http://puu.sh/jwM5e/88238a0b91.jpg

Bretagne, France

I just updated the tutorial explaining the different way of doing level transition.

PrettzL likes this
Bretagne, France

Here is the (hopefully) last version of the editor. http://puu.sh/jzYcn/806b254e9b.zip

I finally understood why some stuff didn't work. One of the reason is that the .oep in the game was not the most up to date. Anyway, i added "music" in the levels properties and three entities:

door3: It's the door that closes when the boss spawn. It's implementation is quite weird. multibeam: It's the beam that changes each phase of the boss. It only works when grigori spawn. rover: a decorative entity that i found in the code of the game and in the assets but was never implemented in any level.

Also, talking about "never implemented" here is some stuff i found that were not added into the game.

Some flags: http://i.imgur.com/R4mvpQO.png http://i.imgur.com/jWgnM9M.png http://i.imgur.com/6yWvSTZ.png

I guess there were supposed to be used for the language selection in the option but never got implemented.

The teleport gun: http://i.imgur.com/PfFOirG.png

You can see in the .oep of the game that the teleport gun was originally a collectible. I suppose that at some point the dev thought about starting the game without the teleport gun and getting it a bit later in the game. Also i have no idea what this pink stuf is.

A cartoony talkie-walkie: http://i.imgur.com/G01OLYu.png

My guess is that the antenna our character has come from this object but i can only speculate at this point.

PrettzL likes this
Bourgogne, France

By the way, as soon as I get back to my appartement, I'm gonna give you an edited OTS-map (the one prettzl did 3months ago) with all the levels id. I did it like 2 months ago while looking through all level files. I guess it could be useful if you want to edit any level. ;)

Edit : Now that I have finished reading all, here a few more things I want to say.

The flags are most certainly for langage selection, because devs are brasilians (so I suppose the game exist in brasilian portuguese), and the game has for sure been translated in english (USA) and french. Plus, in \ots\Action\game\world, there's a LanguageSelection.as file where you can find out the three langages offered in the choice are : English, French and Brasilian.

                case 0:
                {
                    Language.setLanguage("en");
                    break;
                }
                case 1:
                {
                    Language.setLanguage("fr");
                    break;
                }
                case 2:
                {
                    Language.setLanguage("br");
                    break;
                }

Oh, and btw, default is english (well this seams totally normal) :

                default:
                {
                    Debug.logError("Unknown language selected: " + this.selected);
                    Language.setLanguage("en");
                    break;
                    break;
                }

As for the pink stuff, I, too, don't have any idea, I tried to find it in the game, but I haven't found anything yet... And for the antenna, I'm not sure I really understood what you was trying to say, but it's a totally different asset than any of Yuri's asset.

Bretagne, France

Thank you, i added it in the first post. About the talkie walkie it was just speculation, nothing really important. I just wanted to share these stuff i found in the assets.

Edited by the author 7 years ago
Île-de-France, France

Hey !! Thank you for this map editor, it's AWESOME !!! GG !! Really, it's great !! If you ever come to Paris, I'll pay you a beer !

I also wanted to report a bug, with the object npc_alienTree: there is a box for the message, so I tried to make some customs, but the player isn't able to talk to them. It's not a big deal, but it would have permitted to create a short story behind the customs levels.

Bretagne, France

You're welcome! I'm glad to see people are able to create levels using it! Unfortunately, it's currently impossible to make custom messages without having to modify the code of the game. The "message" box in the npc objects are shortcut for their dialogue.

http://puu.sh/lLt3l/0acfa54292.png

The only thing you can do is make one npc say the line of another one. Not really interesting unfortunately. :(

PrettzL likes this
Bretagne, France

I just added to the guide a little section about the trouble you could encounter with some of the game levels. Nothing major.

[quote] P.P.S. Another use for OGMO is to edit game levels. If you want to do this you may notice that some levels can't be opened in OGMO and other correspond to nothing in the actual game. Here is why:

Unopening levels: 10_5.oel: The most complicated one. The line causing issue is line 13: <rect x="0" y="-1" w="26" h="1" /> It adds a line of invisible solid blocks above the level and OGMO doesn't like it. If you want to edit the level you need to remove this line with notepad, edit the level, then put the line back.

12_6.oel The line causing issue is line 245:

<!-- <sp_messageArea id="11" x="288" y="0" width="160" height="160" /> -->

You can just remove it. It affects nothing in the game.

25_5.oel The line causing issue is line 81:

<!-- <env_blockFall id="10" x="160" y="256" /> -->

You can just remove it. It affects nothing in the game.

27_6.oel The line causing issue is line 46:

<!-- <sp_messageArea id="15" x="96" y="64" width="32" height="192" message="" /> -->

You can just remove it. It affects nothing in the game.

Unknow levels: 20_5(new).oel It's an alternate version of 20_5 that was never used in the final game.

20_6.oel It's the foundation of a level that never made it into the final game that you were supposed to access from 20_5(new). The level is still here but unaccessible.

31_6.oel It's an alternate version of level 36_1.oel. Once again, it's unaccessible in the game. [/quote]

Bretagne, France

HUGE UPDATE: A new section was added describing how to add custom dialogue/room name in the game. Also, i improved a bit the formatting so that it looks less like a mess right now and made a few corrections.

PrettzL likes this
Game stats
Followers
105
Runs
428
Players
109
Latest threads
Posted 2 years ago
27 replies
Posted 6 years ago
1 reply
Posted 7 years ago
4 replies
Posted 7 years ago
21 replies