Week 1, Basic Making and Saving
Week 2, Advanced Worldbuilder and Basic Notepad
Week 3, Intermediate Notepad Editing
Week 4, Advanced Notepad & Basic Body Editing
Make sure to read previous tutorials before this one!
Week 4- Advanced Notepad & Basic Body Editing
Starting
-Ok, so today we will be learning about more env_obj_joint options, most importantly make it rotate.
-Lets open toribash and start worldbuilder as usual, to demonstrate how rotation on an obj_joint works I will make a bike with wheels that will eventually turn.
-I made the bike body a bit heavier so it wont flip over.
-I also made a ramp for more fun:

-Right now this is a bit unevenly matched, tori can just roll all over uke, we will change this in a bit.
-Save the mod and grab it from your scripts folder and load it up in notepad.
-
DON'T UNLOAD WORLDBUILDER
Obj_Joint Placement
-The ramp is static, so I wont need to joint those together, but I need to joint the dynamic bike together
-One shortcut for this is to make a small circular object in worldbuilder and then place it where you want to joint to be located:

-Now I can copy the location from the information pallete on the right side of my screen and put it under my object joint layout:
env_obj_joint 1 1 4
pos 1 9.125 2
visible 1
-So, this is my first object joint, the bike body is object one, and the handlebar is object 4, so I write the position, and I want it visible this time. (By default it is invisible)
-Now, since I want my wheels to rotate around an "axle" in this case my obj_joint, I will put the joint on the same position as the wheel:
env_obj_joint 2 1 2
pos 1 9 0.3125
env_obj_joint 3 1 3
pos 1 10.875 0.3125
Joint Rotation
-Ok, now to make my wheels rotate, this is what I will write under the env_obj_joint 2 and 3:
env_obj_joint 2 1 2
pos 1 9 0.3125
axis -1 0 0
range 5 -5
strength 1.3
velocity 80
env_obj_joint 3 1 3
pos 1 10.875 0.3125
axis -1 0 0
range 5 -5
strength 1.3
velocity 80
-Ok, we already know what the stuff on the same line as the env_obj_joint means, and what pos means, but other stuff is confusing:
Axis: Is the way the wheel will turn, I want it to go forward, so I have to change the X axis, and it goes towards the center of the toriworld, so I need to
Lower it towards zero, that's why it's -1. (If it was uke it would be positive 1)
Range: Is how much freedom the joint has to move, the numbers are a bit confusing to explain, but 5 -5 is no joint restriction 4 -4 is little joint restriction, etc. You can use decimals, and if you where to make a whip like object you would have something like 3 -3
Strength: This is hard to explain, but is very similar to velocity. Strength is like how fast it can reach it's maximum speed, 1.3 is rather low, so it will take a longer time to speed up, this prevents it from flipping.
Velocity: This is sort of like how fast the joint will rotate, Strength and velocity work together. I believe both strength and velocity work only when an object is turning 360. (correct me if I am wrong)
-Ok, and that is all, now the wheels should turn when I load the mod.
Basic Body Modding
-Alright, as I said earlier, in this mod uke doesn't stand a chance, I will show some basic body modding options to help him out
-What I will do is get some empty space below the env_obj_joints, then type player1 on a new line
-What this will do is start an "information box" for every word bellow it, untill another information box is formed, (like an object information box, or joint information box, etc.)
-player0 is tori, and player1 is uke, so I will mod player1
-Under player1 I will write out different body parts, this is another information box, but it is a sub-category of the player1 information box, so it is ok.
-I will make uke's ankles stronger so he can jump really high, and make his body lighter so he can get even higher
-So under player1 I will write this:
player 1
joint r_ankle
velocity 90
strength 2
joint l_ankle
velocity 90
strength 2
body head
density .05
body r_hand
density .05
body l_hand
density .05
body r_triceps
density .05
body l_triceps
density .05
body r_biceps
density .05
body l_biceps
density .05
-Ok, so if you want to edit a joint you say joint, then the joint name, in this case I edited the l and r_ankles
-The velocity and thrust have the same properties as the env_joint, but this time they can be used without having to have full range
-I set very high velocity, and lowish force, this will propel me into the air, but cause tons of stress on my ankles, so I have to raise dismember threshold
-Now, If I want to edit a body part I do the same as what I did to edit a joint, but with body instead of joint, body l_biceps, etc.
-Density is used as the weight for body parts, and mass is used for environment objects, so under the body parts I will write density .05 to make them lighter, you can go as light or as heavy as possible, 50 is like stuck to the ground, and .005 is very very fast, and has no force exerted to the rest of the body
-There are more body options, and I will get to those in a later tutorial, but now our uke upgrade is finished, he can now jump like this:

