Decorate Tutorials Maybe?
Moderator: Graf Zahl
- Soultaker
- Posts: 219
- Joined: Fri Sep 02, 2005 8:26
- Location: Capping some zombies Gangsta Style.
- Contact:
Decorate Tutorials Maybe?
Hey I was wondering if maybe you can make some tutorials explaining the mechanics behind Decorate based objects and weapons.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Soultaker
- Posts: 219
- Joined: Fri Sep 02, 2005 8:26
- Location: Capping some zombies Gangsta Style.
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Killmur wrote:Looks more complicated than DDF.
Not really. It's 90% the same information just specified differently. It's just that the tutorial is not that well written.
If you need some examples, try this. It's mostly stuff for testing so it doesn't have much practical use.
Code: Select all
//===========================================================================
//
// Chaingun
//
//===========================================================================
ACTOR ChaingunTest : Weapon 2002
{
+AMMO_OPTIONAL
Health 3 // defines number of weapon pieces
Weapon.SelectionOrder 700
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "You got the chaingun test!"
Weapon.AmmoType "Clip"
Weapon.AmmoGive 20
Weapon.AmmoUse 1
Weapon.AmmoType2 "RocketAmmo"
Weapon.AmmoGive2 20
Weapon.AmmoUse2 1
Weapon.Kickback 400
Weapon.YAdjust 40
AttackSound "weapons/chngun"
States
{
Spawn:
MGUN A -1
Loop
Ready:
CHGG A 1 A_WeaponReady
Loop
Deselect:
CHGG A 1 A_Lower
Loop
Select:
CHGG A 1 A_Raise
Loop
Fire:
CHGG A 4 A_FireCustomMissile("PlasmaBall")
CHGG A 4 A_FireCustomMissile("PlasmaBall",10,1)
CHGG A 4 A_FireCustomMissile("PlasmaBall",20,0)
CHGG B 0 A_ReFire
Goto Ready
AltFire:
CHGG A 4 A_FireCustomMissile("Rocket")
CHGG B 0 A_ReFire
Goto Ready
}
}
ACTOR SSDMiniCyberdemon 11443
{
Health 2000
Radius 40
Height 110
Mass 700
Speed 12
PainChance 20
Monster
+FLOORCLIP
ReactionTime 5
Scale 0.7
SeeSound "minicyber/sight"
PainSound "cyber/pain"
DeathSound "minicyber/death"
ActiveSound "cyber/active"
Obituary "%o was deep fried by a mini-cyberdemon."
Translation "16:31=226:231", "32:47=160:167", "168:179=226:231", "180:191=160:167",
"208:215=226:231", "216:223=160:167", "232:235=164:167"
BloodColor "ff d3 00"
States
{
Spawn:
CYBR AB 10 A_Look
Loop
See:
CYBR A 3 A_Hoof
CYBR ABBCC 3 A_Chase
CYBR D 3 A_Metal
CYBR D 3 A_Chase
Loop
Missile:
CYBR E 4 A_FaceTarget
CYBR F 2 A_BSpiAttack
CYBR E 2
CYBR F 2 A_SpidRefire
CYBR E 2
Goto Missile+1
Pain:
CYBR G 10 A_Pain
Goto See
Death:
CYBR H 10
CYBR I 10 A_Scream
CYBR JKL 10
CYBR M 10 A_Fall
CYBR NO 10
CYBR P 30
CYBR P -1
Stop
}
}
ACTOR MediPulse : Medikit
{
RenderStyle Translucent
+VISIBILITYPULSE
}
ACTOR TestShot : DoomImpBall
{
Decal Scorch
+ROCKETTRAIL
}
ACTOR TestShot2 : TestShot
{
States
{
Spawn:
BAL1 A 1 A_BishopMissileWeave
Loop
Death:
BAL1 A 3 A_BFGSpray("TeleportFog")
Stop
}
}
ACTOR TestShot3 : DoomImpBall
{
States
{
Spawn:
BAL1 A 1 A_CStaffMissileSlither
Loop
Death:
BAL1 A 3 A_Mushroom("DoomImpBall")
Stop
}
}
//===========================================================================
// Enhanced Enemies
//===========================================================================
ACTOR SSDEnhancedImp1 : DoomImp 11444
{
Health 150
GibHealth 10
Mass 120
ReactionTime 5
PainChance 133
Scale 1.2
SeeSound "ssdimp/sight"
DeathSound "ssdimp/death" //ogre_d
MeleeSound "ssdimp/melee"
HitObituary "%o was slashed by an enhanced imp."
Obituary "%o was burned by an enhanced imp."
MeleeDamage 4
Translation "64:71=156:159", "72:79=9:12"
+DONTHURTSPECIES
DropItem Drop
States
{
See:
TROO AABBCCDD 2 A_Chase
Loop
Melee:
TROO EF 5 A_FaceTarget
TROO G 5 A_MeleeAttack
Goto See
Missile:
TROO E 0 A_SetTranslucent(0.5)
TROO EF 5 A_FaceTarget
TROO G 0 A_PlaySound ("imp/attack")
TROO G 5 A_CustomMissile ("TestShot3", 40, 0, 0)
TROO E 0 A_SetTranslucent(1)
Goto See
Pain:
TROO H 2
TROO H 2 A_Pain
Goto See
Raise:
TROO M 8
TROO KLJI 8
Goto See
}
}
ACTOR SSDEnhancedImp2 : DoomImp 11445
{
Health 150
Mass 120
ReactionTime 5
PainChance 133
Scale 1.2
SeeSound "ssdimp/sight"
DeathSound "ssdimp/death" //ogre_d
MeleeSound "ssdimp/melee"
HitObituary "%o was slashed by an enhanced imp."
Obituary "%o was burned by an enhanced imp."
MeleeDamage 4
Translation "64:79=128:143"
+DONTHURTSPECIES
+REFLECTIVE
States
{
See:
TROO AABBCCDD 2 A_Chase
Loop
Melee:
TROO EF 5 A_FaceTarget
TROO G 5 A_MeleeAttack
Goto See
Missile:
TROO E 0 A_SetTranslucent(0.5, 1)
TROO EF 5 A_FaceTarget
TROO G 0 A_PlaySound ("imp/attack")
TROO G 5 A_CustomMissile ("TestShot3", 40, 0, 0)
TROO E 0 A_SetTranslucent(1)
Goto See
Pain:
TROO H 2
TROO H 2 A_Pain
Goto See
Raise:
TROO M 8
TROO KLJI 8
Goto See
}
}
ACTOR SSDEnhancedImp3 : DoomImp 11446
{
Health 150
Mass 120
ReactionTime 5
PainChance 133
Scale 1.2
SeeSound "ssdimp/sight"
DeathSound "ssdimp/death" //ogre_d
MeleeSound "ssdimp/melee"
HitObituary "%o was slashed by an enhanced imp."
Obituary "%o was burned by an enhanced imp."
MeleeDamage 4
Translation "64:79=128:143"
+REFLECTIVE +SHIELDREFLECT
States
{
See:
TROO AABBCCDD 2 A_Chase
Loop
Melee:
TROO EF 5 A_FaceTarget
TROO G 5 A_MeleeAttack
Goto See
Missile:
TROO E 0 A_SetTranslucent(1, 2)
TROO EF 5 A_FaceTarget
TROO G 0 A_PlaySound ("imp/attack")
TROO G 5 A_FatAttack1("DoomImpBall")
TROO G 5 A_FatAttack2("DoomImpBall")
TROO G 5 A_FatAttack3("DoomImpBall")
TROO E 0 A_SetTranslucent(1)
Goto See
Pain:
TROO H 2
TROO H 2 A_Pain
Goto See
Raise:
TROO M 8
TROO KLJI 8
Goto See
Death:
TROO E 4 A_FadeOut
Wait
}
}
ACTOR SSDSuicidalSoul : LostSoul 11446
{
Health 150
Mass 60
Damage 4
ExplosionDamage 90
ExplosionRadius 128
PainChance 256
ReactionTime 5
AttackSound "ssdsoul/attack"
DeathSound "ssdsoul/death"
Obituary "%o was blown up by a suicidal soul."
Translation "16:47=112:127", "160:167=112:127", "168:191=112:127",
"208:223=112:127", "232:235=124:127"
States
{
Spawn:
SKUL AB 10 BRIGHT A_Look
Loop
See:
SKUL AB 4 BRIGHT A_Chase
Loop
Melee:
SKUL F 0 BRIGHT A_PlaySound ("weapons/rocklx")
SKUL F 0 BRIGHT A_UnsetShootable
SKUL F 0 BRIGHT A_Explode
SKUL F 1 BRIGHT A_SetShootable
SKUL F 7 BRIGHT A_Die
Goto Death
Missile:
SKUL C 7 BRIGHT A_FaceTarget
SKUL D 4 BRIGHT A_SkullAttack
SKUL CD 1 BRIGHT
Goto See
Pain:
SKUL E 3 BRIGHT
SKUL E 3 BRIGHT A_Pain
Goto See
Death:
SKUL F 6 BRIGHT
SKUL G 6 BRIGHT A_Scream
SKUL H 6 BRIGHT
SKUL I 6 BRIGHT
SKUL J 6
SKUL K 6
Stop
}
}
ACTOR SSDEnhancedImp4 : DoomImp 11446
{
Health 150
Mass 120
ReactionTime 5
PainChance 133
Scale 1.2
SeeSound "ssdimp/sight"
DeathSound "ssdimp/death" //ogre_d
MeleeSound "ssdimp/melee"
HitObituary "%o was slashed by an enhanced imp."
Obituary "%o was burned by an enhanced imp."
MeleeDamage 4
Translation "64:79=128:143"
+REFLECTIVE +DEFLECT
States
{
See:
TROO AABBCCDD 2 A_Chase
Loop
Melee:
TROO EF 5 A_FaceTarget
TROO G 5 A_MeleeAttack
Goto See
Missile:
TROO EF 5 A_FaceTarget
TROO G 0 A_PlaySound ("imp/attack")
TROO G 5 A_PainAttack("SSDSuicidalSoul")
Goto See
Pain:
TROO H 2
TROO H 2 A_Pain
Goto See
Raise:
TROO M 8
TROO KLJI 8
Goto See
Death:
TROO E 4 A_SpawnDebris("Trash")
TROO E 4 A_CheckSight(1)
Wait
TROO E 1
Stop
}
}
ACTOR SSDEnhancedImp5 : DoomImp 11446
{
Health 150
Mass 120
ReactionTime 5
PainChance 133
Scale 1.2
SeeSound "ssdimp/sight"
DeathSound "ssdimp/death" //ogre_d
MeleeSound "ssdimp/melee"
AttackSound "baron/sight"
HitObituary "%o was slashed by an enhanced imp."
Obituary "%o was burned by an enhanced imp."
MeleeDamage 4
Translation "64:79=128:143"
+REFLECTIVE +DEFLECT
BloodColor "00 ff 00"
States
{
See:
TROO AABBCCDD 2 A_Chase
Loop
Melee:
TROO EF 5 A_FaceTarget
TROO G 5 A_MeleeAttack
Goto See
Missile:
TROO EF 5 A_FaceTarget
TROO G 0 A_MonsterRail
Goto See
Pain:
TROO H 2
TROO H 2 A_Pain
Goto See
Raise:
TROO M 8
TROO KLJI 8
Goto See
}
}
ACTOR SSDEnhancedImp6 : DoomImp 11446
{
Health 150
Mass 120
ReactionTime 5
PainChance 133
Scale 1.2
SeeSound "ssdimp/sight"
DeathSound "ssdimp/death" //ogre_d
MeleeSound "ssdimp/melee"
HitObituary "%o was slashed by an enhanced imp."
Obituary "%o was burned by an enhanced imp."
MeleeDamage 4
Translation "64:79=128:143"
+REFLECTIVE +DEFLECT
States
{
See:
TROO AABBCCDD 2 A_Chase
Loop
Melee:
TROO EF 5 A_FaceTarget
TROO G 5 A_MeleeAttack
Goto See
Missile:
TROO EF 5 A_FaceTarget
TROO G 0 A_MonsterRail
Goto See
Pain:
TROO H 2
TROO H 2 A_Pain
Goto See
Raise:
TROO M 8
TROO KLJI 8
Goto See
Crush:
BOSS I 0 A_SetTranslucent(0.99,0)
BOSS I 0 A_ChangeFlag("VISIBILITYPULSE", 1)
BOSS I -1
Stop
}
}
ACTOR Trash
{
Health 10
States
{
MEDI A -1
STIM A -1
SOUL A -1
RKEY A -1
BKEY A -1
YKEY A -1
RKEY A -1
BKEY A -1
YKEY A -1
PINS A -1
Stop
}
}
ACTOR Drop : Inventory
{
States
{
Drop:
TNT1 A 0 A_Print("A Door opened")
TNT1 A 2 Door_Open(2, 16)
Stop
}
}
ACTOR Test : Inventory
{
Inventory.MaxAmount 0
States
{
Spawn:
MEDI A -1
Pickup:
TNT1 A 0 A_Print("A Door opened")
TNT1 A 2 Door_Open(2, 16)
Fail
}
}
ACTOR Piece1 : WeaponPiece 10000
{
WeaponPiece.Number 1
WeaponPiece.Weapon ChaingunTest
Inventory.PickupMessage "Piece 1"
States
{
Spawn:
RKEY A -1
}
}
ACTOR Piece2 : WeaponPiece 10001
{
WeaponPiece.Number 2
WeaponPiece.Weapon ChaingunTest
Inventory.PickupMessage "Piece 2"
States
{
Spawn:
YKEY A -1
}
}
ACTOR Piece3 : WeaponPiece 10002
{
WeaponPiece.Number 3
WeaponPiece.Weapon ChaingunTest
Inventory.PickupMessage "Piece 3"
States
{
Spawn:
BKEY A -1
}
}
ACTOR Scroll5 : Inventory 30016
{
+FLOATBOB
+INVBAR
+FANCYPICKUPSOUND
Inventory.Amount 1
Inventory.MaxAmount 5
Inventory.Icon SCR5Z0
Inventory.PickupMessage "summon scroll"
States
{
Spawn:
SCR5 A -1
Stop
Use:
SCR5 A 1 A_SpawnItem("Demon1", 128, 0, 0)
Stop
}
}
ACTOR Pro1 : DoomImpBall
{
+EXTREMEDEATH
}
ACTOR Pro2 : DoomImpBall
{
+NOEXTREMEDEATH
Damage 200
}
ACTOR NoGibZombie : ZombieMan
{
GibHealth 500
}
- chaoscentral
- Posts: 113
- Joined: Tue Aug 30, 2005 14:08
- Location: E1M1
- Contact:
- Soultaker
- Posts: 219
- Joined: Fri Sep 02, 2005 8:26
- Location: Capping some zombies Gangsta Style.
- Contact:
- chaoscentral
- Posts: 113
- Joined: Tue Aug 30, 2005 14:08
- Location: E1M1
- Contact:
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
- Soultaker
- Posts: 219
- Joined: Fri Sep 02, 2005 8:26
- Location: Capping some zombies Gangsta Style.
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Not directly. But I can post some weapons that mimic the behavior of the original but use different sprites:
Pistol:
Shotgun:
Chaingun:
Rocket Launcher:
Plasma gun:
BFG:
The state sequences are like the originals but sound names and sprite frames don't match. But it should give you a start.
Pistol:
Code: Select all
//===========================================================================
//
// Pulse pistol
//
//===========================================================================
ACTOR DHPulse : Weapon -1
{
Weapon.SelectionOrder 1900
Weapon.AmmoType DHClip
Weapon.AmmoUse 1
AttackSound "darkhour/pistol"
Weapon.AmmoGive 50
Inventory.Icon I_DHPuls
+WIMPY_WEAPON
Decal BulletChip
States
{
Ready:
DHW2 A 1 A_WeaponReady
Loop
Deselect:
DHW2 A 1 A_Lower
Loop
Select:
DHW2 A 1 A_Raise
Loop
Fire:
DHW2 B 4
DHW2 C 6 A_FireBullets(5.5, 0, 1, 5, "BulletPuff")
DHW2 C 4 A_Light1
DHW2 B 0 A_Light0
DHW2 B 5 A_ReFire
Goto Ready
}
}
Code: Select all
//===========================================================================
//
// Blaster
//
//===========================================================================
ACTOR DHBlaster : Weapon 10851
{
Weapon.SelectionOrder 1300
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "You got the blaster!"
Weapon.AmmoType DHShell
Weapon.AmmoUse 1
Weapon.AmmoGive 20
AttackSound "darkhour/shotgun"
Inventory.Icon DHJ8A0
Decal BulletChip
States
{
Spawn:
DHJ8 A -1
Loop
Ready:
DHW3 A 1 A_WeaponReady
Loop
Deselect:
DHW3 A 1 A_Lower
Loop
Select:
DHW3 A 1 A_Raise
Loop
Fire:
DHW3 A 3
DHW3 A 0 A_GunFlash
DHW3 A 7 A_FireBullets(5.5, 0, 7, 5, "BulletPuff")
DHW3 BC 5
DHW3 B 4
DHW3 CB 5
DHW3 A 3
DHW3 A 7 A_ReFire
Goto Ready
Flash:
DHW3 E 4 BRIGHT A_Light1
DHW3 F 3 BRIGHT A_Light2
DHW3 F 0 A_Light0
Stop
}
}
Code: Select all
//===========================================================================
//
// Fusion cutter
//
//===========================================================================
ACTOR DHCutter : Weapon 10852
{
Weapon.SelectionOrder 800
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "You got the Fusion Cutter!"
Weapon.AmmoType DHClip
Weapon.AmmoGive 20
Weapon.AmmoUse 1
Inventory.Icon DHJ9A0
AttackSound "darkhour/cutter"
Decal BulletChip
States
{
Spawn:
DHJ9 A -1
Loop
Ready:
DHW4 C 1 A_WeaponReady
Loop
Deselect:
DHW4 C 1 A_Lower
Loop
Select:
DHW4 C 1 A_Raise
Loop
Fire:
DHW4 C 0 A_GunFlash
DHW4 C 4 A_FireBullets(5.5, 0, 1, 5, "BulletPuff")
DHW4 D 4 A_FireBullets(5.5, 0, 1, 5, "BulletPuff")
DHW4 D 0 A_ReFire
Goto Ready
Flash:
DHW4 A 4 BRIGHT A_Light1
DHW4 B 5 BRIGHT A_Light2
DHW4 B 0 A_Light0
Stop
}
}
Code: Select all
//===========================================================================
//
// Rocket launcher
//
//===========================================================================
ACTOR DHLauncher : Weapon 10853
{
Weapon.SelectionOrder 2200
SpawnID 29
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "You got the rocket launcher!"
Weapon.AmmoType RocketAmmo
Weapon.AmmoGive 2
Weapon.AmmoUse 1
Inventory.Icon DHJAA0
+Explosive
+NoAutoFire
States
{
Spawn:
DHJA A -1
Loop
Ready:
DHW5 E 1 A_WeaponReady
Loop
Deselect:
DHW5 E 1 A_Lower
Loop
Select:
DHW5 E 1 A_Raise
Loop
Fire:
DHW5 D 8 A_GunFlash
DHW5 D 12 A_FireCustomMissile("DHRocket")
DHW5 D 0 A_ReFire
Goto Ready
Flash:
DHW5 A 4 BRIGHT A_Light1
DHW5 B 4 BRIGHT
DHW5 AD 4 BRIGHT A_Light2
DHW5 A 0 A_Light0
Stop
}
}
Code: Select all
//===========================================================================
//
// Concussion rifle
//
//===========================================================================
ACTOR DHConcussion : Weapon 10856
{
Weapon.SelectionOrder 100
SpawnID 30
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "You got the Concussion Rifle!"
Weapon.AmmoType DHCell
Weapon.AmmoGive 40
Weapon.AmmoUse 1
Inventory.Icon I_DHCONC
States
{
Spawn:
DHJC A -1
Loop
Ready:
DHW6 A 1 A_WeaponReady
Loop
Deselect:
DHW6 A 1 A_Lower
Loop
Select:
DHW6 A 1 A_Raise
Loop
Fire:
DHW6 A 0 A_GunFlash
DHW6 A 3 A_FireCustomMissile("DHPlasma")
DHW6 B 20 A_ReFire
Goto Ready
Flash:
DHW6 C 0 A_Jump(128,2)
DHW6 C 4 BRIGHT A_Light1
Goto Flash+3
DHW6 D 4 BRIGHT A_Light1
DHW6 D 0 A_Light0
Stop
}
}
Code: Select all
//===========================================================================
//
// Assault Cannon
//
//===========================================================================
ACTOR DHAssault : Weapon 10857
{
Weapon.SelectionOrder 1800
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "You got the Assault Cannon!"
Weapon.AmmoType DHCell
Weapon.AmmoGive 40
Weapon.AmmoUse 40
Inventory.Icon DHJDA0
+NoAutoFire
States
{
Spawn:
DHJD A -1
Loop
Ready:
DHW7 A 1 A_WeaponReady
Loop
Deselect:
DHW7 A 1 A_Lower
Loop
Select:
DHW7 A 1 A_Raise
Loop
Fire:
DHW7 A 20 A_PlaySound("darkhour/assault")
DHW7 B 10 A_GunFlash
DHW7 B 10 A_FireCustomMissile("DHBlast")
DHW7 B 20 A_ReFire
Goto Ready
Flash:
DHW7 C 11 BRIGHT A_Light1
DHW7 C 6 BRIGHT A_Light2
DHW7 C 0 A_Light0
Stop
}
}
- Deathsong12
- Posts: 129
- Joined: Mon Sep 05, 2005 22:31
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Deathsong12
- Posts: 129
- Joined: Mon Sep 05, 2005 22:31