how to add custom classes and sprites

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom 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.

how to add custom classes and sprites

Postby Ciabata » Wed Nov 25, 2020 10:59 am

Hi.
I have problem with custom classes and sprites.
I've been trying to make them for several days, but they don't work.
I have read many guides and tutorials, I decided to ask for help here.
Can someone explain to me step by step how to do it?
example:
1.Create file "name"
2.Write that text there:"..."
3. ...
Something like that.
I want custom class to have custom skin
I would be very grateful.
Ciabata
 
Joined: 25 Nov 2020
Location: Poland
Operating System: Windows 10/8.1/8/201x 64-bit

Re: how to add custom classes and sprites

Postby Logan MTM » Wed Nov 25, 2020 4:56 pm

Just calm down, download some good wads and practice the debug art. Honestly, this is your best teacher.
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: how to add custom classes and sprites

Postby Lagi » Wed Nov 25, 2020 5:49 pm

1 you want to create custom monster and give him own graphic?
2 monster need to be placed on some map, i presume you dont want to make NEW map with your monster.
3 you need to replace existing monster. Which monster would you like to replace in which game? (doom, doom2, heretic, hexen, strife)
4 unfortunately i only play heretic, fortunately it doesnt matter its all the same.
let say you want to recolor gargoyle (this red flying imp) in first level.

5 download slade
https://slade.mancubus.net/index.php?page=downloads

6. check out this zdoom wiki. Here is decorate code for Himp -
https://zdoom.org/wiki/Classes:HereticImp

check "See:" this is part of monster behavior when he is chasing player.
IMPX - is sprites name
ABCB - is seqence of spirtes
10 - is the duration (time of display on screen) of every sprite
Code: Select allExpand view
States
  {
  Spawn:
    IMPX ABCB 10 A_Look
    Loop
  See:
    IMPX AABBCCBB 3 A_Chase
    Loop
  Melee:
    IMPX DE 6 A_FaceTarget
    IMPX F 6 A_CustomMeleeAttack(random[ImpMeAttack](5,12), "himp/attack", "himp/attack")
    Goto See


7. open slade. open Heretic.WAD.


8. bottom left => Filter => type
impx*1


9. then type:
impx*2

10.
sprite name is like that f.ex
IMPXA2

IMPX - its the identification of the frame, like name John, Henry...
A - its the next frame. Usually you have A>B>C>D and this create animation.
2 - is direction of monster facing.

IMPX A 6
6 means time in decorate code, but direction 6 in sprite name

11.
File> New>New Archive> ZIP archive

12.
save as > PK3 file

13.
create folder sprites, file a, and file Decorate


14.
in decorate write
#include "a"
save

15. Text language > Zdoom Decorate
set it for both files

16.
in fila "a"
Code: Select allExpand view
ACTOR Ciabata : HereticImp replaces HereticImp
{
  Health 3
 
  States
   {
  See:
    BLUE AABBCCBB 3 A_Chase
    Loop
   }
}




you dont need to past all code. only the bits you want to change.
the first sentence means
Ciabata - new monster
: HereticImp - take all stats from gargoyle
replace HereticImp - on maps switch monsters with this actor (it could be also item like pick up f.ex)

17. in heretic.wad, select all impx A / B / C


18.
convert to GFX..
convert to PNG truecolor - at the top
convert all - at the bottom


19.
select again all the IMPX with * at the end

20.
r click -> export

21.
change graphic
upload into spites folder in
a.pk3


22. add a.pk3 to zdl


you can adjust the position of graphic in slade, so they not cut out in game (you will figure it yourself)

23. dont add half naked girls (unless you are 12 y old)
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence

Re: how to add custom classes and sprites

Postby Ciabata » Thu Nov 26, 2020 6:55 am

Thank you very much for help!
Ciabata
 
Joined: 25 Nov 2020
Location: Poland
Operating System: Windows 10/8.1/8/201x 64-bit


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest