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

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...