One Of The Biggest Headscratchers For GZDoom Modders And Causes Huge Divides In The GZDOOM Community Is The Creation Of 3D Models. A Lot Of Us Have Seen The Incredible Projects Made With 3D Models, But Don't Know Where To Start. This Tutorial Aims To Rectify This Dilemma.

Post tutorial Report RSS Implementing 3D Weapons For GZDoom: A Tutorial

Hello There, I Noticed That Nobody Made A Tutorial For 3D Weapons In GZDoom. So I Made A Tutorial For All Of You GZDoomers. Cheers!

Posted by on - Intermediate Weapons Modelling

GZDOOM 3D WEAPON MODEL TUTORIAL

Note: The README File Contains Same Steps Outlined.

Link To Files: Moddb.com

Steps:

1. Installation

Introduction: One Of The Biggest Headscratchers For GZDoom Modders And Causes Huge Divides In The GZDOOM Community Is The Creation Of 3D Models. A Lot Of Us Have Seen The Incredible Projects Made With 3D Models, But Don't Know Where To Start. This Tutorial Aims To Rectify This Dilemma.

Requirements: Doom 2 IWAD Windows 10/11 GZDoom 4.10.0 or Higher 65 MB Minimum Hard Drive Space 3D Acceleration Card With OpenGL Support OpenGL 4.0 or Higher Slade 3 And Blender 4.0 (Blender 4.1 Untested) Noesis Highly Recommended Full Screen Mode Highly Recommended

Begin The Tutorial: To Begin, Download And Extract The Contents Of The GZDoom 3D Weapon Model Tutorial Archive. Verify That Each Component Listed Above Meets The Requirements Before Continuing, Then Open The Tutorial Files Folder.

2. Setup Blender

a. You Will Need To Setup Blender Before Getting To The Juicy Parts Of This Tutorial. Copy The io_export_gzdoom_md3.py File Into The Addons Folder Then Open The Blender File Provided.

b. Select Edit -> Preferences Then Click On The Addons Tab. Scroll Down To Find Import-Export: GZDoom .MD3 Then Click On The Checkbox On The Left.

3. Export Blender Model As A .MD3 File

a. After Opening The Model In Blender, You Will Want To Export It As A .MD3 Model. Watch The Animation, Then Export The Model By Selecting File -> Export -> ID3 MD3 (.md3).

b. Select The Location You Want To Save The Model At, Then Type 0 In The Start Frame Box And 205 In The End Frame Box.

c. Name It pistol.md3 And Click On The Blue Export Box On The Bottom Right To Start Exporting.

4. Setup .pk3 In Slade 3

a. You Have Now Exported The Model, Congratulations! You Will Now Need To Setup Your .pk3 In Slade3. Open Slade 3 And Click On The Page Icon On The Top To Create A New Archive.

b. Select Zip Archive In The Type Box And Click Create.

5. Create .pk3 Folder Hierarchy

In Our Newly Created Zip Archive, We Will Need To Create A Hierarchy Of Folders And Subfolders For Our Files

Create The Following Hierarchy Structure In Your Zip Archive (Click On The Folder + Icon To Create A New Folder) Then
Import The Specified Files:


6. Define The MODELDEF File

a. We Will Need A MODELDEF File To Define Our Model And It's Animations. Create A New Text File (Click On The Page Icon And Select Text In The Type Box) Then Select GZDoom ModelDef In The Text Language Box. b. Type The Following In The MODELDEF File:







7. Define The DECORATE Files

a. For This Tutorial, We Will Use DECORATE For Our Simplified Weapon Scripts. Create The DECORATE Text File Outside The Decorate Folder As Well As The M1911.txt And Player.txt Text Files Inside The Decorate Folder. Select The Text Language As ZDoom Decorate.

b. Type The Following In The DECORATE File:

#include "decorate/M1911.txt"

#include "decorate/PLAYER.txt"

c. Now Type The Following In The M1911.txt File:




d. Now Type The Following In The Player.txt File:

ACTOR PlayerCharacter: DoomPlayer

{

Player.Displayname Player_Character

Player.StartItem "M1911" Player.StartItem

"PistolAmmo", 15

Player.StartItem "FIST"

}

//Note: Some Mods Are Incompatible With This Setup (such as MyHouse.pk3)

8. Define Miscellaneous Files

a. These Other Files Are Crucial For This Project To Compile And Run Correctly. First Create A SNDINFO Text File (Text Language Is ZDoom SndInfo) And Type The Following:

weapons/pistoldeploy DEPLOY

weapons/pistolshoot FIRE

weapons/pistolout OUT

weapons/pistolin IN

weapons/pistollock LOCKED

weapons/pistolslide SLIDE

b. Next, Create A KEYCONF Text File (Text Language Is ZDoom KeyConf) And Type The Following:

clearplayerclasses

addplayerclass PlayerCharacter

c. Finally, Create A TEXTURES Text File (Text Language Is ZDoom Textures) And Type The Following:

// Texture definitions generated by SLADE3// on Thu Jun 6 21:01:34 2024

Sprite "191IA0", 1, 1

{

Patch "TNT1A0", 0, 0

}

// End of texture definitions

9. Final Project Results

Click On The Floppy Disk Icon To Save Your Project As A .pk3 File And Name It Something Cool.

10. Test And Refine

a. Test Your Project And Verify That It Is Working As It Should. Refer To The Example File For Tips And How To Create A 3D Weapon Worldmodel For Your Project.

b. Leave Any Comments If You Have Any Questions.

A1. Credits

All Scripts Created By ISIGHTGAMESDEV (AKA IVEGOTSOMEWATER)

Weapon Model And Sounds Taken From Left 4 Dead (With Custom Hand Models Created By ISIGHTGAMESDEV)

© 2008 Valve Corporation

Blender MD3 Export Plugin By Nash

Forum.zdoom.org

A2. License Notice

The Example.pk3 file runs on the GZDOOM Engine. Do not copy the application or code for GZDOOM or the Example.pk3 file.

If you are going to use the weapons scripts in the Example.pk3 file, please credit me for the use of these scripts.

Example:
-ISIGHTGAMESDEV, GZDoom 3D Weapon Model Scripts

Thanks For Reading!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: