Aller au contenu

Photo

Did anyone find out why loot bags get underground and unclickable?


  • Veuillez vous connecter pour répondre
20 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 650 messages

Hi all. I know this got mentioned on more than one occasion but I cannot seem to find a solution. One thing one can do is tell his companion to gather the items. The companion will do it. But I just wonder why this happens. Because it happens frequently.

 

Something that might help solving this, if I want to drop and item blueprint in the toolset on the ground, my cursor is empty. Normally the loot bag should appear there... I don't know if related, but still.

 

Also, this is not a major problem, but I wouldn't like to include it as an issue on the ream me file, and people to have to use another method to loot something. Thanks :).



#2
4760

4760
  • Members
  • 1 207 messages

This happened in game both in the OC and MotB for me: after some fights, the top of the loot bag is visible, but not clickable. But if the fight is redone [typically, from a previous save], the loot bag sometimes is fully visible and clickable).

If you add this to the fact that sometimes the character's feet sink into the ground as well, you'd probably think it's related to the walkmesh...



#3
rjshae

rjshae
  • Members
  • 4 491 messages

Perhaps this could be fixed via an override loot bag model that adds a clickable surface floating above the loot bag? Say like an oversized spinning coin? Or just shift the loot bag upward by, say, 0.5 units. It could be immersion-breaking to have floaty loot/coins everywhere though.



#4
kevL

kevL
  • Members
  • 4 061 messages

i think if CalcSafeLocation() could be used, it ensures than an object (at least a placeable) will be positioned *at ground level* on the z-axis

 

but this means dropping via script instead of the 'drop' flag ... (which is buggy anyway, lol)



#5
andysks

andysks
  • Members
  • 1 650 messages
So there's no known solution to this. At least is good to know that people have the problem in the OC and it's not my work related. I found that lootable corpse solves it. Thing is, no one wants to have all creatures as lootable corpses :).

#6
Tchos

Tchos
  • Members
  • 5 054 messages

Well, if the corpse disappears after looting it, it shouldn't be bad...



#7
Dann-J

Dann-J
  • Members
  • 3 161 messages

So there's no known solution to this. At least is good to know that people have the problem in the OC and it's not my work related. I found that lootable corpse solves it. Thing is, no one wants to have all creatures as lootable corpses :).

 

Lootable corpses might not work for water elementals, since they disappear below ground when they die.

 

The only time I've ever encountered unlootable loot bags was when I'd accidently set companions to have lootable corpses. If they died in combat while in the party, all their equipped items would fall off their body and sink into the ground, never to be recovered.



#8
andysks

andysks
  • Members
  • 1 650 messages

Well, if the corpse disappears after looting it, it shouldn't be bad...

Does that happen by default? I have no recollection of it...



#9
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

Does that happen by default? I have no recollection of it...

 

It does, but only once the corpse has no items in it. The corpse object is also somewhat different from the creature itself, though its object ID in scripts is the same. It has a different name, fewer properties (can't be resurrected once it's become a corpse, for instance), and it uses the creature's base model so any equipment that was added (by script, for instance) disappears on death.


  • andysks aime ceci

#10
andysks

andysks
  • Members
  • 1 650 messages

It does, but only once the corpse has no items in it. The corpse object is also somewhat different from the creature itself, though its object ID in scripts is the same. It has a different name, fewer properties (can't be resurrected once it's become a corpse, for instance), and it uses the creature's base model so any equipment that was added (by script, for instance) disappears on death.

That is no problem because the loot bag stays as well if items remain inside. So, one and the same I would say. I never added items with scripts, and don't plan to. It all exists in the blueprints. So I guess lootable corpses are the way to go...

 

When you say different name, what does that mean? If my creature is named "Bob", won't the corpse be named "Bob"? This is purely informational.

 

Also, what do other people think? Is it ok, or does it create gameplay differences to have almost every creature as lootable corpse? Except the ones like water elementals as Dann said of course.



#11
rjshae

rjshae
  • Members
  • 4 491 messages

i think if CalcSafeLocation() could be used, it ensures than an object (at least a placeable) will be positioned *at ground level* on the z-axis

 

but this means dropping via script instead of the 'drop' flag ... (which is buggy anyway, lol)

 

Could you have a regular script that runs at the end of each combat, searches for any loot bags in the area, then relocates them using CalcSafeLocation()?



#12
kevL

kevL
  • Members
  • 4 061 messages

I'd try something like the area or even module heartbeat, or module onUnacquired event. Deciding when combat is finished could be done through the use of booleans and looping over creatures ( if in combat-> set true; if not set false)

but that'd have to fall back on a heartbeat anyway,

This issue has never actually happened to me, so i can't set up a test-case. ( also see Loot bag issues ) The tag for loot_bags is "BodyBag" i believe, if anyone wants to go further. But it would I believe be tricky to make robust, considering other items also get dropped, and contents of bags may have to be handled nontrivially, and even DestroyObject() could fire the onUnacquired event, as does using up a stack of potions eg.

The more i look at that route, the more complicated (and unworkable) it gets. CopyItem() seems problematic because it doesn't take a location argument, unlike CreateObject .... So i'm thinking the best solution would be to go with the onDeath event of creature, and do calcSafe -> CreateObject



ps. Overall i tend to agree with the idea it's an improperly baked walkmesh issue. That is, an area that's been baked but then subsequently had its terrain raised



#13
andysks

andysks
  • Members
  • 1 650 messages

Hmm... then why it happens on interiors as well? I mean, it could make sense to be honest to be bake related. Last it happened on an exterior where I had some dunes. Then I decided to place something there, so I flattened the terrain, smoothed... played with it. Then in testing after the fight loot bags were unclickable. But the thing is, after the mess with the surface, I rebaked. I always do, immediately after I do some change. Lootable corpse worked of course.

 

Ah, also, if an area has been baked and then subsequently had its terrain raised, you wouldn't see the changed but only if you rebake. So I guess the problem could be subsequently raised, but not rebaked? And this bring the previous statement, I rebaked. I always do, immediately after I do some change. So it's kind of a loop here...

 

Edit: Tchos said on that other post, which was the one I was thinking but couldn't find by the way, are you sure it's actually dropping a loot bag, and not just generating the glowing special effect?

 

Why would they generate this? I noticed that most, if not all of the creatures dropping the invisible bag are critters like beetles, or enemies on a trial let's say, where you have to kill waves of creatures and they shouldn't drop much because you get a reward in the end. I have to check... if that is the case.

 

But if companions can reach them, it means that there is something to reach. So even if it is the case of no loot, maybe it's not always...

 

Confused and sleepy, repeating what's already said and just writing my thoughts without providing anything useful... I will return to this tomorrow :D.



#14
kevL

kevL
  • Members
  • 4 061 messages

the walkmesh is getting ruled out ...

re. the effect: I've seen the effect remain after a bag was looted, but can't imagine a dropped effect w/out real loot ... iirc, the effect is applied at location rather than to the bag-object itself

/shrug


lootable corpses, you say never fall through the surface ...?



#15
Dann-J

Dann-J
  • Members
  • 3 161 messages

Could you have a regular script that runs at the end of each combat, searches for any loot bags in the area, then relocates them using CalcSafeLocation()?

 

I don't think you can 'jump' anything other than a creature. Loot bags and lootable corpses are considered placeables.

 

I have an OnExit script on my overland encounter areas that searches for all items (either dropped, in loot bags, or on corpses) and copies them to a rubbish pile outside of a nearby town if they're either 'plot' items or have a gold value above a certain level. Anything else gets destroyed by the area clean-up script. That way you don't lose any equipment or plot-related items if you drop them during an overland encounter for some reason (like being disarmed). The encounter areas are a good way of disposing of cheap crappy items that no-one will buy from you though.



#16
Tchos

Tchos
  • Members
  • 5 054 messages

When I've needed to relocate a dropped item, since jumping doesn't work on them, I use the function CopyObject, and then destroy the original.



#17
Dann-J

Dann-J
  • Members
  • 3 161 messages

When I've needed to relocate a dropped item, since jumping doesn't work on them, I use the function CopyObject, and then destroy the original.

 

I use CopyItem() quite a bit (I assume that's the one you meant). It has the advantage of copying any local variables as well.



#18
rjshae

rjshae
  • Members
  • 4 491 messages

ps. Overall i tend to agree with the idea it's an improperly baked walkmesh issue. That is, an area that's been baked but then subsequently had its terrain raised

 

Another possibility is Interior areas with an uneven floor. They can have a walkmesh that doesn't line up with the floor surface mesh. The number of allowed walkmesh faces are limited, so it can't always be a precise match.



#19
Tchos

Tchos
  • Members
  • 5 054 messages

Dann: Hm, yes, I checked my scripts, and I used CopyItem as you say, not CopyObject.



#20
andysks

andysks
  • Members
  • 1 650 messages

the walkmesh is getting ruled out ...

re. the effect: I've seen the effect remain after a bag was looted, but can't imagine a dropped effect w/out real loot ... iirc, the effect is applied at location rather than to the bag-object itself

/shrug


lootable corpses, you say never fall through the surface ...?

 

Not to my experience... I could always bypass the problem by making the creature as lootable corpse. But that was on edit and re-test. And as 4760 said, when he reloaded and fought again he could loot normally... so I don't know if the solution was there, or if it was just luck :D.



#21
kamal_

kamal_
  • Members
  • 5 250 messages

I had this happen twice in a row in a perfectly flat test area. Lootable corpse (suggested here) was not checked. The creature in question is a spawned in stock spider with a lootable item in it's inventory. I then implemented KevL's suggestion  and it worked for me reliably twice (I got two items, one via kevL's onDeath, and one from the standard inventory drop on death).