Toribash Community » Help » Tutorials
Reply
 
Thread Tools Display Modes
Old Jul 10, 2007   #1
DaHandy
Member
 
Black Belt
Join Date: Jan 2007
Posts: 78



Learn the basics of modding and to use the functions (rot, pos...)
Hi!
This tutorial has 15 functions for now; "rot", "radius", "shape", "material", "color", "sides", "alt_sides" "flag", "velocity", "range", "axis", "gravity", "force", "strength" and "pos".

More are coming soon! =)

And before you can use these, you'll have to know the basics of modding (bodyparts, joints, etc...).

A few basic things about modding:
Basicly, there are two kinds of "things" in toribashian's body; joints and bodyparts.
So they are classificated into two groups; "joint"s and "body"s.

You can see the different bodyparts("body"s) from this image:



I also listed them over here:
-body head
-body breast
-body chest
-body stomach
-body groin
-body r_pecs
-body r_biceps
-body r_triceps
-body l_pecs
-body l_biceps
-body l_triceps
-body r_hand
-body l_hand
-body r_butt
-body l_butt
-body r_thigh
-body l_thigh
-body l_leg
-body r_leg
-body r_foot
-body l_foot

Joints are a little bit different thing, here is a list of them too:
-joint neck
-joint chest
-joint lumbar
-joint abs
-joint r_pecs
-joint r_shoulder
-joint r_elbow
-joint l_axilla
-joint l_shoulder
-joint l_elbow
-joint r_wrist
-joint l_wrist
-joint r_glute
-joint l_glute
-joint r_hip
-joint l_hip
-joint r_knee
-joint l_knee
-joint r_ankle
-joint l_ankle

Here is also a list of every "body"s's and "joint"s's original places and sizes (thanks to veb! =)):
Code:
body head sides 0.200000 0.000000 0.000000 pos 1.000000 0.850000 2.650000 body breast sides 0.200000 0.100000 0.300000 pos 1.000000 0.900000 2.200000 body chest sides 0.500000 0.150000 0.200000 pos 1.000000 0.900000 1.950000 body stomach sides 0.350000 0.150000 0.200000 pos 1.000000 0.950000 1.750000 body groin sides 0.200000 0.150000 0.200000 pos 1.000000 1.000000 1.550000 body r_pecs sides 0.200000 0.150000 0.200000 pos 0.750000 0.900000 2.150000 body r_biceps sides 0.400000 0.200000 0.200000 pos 0.450000 0.900000 2.300000 body r_triceps sides 0.400000 0.100000 0.100000 pos 0.050000 0.900000 2.300000 body l_pecs sides 0.200000 0.150000 0.200000 pos 1.250000 0.900000 2.150000 body l_biceps sides 0.400000 0.200000 0.200000 pos 1.550000 0.900000 2.300000 body l_triceps sides 0.400000 0.100000 0.100000 pos 1.950000 0.900000 2.300000 body r_hand sides 0.220000 0.220000 0.220000 pos -0.350000 0.850000 2.300000 body l_hand sides 0.220000 0.220000 0.220000 pos 2.350000 0.850000 2.300000 body r_butt sides 0.100000 0.100000 0.100000 pos 0.800000 1.000000 1.450000 body l_butt sides 0.100000 0.100000 0.100000 pos 1.200000 1.000000 1.450000 body r_thigh sides 0.120000 0.300000 0.000000 pos 0.800000 1.000000 1.100000 body l_thigh sides 0.120000 0.300000 0.200000 pos 1.200000 1.000000 1.100000 body l_leg sides 0.130000 0.300000 0.000000 pos 1.200000 1.000000 0.500000 body r_leg sides 0.130000 0.300000 0.000000 pos 0.800000 1.000000 0.500000 body r_foot sides 0.200000 0.500000 0.080000 pos 0.800000 0.900000 0.100000 body l_foot sides 0.200000 0.500000 0.080000 pos 1.200000 0.900000 0.100000 joint neck radius 0.110000 pos 1.000000 0.900000 2.500000 joint chest radius 0.180000 pos 1.000000 0.900000 2.050000 joint lumbar radius 0.160000 pos 1.000000 0.950000 1.850000 joint abs radius 0.140000 pos 1.000000 1.000000 1.650000 joint r_pecs radius 0.180000 pos 0.850000 0.850000 2.200000 joint r_shoulder radius 0.180000 pos 0.650000 0.900000 2.300000 joint r_elbow radius 0.160000 pos 0.250000 0.900000 2.300000 joint l_axilla radius 0.180000 pos 1.150000 0.850000 2.200000 joint l_shoulder radius 0.180000 pos 1.350000 0.900000 2.300000 joint l_elbow radius 0.160000 pos 1.750000 0.900000 2.300000 joint r_wrist radius 0.110000 pos -0.200000 0.900000 2.300000 joint l_wrist radius 0.110000 pos 2.200000 0.900000 2.300000 joint r_glute radius 0.160000 pos 0.900000 1.100000 1.510000 joint l_glute radius 0.160000 pos 1.100000 1.100000 1.510000 joint r_hip radius 0.160000 pos 0.790000 1.000000 1.400000 joint l_hip radius 0.160000 pos 1.210000 1.000000 1.400000 joint r_knee radius 0.140000 pos 0.800000 1.000000 0.800000 joint l_knee radius 0.140000 pos 1.200000 1.000000 0.800000 joint r_ankle radius 0.110000 pos 0.800000 1.050000 0.250000 joint l_ankle radius 0.110000 pos 1.200000 1.050000 0.250000
You can use # -in the line to make a comment.
For example:

