CUSTOM MODELS

Creating custom models is a many-step process, and depending on whether you are creating a custom map piece, object or item, there are different tools available to assist you.  Below I will break down the steps to creating the 3 basic types of custom models within SoM and give links to the programs necessary to complete your project.

THE TOOLS

Below are links to the installation files needed to create custom graphics.  I will do my best to outline the basic functions of each tool, however prior knowledge of image editing and 3D modeling will greatly assist you in creating new custom models.

MetaSeqouia / MetaSeqouia Lite: A free 3D tool used to create the mesh, attach the texture and generate the model file to use with SOM.  There are two versions needed to be able to create the final output file so install both tools file.

SoM Toolset:  An additional toolset that From Software produced (and JDO translated) which will allow you to create the files needed for items, objects and map pieces.

Xvi32:  A hex editing tool to allow you to customize the .prf files that are generated during new model creation.

Paintshop:  A powerful image editing tool used to create new textures.

             TIPS:

1.     Before you start, make sure all of the above programs are installed on your machine and you know the command line shortcut for your From Software toolset.

2.     I recommend saving your model and texture files in the same directory as your tools are saved, otherwise they will not be able to generate the output file.

3.     SoM utilizes a very basic lighting configuration while in game.  For the most part it is recommended that you ‘shade’ your models by adding shading to the texture, do not rely on light sources to shade your model in game.

4.    Be sure all your DirectX functions are enabled.  If they are not, the export will fail and no files will be generated when you run X2MDO.EXE.

 

CREATING A CUSTOM OBJECT

Custom objects really help to set your SoM game apart from other games created with the toolset.  With custom objects there is no real limit to the type of graphics you can use in your backgrounds and to interact with the character.

            TIPS:

1.     SoM is not coded to run very quickly with custom objects, so begin with objects that have a small number of polygons.

2.     Large objects may flicker off the screen if their center point (0,0,0) is out of the peripheral vision of the player or placed behind a solid wall.  Keep your objects limited to a maximum radius of 4-6 meters (2-3 map squares).

3.     Objects can be transparent.

4.     Objects are lit differently than map pieces, so creating map piece patches can be difficult.

5.     Be careful naming your files, spaces and certain non alpha-numeric characters may cause problems for the converter tools.

3D MODELING*

 Where to get a 3D model:

  1. Make a model
    1. Metasequoia is the most useful tool I’ve found for making a model from scratch. It can open DXF, LWO, 3DS, OBJ and a few other file types and then save them in X format that SoM can use. NOTE: Metasequoia can not open X files so make sure you save your projects in X and another format in case you ever want to re-edit the object. How a texture is aligned on a 3D mesh is called UV (stands for U and V coordinates to give them distinction from the usual XYZ coordinate notations). Metasequoia has good UV alignment controls. There is a freeware and a shareware version of Metasequoia. I found that the freeware version would not open some files that the shareware version has no problem with. There are some decent tutorials about Metasequoia here:

 

                                       i.      http://www.grumpyrarab.ffximc.com/pages/site/homeframe.html                                      

                                       ii.      http://trlibrary.tripod.com/id49.htm

 

    1. Another useful program is Tree Generator. It uses a simple interface to design just about any tree imaginable. It can export to 3DS which can then be converted to X format using Metasequoia. It’s available here:

                                       i.      http://www.treegenerator.com/

  1. Import a model from a Playstation game
    1. The playstation KF titles use a 3D format called TMD. Usually TMD files are lumped together on the CD so you will need to extract them with a TMD ripper like PSX MultiRip. Once that has been done, there is a program called Milkshape which can import TMD files and then export them as LWO which can then be opened and edited by Metasequoia. The TMDs will lose their textures, but not their UV coordinate mapping (the UV says exactly what region of the texture graphic is displayed on each polygon) so it tends to be easier to remake the textures. Milkshape is available here:

                                        i.      http://chumbalum.swissquake.ch/

  1. Use one of the many free 3D models available on the internet
    1. There are tons of free fan models on the internet in various formats. Many of them are in 3DS format and they can be loaded into Metasequoia and edited or textured as desired.
    2. Here’s a site with link to free-model sites: http://www.amazing3d.com/modfree.shtml

 

Limitations for textures used for SoM:

  1. Should be in BMP format
  2. Must be at least 256 colors
  3. Can’t be longer or wider than 256 pixels
  4. Length and width must be a power of 2 (16, 32, 64, 128, 256) Mixing sizes like 16x256 is fine.

 

