How to make all dropped weapons 100% preserved? -1 reply

Please wait...

10ar

The Internet ends at GF

50 XP

30th May 2007

0 Uploads

117 Posts

0 Threads

#1 10 years ago

A question regarding ‘OL2.2 Rust Protection (1.0)’ by Atrocious: What do I need to change in 'death_manager.script' in order to make all dropped weapons (by anyone, regardless of rank and faction) in perfect condition (100% preserved)?




Supernatur4L

Resident Stalker

50 XP

23rd July 2008

0 Uploads

615 Posts

0 Threads

#2 10 years ago
10ar;4570606A question regarding ‘OL2.2 Rust Protection (1.0)’ by Atrocious: What do I need to change in 'death_manager.script' in order to make all dropped weapons (by anyone, regardless of rank and faction) in perfect condition (100% preserved)?

Pretty sure its something here item:set_condition((math.random(10)+comm_modifier+rank_modifier)/100) --item:set_condition((math.random(50)+10)/100)

I think the item:set_condition that is commented out is the old one from OL so you can try commenting out the first line and in the second line put something like this

item:set_condition(100)

See if this works and let us know.




10ar

The Internet ends at GF

50 XP

30th May 2007

0 Uploads

117 Posts

0 Threads

#3 10 years ago
Supernatur4L;4570610Pretty sure its something here item:set_condition((math.random(10)+comm_modifier+rank_modifier)/100) --item:set_condition((math.random(50)+10)/100) I think the item:set_condition that is commented out is the old one from OL so you can try commenting out the first line and in the second line put something like this item:set_condition(100) See if this works and let us know.

It works! There are two lines with the same text so I changed both of them exactly as you've instructed me. I started a new game and it seems to work just fine. Thanks a lot Supernatur4L!




Supernatur4L

Resident Stalker

50 XP

23rd July 2008

0 Uploads

615 Posts

0 Threads

#4 10 years ago
10ar;4570715It works! There are two lines with the same text so I changed both of them exactly as you've instructed me. I started a new game and it seems to work just fine. Thanks a lot Supernatur4L!

:) Youre welcome.




Atrocious

Oblivion Lost supplier

50 XP

25th March 2008

0 Uploads

1,448 Posts

0 Threads

#5 10 years ago

Actually it should be item:set_condition(1.0) because Stalker counts those things from 0.0 to 1.0. 100 is a bit shot over the mark.

No need to start a new game, btw.




10ar

The Internet ends at GF

50 XP

30th May 2007

0 Uploads

117 Posts

0 Threads

#6 10 years ago
Atrocious;4570965Actually it should be item:set_condition(1.0) because Stalker counts those things from 0.0 to 1.0. 100 is a bit shot over the mark. No need to start a new game, btw.

OK, thank you. :)




Supernatur4L

Resident Stalker

50 XP

23rd July 2008

0 Uploads

615 Posts

0 Threads

#7 10 years ago

Atrocious;4570965Actually it should be item:set_condition(1.0) because Stalker counts those things from 0.0 to 1.0. 100 is a bit shot over the mark.

No need to start a new game, btw.

Hmm youd think math.random(50) would give you an integer between 1-50 and then adding 10 and dividing would give you a nicer integer to use. Not sure why it would drop it down to a range of 0.0-1.0 but good to know :)




Atrocious

Oblivion Lost supplier

50 XP

25th March 2008

0 Uploads

1,448 Posts

0 Threads

#8 10 years ago

I think math.random is a regular Lua function and on the other hand GSC seem to have decided that they like to store their stuff in floats from 0.0 to 1.0. Thus the difference.

That's why my calculation is divided by 100 at the end:

item:set_condition((math.random(10)+comm_modifier+ rank_modifier)/100)



Supernatur4L

Resident Stalker

50 XP

23rd July 2008

0 Uploads

615 Posts

0 Threads

#9 10 years ago

Just sitting here wondering if this is FAQ worthy. lolz I think its a nice tip.




10ar

The Internet ends at GF

50 XP

30th May 2007

0 Uploads

117 Posts

0 Threads

#10 10 years ago

The answer to my question was here: http://forums.filefront.com/s-t-l-k-e-r-soc-modding-editing/340033-s-t-l-k-e-r-oblivion-lost-kanyhalos-287.html#post4511590 The spoiler in Atrocious' post #4293. Anyway, thank you guys for answering my question.