I've got a md3 file - it has 99 total frame animations (it's a gun - with animation frames for reloading, etc). I'm trying to add it to a Gzdoom mod.
Trying to get it to work is driving me INSANE. I used to dabble in Edge modding with DDF...it was an absolute doddle. I find Gzdoom to be insanely difficult to figure out.
If I use a Frameindex series in MODELDEF of something like ABC1 A 0 (and continue that sequence) up to a max of 26 frames, everything seems to work OK - it seems very straightforward.
But....I need more frames - so I've continued to define them as ABC2 (frames A thru Z), ABC3 (A thru Z) and so on....in the MODELDEF.
Initially...it accepted the sequence of frames ABC1, ABC2 and ABC3 (and then I had to use TNT1 as the ID for the remaining frames...at it didn't like me using ABC4 for some reason and was generating errors).
So i'm lightly playing around with the zscript code for the gun itself to see if I can lightly animate the shooting sequence (I haven't touched the MODELDEF) - and now I'm getting this:
Script error, "gun.pk3:modeldef.txt" line 61:
Unknown sprite ABC3 in model definition for USP
WHY, WHY, WHY FOR THE LOVE OF SCIENCE IS IT DOING THIS??????????????????????
My code looks like this:
Model USP
{
Path "models/weapons"
Model 0 "usp.md3"
Skin 0 "usp.png"
Scale 1 1 1
Offset 9 0 0 // Adjust the model's position in the game world (x, y, z offsets)
FrameIndex ABC1 A 0 0 // Frame 0
FrameIndex ABC1 B 0 1 // Frame 1
FrameIndex ABC1 C 0 2 // Frame 2
FrameIndex ABC1 D 0 3 // Frame 3
FrameIndex ABC1 E 0 4 // Frame 4
FrameIndex ABC1 F 0 5 // Frame 5
FrameIndex ABC1 G 0 6 // Frame 6
FrameIndex ABC1 H 0 7 // Frame 7
FrameIndex ABC1 I 0 8 // Frame 8
FrameIndex ABC1 J 0 9 // Frame 9
FrameIndex ABC1 K 0 10 // Frame 10
FrameIndex ABC1 L 0 11 // Frame 11
FrameIndex ABC1 M 0 12 // Frame 12
FrameIndex ABC1 N 0 13 // Frame 13
FrameIndex ABC1 O 0 14 // Frame 14
FrameIndex ABC1 P 0 15 // Frame 15
FrameIndex ABC1 Q 0 16 // Frame 16
FrameIndex ABC1 R 0 17 // Frame 17
FrameIndex ABC1 S 0 18 // Frame 18
FrameIndex ABC1 T 0 19 // Frame 19
FrameIndex ABC1 U 0 20 // Frame 20
FrameIndex ABC1 V 0 21 // Frame 21
FrameIndex ABC1 W 0 22 // Frame 22
FrameIndex ABC1 X 0 23 // Frame 23
FrameIndex ABC1 Y 0 24 // Frame 24
FrameIndex ABC1 Z 0 25 // Frame 25
FrameIndex ABC2 A 0 26 // Frame 26
FrameIndex ABC2 B 0 27 // Frame 27
FrameIndex ABC2 C 0 28 // Frame 28
FrameIndex ABC2 D 0 29 // Frame 29
FrameIndex ABC2 E 0 30 // Frame 30
FrameIndex ABC2 F 0 31 // Frame 31
FrameIndex ABC2 G 0 32 // Frame 32
FrameIndex ABC2 H 0 33 // Frame 33
FrameIndex ABC2 I 0 34 // Frame 34
FrameIndex ABC2 J 0 35 // Frame 35 //end of shooting frames
FrameIndex ABC2 K 0 36 // Frame 36 //start reload frames
FrameIndex ABC2 L 0 37 // Frame 37
FrameIndex ABC2 M 0 38 // Frame 38
FrameIndex ABC2 N 0 39 // Frame 39
FrameIndex ABC2 O 0 40 // Frame 40
FrameIndex ABC2 P 0 41 // Frame 41
FrameIndex ABC2 Q 0 42 // Frame 42
FrameIndex ABC2 R 0 43 // Frame 43
FrameIndex ABC2 S 0 44 // Frame 44
FrameIndex ABC2 T 0 45 // Frame 45
FrameIndex ABC2 U 0 46 // Frame 46
FrameIndex ABC2 V 0 47 // Frame 47
FrameIndex ABC2 W 0 48 // Frame 48
FrameIndex ABC2 X 0 49 // Frame 49
FrameIndex ABC2 Y 0 50 // Frame 50
FrameIndex ABC2 Z 0 51 // Frame 51
FrameIndex ABC3 A 0 52 // Frame 52
FrameIndex ABC3 B 0 53 // Frame 53
FrameIndex ABC3 C 0 54 // Frame 54
FrameIndex ABC3 D 0 55 // Frame 55
FrameIndex ABC3 E 0 56 // Frame 56
FrameIndex ABC3 F 0 57 // Frame 57
FrameIndex ABC3 G 0 58 // Frame 58
FrameIndex ABC3 H 0 59 // Frame 59
FrameIndex ABC3 I 0 60 // Frame 60
FrameIndex ABC3 J 0 61 // Frame 61
FrameIndex ABC3 K 0 62 // Frame 62
FrameIndex ABC3 L 0 63 // Frame 63
FrameIndex ABC3 M 0 64 // Frame 64
FrameIndex ABC3 N 0 65 // Frame 65
FrameIndex ABC3 O 0 66 // Frame 66
FrameIndex ABC3 P 0 67 // Frame 67
FrameIndex ABC3 Q 0 68 // Frame 68
FrameIndex ABC3 R 0 69 // Frame 69
FrameIndex ABC3 S 0 70 // Frame 70
FrameIndex ABC3 T 0 71 // Frame 71
FrameIndex ABC3 U 0 72 // Frame 72
FrameIndex ABC3 V 0 73 // Frame 73
FrameIndex ABC3 W 0 74 // Frame 74
FrameIndex ABC3 X 0 75 // Frame 75
FrameIndex ABC3 Y 0 76 // Frame 76
FrameIndex ABC3 Z 0 77 // Frame 77
FrameIndex TNT1 A 0 78 // Frame 78
FrameIndex TNT1 B 0 79 // Frame 79
FrameIndex TNT1 C 0 80 // Frame 80
FrameIndex TNT1 D 0 81 // Frame 81
FrameIndex TNT1 E 0 82 // Frame 82
FrameIndex TNT1 F 0 83 // Frame 83
FrameIndex TNT1 G 0 84 // Frame 84
FrameIndex TNT1 H 0 85 // Frame 85
FrameIndex TNT1 I 0 86 // Frame 86
FrameIndex TNT1 J 0 87 // Frame 87
FrameIndex TNT1 K 0 88 // Frame 88
FrameIndex TNT1 L 0 89 // Frame 89
FrameIndex TNT1 M 0 90 // Frame 90
FrameIndex TNT1 N 0 91 // Frame 91
FrameIndex TNT1 O 0 92 // Frame 92
FrameIndex TNT1 P 0 93 // Frame 93
FrameIndex TNT1 Q 0 94 // Frame 94
FrameIndex TNT1 R 0 95 // Frame 95
FrameIndex TNT1 S 0 96 // Frame 96
FrameIndex TNT1 T 0 97 // Frame 97
FrameIndex TNT1 U 0 98 // Frame 98
FrameIndex TNT1 V 0 99 // Frame 99 //end reload
}
Adding a 3d model with 99 frames and GZDOOM TORTURES ME!
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
- Posts: 1
- Joined: Fri Jul 05, 2024 5:02 am
-
-
- Posts: 26877
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Adding a 3d model with 99 frames and GZDOOM TORTURES ME!
That implies to me that you are trying to allocate ABC3 to a model frame, but ABC3 hasn't been used in your DECORATE/ZScript for the weapon. Has it?
Or maybe there is no actual ABC3A0 sprite in your project?
There's also no reason why ABC4 shouldn't be acceptable, provided its set up properly.
Personally, if I want to make sure that the sprites I use have legitimate names and don't throw up problems like this, I define them in a textures lump. So, in a single text lump, I can define hundreds of sprites if needs be, but it only takes up the space of one compressed text lump without the need to include hundreds of dummy sprites. It is possible to not include sprites/sprite definitions in the right circumstances, but doing it this way means that you know it's been done.
Although, it the sprites are never going to be seen, there is no reason why you can't use any of the Doom sprites as in your DECORATE/ZScript, and then map them to your model in MODELDEF. Though, for big projects/models, I do prefer the "define loads of sprites in the textures lump" method.
Edit:
e.g. To expand on the TEXTURES lump thing, you could create a textures lump like this
By the time that you have filled in all the possibilities from MOD2, MOD3, MOD4 and then into the letters (MODA, MODB, MODC etc), you have several hundred unique and legitimate sprites at your disposal. Of course, if you don't need that many, you don't have to create that many entries.
(I only picked BAL2A0 as the placeholder because it's a nice simple 16x16 size, but anything would do really. In fact, I'm pretty sure it can be blank. It's just a list of names that you will be replacing with model frames in game.)
Or maybe there is no actual ABC3A0 sprite in your project?
There's also no reason why ABC4 shouldn't be acceptable, provided its set up properly.
Personally, if I want to make sure that the sprites I use have legitimate names and don't throw up problems like this, I define them in a textures lump. So, in a single text lump, I can define hundreds of sprites if needs be, but it only takes up the space of one compressed text lump without the need to include hundreds of dummy sprites. It is possible to not include sprites/sprite definitions in the right circumstances, but doing it this way means that you know it's been done.
Although, it the sprites are never going to be seen, there is no reason why you can't use any of the Doom sprites as in your DECORATE/ZScript, and then map them to your model in MODELDEF. Though, for big projects/models, I do prefer the "define loads of sprites in the textures lump" method.
Edit:
e.g. To expand on the TEXTURES lump thing, you could create a textures lump like this
Code: Select all
sprite MOD1A0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
sprite MOD1B0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
sprite MOD1C0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
sprite MOD1D0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
...
...
sprite MODZA0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
sprite MODZB0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
sprite MODZC0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
sprite MODZD0, 16, 16 { Offset 8, 16 patch BAL2A0, 0, 0 {} }
(I only picked BAL2A0 as the placeholder because it's a nice simple 16x16 size, but anything would do really. In fact, I'm pretty sure it can be blank. It's just a list of names that you will be replacing with model frames in game.)