Simple Game Tutorial: Difference between revisions
m added Category |
|||
| Line 106: | Line 106: | ||
==Step 9:Testing Your Mod== | ==Step 9:Testing Your Mod== | ||
Open Up SpringSP, pick your mod from the drop-down at the top (if it doesn't show up you screwed up your modinfo.txt), choose your tiny map from the map list and press start. If it doesn't break and your unit shows up, you have created all the neccessary files... yay! | Open Up SpringSP, pick your mod from the drop-down at the top (if it doesn't show up you screwed up your modinfo.txt), choose your tiny map from the map list and press start. If it doesn't break and your unit shows up, you have created all the neccessary files... yay! | ||
[[Category:Mod making]] | |||
Revision as of 14:25, 15 March 2006
Until I Finish Mod Development is the place to go.
This Tutorial Aims to get a person from knowing nothing about Spring to the point where they can create and edit mods.
Right now I am working from memory so you may want to correct me when I'm wrong, I will try to cross link from my summaries to the appropriate articles available in other places.
I will not go too deep into making 3do's because they are old and dumb... but I'll try to make note of the differences here.
I don't know anything about scripting right now, so that section is likely to be sparse when I write it, I hope that someone will expand on it.
Book 1: The First Unit
Step 1:Planning
Who cares about planning, you know what you're doing... just come up with an idea for a mod... I made a chess set... if you don't have a real idea and just want to make a model show up in the game... then yeah... this is the place to start... I'd do that if I were you.
Another good thing to do at this point is to creat a "working directory", and inside it create a directory with the name that your mod will have... after many headaches I decided it's best to put this in the root directory of your system so it's really easy to find when you are switching around back and forth between folders and keep having to find your files over and over again.
Step 2:Getting Da Tools
You will need a bunch of stuff... here's the list (I assume you are using windows)
--Want:--
- Spring - The main program, you will likely need this to test if you've screwed up
- A Tiny Map (2x2) - to test your mod fast
- SpringSP - To load up your mod and your map in spring without confising lobby folks
--Need:--
- 3D Modeling Program - I use Wings3d (other options are available XXreminder for someone to add a link)
- Notepad - to edit all the miriad of text files
- A Graphical Editing Program - needs to handle RGBA TGAs (aka tga's with alpha channels), I suggest Photoshop if you have it, or the Gimp... needed for all of the UVmapping as stuff...
- Upspring 1.3 - To convert your models to the approprite s3o format (if you want to fight with 3do builder, then go ahead... a good trick is to get your model into upspring first and adjust all the hierachy, then save it as an 3do... but why bother?)
- Scriptor - to make and compile your units "animation script"... or steal someone elses and make it work for your unit.
- 7zip - even if you are using zip compressiong and not 7zip, it's still good to have
Step 3:Making a 3D Model
Go into your 3D modelling program and make a 3D model, combine all the objects and UV map the model, then separate it out any parts that need to move. Then Export the UV map as an Image File and Export the whole thing as a 3DS file. Put the orriginal wings file, the UVMap image and the 3ds file into your working directory so you can find them later.
Wings 3D UV Mapping tutorial:
XXreminder for someone to create a Wings 3D UV Mapping tutorial
Step 4:Fixing Your Images
Open up your UVMap in Photoshop (or whatever) go to the layer/chooser thingy and go to the Channels Tab, add a new layer (it should default to alpha) and fill it with 99% black so you can see your texture in upspring. If you want to can paint the UVmap and put white (1% black) on the alpha channel where you want your team colours to show up (you can use something between 1% and 99% to get a blend of your team colour along with the texture... for example 50% will give you your texture with 50% of the team colour mixed in...)
I don't know how to do glow maps... XXreminder for someone to create a Glowmapping tutorial... you don't acctually need one for the model to show up.
Save these images both in the working directory.
Save a copy of these images in tga format into <working directory>/<mod name>/unittextures
Step 5:Upspring
Importing Your 3ds
Open Upspring 1.3, go to file>load model and navigate to and open your 3DS model you exported, you should see the model in upspring as a 3d mesh. Go to the model tab and set the radius and height values to something other then zero... this defines where the health bar will show up, and more importantly, how big the collision sphere will be.
You will also need to use all of the other tools on those tabs to resize and rotate and move your model to the right place... wings makes models that are 90 degrees off and about 30 times to small of the size of most spring models... make sure you click the "apply transform" button after any changes you acctually want to show up in game.
Also, you will want to make the hierachy work using the cut, paste, and add empty buttons. You will need an object called "base" that all the other objects are connected to... the "origin object"... sometimes you get lucky and wings exports it properly... usually not.
Importing Your UV and Glowmaps
Go to the textures tab and make your UV/texture/team-colour map as "texture1" and your UV/glow/reflectivity map as "texture2"... it should show up correctly in the preview pane.
Exporting Your s3o
Choose File>Save Model As then in the drop down select "s3o" and type an appropriate name. this model should be saved to your working directory, and a copy of it made to <working directory>/<mod name>/3dobjects/
Step 6:A couple Text Files
UnitName.fbi
put it in <working directory>/<mod name>/units/
modinfo.txt
Making a New Mod with your unit
Adding Your Unit to an Existing Mod
put it in <working directory>/<mod name>/
Armour.txt
put it in <working directory>/<mod name>/
Step 7:Scriptor
Stealing a Script
Open someone elses script in scriptor that works the way you want your script to work, look at the top where it's talking about "piece names"... then change those piece names to be the piece names of your unit and do a find/replace to make all the places where those pieces show up to be your pieces too. Compile it so it's name is the same as the "UnitName=" value in your "UnitName.fbi".
XXreminder to someone to link to a proper scripting tutorial
put the bos and cob files for your unit script in <working directory>/<mod name>/scripts
Step 8:Compiling Your Mod
navigate to your <working directory>/<mod name> and select everything and choose "add to archive <mod name>.7z".
make a copy of this file called <mod name>v0.7z in your working directory so you don't screw anything up later, then make a copy of it called <mod name>.sd7 in the mods directory of spring.
Step 9:Testing Your Mod
Open Up SpringSP, pick your mod from the drop-down at the top (if it doesn't show up you screwed up your modinfo.txt), choose your tiny map from the map list and press start. If it doesn't break and your unit shows up, you have created all the neccessary files... yay!