Code:
#This is a comment.
Let's move on to the functions now! =)

The "rot" -function:
"rot" -function can only be used in bodyparts (not in joints, I think..). "rot" -function rotates the selected part of player's/uke's body.
For example:

Code:
Body l_biceps rot 45 0 0
^That will rotate left biceps 45 degrees in horizontal (x). The last too zeros (0) are for the other direction; Y and Z. Y is up/down, Z is back/forward. X is like a spin or something.

The "pos" -function:
"pos" -function can used in joints and bodyparts. This function will move the part you have selected to an another place.
For example:

Code:
Body l_wrist pos 2.200000 1.900000 2.300000
^That will raise the wrist upper (default pos: 2.200000 0.900000 2.300000).
So in this function, the numbers are going like this:
pos x y z
x = left/right
y = up/down
z = forward/backward

When you add more to Y, your part will raise higher.
When you add more to X, your part will go right.

The "radius" -function:
"radius" -function is very simple. It has only one argument; radius. =)
So this function will adjust the size of balls (joints, heads etc...).
For example:

Code:
body head radius 10.000
^That will make player's/uke's head larger.
Bigger value, larger head. Simple. =)

The "shape" -function:
With "shape" -function, you can select the shapes of bodyparts.
You can select it from three; box, cylinder and sphere.
For example:

Code:
body head shape box
^That will make the heads into boxes. =)

The "material" -function:
With "material" -function, you can select the material of bodyparts.
You can select it from these two; flesh or steel.
For example:

Code:
body head material steel
^That will make steel-heads. =)

The "color" -function:
With "color" -function, you can select the colors of bodyparts (or "world"s).
This function uses the basic RGB(RedGreenBlue) -system; color r g b.
For example:

Code:
body l_triceps color 1 0 1
^That will change the color of left triceps. =)

The "sides" -function:
With "sides" -function, you can change the size of bodyparts (not joints).
It has 3 arguments; x = width, y = lenght and z = height.
For example:

Code:
body l_wrist sides 1 1 15
^That will make a silly looking left wrist. =P


Usage of "world" (not an actual function):
The "world" is in the same group with "player"s. So it is not a function!
It is used to customize the map/world (colors etc...).
I don't know much about it, but I know that it can be used for coloring the background.
For example:

