Author Topic: DUCK'S GUIDE TO ARENA MODDING V1  (Read 10544 times)

Offline DuckRA2

  • *
  • Posts: 1006
  • Rep: 1
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« on: June 23, 2009, 12:20:06 AM »
ENJOY

https://gametechmods.com/uploads/files/tutorial.rar
:-D:-D:-D


Alert me of any mistakes/typos, I am pretty sure there are some, I'm too lazy and tired to check at the moment.


waiting to see what the first comment will be like...

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #1 on: June 23, 2009, 02:11:41 AM »
Thank you Duck, i'm going to try all of this (and farther ?) till the end of the week.

Offline Madiaba

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #2 on: June 23, 2009, 02:24:19 AM »
Thanks for the effort, Duck.
Glad you started one. I'll look through it and add stuff... if that's the idea.
.
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline JoeBlo

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #3 on: June 23, 2009, 03:20:44 AM »
thanks heaps for this Duck, I wanted to learn arena modding but had troubles starting off this should be a big help

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #4 on: June 23, 2009, 06:15:50 AM »
First and Good Point : I HAVE MY FIRST ARENA !! your tutos is good Duck, thank.

i followed what you said (except for the folder i put under arena/ and not in a new  folder) and it works !!! Nice.

1 comment : on step 12, as you advice us to rename the gmf, do not forget to change the .py too to notice the new gmf name

1 question : i try not to extend the spike_zone2 but to create a new zone :
   in the gmf :
   -  duplicate the GEOMOBJECT
   - increment the OBJECT_COUNT
   - rename the zone 'out_zone'
   - change the mesh as said in your doc
  in the py :
   -declare the zone 'self.RegisterZone("out_zone",4)'
   - handle the event  '   ...     elif id == 4 and  robot > 0 : plus.eliminatePlayer(robot - 1)  
and it did not worked :  no error, arena can be called in RA2, but the bot are never eliminated. It seems that the gmf file did not really defined the new GEOMOBJECT. was there anything more to change in the gmf ? Any Id ?

Resolved
i needed to do also that :
->  define my new zone in the "GMID_HAVOK_RIGIDBODY_LIST" section (and increment the obhect count)
-> define my zone in the GMID_HAVOK_DIS_COLLISION_PAIRS (with arena_collision pair)

I'm very happy to have a step in arena modding yet.
« Last Edit: June 23, 2009, 06:41:52 AM by philetbabe »

Offline Madiaba

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #5 on: June 23, 2009, 08:35:30 AM »
Phil: One should almost always add the GEOMOBJECT down in the GMID_HAVOK_RIGIDBODY_LIST, because of the many more cool options available there.
 
Duck: These could make up some sections in this Tutorial:
GMF/PY links- The 'links' between the gmf and py are very important. Perhaps you could have a section that explains the coding for:
1. SZs,
2. Hazard importing and utilization,
3. self.SetSubMaterialSound,
4. Inserting and removing gmf objects
5. Camera placement, aiming and movement.
etc...
 
 
There is a TON of this work already done in the Python Reference sheet that Trov and I have been assembling over the last couple years. I'll send it to you.
 
It's really nice to see interest in this. Phil, Joe, Red, others,... it's not that hard. And you can make some really cool stuff.:mrgreen:
 
.
« Last Edit: June 23, 2009, 02:19:38 PM by Madiaba »
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline DuckRA2

  • *
  • Posts: 1006
  • Rep: 1
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #6 on: June 23, 2009, 12:09:50 PM »
Quote from: philetbabe;46017
First and Good Point : I HAVE MY FIRST ARENA !! your tutos is good Duck, thank.

i followed what you said (except for the folder i put under arena/ and not in a new  folder) and it works !!! Nice.

1 comment : on step 12, as you advice us to rename the gmf, do not forget to change the .py too to notice the new gmf name

1 question : i try not to extend the spike_zone2 but to create a new zone :
   in the gmf :
   -  duplicate the GEOMOBJECT
   - increment the OBJECT_COUNT
   - rename the zone 'out_zone'
   - change the mesh as said in your doc
  in the py :
   -declare the zone 'self.RegisterZone("out_zone",4)'
   - handle the event  '   ...     elif id == 4 and  robot > 0 : plus.eliminatePlayer(robot - 1)  
and it did not worked :  no error, arena can be called in RA2, but the bot are never eliminated. It seems that the gmf file did not really defined the new GEOMOBJECT. was there anything more to change in the gmf ? Any Id ?

Resolved
i needed to do also that :
->  define my new zone in the "GMID_HAVOK_RIGIDBODY_LIST" section (and increment the obhect count)
-> define my zone in the GMID_HAVOK_DIS_COLLISION_PAIRS (with arena_collision pair)

