death_manager.script error question. -1 reply

  • 1
  • 2

Please wait...

csoldier7

Slightly cooler than a n00b

50 XP

28th June 2009

0 Uploads

33 Posts

0 Threads

#1 9 years ago

I've tried to search for the answer and couldn't quite find what I was after I've been modifying O.L. 2.2 to feature a wider variety of weaponry in use by NPC's. Monolith for eg. are now packing a hell of a lot of AK47's and soldiers now use PKM's. That phase worked well and was easy enough to accomplish. However, I keep getting the following error when I try to alter the death_items_*.ltx files to have NPC's carry the corresponding ammo type in their 'corpse' inventory ( ie 7.62x39 ammo ) : ------------------------------------------ O.L.2.2 / patch 1.005 FATAL ERROR [error]Expression : fatal error [error]Function : CScriptEngine::lua_error [error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp [error]Line : 73 [error]Description : [error]Arguments : LUA error: ...\s.t.a.l.k.e.r\gamedata\scripts\death_manager.script:139: attempt to index field '?' (a nil value) stack trace: ----------------------------------- It seems if I leave 'death_items_by_levels.ltx' unmodified I do not experience any CTD errors. If I do modify that file, once in a while when a particular NPC dies I'll experience a CTD with the aforementioned error. So question being, even though I've followed the format for each death_items_*.ltx type file and I cannot see any grammatical errors in the coding, what would be causing the error and am I correct in guessing that line 139 is part of the following code from the death_managet.script file : ---------------------------------------- local spawn_items = item_by_community[self.npc:character_community()] if spawn_items then for k,v in pairs(spawn_items) do --' Ïî êàæäîìó îáúåêòó íåîáõîäèìî ïîëó÷èòü çàâèñèìîñòè if check_item_dependence(self.npc, k) == true then --' Ïî êàæäîìó îáúåêòó íåîáõîäèìî ïîëó÷èòü êîëè÷åñòâî local number = math.ceil(math.random(count_by_level[k].min, count_by_level[k].max)) --' Íåîáõîäèìî çàñïàâíèòü íóæíîå êîëè÷åñòâî. create_items(self.npc, k, number, v) end end end




otorojikku

GF makes me horny

50 XP

4th July 2008

0 Uploads

96 Posts

0 Threads

#2 9 years ago

i was trying to do the same thing :) i haven't tried this yet, but i dont think the 7.62x39 ammo is in the gamedata\config\mp\mp_ranks.ltx file, which might be the cause of the crash. try adding it to the line with all the other ammo types, i think the begining has the word "auto" in it. anyways, try that and tell me if it works, cause i'd like to know.




csoldier7

Slightly cooler than a n00b

50 XP

28th June 2009

0 Uploads

33 Posts

0 Threads

#3 9 years ago

mp_ranks.ltx aye? Is that a specific multiplayer file or is it just a different reference? Well in regards to my problem, I decided to take an incremental approach. I went back to the default O/L 2.2 'death_items_*.ltx files' and simply added the ability for weapons like the Tec-9 and the Benelli Short to be used by NPC's and to then have the corresponding ammo in the NPC corpse inventory. This worked without any errors (at this stage). Now I've added 7.62x39_fmj for NPC AK-47's and it appears to be working. I'll next add 5.7x28 and see how that goes. As for avoiding any death_manager.script related errors, I did notice that the w_pkm.ltx file I was using, did not have a reference to 'ammo_7.62x54_ap', only 'ammo_7.62x54r', when I did reference both ammo types in the 'death_items_*.ltx files'. So having added 'ammo_7.62x54_ap' back to the w_pkm.ltx file, I have not yet had any errors....




WARCATT

I'm Working on it!!!

50 XP

14th September 2008

0 Uploads

424 Posts

0 Threads

#4 9 years ago

why are you packing the monolith with ak47's? I mean you can mod it anyway you want or adjust it anyway you want, even I have. I was only woundering cause they are part of whats going on. when you put it all togeather including the claim the Russia in real life has its own area 51, the scientist were basicly experimenting with alien tech and it went wrong. The monolith faction is basicly a security force to protect the Zone from you. look at there faces, they look like zombies. I am just woundering why would you pack with something old instead of something advance. I am not knocking it, just woundering. wouldn't the stalkers like in the coradon be more of a canidate to have the older weapons carring them around instead of the 74's were the military would carry the 74's? woulder if I could change that? I pack the monolith with m200's and the stalkers with ak47's...humm...




csoldier7

Slightly cooler than a n00b

50 XP

28th June 2009

0 Uploads

33 Posts

0 Threads

#5 9 years ago

Bear in mind I've extensively modified the weapon and ammo stats to make them more realistic in terms of effectiveness and terminal ballistics. So an AK47 is just as effective as an AK74, if not a tad more so, in general. Both fire light/medium weight, non-expanding spitzer type bullets for eg. In addition C-Conciousness or not, by all rights there should be more 7.62x39 and 5.45x39 lying around Chernobyl than 5.56x45Nato. But mainly for a differentiation from the other factions. Rather than having Monolith, Svoboda, Dolg and the Mercs all using the same pool of weaponry, I figured I'd diversify the options. The way I've altered the ' character_desc_* ' files, all I've done is remove 5.56x45Nato and Gauss (I find the gauss rifle to be boring) weapons from the Monolith. They still use AK74's and AN94's, but they now also use Saiga12c's, AK47's and PKM's.

look at there faces, they look like zombies.

