How to make/replace models?

A place to discuss user-created Allegiance 3D models, textures, images, and other visual ingame content.
Zerg
Posts: 22
Joined: Sun Aug 17, 2008 2:11 am
Location: Thailand

Post by Zerg »

Hi,

For starters, I have no idea how to do any modding with Allegiance. Any help anyone could give would be nice.

I would like to make a mod that replaces the current Giga luxury fighter model+texture with the Patroller model+texture, simply because the Patroller is so much cooler :P
Is it possible/easy to simply switch models? Or is there other info that must be put in, i.e. hitbox size or gunmount position? I read somewhere that ASGS will not log in if you change the hitbox of a model, but can you replace the model itself?

Next, how would I go about doing this? I want to learn how this works, so I don't have to be in the position where I have to ask other people to do it for me. If anyone could show me where I could find out how to do this, that would be great since I can't seem to find anything on how to do any of this.

Thanks
For the Swarm!
Link to my prize winning RTS game!
Image
HSharp
Posts: 5192
Joined: Fri Aug 11, 2006 11:18 am
Location: Brum, UK

Post by HSharp »

textures you can change, models....maybe, hitboxes definatly not
Image
Image
Adaven
Posts: 1959
Joined: Sat Oct 25, 2003 7:00 am
Location: Greater Ozarks

Post by Adaven »

To further clarify:

Yes, you can edit the textures and models for any of the ships in game. There are 3 files associated with an allegiance model: the *bmp.mdl texture, the *.mdl model geometry, and the *.cvh hit box data.

If you just want to change textures, you have to create a new bmp.mdl. You cannot simply copy & rename the patty texture to the lxy fig filename because the names are referenced in the file itself. You can make a new bmp.mdl using MDLThing or MDLC. MDLC is older (not sure you can find a link for it anymore) but easier to use in my option. MDLThing is good as it lets you use a wide variety of input image formats and just creates a little text file that "directs" the Alleg client to the correct image file when called for (so your actual picture will stay a .bmp or .png etc), but you have to muck around with specifying the file's location relative to the text .mdl. It's not too hard, just something I always forget and have to fiddle with to figure out again everytime I do this sort of stuff.

If you want to change the model, you can also assign whatever texture you want and not really have to worry about the above part. The hard part is reading Alleg models and/or converting other models into alleg format. To do that you have two options: 1) Download Milkshape 3D from chumbalumsoft(spelling?) and snag the Alleg MDL plugin from the downloads page here. Unfortunately there is only a 30 day trial and the program costs ~$25. 2) You can use the orginal developer's tools from the source to convert your model from .X format to the .mdl format Alleg recognizes. Actually I have no idea how to do that myself, your best bet would be sending a pm to Madpeople or Compellor, I know they have both messed around with the dev tools. Just be careful with either method that you don't generate a new .cvh file (see below).

The .cvh you cannot change. It is protected by ASGS to stop people from cheating and making their ships invulnerable by reducing the hit box to microscopic size. So even if you do change the model you see in game, the hitbox for that ship won't match what you see. If you can live with that, cool, but don't be surprised if you are trying to shoot a lxy fig and some of the shots you see "hitting" the pattie model but not do any damage.
Last edited by Adaven on Thu Jan 29, 2009 4:39 pm, edited 1 time in total.
Zerg
Posts: 22
Joined: Sun Aug 17, 2008 2:11 am
Location: Thailand

Post by Zerg »

So in summary:
If I want to change the texture, I have to create a new .mdl file for it/create a text .mdl file that references a bmp or png image.
If I want to change the model, I need to use Milkshape 3D and export the file.
If I want to change the hitbox, too bad for me :)

Does that mean that simply renaming the model file will swap out the model? And if I do that, does the texture remain the one that the lxy fig uses?

Also, for 3D modeling, I generally use Blender. Is there an export script for Blender to .mdl? Are the gunmounts coded in by the modeling stage, or are they part of the .cvh file?

Thanks for giving me some links to files I can use. I'll play around with them later today and see if I have any other questions.
For the Swarm!
Link to my prize winning RTS game!
Image
Compellor
Posts: 994
Joined: Fri Jul 06, 2007 12:56 am
Location: Columbus, OH

Post by Compellor »

Zerg wrote:QUOTE (Zerg @ Jan 29 2009, 07:26 PM) Does that mean that simply renaming the model file will swap out the model? And if I do that, does the texture remain the one that the lxy fig uses?
Sortof and no, respectively. You can't just copy fig12.mdl and rename the duplicate dn_fagishfigx.mdl. You'd have to take fig12.x and fig12bmp.mdl and turn those into a file named dn_fagishfigx.mdl. The process may also generate a .cvh, you can discard that. I'd backup the original first, of course, but if you do that I think you'll get a pattie with pattie textures, lxy fig collision detection, and lxy fig gunmounts, thruster locations, etc. I don't think it would look right.

QUOTE Is there an export script for Blender to .mdl?[/quote]
No. Blender can export to .x, which can be imported by the original dev tools, but we don't fully understand how those work still. I can create files that sort of work...
Blender could probably export to something that Milkshape can import, I haven't tried.

QUOTE Are the gunmounts coded in by the modeling stage, or are they part of the .cvh file?[/quote]
Gunmounts are part of the .cvh, but they can be created during the modeling stage.
Any job worth doing with a laser is worth doing with many, many lasers. -Khrima
Beyond a shadow of a doubt if you don't watch them like a hawk they will stack their collective balls off - MrChaos on Alleg players
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

You might be able to create a text.mdl file to 'redirect' the model reference to a different model, but I'm not sure exactly if that would work or not
Image
ImageImage
madpeople
Posts: 4787
Joined: Tue Dec 16, 2003 8:00 am
Location: England

Post by madpeople »

Compellor wrote:QUOTE (Compellor @ Jan 30 2009, 01:02 AM) Gunmounts are part of the .cvh, but they can be created during the modeling stage.
Actualy, cvh only does hit box, lights, guns missile launch points, smoke, everything else is in the .mdl I believe.
Compellor
Posts: 994
Joined: Fri Jul 06, 2007 12:56 am
Location: Columbus, OH

Post by Compellor »

Yeah, I wasn't thinking. Judging by the cvh I just opened, it does gunmount, missile mount, cockpit, hit box, and I don't think anything else. Lights I know are in the mdl.
Any job worth doing with a laser is worth doing with many, many lasers. -Khrima
Beyond a shadow of a doubt if you don't watch them like a hawk they will stack their collective balls off - MrChaos on Alleg players
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

Lights can be in either.
Thrusters and boost points are mdl, IIRC
Image
ImageImage
Zerg
Posts: 22
Joined: Sun Aug 17, 2008 2:11 am
Location: Thailand

Post by Zerg »

OK, I finally got around to downloading some of the tools, but I think I am missing some :(. I have the ones you mentioned, but I think I need some other ones. You said something about combining a .x file with a _bmp.mdl file to get a resultant .mdl file, but I don't think I have the right program to do that. Could you save me the trouble of digging around for it, and let me know where to find it? Thanks in advance!
For the Swarm!
Link to my prize winning RTS game!
Image
Post Reply