Author Topic: If I were to make an add-on how would I start?  (Read 334 times)

Alright, I'm wanting to make an add-on for medieval warfare, here's what it looks like:

Basically it would shoot (in-accurate) flaming wooden rockets in one general direction and you would be able to move it like any other vehicle, except very slowly.

The Wooden rockets would be rather inaccurate and upon hitting the ground, would explode and send shrapnel all around the general area. To get this artillery to fire, you would right click it with a torch anywhere on the vehicle, no one would have to be controlling the artillery for it to fire, however if nobody is controlling it, you wouldn't be able to aim it.

-got to go to bed, will update tomorrow-

First, you have to have a goal in mind. Something clear, cut and center. Luckily, you got that part down. Second, do a little bit of planning. Try to sketch out the mod, put down some considerations, etc.
Third, do a bit of research on coding. There are a couple of TorqueScript Tutorials in the Modification Help section, so that shouldn't be too hard.
Fourth, try to find an Add-On similar to what you are trying to achieve. Not all Add-Ons need to be done completely from scratch, and code can be recycled from anything and anywhere.
Fifth, get yourself a working model with animations and stuff. Should be tutorials on how to model as well.
Sixth, start working. Combine everything, do a bit of code trimming, working back and forth on the mod until it's just the way you want it.
Seventh, make sure there aren't any bugs. I am a victim with these said mistakes, as I have 3 add-ons in the making and they still have damn bugs (~_~;). Beta test as much as possible!
Finally, you can release the mod. Make a good thread for it, and place a download link to the zipped file.

Although there are different ways to go about making mods, this has been my typical approach on the subject whenever an idea popped into my mind. You may follow it, or experiment for yourself.

It is also good to know how to reload your addon while still in the game so you don't have to keep restarting to test your code.
This only works decently in singleplayer as it can crash other clients when used in multiplayer.

While in game, press the button under escape, which will open a white command line interface.
Paste this line into it after changing the name to the name you choose for your addon.
Code: [Select]
discoverFile("add-ons/your_addon.zip"); exec("add-ons/your_addon/server.cs");
It can still glitch sometime after a lot of use, so actually restarting might help when encountering weird issues.