[3.1.0]Skills 'factor' compounding issue

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

[3.1.0]Skills 'factor' compounding issue

Post by Major Cooke »

When playing DUMP2 with D4D, I noticed that every time I started another map, each time I picked up a blue armor, the value is decreasing on Nightmare difficulty or greater. Every map is treated as a new map too, which makes this problematic.

D4D has an armor factor of 0.75 on Nightmare difficulty, and 0.5 on Ultra Nightmare. Armor continuously decreases in value with each new map. On nightmare, the big blue armor is supposed to give 150.

Note: DUMP2 does not have any adjustments to skill levels, and is not at fault. It starts every map off with a 'new map start'.

D4D's player also does nothing different than give empty inventory tokens for items the player doesn't already have.

Code: Select all

override void PostBeginPlay()
{
	if (!player || !player.mo || player.mo != self)
	{
		return Super.PostBeginPlay();
	}
	
	Super.PostBeginPlay();
	
	if (self.GetClass() == "Doom4Player")
	{
		ItemsToSave ITS;
		ITS.Init();
		
		// Because of KEEPDEPLETED, that's all we'll need. I am so happy this
		// flag exists.
		for (int i = 1; i < ITS.ItemList.Size(); i++)
		{
			Class<Inventory> check = ITS.ItemList[i];
			if (check && !CountInv(check))
			{
				A_SetInventory(check,1);
				A_SetInventory(check,0);	
			}
		}
		stamina = 0;
		A_SetHealth(100);
	}
}
Another issue this also sparks is, it gives the players all the StartItems defined in their player classes, so you'll notice immediately upon entering a map, you can triple jump right off the bat. I'm not reporting this as a different bug because I believe it falls under the same circumstances as the above.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.1.0]Skills 'factor' compounding issue

Post by Graf Zahl »

I guess your problem is buried right in this comment:
// Because of KEEPDEPLETED, that's all we'll need. I am so happy this flag exists.
That said, with a mod that uses such heavy scripting as D4D I expect that you do a bit more analysis of your problems. My personal impression is that A_SetInventory is not doing what you expect here.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [3.1.0]Skills 'factor' compounding issue

Post by Rachael »

And on that note, can I get a VERY minimal example to test this? I can't look at D4D in its entirety here - sorry - and you can't expect that of me.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [3.1.0]Skills 'factor' compounding issue

Post by Major Cooke »

Didn't see this was actually posted in. My bad.

I'll try to come up with something. I made a workaround in D4D anyway so it can't exactly be tested using that anymore.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.1.0]Skills 'factor' compounding issue

Post by Graf Zahl »

Bump for a reminder.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [3.1.0]Skills 'factor' compounding issue

Post by Major Cooke »

Close it. I'm unable to reproduce the bug anymore and I gave up on the attempts to reproduce it by itself because it couldn't get it to work.
Post Reply

Return to “Closed Bugs [GZDoom]”