Changing the default cycle by editing the .mod files.

Got something that makes Armagetron look shiny? Post it here.
Post Reply
User avatar
edd
Core Dumper
Posts: 135
Joined: Sun Jan 30, 2005 8:02 pm
Location: UK
Contact:

Changing the default cycle by editing the .mod files.

Post by edd »

I thought about doing this several years ago and now I wish I had. I've been looking at the three .mod files of the default cycle. I never liked the original, no offence to the master but it looks a bit like a dragster. However I now understand how to edit the file to change the shape of the cycle. I will post instruction when I've finalised this model. I've modified it to look like the Tron lightcycle (no surprise) and changed the two wheel .mod files, the rear wheel is now thin like the lightcycle and the front wheel is fat and the same diameter as the rear. My problem here is that I can't change the location of the wheels so the front one rotates on an axis specified in the program code (I'm assuming?) and the same goes for the relative locations for the rear wheel and body files. If one of the programmers could set the rotation point to the same height as the rear wheel and move the rear wheel back a tad then it would be possible to make a whole slew of bikes with rotating wheels that are the same polygon size as the original giving better performance than the .ase files. I've also modified the texture file to look like the lightcycle.

So is it possible to get this bit of code modified?? If so I'll write a how to modify the .mod files so anyone who wants to can change the look of the bike.

edd
Attachments
sample image
sample image
Archive.zip
modified bike and texture
(72.02 KiB) Downloaded 190 times
User avatar
Z-Man
God & Project Admin
Posts: 11710
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Changing the default cycle by editing the .mod files.

Post by Z-Man »

Yeah, the wheel positions are hardcoded. It's possible to change them in gCycle.cpp, but I'd rather not turn them into settings or somesuch, as it's all dead end code.
User avatar
edd
Core Dumper
Posts: 135
Joined: Sun Jan 30, 2005 8:02 pm
Location: UK
Contact:

Re: Changing the default cycle by editing the .mod files.

Post by edd »

OK, but how about just setting the front wheel to the same rotation height as the rear wheel? I can shorten the body of the cycle to fit with the rear wheel in it's current position. I think this would be a good addition as bikes with the same size wheels just look better.


Edd
User avatar
Z-Man
God & Project Admin
Posts: 11710
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Changing the default cycle by editing the .mod files.

Post by Z-Man »

It's still a code change, and people will not be able to select between the two cycle models. And there's no version planned where we could replace the old model with your changed one.
The relevant bits of code are those in gCycle.cpp:

Code: Select all

glTranslatef(0,0,.73);
glTranslatef(1.84,0,.43);
And, ugh, those:

Code: Select all

rotate(rotationFrontWheel,2*verletSpeed_*animts/.43);
rotate(rotationRearWheel,2*verletSpeed_*animts/.73);
.73 would be the radius of the rear wheel, .43 that of the front wheel, and 1.84 the position of the front wheel.
Word
Reverse Adjust Outside Corner Grinder
Posts: 4310
Joined: Wed Jan 07, 2009 6:13 pm

Re: Changing the default cycle by editing the .mod files.

Post by Word »

there was a converter for it somewhere on the forum...
here:
http://forums3.armagetronad.net/viewtop ... 79&p=35950

and another one for blender:
http://forums3.armagetronad.net/viewtopic.php?t=14911
User avatar
pike
Round Winner
Posts: 397
Joined: Thu Feb 28, 2008 6:53 pm
Location: where polar bears walk the streets

Re: Changing the default cycle by editing the .mod files.

Post by pike »

I wonder if it wouldn't be better to make .ase models in moviepacks "move" (I think it's possible in games like Unreal Tourn.)? .mod models are pretty easy to make (it's all about making points and connecting them into triangles), but texturing is limited.

Also making more detailed models takes much more time than making model in 3D modelling app, I still can't make my donut more round :P (http://forums3.armagetronad.net/viewtop ... 64#p208364) I just get lost in all these triangles and the shadows on the model act strange.


Hm, I didn't know there are converters for .mods. So basically you replace cycle_body with your model and erase cycle_front and cycle_rear? I think adding moving parts is not possible in this case.
User avatar
edd
Core Dumper
Posts: 135
Joined: Sun Jan 30, 2005 8:02 pm
Location: UK
Contact:

Re: Changing the default cycle by editing the .mod files.

Post by edd »

OK then it looks like I've waisted my time but I enjoyed figuring out the .mod files and it's nice to have rotating wheels and a very small file size even though the model and textures are limited...... back to .ase files then!

edd
User avatar
Misery
Round Winner
Posts: 285
Joined: Thu Dec 30, 2004 12:37 pm

Re: Changing the default cycle by editing the .mod files.

Post by Misery »

pike wrote:I wonder if it wouldn't be better to make .ase models in moviepacks "move"
From what I've gathered (And I COULD be wrong. Someone correct me if I am.) .ase models are static.
"Music can name the unnameable and communicate the unknowable."
~Leonard Bernstein
Word
Reverse Adjust Outside Corner Grinder
Posts: 4310
Joined: Wed Jan 07, 2009 6:13 pm

Re: Changing the default cycle by editing the .mod files.

Post by Word »

you're not wrong...maybe it would be possible to make a bike model and two models for the wheels - then you'd just need some empty object in the ase model which tells arma where to put the wheels (that's how most racing games do it)
Post Reply