OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

Make empty corpses non selectable

Open AlexJakeGreen opened this issue 3 years ago • 1 comments

If a lot of monsters killed around, it is hard to loot them because each time the same empty corpse is highlighted for selection. It would be good if empty corpses are not possible to be selected.

AlexJakeGreen avatar Sep 08 '22 09:09 AlexJakeGreen

On one hand, I'm absolutely in agreement; hunting a pack of wolves in the forest and then making sure all of them are looted, that takes some time. On the other hand, it might make sense for at least named NPC corpses to keep displaying their name even if they don't have anything on them. So maybe just beasts? Just "generic" entities without a given name? Possibly not making them non-selectable outright, but just disable the name + hitpoint overlay for easier distiction?

Nindaleth avatar Sep 12 '22 11:09 Nindaleth

Can you apply and test this change. Worked for me in a quick run.

https://github.com/Try/OpenGothic/blob/507bcd6ec1799ab4fb3c2cb14fbbb0d4b58c9a8a/game/world/worldobjects.cpp#L719

-  return r ? r->get() : nullptr;
+  if(r!=nullptr && (!r->get()->isDead() || r->get()->inventory().iterator(Inventory::T_Ransack).isValid()))
+    return r->get();
+  return nullptr;

thokkat avatar Nov 18 '22 15:11 thokkat

Quick googling around, shows that same functionality exists in SystemPack: https://steamcommunity.com/sharedfiles/filedetails/?id=2732502887

// SystemPack.ini 
Show_FPS_Counter - change it to 1 to show current FPS in the upper left corner.
NewFOVformula - if you are experiencing stretched screen change it to 0.
HideFocus - change it to 1 and dead NPCs with empty inventory will not be available to loot. No more "Nothing there".
Scale - change it to 0 to have smaller UI. Better for inventory browsing.

My suggestion here is to implement compatibility layer, that reads SystemPack.ini and hides focus only, if parameter is HideFocus is set to one

Try avatar Nov 19 '22 17:11 Try

Yeah plan was to make this a customizable setting. I can incorporate it into my ini file PR. A Problem could be different default values. Show_FPS_Counter is 0 in SystemPack.ini but 1 in OpenGothic.

thokkat avatar Nov 19 '22 18:11 thokkat

Show_FPS_Counter is 0 in SystemPack.ini but 1 in OpenGothic.

Should also be 0 for Release/RelDebug builds

Try avatar Nov 19 '22 18:11 Try

It's shown in release build.-noFrate flag was introduced to disable the fps counter, see https://github.com/Try/OpenGothic/pull/58.

thokkat avatar Nov 19 '22 23:11 thokkat