Jump to content
The Dark Mod Forums

Lockpick-Key selection causes crash - Heart of Lone Salvation - 2.09


Zeen

Recommended Posts

Apologies in advance if this is a known problem, I haven't found any results from my search.

My Heart of Lone Salvation mission save started to crash whenever I tried to select lockpicks or keys. Other items (I tested potions, reading material) seem to be fine, but whenever I select lockpicks or keys the game freezes and crashes to desktop. I restarted the mission and it seem to run fine is there a way to solve this without restarting the mission?

If you want to try out, you can find my save at https://www.sendspace.com/file/yzn2qk

  • Thanks 1
Link to comment
Share on other sites

Quick workaround:

  1. Go to Settings \ Gameplay \ General.
  2. Set Use-by-frobbing to Disabled.
  3. Load the game and continue playing.

Note that with this setting disabled, you have to hit Enter on keyboard to apply keys and lockpicks to doors/locks.
I have checked that I can successfully lockpick something, but I can't be sure the game will work properly.

Also, please keep this crash-save around: most likely I'll ask you to test the fix when it is available.

 

Link to comment
Share on other sites

>	TheDarkModx64.exe!idPlayer::PerformFrob(EImpulseState impulseState, idEntity * target) Line 11496	C++
 	TheDarkModx64.exe!idClass::ProcessEventArgPtr(const idEventDef * ev, __int64 * data) Line 1047	C++
 	TheDarkModx64.exe!idInterpreter::CallEvent(const function_t * func, int argsize) Line 819	C++
 	TheDarkModx64.exe!idInterpreter::Execute() Line 1092	C++
 	TheDarkModx64.exe!idThread::Execute() Line 872	C++
 	TheDarkModx64.exe!idClass::ProcessEventArgPtr(const idEventDef * ev, __int64 * data) Line 1047	C++
 	TheDarkModx64.exe!idEvent::ServiceEvents() Line 598	C++
 	TheDarkModx64.exe!idGameLocal::RunFrame(const usercmd_t * clientCmds, int timestepMs) Line 3393	C++
 	TheDarkModx64.exe!idSessionLocal::RunGameTic(int timestepMs) Line 3072	C++
 	[Inline Frame] TheDarkModx64.exe!idSessionLocal::RunGameTics() Line 3114	C++
 	TheDarkModx64.exe!idSessionLocal::FrontendThreadFunction() Line 3160	C++
 	[Inline Frame] TheDarkModx64.exe!idSessionLocal::StartFrontendThread::__l2::<lambda_6b7828b12cf509cf76fb3406570c8cd1>::operator()(void *) Line 3254	C++
 	TheDarkModx64.exe!<lambda_6b7828b12cf509cf76fb3406570c8cd1>::<lambda_invoker_cdecl>(void * x) Line 3256	C++

Call stack is above.

Basically, stim-response script calls idEntity::Event_Frob on target entity WaterUpBut.
It redirects to idPlayer::PerformFrob, where idEntity* highlightedEntity = m_FrobEntity.GetEntity(); is NULL.
But later this pointer is used in if ( (item != NULL) && item->UseOnFrob() && highlightedEntity->CanBeUsedBy(item, true)), because some inventory item with "use on frob" is selected by player.

I assume in this FM and in this state the corresponding stim-response is generated repeatedly for some reason. So as soon as player decides to select key or lockpick, the game crashes on next event.


The main question is: if it is possible to generate a "frob" from game script, is it valid to take gameplay settings into account?
It means that FMs using this frob event will behave differently depending on gameplay settings, which is often very bad and can break mission.

Link to comment
Share on other sites

Here is the entity definition which generates response:

// entity 868
{
"classname" "atdm:mover_lever"
"name" "PlugLever"
"frobbox_size" "15"
"interruptable" "0"
"model" "PlugLever"
"move_time" "0.7"
"origin" "76.875 5432 233"
"rotate" "0 0 0"
"sr_class_1" "R"
"sr_effect_1_1" "effect_frob"
"sr_effect_1_1_arg1" "WaterUpBut"
"sr_state_1" "1"
"sr_type_1" "1000"
"target" "BathPlug"
"target2" "DrainOnlyWhenOpen"
"translate" "0 0 -29"
"trigger_on_close" "1"
"trigger_on_open" "1"
"trigger_when_opened" "0"

And here is one which generates the stim:

// entity 869
{
"classname" "atdm:mover_lever"
"name" "PouringWater"
"frobable" "0"
"model" "PouringWater"
"noShadows" "1"
"origin" "76.875 5456.13 337.937"
"rotate" "0 0 0"
"snd_move" "noSound"
"sr_class_1" "S"
"sr_radius_1" "32"
"sr_state_1" "1"
"sr_time_interval_1" "1000"
"sr_type_1" "1000"
"target" "WaterPouringSound"
"translate" "0 0 -110"

 

Link to comment
Share on other sites

@Zeen, I have published version "test_release209_5542" with this problem fixed (only in Windows build).

One can update to this version in tdm_installer, and check that it does not crash.
Set "tdm_force_savegame_load 1" in order to load existing savegame (saves are compatible with 2.09, but the game will complain).

I do not recommend leaving this version for playing though!
Just check that the issue is gone, then revert back to release209.

  • Thanks 1
Link to comment
Share on other sites

I'd like to ask @Dragofer,s advice here, since he has apparently used this "effect_frob" too.

When "effect_frob" response is triggered, or when ".frob()" method is called from the script: is it normal that player may apply lockpick/key he currently has selected to the frob target? Would it be OK if I disable this "use-by-frobbing" behavior for the cases when frob originates from a script/stim-response?

 

Link to comment
Share on other sites

@stgatilov
I don't think that effect/method is meant to use inventory items for the player, it would not be possible for lockpicks anyway because the player needs to hold down his key for those.

It's more meant to simulate that items are frobbed by the player, i.e. pressing a button as if the player had pressed it. My main use case is to make func_static items that, when frobbed, call a frob effect on an item in the blue room. This way I can give the player moveable inventory items like keys without risking that an explosion or other force has pushed the item to somewhere where it can't be found anymore.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...