Toribash
Original Post
[OUTDATED]How to mod (supplementary tutorial)
How to make a mod: (FAST)

Well, learning how to type in crap to make a mod isn’t enough. There are several procedures to making a mod, so that you work effectively, and efficiently. This tutorial will hopefully help your career as a modder.

DISCLAIMER: this tutorial does not teach you how to mod. Learn that first. This is to make modding easier, and to give you some tips on how to do it more efficiently.
Lets start:

First step to making a mod is getting a good idea. Make sure your idea is thoroughly thought out before you start, or you might be wasting a lot of time. This still applies to mod requests. You might want to do a few tests to see if a certain theory of yours works out. For example: make an amour mod. You go along and make all your piece of armor, and secure them to your tori. Later you discover that all your efforts were wasted because you realize that the armor will do more damage to yourself, than it will ever prevent from the enemy. Solution: do some simple tests to see if anything suspicious will work.

Now, try not to start from scratch. A blank notepad is slightly scary to the inexperienced eye. If possible, use a template or worldbuilder:
  1. template:
    Some mods require you to start a little on a template before you go to worldbuilder. (say you want to make a goblin with a dagger. You need to make the goblin first or you wont know where to put the dagger).
  2. worldbuilder:
    First of all, get the version that allows you to use 16 objects. Now, as you add objects, try to do them in a certain order. Do everything in an organized way. And make sure you don’t make any stupid mistakes, such as forgetting to unselect something. (wastes a lot of time) Now, when you are finished, save it, and go to the file and open it. now, if the world you have requires joints AND more than 5 objects, you might want to add a little comment above every object reminding you what it is. Also, take note of any gamerules that will be necessary that you already set. (such as engageheight and engagedistance)

Now, you can add some stuff to your notepad document that you can’t in worldbuilder. You can add bounce, change the mass, add joust, do some small changes to size and position, change friction, etc. after doing the stuff that is the easiest, save the file you are working on as .yournamehere.tbm. the period puts it at the top of the list, so you don’t have to scroll to load it. if you have lots of mods, you might need to do a priority thing, with more periods for every priority.

So you go on TB, (after unloading worldbuilder ofc) and quickly load the mod. You notice something is jousting the wrong direction. You alt-tab (switch windows to notepad), change some stuff, ctrl-s (quick save), alt-tab (switch to TB), ctrl-m (open mod list), clickclick (on the mod at the top of the list), and your back with an updated version of them mod. Since you’ll be doing this many times, I suggest you find a way to do it as fast as possible (especially if your doing body object modifications, which take a fuckload of time). Also, try using find and replace. Say you want to change the bounce on all these objects. Find…. And replace,…. Now you’re done. xD

After you finish your mod, make sure you rename it without the period, and then post it on the forums for peer review. This will allow you to catch most of the bugs before you upload to MP.



Now, here are so pitfalls that you might need to avoid. I have categorized them based on what makes them.


Joints: this seems pretty hard for most people.
  • axis: remember that its bool, so don’t add anything other than a 1 or a 0 here.
  • range: it’s from a positive number to a negative number
  • Bugs: joints are known to randomly mess up. The symptoms range from: spinning out of control, vibrating erratically, the joint spins on the axis to the nearest 90/180 angle (in relation to the world) and gets stuck there.
    solution:
  • if it’s vibrating, check to see if the two objects you jointed are merged in each other.
  • if it’s spinning, make sure you have a range something like range 10 -10, not range -10 10.
  • if it starts doing the nearest 90/180 thing, I HAVE NO FUCKING IDEA HOW IT HAPPENS AND IT HAS RUINED MORE OF MY MODS THAN YOU HAVE HAIRS ON YOUR BALLS. Fortunately, I have recently found out how to fix it. You just delete all your current joints (or comment them out) and then redo them, and mix them up. So the previous env_obj_joint 4 might be the new env_obj_joint 8.


Toribash crashing: check whether you have more than one bounce object, or any bounce object with something like 10000 bounce. Usually bounce 5 is enough. Also check whether too many objects are jointed together or merged in each other. Otherwise, TB should not crash just when you begin.
EDIT: remember to check whether 2 objects that shouldnt be near each other have the same pos. for example, check whether your right and left glute are in the correct place.


Objects not colliding, until you touch them: usually because when many env objects are merged in each other and tori/uke is not touching any of them. Finish adding joints, or just don’t merge them together to fix this.


People are not DQing: I’m not sure about this one. It seems to have something to do with objects that are static that are merged into the ground. Apparently, the game engine is too busy calculating that collision than calculating DQ. (total BS in my opinion, but o well) No fix yet.


Things just not working: your probably being a dumbass. Don’t worry though, we all are some time. (especially me, because I mod when I’m supposed to be sleeping). Try not to worry about it. if you cant find it within 60 seconds, just go and post your script (not an attachment, I get lazy) on the forums, and we’ll give it a scan. Probably you misspelled joint or something like that. Don’t waste your time on it.