Exactly, in my mind, Monolith are more 'decrepit' than other factions hence my choice to give them more rugged weaponry. As for the other factions. I've given Bandit's basically everything under the sun, except Gauss and heavy weaponry. Stalker novices use a wider variety of more straightforward weaponry (Toz34, Tec9's, Mosin Nagant's). Mercs use FN P90's instead of Mac10's. Lower ranked soldiers don't have pistols but they do have the occasional PKM, SVD or even an RPG or to. Specnaz use more Bizon SMG's. I've even given Freedom a MG3 or two. So if nothing else, I wanted to see a bit more than just a constant stream of PM's, MP5's, G36's and Sawn off's. As for my initial problem, once I blanked out ( ; ) references to 'ammo_7.62x54_ap' the errors ceased, however when I listed 'ammo_7.62x54_ap' again the errors reoccured. So it would seem to have something to do with 'ammo_7.62x54_ap'.




otorojikku

GF makes me horny

50 XP

4th July 2008

0 Uploads

96 Posts

0 Threads

#6 9 years ago

I can't figure out how to make people spawn with the 7.62x39 ammo properly, first it wouldn't even show up, I edited it more and now both fmj and ap spawn in their inventory regardless what I put in character_desc*.xml

Help?




csoldier7

Slightly cooler than a n00b

50 XP

28th June 2009

0 Uploads

33 Posts

0 Threads

#7 9 years ago
now both fmj and ap spawn in their inventory

I had that occur briefly as well, so I just made sure all references to 'ammo_7.62x39_ap' in the 'death_items_*.ltx' files were of the exact same format as other ammo types.




WARCATT

I'm Working on it!!!

50 XP

14th September 2008

0 Uploads

424 Posts

0 Threads

#8 8 years ago
csoldier7;4977678Bear in mind I've extensively modified the weapon and ammo stats to make them more realistic in terms of effectiveness and terminal ballistics. So an AK47 is just as effective as an AK74, if not a tad more so, in general. Both fire light/medium weight, non-expanding spitzer type bullets for eg. In addition C-Conciousness or not, by all rights there should be more 7.62x39 and 5.45x39 lying around Chernobyl than 5.56x45Nato. But mainly for a differentiation from the other factions. Rather than having Monolith, Svoboda, Dolg and the Mercs all using the same pool of weaponry, I figured I'd diversify the options. The way I've altered the ' character_desc_* ' files, all I've done is remove 5.56x45Nato and Gauss (I find the gauss rifle to be boring) weapons from the Monolith. They still use AK74's and AN94's, but they now also use Saiga12c's, AK47's and PKM's. Exactly, in my mind, Monolith are more 'decrepit' than other factions hence my choice to give them more rugged weaponry. As for the other factions. I've given Bandit's basically everything under the sun, except Gauss and heavy weaponry. Stalker novices use a wider variety of more straightforward weaponry (Toz34, Tec9's, Mosin Nagant's). Mercs use FN P90's instead of Mac10's. Lower ranked soldiers don't have pistols but they do have the occasional PKM, SVD or even an RPG or to. Specnaz use more Bizon SMG's. I've even given Freedom a MG3 or two. So if nothing else, I wanted to see a bit more than just a constant stream of PM's, MP5's, G36's and Sawn off's. As for my initial problem, once I blanked out ( ; ) references to 'ammo_7.62x54_ap' the errors ceased, however when I listed 'ammo_7.62x54_ap' again the errors reoccured. So it would seem to have something to do with 'ammo_7.62x54_ap'.

Well I wanted to arm the stalkers with AK47's and as for the monolith I reserved 2 guns as gauss weapons, on hand gun and a assult rifle. they have been done, and work great, light and all. and arm them with that as well as all sniper monolith use the sniper gauss gun that is there (since they seem to be the only ones with it). were do I find this to arm them like you did?




csoldier7

Slightly cooler than a n00b

50 XP

28th June 2009

0 Uploads

33 Posts

0 Threads

#9 8 years ago

What I did was replace the weapon and ammo references in the ' character_desc_*.xml ' files found in E:\S.T.A.L.K.E.R\gamedata\config\gameplay\. For eg. : [spawn] \n wpn_sig220 \n ammo_11.43x23_fmj \n wpn_lr300 \n ammo_5.56x45_ap = 1 \n device_torch \n #include "gameplay\character_drugs.xml" has been altred to : [spawn] \n wpn_colt1911 \n ammo_11.43x23_fmj \n wpn_ak47 \n ammo_7.62x39_fmj = 1 \n device_torch \n #include "gameplay\character_drugs.xml" Then I altered the ' death_items_*.ltx ' files accordingly, keeping in line with the coding format of each file, to add the extra references of the other weapon and ammo types.




WARCATT

I'm Working on it!!!

50 XP

14th September 2008

0 Uploads

424 Posts

0 Threads

#10 8 years ago

It worked, I went through every file regarding the monolith and set the weapon loadout for the modified guns, had to do a restart to make it work right, lol it was great! first time freedom could not hold the line at the the military. I had to make a run for it! they chased me into freedom base were they attacked that too, almost invaded it. it was great. actors\monolit\stalker_mo_komandir [spawn] \n wpn_hpsa \n ammo_gauss = 3 \n wpn_gauss \n ammo_gauss = 5 \n I also went and armed the military Speznic whith m2000, and the ecolgist with the lr85. I did adjust the death _genric.ltx only, now the ammo and guns they carry can be found on them...thanks! ammo_gauss = wpn_gauss, wpn_vintorez, wpn_hpsa




  • 1
  • 2