BREAKTHROUGH! - Wounded NPC Crash Solved!!!!
(Games : S.T.A.L.K.E.R.: Call of Pripyat : Mods : MISERY : Forum : Mod optimization : BREAKTHROUGH! - Wounded NPC Crash Solved!!!!)
|
Locked
|
Thread Options
|
|
|
Aug 24 2013
Anchor
|
I put out a call in this thread List of required fixes days ago hoping people could send me their saves to solve the problem with crashing while trying to help wounded friendly NPC's, as I was on the verge of a breakthrough. Well thanks to no-one I have found the solution.
After extensive testing I dicovered the cause of the problem is a faulty return value in the function "npc_is_not_surrendered(a,b)" in the dialogs.script
This function in dialogs.script:
function npc_is_not_surrendered(a,b)
local npc = who_is_npc(a, b)
local st = db.storage[npc:id()]
local po = st and st.victim_surrender and level.object_by_id(st.victim_surrender)
if not (po) then
return false
end
return po:id() ~= db.actor:id()
end
should be changed to:
function npc_is_not_surrendered(a,b)
local npc = who_is_npc(a, b)
local st = db.storage[npc:id()]
local po = st and st.victim_surrender and level.object_by_id(st.victim_surrender)
if not (po) then
return true
end
return po:id() ~= db.actor:id()
end
It should return "true", not "false"
This works on both the 2.0.1 version and 2.0.2 versions of dialog_manager.ltx. didn't test 2.0's version but I don't see why it wouldn't
I have tested this by dropping a mine in front of a group of stalkers then healing the wounded, then by doing the dredge station several times and shooting the stalkers in the leg until they are crying like girls on the floor. Because I never had anyone get me copies of their saves so I could test some more with the other factions, I'm not 100% sure if it works on them but I don't see why it wouldn't.
Quick Note: I'm almost 100% certain that it is random whether or not an enemy NPC surrenders, I have found that if they do not get up off the floor so you can talk to them you can quicksave/quickload until they do
Enjoy
Edited by: Yastiandrie
|
|
Aug 24 2013
Anchor
|
We will have to think about a proper way of honouring you for that
Yastiandrie seems like a cool name for NPC or a weapon
Which would you prefer?
|
|
Aug 24 2013
Anchor
|
trojanuch wrote: We will have to think about a proper way of honouring you for that
Yastiandrie seems like a cool name for NPC or a weapon
Which would you prefer?
Lol well I don't mind either way, Yasti or Yasti's is probably better for a weapon though instead of the full nick heh
|
|
Aug 24 2013
Anchor
|
thank you very much, so is this the no reason crash always happening in game?
-- "One doesn't simply go into the Zone without a good equipment"
Good equip. means worn sawn-off shotgun and Abs. Vodka
- GenezisO
Massive feedback lead to this, keep it coming Gen!
- [TZP] LoNer1
|
|
Aug 24 2013
Anchor
|
Wow this is great man! Thanks for fixing this.
|
|
Aug 24 2013
Anchor
|
GenezisO wrote: thank you very much, so is this the no reason crash always happening in game?
I'm not sure what the no reason crash is but it fixes the crash when you try to give a wounded npc a medkit
|
|
Aug 24 2013
Anchor
|
Yastiandrie wrote:
GenezisO wrote: thank you very much, so is this the no reason crash always happening in game?
I'm not sure what the no reason crash is but it fixes the crash when you try to give a wounded npc a medkit
Ok, I have looked into that dialog_manager file but there is nothing like in the first code you posted here, so I can't change it into good one then
there is only one dialog_manager file yup?
-- "One doesn't simply go into the Zone without a good equipment"
Good equip. means worn sawn-off shotgun and Abs. Vodka
- GenezisO
Massive feedback lead to this, keep it coming Gen!
- [TZP] LoNer1
|
|
Aug 24 2013
Anchor
|
GenezisO wrote:
Yastiandrie wrote:
GenezisO wrote: thank you very much, so is this the no reason crash always happening in game?
I'm not sure what the no reason crash is but it fixes the crash when you try to give a wounded npc a medkit
Ok, I have looked into that dialog_manager file but there is nothing like in the first code you posted here, so I can't change it into good one then
there is only one dialog_manager file yup?
it's dialogs.script in gamedata\scripts
I added the mention about dialogs.ltx (which is in gamedata\configs\misc) because that lists what dialog to say to what npc faction (in conjuction with the xml file), and it has been changed in every update
Edited by: Yastiandrie
|
|
Aug 24 2013
Anchor
|
Yastiandrie wrote:
GenezisO wrote:
Yastiandrie wrote:
GenezisO wrote: thank you very much, so is this the no reason crash always happening in game?
I'm not sure what the no reason crash is but it fixes the crash when you try to give a wounded npc a medkit
Ok, I have looked into that dialog_manager file but there is nothing like in the first code you posted here, so I can't change it into good one then
there is only one dialog_manager file yup?
it's dialogs.script in gamedata\scripts
ok
Yastiandrie wrote:
GenezisO wrote: thank you very much, so is this the no reason crash always happening in game?
I'm not sure what the no reason crash is but it fixes the crash when you try to give a wounded npc a medkit
BTW, how this can be still bug in game? I was able to heal Petruha near flame anomaly in Zaton, he gives you detector then and I had no crash
Edited by: ☣GenezisO☢
-- "One doesn't simply go into the Zone without a good equipment"
Good equip. means worn sawn-off shotgun and Abs. Vodka
- GenezisO
Massive feedback lead to this, keep it coming Gen!
- [TZP] LoNer1
|
|
Aug 24 2013
Anchor
|
GenezisO wrote:
If its so, then change this line in first post here, because its wrong:
"This works on both the 2.0.1 version and 2.0.2 versions of dialog_manager.ltx. didn't test 2.0's version but I don't see why it wouldn't"
Should it be like this:
"This works on both the 2.0.1 version and 2.0.2 versions of dialogs.script didn't test 2.0's version but I don't see why it wouldn't"
Yastiandrie wrote: I put out a call in this thread List of required fixes days ago hoping people could send me their saves to solve the problem with crashing while trying to help wounded friendly NPC's, as I was on the verge of a breakthrough. Well thanks to no-one I have found the solution.
After extensive testing I dicovered the cause of the problem is a faulty return value in the function "npc_is_not_surrendered(a,b)" in the dialogs.script
This function in dialogs.script:
function npc_is_not_surrendered(a,b)
local npc = who_is_npc(a, b)
local st = db.storage[npc:id()]
local po = st and st.victim_surrender and level.object_by_id(st.victim_surrender)
if not (po) then
return false
end
return po:id() ~= db.actor:id()
end
should be changed to:
function npc_is_not_surrendered(a,b)
local npc = who_is_npc(a, b)
local st = db.storage[npc:id()]
local po = st and st.victim_surrender and level.object_by_id(st.victim_surrender)
if not (po) then
return true
end
return po:id() ~= db.actor:id()
end
It should return "true", not "false"
This works on both the 2.0.1 version and 2.0.2 versions of dialog_manager.ltx. didn't test 2.0's version but I don't see why it wouldn't
GenezisO wrote:
BTW, how this can be still bug in game? I was able to heal Petruha near flame anomaly in Zaton, he gives you detector then and I had no crash
That instance is pre-scripted (dialogs_zaton.script i believe) so it will always work
This fixes non-scripted wounded npc's
Edited by: Yastiandrie
|
|
Aug 24 2013
Anchor
|
nice job :o
how can i put that into my cop so i mean that awesome fix
*or is it include the new 2.0.2 hotfix?:)
Edited by: epoz1234
|
|
Aug 24 2013
Anchor
|
Where exactly is this file in the Stalker folder?
|
|
Aug 24 2013
Anchor
|
epozbeatz wrote: nice job :o
how can i put that into my cop so i mean that awesome fix
Go to cop install directory\gamedata\scripts
Open dialogs.script preferably with notepad++ but I think normal notepad may work
Find the function I've put in the first code box in the first post (should be the second function from top)
Change it so it says "return true" instead of "return false" (so it looks like 2nd code box)
Save and you're done. No new game required
Edited by: Yastiandrie
|
|
Aug 24 2013
Anchor
|
Yastiandrie wrote:
epozbeatz wrote: nice job :o
how can i put that into my cop so i mean that awesome fix
Go to cop install directory\gamedata\scripts
Open dialogs.script preferably with notepad++ but I think normal notepad may work
Find the function I've put in the code box in the first post (should be the second function from top)
Change it so it says "return true" instead of return "false"
Save and you're done. No new game required
Thanks,im done
gonna try it as soon as i see a wounded stalker in my new playthru
|
|
Aug 24 2013
Anchor
|
epozbeatz wrote:
Yastiandrie wrote:
epozbeatz wrote: nice job :o
how can i put that into my cop so i mean that awesome fix
Go to cop install directory\gamedata\scripts
Open dialogs.script preferably with notepad++ but I think normal notepad may work
Find the function I've put in the code box in the first post (should be the second function from top)
Change it so it says "return true" instead of return "false"
Save and you're done. No new game required
Thanks,im done
gonna try it as soon as i see a wounded stalker in my new playthru
Easy way to test it is to drop mines in the path of wandering stalkers heh. Not the ied's though they're too powerful lol. Learnt that the hard way
|
|
Aug 24 2013
Anchor
|
Yastiandrie wrote:
GenezisO wrote:
If its so, then change this line in first post here, because its wrong:
"This works on both the 2.0.1 version and 2.0.2 versions of dialog_manager.ltx. didn't test 2.0's version but I don't see why it wouldn't"
Should it be like this:
"This works on both the 2.0.1 version and 2.0.2 versions of dialogs.script didn't test 2.0's version but I don't see why it wouldn't"
Yastiandrie wrote: I put out a call in this thread List of required fixes days ago hoping people could send me their saves to solve the problem with crashing while trying to help wounded friendly NPC's, as I was on the verge of a breakthrough. Well thanks to no-one I have found the solution.
After extensive testing I dicovered the cause of the problem is a faulty return value in the function "npc_is_not_surrendered(a,b)" in the dialogs.script
This function in dialogs.script:
function npc_is_not_surrendered(a,b)
local npc = who_is_npc(a, b)
local st = db.storage[npc:id()]
local po = st and st.victim_surrender and level.object_by_id(st.victim_surrender)
if not (po) then
return false
end
return po:id() ~= db.actor:id()
end
should be changed to:
function npc_is_not_surrendered(a,b)
local npc = who_is_npc(a, b)
local st = db.storage[npc:id()]
local po = st and st.victim_surrender and level.object_by_id(st.victim_surrender)
if not (po) then
return true
end
return po:id() ~= db.actor:id()
end
It should return "true", not "false"
This works on both the 2.0.1 version and 2.0.2 versions of dialog_manager.ltx. didn't test 2.0's version but I don't see why it wouldn't
GenezisO wrote:
BTW, how this can be still bug in game? I was able to heal Petruha near flame anomaly in Zaton, he gives you detector then and I had no crash
That instance is pre-scripted (dialogs_zaton.script i believe) so it will always work
This fixes non-scripted wounded npc's
I got it finaly, thanks
-- "One doesn't simply go into the Zone without a good equipment"
Good equip. means worn sawn-off shotgun and Abs. Vodka
- GenezisO
Massive feedback lead to this, keep it coming Gen!
- [TZP] LoNer1
|
|
Aug 24 2013
Anchor
|
Just a note guys: The latest 2.0.2 QF (revision B) patch has this fix incorporated. You only need to adjust this yourself if you are using a previous version
|
|
Aug 25 2013
Anchor
|
a little bit late but it works!
again good job Yastiandrie:)
|
|
Aug 25 2013
Anchor
|
I don't really understand, I never had the game crash when talking to a downed stalker...
|
|
Aug 25 2013
Anchor
|
Haraldx wrote: I don't really understand, I never had the game crash when talking to a downed stalker...
You never had the game crash while trying to give a friendly wounded NPC a medkit?
|
|
Aug 26 2013
Anchor
|
Yastiandrie wrote:
Haraldx wrote: I don't really understand, I never had the game crash when talking to a downed stalker...
You never had the game crash while trying to give a friendly wounded NPC a medkit?
Nope, never.
-- Thanks & Best Regards,
-Мохамед
|
|
Aug 26 2013
Anchor
|
mrmohamed2001 wrote:
Yastiandrie wrote:
Haraldx wrote: I don't really understand, I never had the game crash when talking to a downed stalker...
You never had the game crash while trying to give a friendly wounded NPC a medkit?
Nope, never.
It is only one of thousand evidence that MISERY 2 has the weirdest buggs ever. Each player has different problems.
-- "One doesn't simply go into the Zone without a good equipment"
Good equip. means worn sawn-off shotgun and Abs. Vodka
- GenezisO
Massive feedback lead to this, keep it coming Gen!
- [TZP] LoNer1
|