Once the 3D object is saved in X format with Metasequoia:

  1. Importing Objects into SoM:
    1. Objects and Items have 3 different parts:

 

                                        i.     MDO file: the 3D mesh which references its texture (txr) internally.

                                        ii.    TXR file: the MDO’s texture

                                        iii.   PRF file: Contains various information such as the part’s name, type (helm, lamp etc), its MDO file name, its collision rectangle size, whether it can be rotated on Z and X axis or not etc.

 

    1. Making an MDO file:

                                        i.      Put the X file (saved with Metasequoia) and its texture BMP into a folder with ‘x2mdo.exe’ on your desktop. In this example I’ll say the folder is named ‘Piece’. Go to ‘Start>Run’ and type ‘command’ (always without the quotes). In the command prompt that pops up type ‘CD desktop\piece’ (that will change the active directory to the Piece folder on your desktop). Next, type ‘x2mdo.exe Z.x’ but replace Z with the name of your X file, and push enter. Both the MSM and the TXR file should appear in the Piece folder where the X and BMP files were.

    1. Making a TXR file

 

                                         i.     The TXR file will get generated when you make the MDO. They have the same size/dimension requirements as any other texture.

                                         ii.   NOTE: you should make the name of your texture BMP exactly the same as the name of your MDO file’s. Otherwise, it won’t automatically transfer when you ‘build runtime’. Example: tree.x and tree.bmp.

 

    1. Making a PRF file:

                                        

                                        i.      The process will differ depending on what type of part you are making. The PRF file for most parts can be made with ObjEdit.exe, however, remember you can’t make Objects with moving parts (traps, doors, chests, key pedestals etc).

                                       ii.      To make a PRF with ObjEdit.exe, put the MDO and TXR file in the appropriate SoM directory. Run Item or ObjectEdit.exe and name, enter details for your part then save.

To make PRF file for an Item/Object not supported by ObjEdit.exe (Lamps, Doors etc) you will need a hex editor. Open existing PRF files until you find one that belongs to the same class as the part you are trying to make. Type over the name and MDO name references and then save-as, renaming the PRF to match your new part’s name. Here’s an example. The Pinkish area is where the item’s name (which is displayed in the Editor) can be written. The yellowish area is where the mdo file’s name can be written. Just make sure you end the name with a hex 00 number (as the white 00 between the pink and yellow shows).

 

I type over the above PRF text to make this new item, then save-as under a new name (so I don’t overwrite the old)

* - This section is taken from documentation created by John David Osborne.

 

CREATING OBJECTS WITH A MOVING TEXTURE

This info only explains the unique operations involved in making a SoM texture move using Metasequoia. It does not tell you how to make the model itself or other common operations like converting an X model to SoM format. You will need to learn those details separately.

Before you start, you will need to download the following toolkit created by John Osborne which will give you the necessary files to use in the tutorial.  Click here for the toolkit.

1. Make your model but keep in mind that only parts of the model that are covered in the first listed texture will move (indicated with red arrows).  More textures may be used, but they will not move (green arrows).

2. When you are finished making your model, save it in MQO format then open the included 'Move Arrow.mqo'.  Opening 'Move Arrow.mqo' should close the model you made so it should now look like this:

3. Next, go to the 'File>Insert' and insert the model you made in step 1.  Press the 'Misc' button and select 'Merge All' from the list and you should end up with something like this:

4. Save this combined model as an X file making sure 'UV Mapping' is checked and convert it to a MDO format using SOM's X2MDO.exe.

5. Put the included 'Moving.prf' file in '...\DATA\OBJ\PROF\' and your new MDO file that you saved in step 4 above, as well as the included 'BlankArrow.txr' in '...\DATA\OBJ\MODEL\'.

6. Run SOM's Object tool and 'File>Open' 'Moving.prf' then press 'CHANGE' and select your new MDO from the list.  Enter whatever name you want and click 'SAVE AS' whatever name you want:

Your new animated model should now be ready to use in the Parameter Editor.

TIPS:

1. The black arrow will show up when you place the Object in the Map Editor, but it will not show up in game.  It indicates the direction the texture will move.

 

 

CREATING A ‘USABLE’ ITEM

