ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Randomize Damage and Alcoholic Medkits?

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  03:45:51  10 August 2020
profilee-mailreply Message URLTo the Top
Hammru
(Novice)
 
On forum: 07/13/2010
Messages: 10
Randomize Damage and Alcoholic Medkits?

Hello Friends!

I've decided to do some more modding of this great game. There are a couple of things I believe are possible to do, but I don't know how to do them.

First, I think it would be interesting to randomize damage when someone gets shot. For example the actual damage dealt might be between .1 and 2x the normal damage. I don't know what range of values would be good, so if you have opinions feel free to share.

Second, I want medkits to give a small alcohol effect to throw your aim off. The easy way to do this is just change their class to II_BOTTL and give them a eat_alcohol value, but this removes the ability to bind them to a key for instant use.

It looks like scripting could accomplish both of these things, but I don't know where to even begin with that.
  11:58:22  11 August 2020
profilee-mailreply Message URLTo the Top
100RadsBar
100RadsBar - Formerly known as LoboTheMan
(Resident)

 

 
On forum: 06/03/2009
Messages: 1702

---QUOTATION---
Randomize Damage and Alcoholic Medkits?

Hello Friends!

I've decided to do some more modding of this great game. There are a couple of things I believe are possible to do, but I don't know how to do them.

First, I think it would be interesting to randomize damage when someone gets shot. For example the actual damage dealt might be between .1 and 2x the normal damage. I don't know what range of values would be good, so if you have opinions feel free to share.

Second, I want medkits to give a small alcohol effect to throw your aim off. The easy way to do this is just change their class to II_BOTTL and give them a eat_alcohol value, but this removes the ability to bind them to a key for instant use.

It looks like scripting could accomplish both of these things, but I don't know where to even begin with that.
---END QUOTATION---




Edit the items.ltx (found in gamedata\config\misc\

Try to add this line:
eat_alcohol = 0.2

To the section:

; eatable item
eat_health = 0.5
eat_satiety = 0
eat_power = 0.0
eat_radiation = -0.01
wounds_heal_perc = 0.1
eat_portions_num = 1
eat_max_power = 0.1

This should add the drunk effect when using a medkit
You can test with different values to get the desired effect, and the length of the effect.
  12:12:38  11 August 2020
profilee-mailreply Message URLTo the Top
Hammru
(Novice)
 
On forum: 07/13/2010
Messages: 10
Doesn't work unless the class is changed to II_BOTTL, which removes the ability to use medkits with a convenient keystroke.
  15:40:16  13 August 2020
profilee-mailreply Message URLTo the Top
Hammru
(Novice)
 
On forum: 07/13/2010
 

Message edited by:
Hammru
08/13/2020 15:41:21
Messages: 10
Ok, I've got the basic idea down for the alcoholic medkits.

The idea behind this is that I want a camera effect to make aiming difficult for a short period of time. Just for testing purposes I'm using the end-game earthquake effect, because that was easy for me to figure out. The next step is to get a camera effect that is more appropriate for my needs; the earthquake is too extreme and it lasts too long. I see that there is a "drunk.anm", but if I just swap that in it does the full falling to the ground animation. I only want a gentle wobble.


function actor_binder:medkitCamera(obj)
if (obj:clsid()==74) then
_z.show_blinking_msg("Medkit Used!" )
level.add_cam_effector("camera_effects\\earthquake.anm", 1974, false, "" )
else
_z.show_blinking_msg("Not a Medkit!" )
end
end


The show_blinking_msg I think comes from ZRP. I couldn't figure out any other ways to communicate debug information to myself on-screen.


For randomizing damage I realized there's another (and possibly better) way of achieving the same goal. If I can randomly spawn some enemies with less than normal max HP and some with more than normal HP that would also be good. I don't know how to do this yet, but it might be easier than changing actual bullet damages.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2020 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.