-If you want you can give uke a weapon from what we learned in lesson 3
Finishing
We are done, save the mod and drag it into the mods folder, close worlduilder and play around with it.
You can use what you have learned today to make other interesting mods, such as a ferris wheel, or a fan and much more!
-Here is my final product:

-And this is what It looks like in notepad
# MotoBike by culapou
######################################
gamerule
ed 2000
eh 40
dt 220
tf 10,10,10,200,100,50,40,30,50,100,100
mf 800
dq 1
env_obj 1
shape box
pos 1 9.9375 1.1875
color 0 0.5 1.1 1.1
rot 0 0 0
sides 0.125 1.625 1
material steel
mass .5
flag 0
friction 0
#END 1
env_obj 2
shape sphere
pos 1 9 0.3125
color 0 -0.1 -0.1 1.1
rot 0 0 0
sides 0.3125 1.5625 1
material steel
mass 0.1
flag 0
#END 2
env_obj 3
shape sphere
pos 1 10.875 0.3125
color 0 -0.1 -0.1 1.1
rot 0 0 0
sides 0.3125 1.5625 1
material steel
mass 0.1
flag 0
#END 3
env_obj 4
shape box
pos 1 9.0625 2.25
color 0 -0.1 -0.1 1.1
rot 0 0 0
sides 0.8125 0.0625 0.125
material steel
mass 0.4
flag 0
#END 4
env_obj 5
shape box
pos 1 -1.4375 0.1875
color 0 -0.1 -0.1 1.1
rot -78 0 0
sides 2.8125 0.0625 1.9375
material steel
mass 0.1
flag 8
#END 5
env_obj 6
shape box
pos 1 -3.125 0.8125
color 0 -0.1 -0.1 1.1
rot -62 0 0
sides 2.8125 0.0625 1.9375
material steel
mass 0.1
flag 8
#END 6
env_obj 7
shape box
pos -0.375 -4.0625 0.5625
color 0 -0.1 -0.1 1.1
rot 0 90 -6
sides 1.4375 0.0625 0.125
material steel
mass 0.1
flag 8
#END 7
env_obj 8
shape box
pos 2.375 -4.0625 0.5625
color 0 -0.1 -0.1 1.1
rot 0 90 -6
sides 1.4375 0.0625 0.125
material steel
mass 0.1
flag 8
#END 8
env_obj_joint 1 1 4
pos 1 9.125 2
visible 1
env_obj_joint 2 1 2
pos 1 9 0.3125
axis -1 0 0
range 5 -5
strength 1.3
velocity 80
env_obj_joint 3 1 3
pos 1 10.875 0.3125
axis -1 0 0
range 5 -5
strength 1.3
velocity 80
player 1
joint r_ankle
velocity 90
strength 2
joint l_ankle
velocity 90
strength 2
body head
density .05
body r_hand
density .05
body l_hand
density .05
body r_triceps
density .05
body l_triceps
density .05
body r_biceps
density .05
body l_biceps
density .05
Have fun,
post your mods, comments, and questions here please!
Next week: Week 5: Weapons special