I'm very happy to have a step in arena modding yet.


It's good you can figure stuff out on your own, I'm glad you understand how the GMF/Py works! :-D


Oh and under your comment, I think you are seeing that part a little different. You don't need to make a copy of the output file, it can stay the same the whole time, it's the decompiled ones that are needed. You could make a copy of the output, but it would un needed. You see, thats basically keeping two of the same file. Except for the fact that one is compiled and one is not. -does that make more sense? I can explain more if you'd like


Mad: I think that would be a great idea. I plan to make another version/improved tutorial, but at the moment I am pretty damn exhausted.

Offline JoeBlo

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #7 on: June 24, 2009, 07:05:42 AM »
I have ran into a problem my compiler wont recompile my arena gmf after I modified it, I get



from Dummys GMF compiler and



from FB's Compiler

Offline DuckRA2

  • *
  • Posts: 1006
  • Rep: 1
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #8 on: June 24, 2009, 07:07:31 AM »
do you think you could have made any small mistakes? As in spaces instead of tabs...?


Just to test it if the compiler works, compile it before you mod it. If it doesn't than something is wrong definitly

Offline JoeBlo

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #9 on: June 24, 2009, 07:16:35 AM »
not sure what the issue was but my nice little computer decided to kill the GMF file so I sort of did that part again and works now, so likely a typing mistake by me, thanks again for helping out with arena modding

Offline DuckRA2

  • *
  • Posts: 1006
  • Rep: 1
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #10 on: June 24, 2009, 07:17:37 AM »
no problem

BTW: Do you have any IM or something? I could show you more stuff if your interested.

Offline Madiaba

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #11 on: June 24, 2009, 08:56:49 AM »
Joe: if you get an error message, the you DID make a mistake. Seen it many times myself. Nice to see you jumping in...
Advice: When you make a tweak and it's works, then immediately make a back-up, lest you try the next tweak and lose the whole work.
.
« Last Edit: June 25, 2009, 01:56:21 AM by Madiaba »
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline GameKing3

  • Heavyweight
  • Posts: 488
  • Rep: 0
  • A guy playing a guy disguised as another guy...
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #12 on: June 24, 2009, 10:23:07 PM »
Just wanted to take the time to thank you for making this tutorial. I have found it very helpful and after getting an error message a couple of times i was able to get it to work. Thanks a bunch.

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #13 on: June 25, 2009, 07:32:56 AM »
exploring this new world of arena modding, i  try to figure how to set  the bot's starting zone
(...*GMID_ATTACHMENTPT   {   *NODE_NAME   Point0X ...USER DATA   Type = Startpoint id = 2} ...)

