gametechmods
Robot Arena => Tutorials and Tips => Other Tutorials => Topic started by: JoeBlo on November 02, 2009, 08:27:25 AM
-
This is a thread that I will place all my little arena tweaks, notes and hows to\'s as I discover/ Learn them, others can add other things they work out, learn, etc to help out along the way
Question: how to move the location where objects are placed in the practice arena, such as the creates, blocks, etc
Answer when you \'AddExtra gmf objects (not in the arena.py) their location is set in their own gmf, not in the arena.gmf, or the python, but that objects own gmf.
so find the section(s) like this
*NODE_NAME crate01
*TM_ROW0 1.000000 0.000000 0.000000
*TM_ROW1 0.000000 1.000000 0.000000
*TM_ROW2 0.000000 0.000000 1.000000
*TM_ROW3 0.572541 0.103332 7.858184
TM_ROW3 is the X Y & Z axis of the objects location, first column of numbers is the X, second the Y and last column the Z
change these vales for the object (in both the RIGIDBODY and GEOMOBJECT) recompile and you will find the objects have been moved :-D
-
Nice thread, Joe.
TM_ROW3 is the X Y & Z axis of the objects location, first column of numbers is the X, second the Y and last column the Z
change these vales for the object (in both the RIGIDBODY and GEOMOBJECT), recompile and you will find the objects have been moved :-D
If the GEOMOBJECT has also a RIGIDBODY section below, the RIGIDBODY x,y,z coordinates 'over-ride' the GEOMOBJECT x,y,z coordinates. So it doesn't really matter what they are, the RIGIDBODY section dictates the final say...
-
ah thanks Mad, I just worked down the GMF and changed it all for X,Y,Z for the that Node Name
-
Nice thread, Joe..
fully agree
-
Resizing the Combat Zone Arena - Part 1
Arena Collision
after you decompile box.gmf
ok once we are open you will find the to section is the skins and textures of the arena but we will come back to those later, there is quite a lot of it to pass by but find this part
*OBJECT_LIST
this is what you need to edit
*NODE_NAME arena_collision
is the first object... so no what to edit..
*MESH_VERTEX 0 -12.7 -2.264982 -12.39729
*MESH_VERTEX 1 12.7 -2.264982 -12.39729
*MESH_VERTEX 2 -12.7 -2.264982 13.0027
*MESH_VERTEX 3 12.7 -2.264982 13.0027
*MESH_VERTEX 4 -12.7 13.73502 -12.39729
*MESH_VERTEX 5 12.7 13.73502 -12.39729
*MESH_VERTEX 6 -12.7 13.73502 13.0027
*MESH_VERTEX 7 12.7 13.73502 13.0027
this part here... each vertex is a point and the 3 columns behind it are the coordinates (8 points makes a cube :-D)
the first column is the X axis
second column is the Y axis
third column is the Z axis
this object is only the collision for the arena so its up to youi what you pick for it but remember to keep the - signs if there is one
so if we make the arena half the floor size it would look something like this
*MESH_VERTEX 0 -6.45 -2.264982 -6.2
*MESH_VERTEX 1 6.45 -2.264982 -6.2
*MESH_VERTEX 2 -6.45 -2.264982 6.5
*MESH_VERTEX 3 6.45 -2.264982 6.5
*MESH_VERTEX 4 -6.45 13.73502 -6.2
*MESH_VERTEX 5 6.45 13.73502 -6.2
*MESH_VERTEX 6 -6.45 13.73502 6.5
*MESH_VERTEX 7 6.45 13.73502 6.5
notice the second column is untouched ? that is only the height of the arena if you want to change this to half the size also it isnt done the same
*MESH_VERTEX 0 -6.45 -2.264982 -6.2
*MESH_VERTEX 1 6.45 -2.264982 -6.2
*MESH_VERTEX 2 -6.45 -2.264982 6.5
*MESH_VERTEX 3 6.45 -2.264982 6.5
*MESH_VERTEX 4 -6.45 6.5 -6.2
*MESH_VERTEX 5 6.45 6.5 -6.2
*MESH_VERTEX 6 -6.45 6.5 6.5
*MESH_VERTEX 7 6.45 6.5 6.5
notice -2.264982 wasnt changed ? that is the floor so unless you intend changing the height of it dont touch the first 4 vertex's otherwise you will have robots driving above or inside the floor
-
^^ I will not read this... I must find by myself!
-
thanks for the.. err support Naryar
-
You're welcome XD
-
Good work on figuring that out, Joe. Knowing Mad, he'll put that to use somehow with one of his arena ideas.
-
How To Copy Arenas For multiple Skins
step 1, find the arena in the arenas folder you want to make a copy of
right click the folder and click copy and rename it something different for example "myarena" make a copy of the .py file also and rename it the same name as the folder
open the .py file in notepad (I would advise Python if your editing it but not necessary since were only changing names)
find a section like this
name = "Combat Arena"
preview = "box/box_preview.bmp"
game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
def __init__(self):
Arenas.SuperArena.__init__(self, "Arenas/box/boxarena.gmf")
ok the Combat Arena is the name that will appear in game, change this to what ever you want
the sections box is the name of the folder you just named, so put the same as what you previously named the other folder
using my previous example it should look like this
name = "My New Arena"
preview = "myarena/box_preview.bmp"
game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
def __init__(self):
Arenas.SuperArena.__init__(self, "Arenas/myarena/boxarena.gmf")
ok now go into that new copy of the arena and skin all your images how you want
next rename all the images something different, so say intead of "box_outerfloor" call it something like "theouterfloor"
once you have done that for ALL images grab a decompiler for the GMF
I strongly recommend Serges one for arenas, its easy to use just open up the decompiler and find the arenas GMF, its inside the new arena folder you made. then it will appear for you to save the decompiled file name it anything you want.
go through the top section of the GMF in notepad,
find sections such as this
*BITMAP oct_sawblade.bmp
change the name of it to what ever it is you renamed the file too, such as
*BITMAP new_saw.bmp
once you have done that for all of the file names, grab the re compiler and recompile the GMF to the original location of the arena GMF
*note make sure you add the extension .gmf when saving with the decompiler
Hope that helps :bigsmile:
-
Why is this not in the tutorials section?
EDIT: why do you not have a Photoshop How to, since you are so good at it??????
-
this is the in the tutorials section ?? It was Mads idea for me to make this topic (he even named it lol)
also I barely use photoshop lol I use Fireworks, Photoimpression, Paint (yes) in a 3 way mixture to make my splashes and such, usually just a bit of photoshop for backgrounds, you just get custom brushes for that ;)
-
Wow. Thank you. That first part on it's own helped. I was wondering how this worked since I'm now trying to use the Combat Zone as the practice arena.
-
try just replacing the practice arena gmf with the combat zone ? it will load the player 1 start point from the GMF for the robot
all objects can be moved about in the GMF (first post)
-
Yeah. I know. I'm just taking it small steps at a time.
The obstacle objects are up in the air, and your first post helped me try to figure out what I had to change to make the obstacles work.
-
ah very good ;)
-
I don't know where better to put this, how do I create low walls from an arena that is like the combat arena?
-
It's all in the gmf, GK. Just decompile it and edit the geomobject's xyz parameters.
Reposition them below in the Rigidbody section.
If you need help, just say so..
-
I don't know where better to put this, how do I create low walls from an arena that is like the combat arena?
first you have to change the collision easy enough, find the collision section
*MESH_VERTEX 0 -12.700000 -2.264982 -12.397295
*MESH_VERTEX 1 12.700000 -2.264982 -12.397295
*MESH_VERTEX 2 -12.700000 -2.264982 13.002705
*MESH_VERTEX 3 12.700000 -2.264982 13.002705
*MESH_VERTEX 4 -12.700000 13.735018 -12.397295
*MESH_VERTEX 5 12.700000 13.735018 -12.397295
*MESH_VERTEX 6 -12.700000 13.735018 13.002705
*MESH_VERTEX 7 12.700000 13.735018 13.002705
the middle column (Y Axis) is the one you want to look at, -2 is the floor top and 13 is the top of the walls so changing that to something like
*MESH_VERTEX 0 -12.700000 -2.264982 -12.397295
*MESH_VERTEX 1 12.700000 -2.264982 -12.397295
*MESH_VERTEX 2 -12.700000 -2.264982 13.002705
*MESH_VERTEX 3 12.700000 -2.264982 13.002705
*MESH_VERTEX 4 -12.700000 2 -12.397295
*MESH_VERTEX 5 12.700000 2 -12.397295
*MESH_VERTEX 6 -12.700000 2 13.002705
*MESH_VERTEX 7 12.700000 2 13.002705
at this stage im not sure with this arena whether the top collision will come into play ? but I dont think the arena has one? anyway find this..
*NODE_NAME glass walls
*NODE_PARENT arena_display
*NODE_SHADEVERTS 0
*NODE_TM
{
*NODE_NAME glass walls
*TM_ROW0 1.000000 0.000000 0.000000
*TM_ROW1 0.000000 1.000000 0.000000
*TM_ROW2 0.000000 0.000000 1.000000
*TM_ROW3 0.000000 -2.264983 0.302705
}
*MESH
{
*TIMEVALUE 0
*MESH_NUMVERTEX 8
*MESH_NUMFACES 8
*MESH_VERTEX_LIST
{
*MESH_VERTEX 0 -12.750000 -0.000001 -12.750000
*MESH_VERTEX 1 12.750000 -0.000001 -12.750000
*MESH_VERTEX 2 -12.750000 -0.000001 12.750000
*MESH_VERTEX 3 12.750000 -0.000001 12.750000
*MESH_VERTEX 4 -12.750000 11.999999 -12.750000
*MESH_VERTEX 5 12.750000 11.999999 -12.750000
*MESH_VERTEX 6 -12.750000 11.999999 12.750000
*MESH_VERTEX 7 12.750000 11.999999 12.750000
and change the 11.999999 to the same number as the collision
ounce your done I think you will need to add a zone to eliminate robots that fall out or (a much better way) add the python coding for it
-
Thanks.
I have noticed though that the combat arena has a ceiling. Is there any way to remove it?
-
the ceiling is in the collision ?
if so you would have to reconstruct the collision to not include it
-
De-compiling an Arena to workable ASCII
Grab yourself Serges Decompiler
run it and browse through to the GMF you wish to edit.
a second window will pop up to chose a save, I recommend saving in the same folder, for the sake of this tutorial, save it as newedit.gmf (important that you add .gmf yourself when typing in the name)
*decompiles*
open up the resulting file in note pad and make your changes...
-
Editing Start Points
similar deal with something I posted earlier with the test arena objects.. so I will quote some of it here...
find the first Startpoint object in your ASCII file, they make themselves quite obvious so you can use Ctrl + F and type start to find them.
*TM_ROW0 1.000000 0.000000 0.000000
*TM_ROW1 0.000000 1.000000 0.000000
*TM_ROW2 0.000000 0.000000 1.000000
*TM_ROW3 0.572541 0.103332 7.858184
you will find a part like this under the "node name" of the startpoint you just found
TM_ROW3 is where the action is at for the transitional changes
first column of numbers is the X, second the Y and last column the Z
X= Left/ Right
Y = Higher or Lower
Z= Up/ Down
*X and Z may appear to swap movements if you look at the arena from a different viewpoint.
increasing the number (just ignore the decimals) as a positive or a negative will effect the movement
X
- Left + Right
Y
- Lower + Higher
Z
- Down + Up
-
Somebody (no pun intended) better reads this and do what he must...
Edit: OWAIT. Aren't "lower and higher" and "down and up" synonyms ?
-
welcome to the confusing world of 3D :P
you must imagine you are looking straight down on the arena floor when dealing with X & Z
-
Perhaps North, South, East and West would make more sense.
-
I dont think so.. its easy enough to work it as is, Naryar is just being difficult :P
-
Naryar is just being difficult :P
Scientifically minded would be more precise.
Perhaps North, South, East and West would make more sense.
Eh. Yes, but I don't like the feeling of it.
Or we could use 0, math.pi, math.pi*0,5 and math.pi*1,5 ?
-
Or we could use 0, math.pi, math.pi*0,5 and math.pi*1,5 ?
no pretty sure your being difficult :P
it will do, people will understand it if they really want to know this stuff
-
:trollface OK,I will stop. I just did not liked your wording.
-
:D
Will try first thing when I get home. Just a mere 8 hours to go... :/
-
Good job so far Joe, will poke around and see if things work in regards to your coding, here and there.
-
How do I rotate the start points? I've moved the robots out of the corners in the RW arena, but they still start at an angle, and I want to fix that.
-
Serge made a topic for it somewhere about calculating the angles
*TM_ROW0 1.000000 0.000000 0.000000
*TM_ROW1 0.000000 1.000000 0.000000
*TM_ROW2 0.000000 0.000000 1.000000
I usually cheat and copy and paste TM_Row0 - TM_Row2 from another arena's start points to get the right angle.. the small arena's should match up
make sure you always trial with the same robot so wrong nose values arnt throwing you off..