Wc3C.net (http://www.wc3c.net/forums.php)
-   Model & .Mdl Editing Corner (http://www.wc3c.net/forumdisplay.php?f=447)
-   -   Essentials: Things In Models That Make the Game Crash (http://www.wc3c.net/showthread.php?t=102626)

Rao Dao Zao 09-18-2008 06:18 PM

Essentials: Things In Models That Make the Game Crash
1. GeosetAnims With No Geoset
This problem most commonly occurs when you're removing geosets from an existing model using Magos' Model Editor. Upon deleting a geoset, the program will automatically null values in other model objects relating to the deleted object -- it removes any reference to the dead object. While we frequently love this behaviour, in the case of a GeosetAnim it can be fatal.

GeosetAnims that refer to non-existant Geosets (eg GeosetId 5 when you have only 3 Geosets) should also be avoided.

The MDL code of a "broken" geoset looks something like this:

GeosetAnim {
        Alpha 8 {
                25000: 1,
                85000: 0,
                159967: 0,

Note the lack of a "GeosetId X," line -- without this, the model will cause a crash. The solution is to delete the GeosetAnim entirely or re-assign it to an existing geoset.

In Magos', a dodgy GeosetAnim's "Geoset" drop-down will be marked "None".

2. RibbonEmitters With No Material
A problem similar to the above, this is rather more likely to go unawares and ruin everything because nobody pays much attention to ribbon emitters. It's going to occur again when you delete "unnecessary" objects; removing the material that a ribbon refers to will see the value held in the Ribbon Emitter nulled.

RibbonEmitters that refer to materials that don't exist (eg MaterialId 6 when you have only 2 Materials) should also be avoided.

A broken RibbonEmitter will look like any other, except that it will be missing a "MaterialId X," line. The solution is to delete the RibbonEmitter or assign it to a new material.

In Magos', a broken RibbonEmitter's "Material" drop-down will be marked "None".

3. Negative Maxes and Positive Mins
This is a more ephemeral issue that doesn't always occur; it happened to me when working with the Marine and the Tauren Chieftain.

The problem here is with the "Extents" sections that appear throughout any model -- in the Model section, in every Sequence, and in Geosets. These extent values allow the game to work out when the model is off screen, and can be safely "culled". You might have noticed that when you over-scale some units they disappear before they are completely off the edge of the screen -- this is them being culled.


        Anim "Birth" {
                Interval { 41, 833 },
                MinimumExtent { -24.5901, -40.2246, 34.4112 },
                MaximumExtent { 30.8934, -47.7023, 167.684 },
                BoundsRadius 98.65,

The problem above lies in the fact that there is a positive "min" value and a negative "max" value. The simple solution is just to swap the signs as necessary, though you can also use the "Recalculate Extents" option in Magos' Model Editor.

4. Team-Coloured Particle Emitters
By "team-coloured particles", I mean particles that use ReplaceableId 2 (team-colour glow texture) instead of a specific texture.

This is another ephemeral one, and I've never done any extensive testing in order to narrow down the problem -- so any information you might have on the subject would be appreciated. The problem with team-coloured particles is that in some cases they do work perfectly well -- for example, the Priestess of the Moon's Owl Scout has team-coloured particles on its wings.

5. Extreme Polycount
This isn't necessarily a model editing issue, but it's worth noting that a single model with a number of triangles in excess of several hundred thousand will cause the game to crash.

6. Billboards and No Sequences
This is an odd one. I've long held that having no sequences section (at all, not just one stand sequence like all doodads) was a bit iffy, and some recent testing proves it is squiffy... in some circumstances. If you want to have a bone Billboarded, the model requires at least one sequence or it will crash the game!

7. Anything Else?
Have you discovered anything else that might cause a model to make the game crash? Let us know!

Callahan 09-22-2008 09:08 PM

When a material use a textures animation that doesn't exist or has been deleted.
You must fix the material.

Kyrbi0 09-22-2008 09:22 PM

Very helpful; especially the part about empty geosetanims (gosh that's happened too many times for me...) +Rep (Ok, never mind, it won't let me)...

If you support Magos help, could you describe what some of the more common errors are (and how to fix them, if possible)? Like ~Unknown tag "KRAL" in RibbonEmitter~.

Rao Dao Zao 09-22-2008 10:23 PM

It's not really my place to support Magos' Model Editor; if you have a problem like that which is an actual bug in his program (either it's a tag the editor can't support, or it's an incorrect tag it's incorrectly producing), you'll have to take it up with him. The errors I describe above are the results of the operator not paying attention, not from any actual issues in his program.

Kyrbi0 09-23-2008 03:55 AM

Alright, kewl.

Callahan 10-05-2008 12:07 AM

I found another thing.
It may not cause the game or WE crash but an Eventobject with no event track will cause your model to not be shown in game/WE.

All times are GMT. The time now is 04:46 AM.

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services