As a test, i try to mod the DSL practice arena to make it a fighting arena (adding 4 strating points).
There i found some trouble and i ask for help :
1/ i identify my arena ccordinates assuming they were those link to the cube called 'arena collision'.
With informaiton like this
Code: [Select]

 *MESH_VERTEX_LIST
{
*MESH_VERTEX 0 -13 -3 17
*MESH_VERTEX 1 13 -3 17
*MESH_VERTEX 2 -13 3 17
*MESH_VERTEX 3 13 3 17
*MESH_VERTEX 4 -13 -3 -16
*MESH_VERTEX 5 13 -3 -16
*MESH_VERTEX 6 -13 3 -16
*MESH_VERTEX 7 13 3 -16

 i have so a cube that extend from (-13,-16 )to (13,17) horizontaly and that goes from -3 to 3 verticaly

 in the py, i declare static cams inside this cube :
 
Code: [Select]

        self.AddStaticCamera("Static Cam 1", (10, 2, 10), (0.47, 1.33), math.pi/3)
        self.AddStaticCamera("Static Cam 2", (10, -2, 10), (0.47, 1.33), math.pi/3)
        self.AddStaticCamera("Static Cam 3", (10, -2, -10), (0.47, 1.33), math.pi/3)
        self.AddStaticCamera("Static Cam 4", (-10, -2, -10), (0.47, 1.33), math.pi/3)
        self.AddStaticCamera("Static Cam 5", (-10, -2, 10), (0.47, 1.33), math.pi/3)
        self.AddStaticCamera("Static Cam 9", (-10, 2, -10), (0.47, 1.33), math.pi/3)
 

even with those misty story of rotation and fov, i tought at least one of the camera will be ok  -> and not !
i can't see where does my bots start in the arena or even the arena (just chaotic mesh)
What's the trouble with my cameras ?

2/ does any of you had a 'gmf converter' to any other 3D format (obj, 3ds, etc) ? i don't mind modding with
notepade++ but if the gmf can be seen in a tool it is really more  easy to calculate any coordinates.

3/i can put 2 to 4 bots in my 'practice arena' once it has been mod as a fighting one. But, even if i can't see inside
the arena( see First problem), it seems that some of the bots have starting position 'outside' the arena, even if a declare
their coordinate inside the cube (for instance :
Code: [Select]

*GMID_ATTACHMENTPT
{
*NODE_NAME Point02
*NODE_TM
{
*NODE_NAME Point01
*TM_ROW0 1 1 -8
*TM_ROW1 -1 1 8
*TM_ROW2 8 -8 1
[color=red]*TM_ROW3 4 1 4[/color]
}


what should interest me is some answers to these questions or the DSL practice arena modified (4 start points + py with cams)
so i can learn by making diff between the 2 versions.

Offline Madiaba

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #14 on: June 25, 2009, 08:32:03 AM »
..Une minute, s'il vous plaît..
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #15 on: June 25, 2009, 08:38:41 AM »
Quote from: Madiaba;46404
..Une minute, s'il vous plaît..

:-)

Offline Madiaba

DUCK'S GUIDE TO ARENA MODDING V1
« Reply #16 on: June 25, 2009, 09:05:32 AM »
#1 Where is your box (and cameras) located? This is "TM_ROW3 X Y Z"(the 4th row).
Here:
The 3 verticalColumns are the Arena’s X,Y,Z coordinates:
X Y Z of Arena.
--------------------
*TM_ROW0 1 0 0
*TM_ROW1 0 1 0
*TM_ROW2 0 0 1
--------------------------
 
The first 3 (0-2) horizontal Rows are the Robot/Object’s X,Y,Z coordinates:
X Y Z of Arena.
Robot’s X
Direction:
Y
Z
*TM_ROW0 1 0 0
*TM_ROW1 0 1 0
*TM_ROW2 0 0 1
 
These3 rows determines the ‘direction’ of each of the bot’s 3 X,Y,Z axes,in reference to thearena’s 3 X,Y,Z coordinates. In other terms these determine the bot’s/object’sPitch, Yaw, and Roll,withinthe arena.It tells each axis where to point within the arena at the start of the game; like the cam angles in the bot pythons. (Notice that the 2nd row (the bots ‘Y’ or vertical axis) is usually left with no x or z bias/tilt, but only 1 in the Arena’s Y axis (180degrees- ‘upright’). These numbers have an effect on one another and are therefore ‘very picky’.
I’ve got some ‘templates’ for directing bots/objects in arenas (esp. starting points for bots), so that you can start them facing square with the arena with backs against walls), or face them with backs toward each corner (diagonally).
The 4th horizontal Row only determines the location’ of the bot within the Arena’s X,Y,Z.
X Y Z of Arena.
Robot’s X
Direction:
Y
Z
Location
*TM_ROW0 1 0 0
*TM_ROW1 0 1 0
*TM_ROW2 0 0 1
--------
*TM_ROW3 5 3 12

 
 
 
#2. Here's what I have of the latest from Serge's stuff (includes a 3D viewer:-D): GMF_Serge
 
 
#3. The Bot's heading and starting positions are dictated by 'startpoint', which complete section is below(example only: don't copy and use, formatting may not be in tact):
Code: [Select]
*GMID_ATTACHMENTPT
 {
  *NODE_NAME Point01
  *NODE_TM
  {
   *NODE_NAME Point01
  [COLOR=seagreen] *TM_ROW0 -0.707107 0.000000 -0.707107[/COLOR]
[COLOR=seagreen]    *TM_ROW1 0.000000 1.000000 0.000000[/COLOR]
[COLOR=seagreen]    *TM_ROW2 0.707107 0.000000 -0.707107[/COLOR]
   [COLOR=blue]*TM_ROW3 6 0.3 6[/COLOR]
  }
  USER DATA type = [B][COLOR=black]startpoint[/COLOR][/B]
id = 1
 
 }

Hope this helps, Phil. Gottta get back to work...
.
« Last Edit: June 25, 2009, 11:48:35 AM by Madiaba »
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #17 on: June 25, 2009, 12:29:35 PM »
Thank you mad,

i'm going to figure why everything goes crazy as soon as i add a new startpoint  (point03,  there have been 2 defined yet).
long debugging night ?

Offline DuckRA2

  • *
  • Posts: 1006
  • Rep: 1
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #18 on: June 25, 2009, 12:36:36 PM »
If you can't see the bots, why don't you switch views (f2) to see them, or are those cams the only ones you have?

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
DUCK'S GUIDE TO ARENA MODDING V1
« Reply #19 on: June 25, 2009, 01:41:34 PM »
I'm ok with the cams (i know how to create and direct them).
on the picture below : the first is without modding the gmf (just creating a xxx.py), the second picture is after adding a startpoint (the gmf already had 2 startpoints, one is not well firected but this is not the subject yet).