Python MD3 FrameIndex Generator

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
KometFox
Posts: 61
Joined: Thu Nov 05, 2020 12:43 pm

Python MD3 FrameIndex Generator

Post by KometFox »

I've made a while a ago a Python program which generates the frameindex for use in MODELDEF data file. I've been using it primarily for MD3 model files no idea if it will also work for MD2 or DMD model format. It's quite primitive tool, but spares you the pain of having to input manually all the frame indexes per hand. There is one caveat though, you can use only the first 3 letters and numbers since the last 4th place is reserved for extending the frames.


Download Link

How to use: You need a tool like Geany or VSCode to execute Python 3.0 programs. Then open the file and look at the WriteFile() function, Bro is a dictionary variable so you just need to add a new line for example Bro[FIR] = 20 or whatever animation and frames you have and add as many as you like depending on your model animations. Then execute the script and it will generate a new text file on the same directory the file is placed in which is called. MODELFRAMES.txt from there on you should be able to copy everything from it here and paste in your MODELDEFS data file. Then if done correctly you should be able to use now all the frames in Decorate/ZScript as of what you have defined for it.
Post Reply

Return to “General”