Let’s start with the most basic type of item creation, the usable type item.  These items are simple, non-animated items that go into the player’s inventory when picked up and are accessed from the “USE” menu in game. 

  1. First, start off as described above in the ‘custom object’ creation section and generate your model, and any corresponding bitmap textures you will be using for the item. 
  2. The same limitations apply to custom items as did for objects, keep the textures in multiples of 2 and no greater than 256 x 256 resolution.

    1. Keep in mind when creating texture bitmaps, if you plan on running your game in 16-bit mode you should make  your bitmaps 16-bit as well.  If you are going to use 32-bit mode in game then use 24-bit true color textures.  Mixing true color textures in a game running on 16-bit mode will make your textures look blocky and very degraded.
    2. For semi-transparent textures you must modify the texture within Metaseqouia to enable the “diffusion” setting as shown below.  The darker the texture the more effect diffusing the texture has.  I don’t recommend going beyond .15 diffusion else the texture will be too transparent.
  3. Once you have your model in .x format, export it to a .mdo file via the X2MDO.EXE program as described in the object creation section.  This will produce the .mdo and any related .txr files.  Note every texture listed for the model will have its own .txr file in the output folder, so be sure to copy them all to their respective folders within SoM.

  4. Now that we have our item model and texture files in the appropriate directory launch ITEMEDIT.EXE.  With this editor you can now load any non weapon item models by hitting the ‘change’ button above the preview pane.

  5. Once you have selected your model from the list you must give your item a name.  This name will be the name listed within the SoM item editor.

  6. The ‘Item Preview Screen” and “Map Preview Screen”  allows you to adjust the rotation angle of the item when you look at it in your inventory or pick it up on the map.  To see the outcome of the number of degrees you input into these fields it may be necessary to toggle the two bottom most buttons labeled “Item Preview” and “Map Overview”.

  7. Finally, the “Y offset” allows you to adjust raising or lowering the item as it would appear in your inventory screen.  This is sometimes necessary to center it on the screen depending on the original orientation of the item model.

  8. When you finished with all your settings save the file and it will appear in your SoM item model list the next time you start it up.

 

CREATING ARMOR ITEMS

Armor items, with the exception of the glove slot, all follow the first 3 steps as creating a generic use item.  Any of the slots in your inventory other than magic or weapon are considered armor slots in SoM and each will only be able to add to your defense stats. 

  1. Once you have your model and textures complete and in the item directory, you will need to have your hex editor handy.  Unlike generic use items, armor items require you to have a specific .prf file that ITEMEDIT.EXE cannot create..so we have to work a little magic.
  2. Open up your prof folder in the items directory of SoM.  Select from the following .prf files dependant on the type of item you want to create:

    1. 035.prf – Head slot item.
    2. 044.prf – Body slot item.
    3. 060.prf – Arm slot item (more details on gloves in the weapon/glove section).
    4. 068.prf – Leg slot item.
    5. 080.prf – Shield slot item.
    6. 092.prf – Accessory slot item.
  3. Now the next part is very tricky…I am not a master of hex editing so I recommend taking the easy way out and simply overwriting what is in the existing file with a new reference name.  Let us use 035.prf for example.

 Shown below we can see that the ‘O’ in ‘Open Helm (1)’ starts on hex 6.  The easiest way to create your new item is to simply overwrite what is already in the hex file, it is more difficult to add to or remove from the file as each hex is important and may be used as place holding.

 

Consider if we wanted to create an item called Gladiator Mask.  In 035.prf we have 13 characters in the name Open Helm (1), so it is my recommendation to make the gladiator helm name 13 characters long.  If we type in (all one word with no spaces) ‘GladiatorHelm’ it will fill all 13 hex slots.  This way we haven’t removed any spaces or added new characters to the file…simply replaced some characters with others.

 

Now that the item name is complete, we have one more step before this item will work.  Using 035.prf again, we see that the model referenced is i035.mdo.  Again spacing is very important, so unless you know your way around hex editing I recommend simply and only overwriting characters.  So that leaves us with a four character file name. 

 Go back to the model you created and rename the .mdo to something that SoM is not currently using…like h001.mdo to signify this item is a helmet.  Now that it is named h001.mdo we can overwrite i035.mdo in the profile to read h001.mdo.  Again we have not added or subtracted from the file.

 

Last but not least choose ‘File>Save As’ and save the file as h001.prf.  This should now allow you to see the item in your SoM item list and use it as a configurable helmet type item.

 

NEXT>>>>