(Help) Some modified Things code doesn't work in GZDoom

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Shotgun guy
Posts: 73
Joined: Sat Mar 24, 2018 5:35 am
Location: Hungary

(Help) Some modified Things code doesn't work in GZDoom

Post by Shotgun guy »

I modified some thing (Chaingun,items:health and armor,powerups) in DECORATE,but they don't work in GZDoom. In ZDoom yes. I tested in GZDoom v3.3.0.
User avatar
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

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by wildweasel »

....Post your WAD?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Graf Zahl »

Should be pinned for "How not to report a bug"!
User avatar
Shotgun guy
Posts: 73
Joined: Sat Mar 24, 2018 5:35 am
Location: Hungary

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Shotgun guy »

wildweasel wrote:....Post your WAD?
Tomorrow I'll post my wad.
User avatar
Rachael
Posts: 13967
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Rachael »

I am moving this to scripting, until we know for sure there is a bug here.
User avatar
Shotgun guy
Posts: 73
Joined: Sat Mar 24, 2018 5:35 am
Location: Hungary

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Shotgun guy »

Rachael wrote:I am moving this to scripting, until we know for sure there is a bug here.
Okay. Sometimes I don't know the things.

Here it is my Doom wad:http://www.mediafire.com/file/1s083c1kz ... 20v0.9.wad
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by _mental_ »

How about checking warnings in console?

Code: Select all

Script warning, "HELL v0.9.wad:DECORATE" line 9:
Tried to define class 'ArmorBonus' more than once. Renaming class to 'ArmorBonus@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 28:
Tried to define class 'GreenArmor' more than once. Renaming class to 'GreenArmor@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 45:
Tried to define class 'BlueArmor' more than once. Renaming class to 'BlueArmor@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 62:
Tried to define class 'BlueArmorForMegasphere' more than once. Renaming class to 'BlueArmorForMegasphere@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 74:
Tried to define class 'HealthBonus' more than once. Renaming class to 'HealthBonus@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 89:
Tried to define class 'Stimpack' more than once. Renaming class to 'Stimpack@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 102:
Tried to define class 'Medikit' more than once. Renaming class to 'Medikit@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 116:
Tried to define class 'Soulsphere' more than once. Renaming class to 'Soulsphere@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 134:
Tried to define class 'MegasphereHealth' more than once. Renaming class to 'MegasphereHealth@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 147:
Tried to define class 'Berserk' more than once. Renaming class to 'Berserk@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 173:
Tried to define class 'Chaingun' more than once. Renaming class to 'Chaingun@HELL v0.9.wad@DECORATE'
Script warning, "HELL v0.9.wad:DECORATE" line 241:
Unknown class name '0' of type 'Actor'
Script warning, "HELL v0.9.wad:DECORATE" line 244:
Unknown class name '0' of type 'Actor'
I'm pretty sure that non-working modified things are in this list.
You need to name your classes differently and use replaces keyword to substitute internal GZDoom actors.
User avatar
Shotgun guy
Posts: 73
Joined: Sat Mar 24, 2018 5:35 am
Location: Hungary

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Shotgun guy »

I only replace? E.G:Ultra Chaingun?
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by _mental_ »

I guess it should be

Code: Select all

ACTOR UltraChaingun : DoomWeapon replaces Chaingun
instead of

Code: Select all

ACTOR Chaingun : DoomWeapon
And similar changes for all other warnings.
User avatar
Shotgun guy
Posts: 73
Joined: Sat Mar 24, 2018 5:35 am
Location: Hungary

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Shotgun guy »

_mental_ wrote:I guess it should be

Code: Select all

ACTOR UltraChaingun : DoomWeapon replaces Chaingun
instead of

Code: Select all

ACTOR Chaingun : DoomWeapon
And similar changes for all other warnings.
I replaced the things. But I can't understand,that Berserk why give yet health above? Hm. :roll:
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by _mental_ »

Did you mean why player's health can go above 200 when replaced berserk was picked up?

If so, check DEHACKED lump from your mod, line 73 to be precise

Code: Select all

Max Health = 400
Berserk was altered to give 200 health, so player with 100 hp will have 300 after picking it up.
User avatar
Shotgun guy
Posts: 73
Joined: Sat Mar 24, 2018 5:35 am
Location: Hungary

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Shotgun guy »

In Original Doom Berserk give 100% Health,but it doesn't step the 100% health.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by _mental_ »

In original Doom player's maximum health is 100. Megasphere and Soulsphere are special cases though.
Did you try pickup a medikit with your mod? Player's health will go above 100 because you set its maximum to 400.
User avatar
Shotgun guy
Posts: 73
Joined: Sat Mar 24, 2018 5:35 am
Location: Hungary

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by Shotgun guy »

_mental_ wrote:In original Doom player's maximum health is 100. Megasphere and Soulsphere are special cases though.
Did you try pickup a medikit with your mod? Player's health will go above 100 because you set its maximum to 400.
I set to 200% Health max without Megasphere and Soulsphere.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: (Help) Some modified Things code doesn't work in GZDoom

Post by _mental_ »

Where did you do this?

Code: Select all

Initial Health = 200
Max Health = 400
Max Armor = 400
Green Armor Class = 2
Blue Armor Class = 4 
Max Soulsphere = 400
Soulsphere Health = 200
Megasphere Health = 400
God Mode Health = 200
IDFA Armor = 400
IDFA Armor Class = 4
IDFA Armor = 400
IDKFA Armor Class = 4

Return to “Scripting”