Robot Arena > Tutorials and Tips

A simple tutorial on making parts for ra2

(1/1)

kix:
****s sake





Hey Vsauce! Michael here. I have a virus. Or do i?


Answer is yes i ****in do. And because funny croatian sick with virus, funny croatian make funny informative tutorial.



So i hear you want to make a part for RA2. If so, kys, but also read this tutorial becasue it will help you understand how to deal with this sh**.


Lets start


WHAT IS NECESSARY:
-Notepad++
-RA2 component compiler and decompiler (i use Serge's one, but you can use whatever you want, but if it doesnt work dont ask me "why this not do the thing" and "why my game no work anymore")
-Blender
-Any 3D modeling software, i use Sketchup
-OBJ2GMA
-GMI2OBJ
-Literally any pitcure editing software, ranging from Paint to Adobe Photoshop.

After you get what you need, lets go logang!


Part I: The design sh******ery


Lets make a model. Open up your modeling software and create your thing.

Ill be making a drum base so yeah

Here is the design i made

After you made the design, you need to make to make collision which need to be low poly. Basically, There are 2 meshes in ra2: The display mesh which shows the component ingame, and the Collision mesh which sets the collision. The more poly's collisions, the more chance that the part will not register collision:
Example of a Display/collision that will work well:



Export it in any format you can as long as Blender can import it.

Do the same for collision mesh

PART II: The Blender boogaloo and hostile component takeover

Open up Blender


Import your meshes (disp and colmesh)



Center it



Once you done that, what you want to do is to take a compenent that has the same purpose like the one youre making, and possibly the same design. In my case i will use the drum.gmf file.

After you find the gmf file make a backup of it and drag it to GMI2OBJ

After its done you will get 3 files. one is obj which is the geometry, one is mtl which is the uv mapping and one is gma, which is basically a decompiled copy of the gmf (yes you can rename the gma to gmf btw)


Import the obj of the newly decompiled file into blender

Scale the design how you imagined but to keep in scale to the decompiled file (you dont want to make the component too big or too small)



Now what i recommend is that you rotate/move the design to the decompiled component because then your primary attachment point will be the same. It should look something like this



Now here are some important steps to do. Ofc first, you need to uv unwrap the display mesh. Collision mesh doesnt need the uv unwrap as it wont be visible in ra2
To do so:
-Select the drum



-Set to edit mode



-And go to smart UV Unwrap and press enter if something pops up



Few more things you need to select too for both Collision and Display mesh otherwise, it wont work at all



PART II.V: ****in skinning kill me


Ah yes, this sh**.

After UV unwrapping select the Disp mesh (if you didnt have already)
Change the viewpoint to texture(This way you will see your skin once you make it)



Go to bottom right and select uv editor

Click New at the bottom, and hit ok. (2048x2048 and 4096x4096 resolutions work too but the image size will also be unnecessarily larger, unless youre making a big part with a lot of details)

After that go to UVs and Export uv Layout. Save it wherever you want and then use paint or something simmilar to make the skin. Just save it as bmp as RA2 loves 24-bit bmp images
So all you need to is to open the skin you made and boom, its done, you have a skin and a part. You just need to extract and 123354235 more stuff to do


Now before you extract. rename your meshes. Your display mesh should have _display on the end of the name and your collision should have _collision on the end of the name.
To rename the parts you need to do this:



And this is it. just export to obj and one part of hell is done.


PART III: Making the component work

There is one important thing you need to do, go to the obj file and change the o that starts before the parts names and change them to g. Otherwise you wont get a gma file at all from it

After you have done it all, just drag the obj file of the newly made component into OBJ2GMA. After its done you will get a gma file


When its done, open the gma file, open the decompiled gmf file youre gonna use for sacrifice of some sort, remove the ascii pony ofc, copy everything from it (which includes the display and the collision mesh) and just replace the old ones in the decompiled gmf. (This is like some sort of engine swapping on a car... and drivetrain, and suspension... basically you are just keeping the chassis)


Few things you need to watch:


OBJECT_COUNT. If you add or remove an object (like an attachment point, which is an object) you also need to change the object count accordingly. Otherwise ra2 will crash


Attachment points: this is still a gambling crapshoot to me and i do not feel ****ing suicidal enough to learn so im linking these threads, maybe you will understand:
https://gametechmods.com/forums/index.php?page=page755
https://gametechmods.com/forums/tutorials-and-tips/gmf-('how-to'-mods-and-notes)/



First and third NODE NAMES are display mesh names, name then as you named them in blender
second one is colision mesh name, name is as you named it in blender.


Weight of the component, its not a thing you should forget.

PART IV: Done, just testing if it works in ra2


Well, You just need to compile it with the compiler. One thing Compiler likes to do is to not add .gmf file when you are finished so you have to add it manually

If you havent made the txt file already, just use this thread to figure stuff out:
https://gametechmods.com/forums/index.php?page=page1752


And that is it, you have made a component.

I would like to show you the rest of the stuff, but my copy of obj2gma crapped out and i cant even get a working gma file so i had to do this out of my memory and knowledge.

Jaydee99:
Epic ty

president of ra2 cheating inc:
good job covid man. although you should probably let people know that the vertices for the col mesh need to be welded

kix:

--- Quote from: geese on March 21, 2020, 08:27:53 PM ---good job covid man. although you should probably let people know that the vertices for the col mesh need to be welded

--- End quote ---
I think blender might do it automatically. Lenme check

kix:

--- Quote from: kix on March 22, 2020, 03:51:30 AM ---
--- Quote from: geese on March 21, 2020, 08:27:53 PM ---good job covid man. although you should probably let people know that the vertices for the col mesh need to be welded

--- End quote ---
I think blender might do it automatically. Lenme check

--- End quote ---
Took me a minute, right? It does not do that automatically by default. You can set auto-merge on, but from what i see, once you make colmesh and dispmesh you can just hit ALT+M to merge/weld

But iirc i never needed to weld (maybe its needed for motors idk)

Navigation

[0] Message Index

Go to full version