WHAVENWEPS! My upcoming MOD! (First decorate mod)(HELP!)
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Crudux Cruo
- Posts: 1165
- Joined: Mon Apr 10, 2006 8:43 pm
- Location: California
WHAVENWEPS! My upcoming MOD! (First decorate mod)(HELP!)
Hello! Im Doomer1. If you dont know me, im the maker of a graphical replacement called hexendoom, which was a abysmal failure which i eraticated from the doom wiki and my hard drive.
[quote="Bouncy"]I'd approve of this mod highly if it wasn't just a graphic replacement.[/quote]
Those are the words that drove me to learn decorate code! this mod will be a example of all the decorate code ive learned in the past 2 years.
too bad its not released yet not funny? Anyway here is some of the features as of now in order of importance (yes this is my progress!)
- it has 9 of 11 original witchaven weapons as of now (70% of the mod)
- it has 6 out of 11 planned weapon pickups (10%)
- it has 7 out of 8 planned monster replacements. (10%)
- it has 2 of 2 armor changes, and 0 of 1 powerup changes. (10%
do the math, thats about 90% finished.
at this rate, the mod will be released in a matter of days.
If anyone wants to help, this will take minor scripting in the following ways:
monsters:
Zombieman: replaced with fighter (no deathsound!)(done)
Shotgunzombie: Cleric (done
Chaingunzombie:slaughtar (done
Arachnotron:dark bishop (done)
Revenant:knight (done)
Spidermastermind: heresiarch (done)
Cyberdemon: Replace with either the minotaur or korax.
i would like to thank:
The NUTcracker
Wildweasel
The Dark Arachnotron
Vaecrius
Zippy
Hotwax
Xutawoo
AND Xaser cause hes cool! (he made me a picture on page 4!)
[quote="Bouncy"]I'd approve of this mod highly if it wasn't just a graphic replacement.[/quote]
Those are the words that drove me to learn decorate code! this mod will be a example of all the decorate code ive learned in the past 2 years.
too bad its not released yet not funny? Anyway here is some of the features as of now in order of importance (yes this is my progress!)
- it has 9 of 11 original witchaven weapons as of now (70% of the mod)
- it has 6 out of 11 planned weapon pickups (10%)
- it has 7 out of 8 planned monster replacements. (10%)
- it has 2 of 2 armor changes, and 0 of 1 powerup changes. (10%
do the math, thats about 90% finished.
at this rate, the mod will be released in a matter of days.
If anyone wants to help, this will take minor scripting in the following ways:
monsters:
Zombieman: replaced with fighter (no deathsound!)(done)
Shotgunzombie: Cleric (done
Chaingunzombie:slaughtar (done
Arachnotron:dark bishop (done)
Revenant:knight (done)
Spidermastermind: heresiarch (done)
Cyberdemon: Replace with either the minotaur or korax.
i would like to thank:
The NUTcracker
Wildweasel
The Dark Arachnotron
Vaecrius
Zippy
Hotwax
Xutawoo
AND Xaser cause hes cool! (he made me a picture on page 4!)
Last edited by Crudux Cruo on Sat Mar 31, 2007 11:15 pm, edited 27 times in total.
- The NUtcracker
- Posts: 843
- Joined: Sun Jan 14, 2007 9:12 pm
- Location: South Dakota
- Contact:
- The NUtcracker
- Posts: 843
- Joined: Sun Jan 14, 2007 9:12 pm
- Location: South Dakota
- Contact:
You have to put a space between "goto" and "ready." You need a frame duration for every frame, which goes before the A_*Insertaction* but before the state. So for example Oh, and you put what select does in the ready state, and what the ready state does in the select state!
If you need a reference, here is one of my melee weapons:
Code: Select all
SRDA0 1 A_Raise
If you need a reference, here is one of my melee weapons:
Code: Select all
ACTOR Melee : Weapon replaces fist
{
Obituary "%o was punched by %k's fists"
Weapon.SelectionOrder 180
Weapon.kickback 40
Scale 0.5
States
{
Ready:
MART A 1 A_WeaponReady
Goto Ready
Deselect:
MART A 1 A_Lower
Goto Deselect
Select:
MART A 1 A_Raise
Goto Select
Fire:
MART ABCDE 1
MART F 1 A_CustomPunch(5,1,0,"Puff")
MART GHIJ 1
MART K 1 A_CustomPunch(7,1,0,"Puff")
MART LMNOPQ 1
Goto Ready
AltFire:
MART RS 2
MART T 2 A_CustomPunch(20,1,0,"Puff")
MART UVW 2
Goto Ready
}
}
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Only one A_Punch seems so little for a sword...
A suggestion you might want to consider: If the sword is making a slashing motion, it should be able to contact a target and deal damage at several points along its path. You might want to add another [wiki=A_CustomPunch]A_(Custom)Punch[/wiki] for each frame where you figure the sword should be able to cut someone if it made contact at that point. (IIRC this is how the knights in Quake work)
A suggestion you might want to consider: If the sword is making a slashing motion, it should be able to contact a target and deal damage at several points along its path. You might want to add another [wiki=A_CustomPunch]A_(Custom)Punch[/wiki] for each frame where you figure the sword should be able to cut someone if it made contact at that point. (IIRC this is how the knights in Quake work)
- Crudux Cruo
- Posts: 1165
- Joined: Mon Apr 10, 2006 8:43 pm
- Location: California
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
I don't remember where the exact wiki entries are, so here it is in one post:
DECORATE can't wholly replace internal inventory items, just (as far as I know) actors on a map. If you have a weapon that replaces, say, the shotgun, grabbing a shotgun on the ground will give you the new weapon, but if you type "give shotgun" in the console you'll end up with the original Doom shotgun rather than the new weapon.
Which means that, to replace the fist, you'll have to set things up so that the player will 1) start with the sword in their inventory, and 2) be able to select the sword as part of weapon slot 1.
Create the following playerclass in DECORATE:
This creates a new player class that starts out with a pistol and sword, instead of pistol and fist. If you want the fist as well add "player.startitem Fist" - note that whatever you have as the first player.startitem entry is the weapon you first have out when the game starts.
Create a lump with "keyconf" with the following:
"clearplayerclasses" gets rid of the default doomguy as a player class and "addplayerclass" adds your new playerclass. Without the clearplayerclasses line, the player will still be able to start as the vanilla, swordless marine.
The name after weaponsection can be anything you want, just make sure it's unique and recognizable. The usual convention is to use capitals but no spaces, e.g., VaesIncrediblyAwesomeModOfExcellentness.
The setslot line is pretty self-explanatory. Putting a weapon name later means the weapon has higher priority (i.e., with the above configuration hitting 1 changes to the saw first, hitting 1 again changes from saw to sword, etc.), so if the sword's better overall than the chainsaw you might want to put the sword after. And, of course, if you're getting rid of the fist altogether you can delete "Fist" from that line.
If you only want the sword to be a pickup instead of a starting item, the only thing you need from here is the setweaponslot line and you won't have to define a new player class.
DECORATE can't wholly replace internal inventory items, just (as far as I know) actors on a map. If you have a weapon that replaces, say, the shotgun, grabbing a shotgun on the ground will give you the new weapon, but if you type "give shotgun" in the console you'll end up with the original Doom shotgun rather than the new weapon.
Which means that, to replace the fist, you'll have to set things up so that the player will 1) start with the sword in their inventory, and 2) be able to select the sword as part of weapon slot 1.
Create the following playerclass in DECORATE:
Code: Select all
actor Swordsman : DoomPlayer
{
player.displayname "Swordsman"
player.startitem Pistol
player.startitem Clip 50
player.startitem Sword
}
Create a lump with "keyconf" with the following:
Code: Select all
clearplayerclasses
addplayerclass Swordsman
weaponsection doomerlsawesomeswordmodorwhateveryou'regonnacallit
setslot 1 Fist Sword Chainsaw
The name after weaponsection can be anything you want, just make sure it's unique and recognizable. The usual convention is to use capitals but no spaces, e.g., VaesIncrediblyAwesomeModOfExcellentness.
The setslot line is pretty self-explanatory. Putting a weapon name later means the weapon has higher priority (i.e., with the above configuration hitting 1 changes to the saw first, hitting 1 again changes from saw to sword, etc.), so if the sword's better overall than the chainsaw you might want to put the sword after. And, of course, if you're getting rid of the fist altogether you can delete "Fist" from that line.
If you only want the sword to be a pickup instead of a starting item, the only thing you need from here is the setweaponslot line and you won't have to define a new player class.
- Crudux Cruo
- Posts: 1165
- Joined: Mon Apr 10, 2006 8:43 pm
- Location: California
I believe the reason ZDoom is freezing is because you are locking it into an infinite loop by using 0-duration frames everywhere. Those numbers after the frame letters aren't just for decoration you know. You need to give ZDoom time to do other stuff, but currently you're telling it to loop without waiting for anything in every frame of your weapon.
Change the relevant part of your Decorate code to read as follows:
You'll need to adjust the 3's above until the weapon animates at the speed you want. Higher numbers = greater delays. 0 means don't show the frame at all, just execute the action function (i.e. A_CustomPunch) and move onto the next frame without waiting.
Change the relevant part of your Decorate code to read as follows:
Code: Select all
States
{
Ready:
SWRD A 1 A_Weaponready
Goto Ready
Deselect:
SWRD A 1 A_Lower
Goto Deselect
Select:
SWRD A 1 A_Raise
Goto Select
Fire:
SWRD A 3
SWRD B 3
SWRD C 3
SWRD D 3
SWRD E 3
SWRD F 3
SWRD G 3 A_CustomPunch(7,1,0,"Puff")
SWRD H 3 A_CustomPunch(7,1,0,"Puff")
Goto ready
}
- Crudux Cruo
- Posts: 1165
- Joined: Mon Apr 10, 2006 8:43 pm
- Location: California
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Okay, here's how I did draw animations for the weapons in The Stranger. Just about everything is done in the Ready states:
The +6 after Ready is important. That determines how many frames it skips on that state. You'll need to use that number every time you use a Goto Ready.
Code: Select all
Select:
TNT1 A 1
Loop
Ready:
SWDD ABCDEF 3
SWDG A 1 A_WeaponReady
Goto Ready+6
Forgot your A_Raise in the Select state there:
Code: Select all
Select:
TNT1 A 1 A_Raise
Loop
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
- Crudux Cruo
- Posts: 1165
- Joined: Mon Apr 10, 2006 8:43 pm
- Location: California
AS one problem is fixed another stares me in the face, mocking me menacingly...
it draws and all that but now it does it everytime i attack! i assume this is because it goes back to the ready stance once youve completed the attack. is there anything i can do?
(i really dont want to get ready of the sword drawing frames! its just not cool without it!!)
it draws and all that but now it does it everytime i attack! i assume this is because it goes back to the ready stance once youve completed the attack. is there anything i can do?
(i really dont want to get ready of the sword drawing frames! its just not cool without it!!)
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
They key lies in the Goto. If you want to play the drawing animation, type "goto Ready" since the beginning of the Ready state is the drawing animation. If you want to skip that animation, use "goto Ready+6" (or whatever the number is) which takes you to the SEVENTH frame (the first frame in the state after six frames have passed), i.e., the normal A_WeaponReady frame.