Item Ghosting (Ammo) - Engine Bug!

Hi All,

I think that now I have confirmed that NWN2 engine has some sort of “item ghosting” bug (see this link, but I also copy the info below), I believe I am going to be unable to “fix” the discrepancy of what my game reports to the player and what may sometimes be “seen” in their PCs inventories. The point being, my module correctly reports when ammo has been depleted, even though the inventory may show items in an ammo slot. Therefore, when you hear “NO AMMO” or see (NO AMMO) in the TB Feedback, be sure to re-equip ammo in the slot, even if it looks as though there is some remaining!

I am considering trying to work in some kind of “fix” that may have not been considered or may work as an alternative, but am also open to suggestions. My first idea is to (if possible) automatically equip any other ammo when my own system detects ammo below a certain amount. However, it would not discriminate the type, and that may not be to some players liking. Also, I am not sure if the game engine may already do this.

That said, it does NOT interfere with the game if my warning is not ignored. The fix (as said below) is to otherwise simply move the offending item icon from the slot to somewhere else, possibly another tab. We have found simply replacing the ammo with new stuff also fixes the issue.

As I say, any further info players or builders can supply may help.

Thanks in advance, Lance.

GHOSTING BUG INFO:

in:

Game engine bugs

Item Ghosting

Game Version: 1.06.973 English US/Canada

Severity: Minor

Status: Unknown

Description:

Item “ghosting” is possible under some circumstances. The item appears in the inventory and can sometimes be moved around, but does not really “exist” and usually cannot be used. There are several examples I can give where I have seen this happen:

  • I was controlling one of my companions, leaving my main character on AI. I switched briefly to my main character, pressed a quick bar button to equip her with different weapons, and then switched back to my companion. At this point I discovered my companion was seemingly equipped with my main character’s weapons. When the companion died and I returned to my main character, the main character’s weapons appeared to have become ghosted.
  • I had a sword become ghosted after I equipped it to cast a spell from it. I was doing inventory managment (opening magic bags and moving items to and from the bags) at the time, but I don’t know exactly what caused it.
  • One of my companions was using a bow. I’d given him extra arrows for when he used up his existing stack. He ran out of his normal arrows and apparently automatically equipped the extra stack I’d given him. When I went to his inventory later, he had a stack of 95 arrows equipped, and a stack of 95 arrows in his inventory. I thought it odd that he’d have two stacks of 95, and sure enough, one of the stacks turned out to be ghosted.

Workaround:

Keep dragging the ghosted items around in the inventory and they will eventually disappear. Try dragging the item into a different tab in your inventory. For stackables, try stacking the ghosted item with another stack of that same type of item.

Submitted By: Kianne

Bug Confirmed By: Warlock of Faerun

ALSO FROM THE SAME WEB PAGE:

Ammunition Stacks

Game Version: 1.06.973 English US/Canada

Severity: Cosmetic

Status: Unknown

Description:

When you equip ammunition into an equipment slot that already has ammunition, the displayed amount is sometimes incorrect. For example, if you have 23 arrows equipped, and you drag 45 more arrows onto that slot, the slot will display the incorrect amount (such as 23).

Workaround:

Drag the stack of arrows to the inventory first, then equip them again.

Submitted By: Kianne

Bug Confirmed By: Anonymous

This happened to me such that after I ran out of arrows, I still appeared to have 20 or so equipped.

In my own tests, the problem appears to manifest if the game is paused.

For example, if I allow the ammo to drop in quantity (and watch it drop unpaused), the game correctly shows the ammo icons updating until they disappear altogether (at zero remain).

However, if we use pause between each round and open the inventory to check equipment or whatever, then the ammo icons may “ghost” with an erroneous presence.

I will continue to look at this issue a little more, for even though it’s only “cosmetic”, I do find it a little annoying.

If anybody has any ideas to help circumvent the issue, then please advise. Note: I have tried a number of methods to “correct” the icon between rounds (that may be paused), but have had no joy to date. Including unequipping, destroying and recreating, etc. At some point, they all appear to eventually fail.

EDIT: Worse case scenario, I may “fix” the broken ghosted icon after any paused combat and the inventory is opened for the first time after that.

Thanks, Lance.

hey Lance,

i also notice that, arbitrarily, equipped items might “ghost” over to a different character. I haven’t poked at it, but think that either reloading or transitioning (area, or perhaps module to module) straightens up the icons (not that that’s any help…)

i take it that simply closing/reopening the UIScene doesn’t help ?

Hi KevL,

Unfortunately, it does not appear to fix the issue. I have not had any more time to look since my last post, but I hope to look at it again on Monday.

I have the feeling that there will not be any specific fix while it happens (if paused) but hope I may be able to force the ghosted items to be removed once the game is unpaused again. Note: They do not disappear “normally” without some kind of persuasion along the lines you say - so, I am hoping creating/equipping/deleting in quick succession when an inventory is first opened (after unpausing) will fix the issue before it is seen. (Obviously, this won’t fix the issue while paused, but at that time, my own code will be reporting accurately on the ammo info, and I will try to re-synch the figures after TB combat.)

EDIT: Thankfully, I have only ever experienced it with AMMO icons to date. i.e. Not any other “normal” equipment. In fact, even thrown items appear to work OK for me. It is just AMMO types that appear to be the problem - and that when paused - and then only if the inventory is opened when paused.

Catch you later, Lance.

1 Like

Hi All,

Well, I was unable to “fix” the ghosted items while combat was taking place and when the ghosted ammo items occurred while the game was paused (or even unpaused briefly). However, thankfully, I was able to remove them (quicker than other methods tested) when the inventory was opened the first time after they may have appeared during a combat session and when unpaused.

So, just as a reminder, they only appear to occur (sometimes) if the game is paused and we examine the inventory at any time while it is paused. At that point, what is showing in the PCs inventory ammo slot may be inaccurate due to a “ghosted” icon image. i.e. The icon looks real and solid enough, but my own code reports to the player that the PC has run out of ammo, which is CORRECT!

So, my recommendation is to ignore what happens to the ammo icon during any combat, as the PC appears to reload ammo correctly when it reaches zero (even if the ghost icon suggests otherwise), and the count my code reports does update from “NO AMMO” to the correct number after the PC re-equips.

Now, however, after combat (which is the most important time we probably need to check), I have added code that now automatically empties the ammo slot from any ghosted icons when the inventory is opened, and if the ammo quantity for the slot reports “zero” for the ranged weapon being wielded at the time. The player may momentarily notice some ammo that seemed to be present disappear. The fact is, it is NOT present and my code is correcting the slot icon image status.

Hopefully, that will make things just a little easier to follow and tidy it up a bit.

I am updating the files for my wife to test. And if they appear to work well enough, I will update the campaign folder later for everyone to download and update. (This code has now been tested and is included in the latest CAMPAIGN v2.76 update patch.)

Thanks all, Lance.

4 Likes