Lot's of questions for my first TC

Discuss all aspects related to modding Zandronum here.
Post Reply
vinvin
New User
Posts: 7
Joined: Fri Nov 18, 2016 9:34 pm

Lot's of questions for my first TC

#1

Post by vinvin » Fri Nov 18, 2016 9:49 pm

I've been part of the Quake mod scene for quite some time now. Recently, i've been replaying the Doom games and i decided to learn more about it's modding scene. My first attempt will be to migrate a TC i've made for Q1 to Zandronum. I'm curious about how to start and what's the best path to follow... after some research online there are many ways of doing things and i'm quite overwhelmed. In Quake you just have QuakeC for game code, C for client/server code and that's it. :P
  • Is there any tutorial or good place where i can find information on how to create new enemies and their AI?
  • Is there any in-depth information on how to create new weapons?
  • Where i can find more information on how to use 3D models in Zandronum? Which formats are supported? I'm planning to replace weapons and monsters.
  • Any documentation on how to create/replace the player model and it's animations?
  • Where i can find info about replacing stuff like the font, palette, menu screens, etc?

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

Re: Lot's of questions for my first TC

#2

Post by Catastrophe » Fri Nov 18, 2016 10:07 pm

Is there any tutorial or good place where i can find information on how to create new enemies and their AI?
https://zdoom.org/wiki/

Is there any in-depth information on how to create new weapons?
https://zdoom.org/wiki/
Where i can find more information on how to use 3D models in Zandronum? Which formats are supported? I'm planning to replace weapons and monsters.
Either check other mods or https://zdoom.org/wiki/
Any documentation on how to create/replace the player model and it's animations?
https://zdoom.org/wiki/
Where i can find info about replacing stuff like the font, palette, menu screens, etc?
Either check other mods or https://zdoom.org/wiki/

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

Re: Lot's of questions for my first TC

#3

Post by Konda » Fri Nov 18, 2016 11:07 pm

I'm curious about how to start and what's the best path to follow... after some research online there are many ways of doing things and i'm quite overwhelmed. In Quake you just have QuakeC for game code, C for client/server code and that's it. :P
Zandronum follows a source port called ZDoom and implements multiplayer for it, along with using the OpenGL renderer provided by GZDoom.
So, in ZDoom, and therefore also in Zandronum, there are 2 dominant languages where you define your game mechanics. The first one is Decorate, which is used for creating monsters, weapons, items, objects, etc. So it's pretty much a language for mobs. The other dominant language is ACS which is consisted of numbered scripts, and it's usually used for maps since the maps can call a speciffic script number. However, some ACS scripts can also be triggered by events like player death or when a player enters the game. It's a C-like language and is usually used either for map mechanics, or for advanced mob mechanics that can't be coded into Decorate.

The best reference for modding in ZDoom is the ZDoom wiki: https://zdoom.org/wiki/ . It contains everything relevant to ZDoom modding. That's why you will see a lot of people respond to threads beginners make by just posting a link of the ZDoom wiki main page without explaining anything.
Is there any tutorial or good place where i can find information on how to create new enemies and their AI?
Everything you need can be found on the ZDoom wiki but I will point you to speciffic pages that will help you with your speciffic questions.
So, for this question: https://zdoom.org/wiki/Creating_new_mon ... plex_items
Is there any in-depth information on how to create new weapons?
https://zdoom.org/wiki/Creating_new_weapons
Where i can find more information on how to use 3D models in Zandronum? Which formats are supported? I'm planning to replace weapons and monsters.
I am not quite sure about this question so you'll have to search on the ZDoom wiki by yourself.
Any documentation on how to create/replace the player model and it's animations?
https://zdoom.org/wiki/Creating_new_player_classes
It doesn't contain too much information, but luckily ZDoom wiki has code for all things that are in the game. So, here is the code for the default Doomplayer player class that is automatically used by every player (unless there's a custom mod that defines new player classes):
https://zdoom.org/wiki/Classes:DoomPlayer
Where i can find info about replacing stuff like the font, palette, menu screens, etc?
This is usually done by finding the speciffic lump name inside Doom2.wad that contains what you need (for example, the palette). Then you see the lump name, and in your mod you add your palette and make sure that the palette lump is named exactly the same as the one in Doom2.wad because that will replace the speciffic lump from Doom2.wad with the lump from your own wad when you load it. I haven't done much of this myself, and there may be ways to do this other than replacing lumps. You'll have to search the wiki by yourself for this one.

Here are some useful ZDoom wiki pages:
https://zdoom.org/wiki/DECORATE
https://zdoom.org/wiki/ACS
https://zdoom.org/wiki/Tutorials

I'd also advise you to check out some mods that are being played. If some mod you found does something you want to do, you can look inside the mod's content and find out how exactly it's done.

User avatar
Ru5tK1ng
Frequent Poster Miles card holder
Posts: 812
Joined: Fri Jun 01, 2012 9:04 pm

Re: Lot's of questions for my first TC

#4

Post by Ru5tK1ng » Sat Nov 19, 2016 12:10 am

You can also take a look at a lot of the special lumps for things like fonts and sounds: https://zdoom.org/wiki/Special_lumps

A+ on Konda for being very helpful. Just ignore bluewiz's post since it's just generic epic meme shitposting.

vinvin
New User
Posts: 7
Joined: Fri Nov 18, 2016 9:34 pm

Re: Lot's of questions for my first TC

#5

Post by vinvin » Sat Nov 19, 2016 12:16 am

Thanks for the info! You've mentioned ZDoom a lot... so, everything that applies to ZDoom applies to Zandronum?
Konda wrote: So, in ZDoom, and therefore also in Zandronum, there are 2 dominant languages where you define your game mechanics. The first one is Decorate, which is used for creating monsters, weapons, items, objects, etc. So it's pretty much a language for mobs. The other dominant language is ACS which is consisted of numbered scripts, and it's usually used for maps since the maps can call a speciffic script number. However, some ACS scripts can also be triggered by events like player death or when a player enters the game. It's a C-like language and is usually used either for map mechanics, or for advanced mob mechanics that can't be coded into Decorate.
Is it common to write mods with a mixture of ACS and Decorate scripts? Is ACS more targeted at automating levels, like scripting doors?
Konda wrote: This is usually done by finding the speciffic lump name inside Doom2.wad that contains what you need (for example, the palette). Then you see the lump name, and in your mod you add your palette and make sure that the palette lump is named exactly the same as the one in Doom2.wad because that will replace the speciffic lump from Doom2.wad with the lump from your own wad when you load it. I haven't done much of this myself, and there may be ways to do this other than replacing lumps. You'll have to search the wiki by yourself for this one.
Should i worry about filesizes when replacing the lumps?

vinvin
New User
Posts: 7
Joined: Fri Nov 18, 2016 9:34 pm

Re: Lot's of questions for my first TC

#6

Post by vinvin » Sat Nov 19, 2016 12:31 am

BTW, i just noticed the following state machine entry in the player class:

Code: Select all

Pain:
    PLAY G 4 
    PLAY G 4 A_Pain
    Goto Spawn
I'm assuming that PLAY commands animation G to play for 4 frames. Is that correct?

User avatar
Empyre
Zandrone
Posts: 1316
Joined: Sun Jul 08, 2012 6:41 am
Location: Garland, TX, USA

Re: Lot's of questions for my first TC

#7

Post by Empyre » Sat Nov 19, 2016 1:09 am

PLAY is the name of the sprite for the player, and G is a frame of that sprite's animation, which lasts for 4 tics twice (8 total) in this example (35 tics per second). The second line is calling a function named A_Pain.
I'll join the party and give another 2 wiki links:
http://zdoom.org/wiki/DECORATE
http://zdoom.org/wiki/ACS

The wiki and looking at other wads is how I learned (and am still learning), but there are people here to answer questions, or at least point you to the right wiki page.
"For the world is hollow, and I have touched the sky."

vinvin
New User
Posts: 7
Joined: Fri Nov 18, 2016 9:34 pm

Re: Lot's of questions for my first TC

#8

Post by vinvin » Sat Nov 19, 2016 1:17 am

Thanks a lot for the info, guys. :)

vinvin
New User
Posts: 7
Joined: Fri Nov 18, 2016 9:34 pm

Re: Lot's of questions for my first TC

#9

Post by vinvin » Sat Nov 19, 2016 1:27 am

As for replacing the player model with a 3D version, i was only able to find this:
https://zandronum.com/forum/viewtopic.p ... 546#p36546

But what's PLYC? How do i define which animations to play for what state?

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

Re: Lot's of questions for my first TC

#10

