Updated: fixed image links.
For anyone who has 3DS Max (I use
version 2010), this script will let you convert any
Mesh Type model, into a smod, then you can insert it into a map with SStudio.
The script is far from finished, it doesn't have a visual form and controls yet. But if you know how to use 3dmax you will have not problems to use it.
I'll put and example of how to use it (I asume you have a at least a very basic knowledge of 3dsmax):
1) Create a 3D object, in this example a single 3D text.
2) Convert the object to a
Mesh (Right click on the object, and Conver to: Editable Mesh) and name the object
MYMESH (
this is very important!)
3) Apply a texture from the game data folder (just to see how it looks, this is not mandatory)
4) When your model is done, rotate it
90º to it's back direction (use the Left view)
The object should be perpendicular to the Grid in the Perspective view. This is necessary since the game use a diferent position.
5) Go to the
Utilites tab, click on
MAXScript, then on
Open Listener (the listener is just a console)
6) Click on
Open Script and open the mes2smod.ms file, to edit the code
You have to change the output path and filename: Search for a line that says
smodFileName = "D:\3dsmax\0max_test123.smod" and change the path and filename there, to the one you need (it could be any folder you want, just be sure it exist!)
Save the changes (
File > Save) and close the code window.
7) CLick on
Run Script and select the script (mes2smod.ms) file again, it should run without problems.
If everything went OK, you sould see something like this in the MAXScript Listener window:
(The path will be diferent in your computer)
Now go to the folder where the smod file were saved, and copy it to your game data, it sould be in
Data\Entity\Building folder
8) Open ShaiyaStudio en look into the Entity\Building tree, the file should be there, then open it
And that's all, now you can add it to any map with SStudio.
Then make a patch with the new smod file and the WLD file you edited, and apply to the game client, go to the game and check it.
This is a sample, those objects are rotating but I don't have video recording tools.
You can edit the script with any text editor, to experiment. There are tutorials on max scripting, just remember to look for one that is supported by your 3dsmax version. ALso the script has many comments on what is going on in each line.
The script is attached to this post.
Offtopic: A question for @
[Only registered and activated users can see links. Click Here To Register...] How many vertices has the terrain part of a FLD map? (It was 512x512 lines ?) A script to generate a flat plane, edit the heights and export the raw data ready to be inserted in a WLD, should be possible.
What about distances in Shaiya? Are they pixels? Meters? Custom?
This is how a terrain data could be fomed:
4 vertices, then half the distance between them to make the 5th vertice in the center, then build faces from vertices 1, 2 and 5, then 2, 3 and 5, then 3, 4 and five.
It will require many maths tho.
Attached a little PDF (2 pages only) with basic info on how to use MAXScript, manipulate objects, variable types, loops, if..else, etc.