Code:
world chroma color 1 0 1
^That will the room/world pink! =)

"flag" -function:
I am not sure about this one...

With this function you can enable/disable different flags.
This can be used for "body"s only.
For example:

Code:
body head flag 6
^That will enable instagib (instant decapping when hitting, like a lightsaber).

The "velocity" -function:
This one is used to change the speed of the joints.
This can be used for "joint"s only.
For example:

Code:
joint r_pecs velocity 0
^That will make the right pec unmoveable.

The "range" -function:
I am not sure about this one...

This function is used to select the movement range of joints.
It has 2 arguments; contracting and extending.
This can be used for "joint"s only.
For example:

Code:
joint r_pecs range 200 0
^That will make the right hand spinning a lot when you contract right pecs. =)
IF YOU WAN'T TO MAKE IT "SPINNY" YOU MUST DO A POSITIVE AND NEGATIVE VALUE (e.g. 200 and -200)!

The "axis" -function:
This one is just like "rot" -function, but this is used for joints only.
It has 3 arguments; x y z.
For example:

Code:
joint r_pecs axis 0 1 0
^That will make your right hand go up/down besides of front/back.


More in my later posts! =)
http://www.toribash.com/forum/showpo...52&postcount=7
http://www.toribash.com/forum/showpo...2&postcount=10


FAQ:

Q: What program should I use?
A: If you are using Windows, then you should use Notepad (or Notepad++ if you want).

Q: Now I've made my mod, but I don't know how to save it as .tbm!
A: Save (Save as) it with Notepad and put .tbm in the end of your filename (ex. example.tbm).

Q: Why there aren't all of the functions?
A: I haven't finished the guide yet. I am still making it. =)

STILL MORE IS COMING TO THIS TUTORIAL! =)
Please tell me if something is wrong! =)

Last edited by DaHandy; Jul 27, 2007 at 07:39 PM..
DaHandy is offline   Reply With Quote
Old Jul 10, 2007   #2
Ducky
I am your Goddess.
 
3rd Dan Black Belt
Join Date: Sep 2006
Posts: 1,972
Clan: bncy



Great work, but you left velocity and friction out.
<ducky> The game.
<siku> ducky: i didnt know this was 2005 and 4chan
<siku> sorry, i hate the game and you should shut the fuck up about that retarded bullshit
<siku> you should link us to awesome and edgy motivational pics next or maybe pedobear
<siku> inb4 rep needs toriprime or vip lmao rofl that /b/ is grate
<siku> is this the part where you educate me on memes, further showcasing your amazing 4chan findings
<siku> word x is a meme lmao rofl
<+veb> someone make ducky smod
Ducky is offline   Reply With Quote
Old Jul 10, 2007   #3
sin
Member
 
6th Dan Black Belt
Join Date: Mar 2007
Posts: 214



and also strength and range

Last edited by sin; Jul 10, 2007 at 11:11 PM..
sin is offline   Reply With Quote
Old Jul 11, 2007   #4
+suomynona
Banning Icky from Wibbles would be a crime against nature.
 
Probably an Admin Belt
Join Date: Jan 2007
Posts: 6,002
Clan: spirit



Flags aren't the same as server flags in a mod.

So, those are definitely off. 6 is instagib, and 0 is not instagib, that's about all I know for sure.

Also, don't forget alt_sides, and I do believe there's an alt_pos or something now. Do try it first.

Good guide otherwise.
suomynona is offline   Reply With Quote
Old Jul 11, 2007   #5
Doop
Member
 
5th Dan Black Belt
Join Date: Jan 2007
Posts: 442



DaHandy, I used this in my Mods - what to request and what not to thread. Hope you dont mind =).
Doop is offline   Reply With Quote
Old Jul 11, 2007   #6
DaHandy
Member
 
Black Belt
Join Date: Jan 2007
Posts: 78