Flags not working: probably because they don’t. If you are using Flag 2, I might remind you that it doesn’t work. For some reason its just instagib. I’ve already talked with hampa about this.


Thrust: apparently a lot of people think this is confuzzling.
  • Thrust [#N] [#X] [#Y] [#Z]. This means do XYZ force (which is direction and force) every N frames. Ex: force 3 0 0 -10 would make an object move downwards at 10 units force every 3 frames
  • Adding thrust to joints: you can’t. Don’t bother.
  • For any object mass A, and gravity Y, to make that object resist gravity (force and grav cancel out) force 1 0 0 –XY. So if the mass of an object was 0.1, and gravity 0 0 -10, to make that object float, do thrust 1 0 0 1.

Friction:
  • Changing friction for body objects: I don’t think you can do this either. I believe it’s just on… or off. Maybe not even that.
  • Friction is more like an average of the 2 objects touching it. So to get true non friction between 2 objects, it must be set to friction 0 for BOTH. For default friction for body objects, its all based on what its touching. You can alter the friction of the ground by adding friction # to the very beginning of a mod.

Bounce: Fun Fun Fun.
  • I`m not sure exactly how it works.
  • It is based on the average of the two objects colliding.
  • If both objects are bounce 1, no energy is lost. (perfectly elastic collision). However, for most purposes, bounce 5-20 (if no other bounce objects collide) will be sufficient. Any more would be pointless.

Engageplayerpos and Engageplayerrot:
  • Engageplayepos: X1,Y1,Z1,X2,Y2,Z2, where XYZ is coordinate, and 1 is tori, and 2 is uke. Default is 0,0.5,0,0,-0.5,0
  • Engageplayerrot: #,#,Z1,#,#,Z2: where Z1 is rotation of tori, and Z2 is rotation of uke. The other stuff is (I believe) useless, because whatever you set it to, it does not disappear.
  • engageplayerpos and engageplayerrot is NOT changed when you switched mods. To reset, use /set engageplayerpos 0.
  • Also note that when engageplayerpos is anything other that 0, engagedistance and height are ignored.

Also, if people are having trouble moving their biceps/triceps remember that the code MUST BE body r_biceps, NOT biceps, NOT r_bicept.

There also are problems with the thigh body objects. if you try to move/rotate them, the knee joint becomes extremely weriod. Although the join image is in the correct place, you have to click somwhere around it to get it to move. The shadow/outline is also messed up. Might happen with bicepts too, not sure.


Well, I hope that helped

If I forgot anything else, please post it below. This tutorial is supposed to be the 2nd-3rd tutorial after you have read everything else. So please do not ask questions such as “how do you mod,” or even “how do you make something joust?” This is meant to help other modders who have just begun their career. If you want me to add anything to my list of pitfalls or tips, I would be more than happy.

Secondary purpose: these are the questions that were asked me in the last few months; now all I have to do is link people this.

Also: first person to find all my grammatical errors and corrects them gets 50tc. XD


Thanks for viewing 8D. Mayby ill add some pics later.
Last edited by WorldEater; Jan 1, 2015 at 10:47 PM.
- its been a while
Originally Posted by blkk View Post
if it starts doing the nearest 90/180 thing, I HAVE NO FUCKING IDEA HOW IT HAPPENS AND IT HAS RUINED MORE OF MY MODS THAN YOU HAVE HAIRS ON YOUR BALLS. Fortunately, I have recently found out how to fix it. You just delete all your current joints (or comment them out) and then redo them, and mix them up. So the previous env_obj_joint 4 might be the new env_obj_joint 8.

I've never tried that, doesn't seem like it would help, but tb does weird things sometimes. nice idea.

Originally Posted by blkk View Post
Objects not colliding, until you touch them: usually because when many env objects are merged in each other and tori/uke is not touching any of them. Finish adding joints, or just don’t merge them together to fix this.

I've had the no collide bug in mods with no joints or merges what-so-ever and it still happens

Over all nice collection of tips, tricks, and work arounds. I put it in the tutorial sticky in the mods section.
Last edited by MrPoptart; Apr 1, 2009 at 03:35 AM.
hmmm, having problems with the ground DQ bug and engageplayerpos for MP. i posted on support
- its been a while
There also are problems with the thigh body objects. if you try to move/rotate them, the knee joint becomes extremely weriod. 50 tc plz
good tips
Incredible how the people think it is confusing
I learnt in my first time
I AM A GENIUS!!
(losers...)
and for the person above
EVERYBODY KNOWS
Last edited by dengue; Jun 12, 2009 at 12:31 AM.
Upload it Here and then People will be able to Download it, for it to be automatically in the mods list however I think your mod will need to be chosen by the developers of the game.