[Not a bug] Console merges/skips instant identical pickup messages

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.

Console merges/skips instant identical pickup messages

Postby dgzoom » Fri Aug 06, 2021 11:15 am

I'm working on a mod (of a mod) and recenly created a CustomInventory actor that runs multiple A_DropItem in its Pickup (DropAmmo) state, like this:

Code: Select allExpand view
ACTOR InventoryShotgun : CustomInventory replaces Shotgun {
   Scale 0.85
   +INVENTORY.QUIET
   States {
      Spawn:
         SHOT A -1
         Stop
      Pickup:
         TNT1 A 0 A_JumpIfInventory("Shotgun", 1, "DropAmmo")
         Goto DropWeapon
      DropAmmo:
         TNT1 A 0 A_JumpIfInventory("AmmoShell", 0, "Cancel")
         TNT1 A 0 A_DropItem("AmmoShell", 9)
         TNT1 A 0 A_DropItem("AmmoShell", 4)
         Stop
      DropWeapon:
         TNT1 A 0 A_GiveInventory("MagShotgun", 9)
         TNT1 A 0 A_DropItem("Shotgun", 1)
         Stop
      Cancel:
         TNT1 A 0
         Fail
   }
}


I am referring to those 9 + 4 shells there. I keep receiving both shell packs, but only one message in the console: Shells. Now, I will definitely change that to one line with 13 shells, but how come the message is missing? At first, I thought that it has something to do with the 0 tics, so I changed them to 1 - no difference. If I change the code to the one below, it displays "Shells" "Bullets" "Shells", as expected:

Code: Select allExpand view
      DropAmmo:
         TNT1 A 0 A_JumpIfInventory("AmmoShell", 0, "Cancel")
         TNT1 A 0 A_DropItem("AmmoShell", 9)
         TNT1 A 0 A_DropItem("AmmoBullet", 10)
         TNT1 A 0 A_DropItem("AmmoShell", 4)
         Stop


If the player picks up two items, the console should say so, no? Since this works with different items but not the same kind, I assume it's not intended.
dgzoom
 
Joined: 24 Jul 2019
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Console merges/skips instant identical pickup messages

Postby Gez » Fri Aug 06, 2021 11:34 am

It's not a bug IIRC, but pretty deliberate, to reduce log spam when identical pickups are stacked. Did you know that, for example, at the start of Dead Simple you've got not one backpack but a stack of ten?
Gez
 
 
 
Joined: 06 Jul 2007

Re: Console merges/skips instant identical pickup messages

Postby Graf Zahl » Fri Aug 06, 2021 11:43 am

precisely that. It's for reducing message spam for stacked items.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Console merges/skips instant identical pickup messages

Postby dgzoom » Fri Aug 06, 2021 11:54 am

Right. I had noticed the "huge" backpack on that map but what the hell do I know how it's coded? xD

So I'm assuming that the skips are in the original engine as well then. Too bad.
dgzoom
 
Joined: 24 Jul 2019
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Console merges/skips instant identical pickup messages

Postby Rachael » Fri Aug 06, 2021 12:23 pm

dgzoom wrote:So I'm assuming that the skips are in the original engine as well then. Too bad.

The original engine had no facility to place multiple messages in the first place, so it was irrelevant. You only saw the latest pickup message so if you picked up 10 it was easy to assume you had one.

Stacking inventory was never that rare, either. If I remember right it was very frequent even in id maps to find armor boni and health boni stacked up on top of each other. And this certainly counted against your Items % when leaving the level if you missed them.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Console merges/skips instant identical pickup messages

Postby Blue Shadow » Fri Aug 06, 2021 7:37 pm

if the OP is interested, there is the NoMergePickupMsg GameInfo property in MAPINFO.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Console merges/skips instant identical pickup messages

Postby dgzoom » Sat Aug 07, 2021 7:23 am

Thanks a lot! :)
dgzoom
 
Joined: 24 Jul 2019
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests