Soooo i finally got around to making this , hopefully no one beat me cause i didn't check.
Do everything in the order it is written in! From Getting starter to the final map file all in order.
You will Need:
Latest Version of Trapped's Server files
-Google his github to find them
Visual Studio or Other Editing Software
-Dont use something such as notepad ++
-I suggest Visual Studio Express 2012
(Maybe) HeidiSQL
-If you dont already
A little brain.exe
To get started:
Alright the very first thing you need to do is to open up the editor in Trapped's files. To achieve this your account must be atleast Moderator role (2). You can use HeidiSQL to change that.
Once you open the editor you can go ahaid and well, start editing. Something to remember is to put at least one square of spawn region, or you just render the map useless.
Converting the map:
Step 1: Open the server project in Visual. It can be found in the main server folder.
Step 2: Navigate to terrain -> jsonwmapexporter.cs
Step 3: Edit these to what your map is named. It must be exact!
Code:
static void Main()
{
byte[] dis = Convert(File.ReadAllText("C:/example.jm")); //open that .jm file
File.WriteAllBytes("C:/example.wmap", dis); //and saves it there //NEED TO RUN terrain.exe AS ADMIN!
}
Step 4: Save, and right click terrain in the solution explorer and click 'Rebuild'.
Step 5: Put your .jm map into your C:/ directory. In Windows Explorer, navigate to your server folder.
Step 6: Navigate to Terrain -> bin -> Release
Step 7: Run terrain.exe as administrator, and your map.wmap will be created in C:/.
NOTE: You can change the directory of where you place the map. Dont attempt unless you know how.
Implementing the map:
Step 1. Open the server project in Visual. It can be found in the main server folder.
Step 2. Navigate to wServer -> Realm -> RealmManager.cs
Step 3. Scroll down until you see a list with the dungeon names.
Step 4. Copy the last one on on the list, and paste it under it.
Step 5. You should have something like this:
Code:
Worlds[World.EXAMPLE_ID] = new Example();
Step 5.5: Proceed to change EXAMPLE to your dungeon name in all caps, and Example to a normal version. No spaces in the names!
Step 6. Proceed to save the file, also at this point it is normal to have an error under EXAMPLE_ID aswell as Example().
Step 7. Without closing that tab, Navigate to DB -> Data -> addition.xml
Step 8. Paste in this code after <Addition> :
Code:
<Object type="0x1F40" id="YOURDUNGEONNAMEHERE Portal">
<Class>Portal</Class>
<IntergamePortal/>
<DungeonName>Your dungeon name from the part after = new in step 5</DungeonName>
<Texture>
<File>lofiEnvironment</File>
<Index>0x7c</Index>
</Texture>
</Object>
<Object type="0x1F41" id="YOURDUNGEONNAMEHERE Key">
<Class>Equipment</Class>
<Item/>
<Texture>
<File>lofiObj5</File>
<Index>0xCE</Index>
</Texture>
<SlotType>10</SlotType>
<Description>A key which opens an entrance to a Portal.</Description>
<Sound>use_key</Sound>
<Consumable/>
<Activate id="YOURPORTALNAMEHERE Portal">Create</Activate>
<DungeonName>Yourdungeonnamefromthepartafter = new instep5</DungeonName>
</Object>
Step 9: Edit that accordingly and save.
Step 10. Without closing that tab, navigate to wServer -> Realm -> Entities -> Player -> Player.cs
Step 11. Scroll down until you see something like this, ignoring the Starter and Ice Cave:
Code:
switch (entity.ObjectType)
{
case 0x0712:
case 0x071d:
world = RealmManager.GetWorld(World.NEXUS_ID); break;
case 0x071c:
world = RealmManager.Monitor.GetRandomRealm(); break;
case 0x0720:
world = RealmManager.GetWorld(World.VAULT_ID); break;
case 0x071e:
world = RealmManager.AddWorld(new Kitchen()); break;
case 0x233D:
world = RealmManager.AddWorld(new Banana()); break;
case 0x2553:
world = RealmManager.AddWorld(new Gee()); break; //map creating tutorial world
case 0x0721:
world = RealmManager.AddWorld(new WineCellar()); break;
case 0x0742:
world = RealmManager.AddWorld(new Beachzone()); break;
case 0x1771:
world = RealmManager.AddWorld(new IceCave()); break;
case 0x1773:
world = RealmManager.AddWorld(new Starter()); break;
}
Step 12: Copy the last one on your list, and paste it below. Change the id after case to 0x1F40, and change the name after new to your dungeon name, from step 5.
Step 13: Save, and Navigate to wServer -> realm -> World.cs
Step 14: Scroll down to the list, and copy the last one. Change the id to anything, as long as it isnt already taken. Also change the
BLAHBLAH_ID to what ever you set the id to previously.
Step 15: Save, and contine with the next step.
Adding the map to the files
Step 1: Outside of Visual Studio, open up your Server folder and wherever you saved your .wmap file to.
Step 2: In your server folders, navigate to wServer -> Realm -> worlds
Step 3: Drag your .wmap file into the folder, and close the folders.
Step 4: Go back into Visual, and navigate to wServer -> Realm -> worlds
Step 5: Right click on the worlds folder in the solution explorer. Press add existing item.
Step 6: In the window that comes up, navigate to your server files, then wServer -> Realm -> worlds. You need to switch the file type to all files. Then click on your map.wmap and open it.
Step 7: In the solution explorer, scroll down to your map.wmap and click it.
Step 8: Now, in the properties box you HAVE TO change the build action to Embed Resource!
Step 9: Your map is now in the files, please continue in the next section.
Final map.cs File
Step 1: In visual, navigate to wServer -> Realm -> worlds.
Two methods for this
Step 2A: Right click banana.cs, and click copy. The right click worlds folder and click paste. Then rename Copy of banana.cs to yourworldname.cs.
Step 2B: Right click worlds folder and add new item -> class. Open it up, then open banana.cs and copy all, and paste in your new class. Then rename your class to yourworldname.cs.
Step 3: Edit these things. Change the id to the BLAHBLAH_ID you put earlier. Change the name to the name you keep having to use. Then edit this line to your .wmap name.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System****;
namespace wServer.realm.worlds
{
public class Banana : World
{
public Banana()
{
Id = -23;
Name = "Banana";
Background = 0;
base.FromWorldMap(typeof(RealmManager).Assembly.GetManifestResourceStream("wServer.realm.worlds.banana.wmap"));
}
}
}
Step 4: At the top press the save all button. Then in the solution explorer scroll all the way up and right click " Solution 'server' " and press rebuild.
Step 5: If you have done everything correctly, then you now have a working dungeon! Just /give yourself the name of the key, and bravo!
Thanks to @
Trapped for teaching me in the first place
Thanks to me for typing for a little over an hour!
If my post helped you, then please leave a thanks!
Post any questions in the thread, please dont pm me about it! Enjoy