Originally Posted by Doopmantori View Post
DaHandy, I used this in my Mods - what to request and what not to thread. Hope you dont mind =).

If you used this, it is totally ok. It is what this is made for! To help people. =)


@Sin and LonelyDuck: Yes, the guide is still a little bit unfinished. I will add them later. =)

@suomynona: Ok, thanks. I will edit those flags off.


Thank you all for your comments! =)

Last edited by DaHandy; Jul 11, 2007 at 04:08 PM..
DaHandy is offline   Reply With Quote
Old Jul 11, 2007   #7
DaHandy
Member
 
Black Belt
Join Date: Jan 2007
Posts: 78



Hi there modders! =) (Sorry for double post, but this is an update)

I have added these to the guide now:
-More basics
-"velocity" -function
-"range" -function
-"axis" -function
-"blood" color and stuff
-"gravity" -function
-"force" -function
-"alt_sides" -function
-"strength" -function

Still coming:
-"friction" -function

-"message"?

Have fun! =)

EDIT: I am going to add the rest of the functions into different posts, 10000 marks is getting done, so I can't add there anymore text... =(


Usage of "blood" (not an actual function):
The "blood" is in the same group with "world", "joint"s and "body"s. So it is not a function!
It is used to customize the blood (colors etc...).
I don't know much about it, but I know that it can be used for coloring the blood.
For example:

Code:
blood color 0 0 1
^That will the blood blue!

Usage of "gravity":
This is one of the cool things. With this, you can customize the gravity.
You can put it where ever you want (but still inside the code =P).
This has 3 arguments; x y z
For example:

Code:
gravity 0 0 0
^That will make the gravity to 0 in all directions! =)


Usage of "force" -function:
This function is to set the actual direction of force of joints or bodyparts (not same as "velocity").
Jousting is using this to get the players to move againts each others.
It has 3 arguments: x, y and z.
For example:

Code:
joint l_ankle force 100 100 100
^That will make your ankle's force to all of those directions.

Last edited by DaHandy; Jul 27, 2007 at 08:31 AM..
DaHandy is offline   Reply With Quote
Old Jul 11, 2007   #8
Blazsword
Member
 
Brown Belt
Join Date: Mar 2007
Posts: 55



Cant wait for more. =) Keep up the good work. Dahandy.
Blazsword is offline   Reply With Quote
Old Jul 11, 2007   #9
+suomynona
Banning Icky from Wibbles would be a crime against nature.
 
Probably an Admin Belt
Join Date: Jan 2007
Posts: 6,002
Clan: spirit



Range function is wrong, it has two variables.

Code:
range <contract> <extend>
I believe.


And I do know that 2.8 is about the max before it turns into a helicopter blade.
suomynona is offline   Reply With Quote
Old Jul 11, 2007   #10
DaHandy
Member
 
Black Belt
Join Date: Jan 2007
Posts: 78



Thank you guys! =)

Originally Posted by suomynona View Post
Range function is wrong, it has two variables.

Code:
range <contract> <extend>
I believe.


And I do know that 2.8 is about the max before it turns into a helicopter blade.

Thanks for the info! =)


The "alt_sides" -function:
"alt_sides" -function is almost the same function as "sides".
This one just modifies the "grabbyhands" besides of normal hands.
It has 3 arguments; x = width, y = lenght and z = height.
For example:

Code:
body l_wrist alt_sides 1 1 15
^That will make a silly looking left (grabby) wrist. =P

The "strength" -function:
This function will add some more power to your joints (like "force", I think, but even more powerful)
It has only one argument; power.
For example:

Code:
body l_hip strength 10
^That will make you left hip really powerful!


PS: When I have completed this, I will compile it to a .pdf -file. =)

Last edited by DaHandy; Jul 25, 2007 at 08:14 PM..
DaHandy is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:32 AM.




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
ragdoll fighting game physics fighting game ragdoll fighting physics funmotion joints martial arts karate pc mac free game turn based game