News |
Solo Strategy |
Multiplayer Strategy |
Solo Films
Myth Links |
Myth Mapmaking |
Site FAQ
Once you have learned the basics of creating a plug-in level (by reading Tycho's Guide), and you can modify existing units via a MONS plug-in (from Tycho's other Guide), the next step is to create a new unit. Since no one has specifically discussed this, I will do so now.
In this example, we will take a warrior and turn him into a warrior-bomb. Sound fun? Ok, first, we need complete MONS and UNIT plug-ins for a warrior. The MONS plug-in consists of the MONS header (at offset 15414035) and the MONS body. The header is 64 bytes long. We copy it into a new Hex file.
Next, we need the MONS Warrior body. We do a check in the output of Myth Inspector and find that the mons warr object is at offset 14960136 and is 512 bytes long. We go and copy that into the new mons file below the header.
The resulting MONS file is 576 bytes long and looks like this.
Next we have to extract the UNIT file for the warrior. First we get the UNIT header the same way we got the MONS header. All warrior types seem to share the same MONS file, but each as a separate UNIT object. There are lots of kinds of warriors, including waec, wait, wamn, waoc, waoo, and waqg. I don't think it matters which one you use since we're going to change it anyway. We are going to use warrior queen's guard. The header is at the end of tags.gor at offset 15489363. It too is 64 bytes. Cut it out and paste it into a new file.
To get the body of the UNIT for waqg (again using info from Myth Inspector), go to offset 15365011 and grab 128 bytes. Paste it into the new file below the header, resulting in a 192 byte file. It will look like this.
Now, we want to change the warrior into a warrior bomb. The 4-letter code we will choose is wbmb. Make sure you choose a code that is not defined in the MythInspector output.
First, save the MONS file as "warbomb". Then save the UNIT file as "warbombunit". As far as I can tell the names of the files themselves are completely arbitrary. Next, open up the MONS and UNIT files next to each other. In the warbombunit file, select the words "warrior queen's guard". Type over it "warrior bomb". Now, the resulting hex file will only be 183 bytes long, but you want it to be 192 bytes long. The hex code for the words "warrior bomb" is 77 61 72 72 69 6F 72 20 62 6F 6D 62. Click after the 62 and add 0's (zeros) until the length of the file is again 192. Next, in the file you will see unitwaqg. Change this to unitwbmb. Finally, where it says warrwara, change it to wbmbwara. Save the file. The resulting file will look like this:
Now, look at the file you saved as warbomb. On the first line, change warrior..... to warrior.bomb. Note that the dots are spaces, not periods.
Next, change monswarr to monswbmb. Save. The resulting file will look like this:
Put warbomb in myth:tags:local:mons: . You can create the directory if it does not exist. Put warbombunit in myth:tags:local:unit: . You can create this directory too if it is not there.
Now just reference your unit from within a modified map using the code wbmb and see if it works. If it does, we can go on and make some more changes to make the warrior into a real bomb.
More info will follow shortly. This will get you started though. If you want to download the files that would be created at this point (that can be used for part 2), click HERE.
satan@theresistance.net
| Satanª
| http://myth.theresistance.net/maps/