Post by Konda » Sat Nov 19, 2016 1:35 am

vinvin wrote:Thanks for the info! You've mentioned ZDoom a lot... so, everything that applies to ZDoom applies to Zandronum?
For the sake of the argument, yes. However, the technical answer would be "no" because ZDoom keeps constantly evolving and adding new stuff and it takes time for Zandronum to catch up. So you may find some functions or features on ZDoom wiki that are not available in Zandronum yet. Zandronum's mission is to be the multiplayer version of ZDoom. ZDoom, however, has recently added its own multiplayer but it's only good for LAN games.
vinvin wrote:Is it common to write mods with a mixture of ACS and Decorate scripts? Is ACS more targeted at automating levels, like scripting doors?
It is common nowadays for mods to have both Decorate and ACS. For example: You want to create an item which, when picked up, gives you ammo regeneration for 30 seconds. You can create the item as an object in Decorate (referred to as "Actor" in the language), but you won't be able to make the ammo regeneration work in Decorate unless you use a pre-defined powerup for ammo regeneration, which there is none. In that case, you can make an ACS script that would do the ammo regeneration (using a loop inside the script with some delay inside the loop; ACS is a C-like language), and make the item execute the script you wrote once the item is picked up.

It is possible to script doors in ACS, but you don't need to do that because ACS already has a few pre-defined functions for doors.
vinvin wrote:Should i worry about filesizes when replacing the lumps?
File sizes are not a limitation when adding or replacing lumps. The only concern people have about filesizes is related to the filesize of their entire mod. Mods usually get big when they add a lot of original graphics/sounds.
vinvin wrote:BTW, i just noticed the following state machine entry in the player class:

Code: Select all

Pain:
    PLAY G 4 
    PLAY G 4 A_Pain
    Goto Spawn
I'm assuming that PLAY commands animation G to play for 4 frames. Is that correct?
I see the reasoning, but that's not how those states work at all. "PLAY" are the first four letters of the name of a graphic(sprite) lump. "G" is the fifth letter of the sprite lump's name, called the frame letter, and 4 is the length of time during which that particular sprite is being shown on the object. The unit of time in Decorate and ACS is a tic and it's equal to a 35th of a second (1/35 s).

The actual sprite lump has 2-4 additional letters at the end of its name which define the sprite's rotation. The sprite with the same identification (first 4 letters) and frame letter (the fifth letter) will appear differently depending on from which angle you're looking at the actor that displays the sprite. The 2-4 letters at the end say that the current lump will be displayed only when the actor is being looked at from a certain angle. Essentially, the actor (object) is being rendered in 2D but you make several 2D images of the same object in different rotations and thus the illusion of 3D is created.
More info here: https://zdoom.org/wiki/Sprite and https://zdoom.org/wiki/Creating_new_sprite_graphics
Also worth checking out: https://zdoom.org/wiki/Actor_states

The general extension for doom mods is .wad. This extension is also used by Doom 2 (doom2.wad). There is a good editor of .wad files called Slade: http://slade.mancubus.net/
I encourage you to use Slade to open Doom2.wad and search for all sprites beginning with PLAY (there is a search feature in Slade somewhere at the bottom). Then you'll quickly understand what the letters in the sprites' names represent.

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

Re: Lot's of questions for my first TC

#11

Post by Catastrophe » Sat Nov 19, 2016 2:38 am

vinvin wrote: But what's PLYC?
Iirc, that's the default crouch sprite.

vinvin
New User
Posts: 7
Joined: Fri Nov 18, 2016 9:34 pm

Re: Lot's of questions for my first TC

#12

Post by vinvin » Sat Nov 19, 2016 1:47 pm

Again, thanks for the attention and the replies, guys. So, if i want to replace my skin with a 3D version, i just have to fool the engine into thinking that my MD3 frames are actually sprite frames? Is there any special rotation requirement, or can i just repeat the frame? For example: the sprite might have Walking Frame 1 for 3 rotations, while in MD3 i only have Walking Frame 1.

kodi
New User
Posts: 14
Joined: Wed Dec 30, 2015 2:57 pm

Re: Lot's of questions for my first TC

#13

Post by kodi » Sat Nov 19, 2016 2:13 pm

I suggest checking out a mod called "Hunter's moon" - it's the most heavily model-based mod in the community AFAIK, and the pk3 has a nice structure so it's easy to learn from.

Post Reply