IPB

Welcome Guest ( Log In | Register )

Health Regen [TUT on post 4], How to get work
Wild-thing
post Dec 21 2008, 08:42 AM
Post #1


Captain
***

Group: Soldiers
Posts: 83
Joined: 23-September 08
Member No.: 5,639



i just want to know how i can get the health regen work.
here my us_light_solider.tweak
CODE
GeometryTemplate.setSubGeometryLodDistance 1 0 10
GeometryTemplate.setSubGeometryLodDistance 1 1 20

ObjectTemplate.active us_light_soldier
ObjectTemplate.networkableInfo BasicInfo
ObjectTemplate.hasMobilePhysics 1
rem ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.collisionGroups 16
ObjectTemplate.CullRadiusScale 2.5
ObjectTemplate.castsDynamicShadow 1
ObjectTemplate.aiTemplate Soldier
ObjectTemplate.abilityRestoreRate 0.05
ObjectTemplate.abilityInVehicleRadius 7
ObjectTemplate.abilityInVehicleStrength 0.25
ObjectTemplate.abilityInVehicleMaterial 73

rem For adding lightflare at item index 7 --jkj
ObjectTemplate.inventorySize 11

ObjectTemplate.manDownCameraOffsetInDof 0.11
ObjectTemplate.manDownCameraOffsetInUp 0.5
ObjectTemplate.ragdollLandedDelay 4

ObjectTemplate.drag 1.0
ObjectTemplate.mass 100
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.SprintRecoverTime 17
ObjectTemplate.SprintDissipationTime 10
ObjectTemplate.SprintLimit 0.05
ObjectTemplate.SprintLossAtJump 0.15
rem ObjectTemplate.Grip 20

rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 100
ObjectTemplate.armor.hitPoints 100
ObjectTemplate.armor.defaultMaterial 24
ObjectTemplate.armor.wreckhitpoints 320
ObjectTemplate.armor.explosionForceMod 25
ObjectTemplate.armor.explosionForceMax 1000
ObjectTemplate.armor.TimeToStayAsWreck 6
ObjectTemplate.armor.timeToStayAfterDestroyed 1
ObjectTemplate.armor.angleMod 1
ObjectTemplate.armor.wreckExplosionForceMod 0
ObjectTemplate.armor.wreckExplosionForceMax 0
rem ---EndComp ---
rem ---BeginComp:ReplenishingAmmoComp ---
ObjectTemplate.createComponent ReplenishingAmmoComp
ObjectTemplate.ammo.magSize 0
ObjectTemplate.ammo.reloadTime 0
ObjectTemplate.ammo.minimumTimeUntilReload 0
ObjectTemplate.ammo.autoReload 0
ObjectTemplate.ammo.instantReloadOnEnable 0
ObjectTemplate.ammo.toggleWhenNoAmmo 0
ObjectTemplate.ammo.abilityDrain 0.05
ObjectTemplate.ammo.abilityRadius 4
ObjectTemplate.ammo.abilityStrength 5.3
ObjectTemplate.ammo.abilityCost 0.33
ObjectTemplate.ammo.abilityMaterial 73
ObjectTemplate.ammo.replenishingType RTHeal
rem ---EndComp ---
ObjectTemplate.createComponent Ability
ObjectTemplate.ability.hasHealingAbility 1

ObjectTemplate.radius 5
ObjectTemplate.workOnVehicles 1
ObjectTemplate.healSpeed 5
ObjectTemplate.refillAmmoSpeed 7
ObjectTemplate.healStorageSize 0
ObjectTemplate.ammoStorageSize 0
ObjectTemplate.sharedStorageSize 500
ObjectTemplate.destroyWhenEmptyStorage 1
ObjectTemplate.otherCollisionLod 2
ObjectTemplate.visibleOn3dMap 1
ObjectTemplate.3dMapIcon 24
rem ---BeginComp:Radio ---
ObjectTemplate.createComponent Radio
ObjectTemplate.Radio.spottedMessage infantry_spotted
rem ---EndComp ---
ObjectTemplate.collisionMesh Soldier_CollisionMesh
rem *** Animation ****
ObjectTemplate.skeleton1P Objects/Soldiers/Common/Animations/1p_setup.ske
ObjectTemplate.skeleton3P Objects/Soldiers/Common/Animations/3p_setup.ske
ObjectTemplate.animationSystem1P Objects/Soldiers/Common/Animations/AnimationSystem1p.inc
ObjectTemplate.animationSystem3P Objects/Soldiers/Common/Animations/AnimationSystem3p.inc
rem Stand
ObjectTemplate.poseCameraPosition 0 0/0.47/0.1
rem Crouch
ObjectTemplate.poseCameraPosition 1 0/-0.05/0.1
rem Prone
ObjectTemplate.poseCameraPosition 2 0/-0.63/0.1

rem boneName, material, offset, radius, length
ObjectTemplate.setSkeletonCollisionBone left_upperleg 24 0/0.03/0 0.09 -0.35
ObjectTemplate.setSkeletonCollisionBone right_upperleg 24 0/0.03/0 0.09 0.35

ObjectTemplate.setSkeletonCollisionBone left_lowerleg 77 0/0.03/0.02 0.08 -0.32
ObjectTemplate.setSkeletonCollisionBone right_lowerleg 77 0/0.03/0.02 0.08 0.32

ObjectTemplate.setSkeletonCollisionBone head 25 0/-0.02/0.02 0.07 -0.08
ObjectTemplate.setSkeletonCollisionBone spine2 24 0/-0.05/-0.03 0.15 -0.16
ObjectTemplate.setSkeletonCollisionBone spine3 24 0/-0.03/0.02 0.16 -0.05

ObjectTemplate.setSkeletonCollisionBone right_shoulder 77 0.01/0.03/0 0.06 0.2
ObjectTemplate.setSkeletonCollisionBone right_low_arm 77 -0.01/0.03/0 0.045 0.18

ObjectTemplate.setSkeletonCollisionBone left_shoulder 77 0.01/0.03/0 0.06 -0.2
ObjectTemplate.setSkeletonCollisionBone left_low_arm 77 -0.01/0.03/0 0.045 -0.18

ObjectTemplate.addTemplate SoldierCamera
ObjectTemplate.setPosition 0/4.1/0
ObjectTemplate.addTemplate e_sold_swim

ObjectTemplate.active S_us_light_soldier_Death
ObjectTemplate.createdInEditor 1
ObjectTemplate.soundFilename common/sound/Die/Die_01.wav,common/sound/Die/Die_02.wav,common/sound/Die/Die_03.wav,
common/sound/Die/Die_04.wav,common/sound/Die/Die_05.wav,common/sound/Die/Die_06.wav,common/sound/Die/Die_07.wav,common/sound/Die/Die_08.wav,
common/sound/Die/Die_09.wav,common/sound/Die/Die_10.wav,common/sound/Die/Die_11.wav,common/sound/Die/Die_12.wav,common/sound/Die/Die_13.wav,
common/sound/Die/Die_14.wav,common/sound/Die/Die_15.wav
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 1
ObjectTemplate.reverbLevel 0.8
ObjectTemplate.position 0/0.8/0
ObjectTemplate.pitch 0.98
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.98/1.03/
ObjectTemplate.volumeEnvelope 0/1/0/1/0/0/
ObjectTemplate.minDistance 2
ObjectTemplate.halfVolumeDistance 6


ObjectTemplate.active S_us_light_soldier_Revive
ObjectTemplate.createdInEditor 1
ObjectTemplate.soundFilename Objects/Soldiers/Common/Sound/Cough/cough_01.wav,
Objects/Soldiers/Common/Sound/Cough/cough_02.wav,
Objects/Soldiers/Common/Sound/Cough/cough_03.wav,
Objects/Soldiers/Common/Sound/Cough/cough_04.wav
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 0.75
ObjectTemplate.reverbLevel 0.8
ObjectTemplate.position 0/0/0
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.99/1.01/
ObjectTemplate.volumeEnvelope 0/1/0/1/0/0/
ObjectTemplate.minDistance 1.5


ObjectTemplate.active S_us_light_soldier_Swim
ObjectTemplate.createdInEditor 1
ObjectTemplate.soundFilename Objects/Soldiers/Common/Sound/Swim/swim_stroke_01.wav,
Objects/Soldiers/Common/Sound/Swim/swim_stroke_02.wav,
Objects/Soldiers/Common/Sound/Swim/swim_stroke_03.wav
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 0.86
ObjectTemplate.reverbLevel 1
ObjectTemplate.position 0/0/0
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.99/1.01/
ObjectTemplate.minDistance 2


ObjectTemplate.active S_us_light_soldier_Swim_Sprint
ObjectTemplate.createdInEditor 1
ObjectTemplate.soundFilename Objects/Soldiers/Common/Sound/Swim/swim_sprint_01.wav,
Objects/Soldiers/Common/Sound/Swim/swim_sprint_02.wav,
Objects/Soldiers/Common/Sound/Swim/swim_sprint_03.wav
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 0.96
ObjectTemplate.reverbLevel 1
ObjectTemplate.position 0/0/0
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.99/1.01/
ObjectTemplate.minDistance 2


ObjectTemplate.active S_us_light_soldier_Swim_Still
ObjectTemplate.createdInEditor 1
ObjectTemplate.soundFilename Objects/Soldiers/Common/Sound/Swim/swim_still_01.wav,
Objects/Soldiers/Common/Sound/Swim/swim_still_02.wav,
Objects/Soldiers/Common/Sound/Swim/swim_still_03.wav
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.volume 0.73
ObjectTemplate.reverbLevel 1
ObjectTemplate.position 0/0/0
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.99/1.01/
ObjectTemplate.minDistance 1.5



i doesnt work help!!!!
edit: codebox

This post has been edited by Wild-thing: Dec 21 2008, 10:03 AM


--------------------
Sry for my spelling errors. AIX rules
Go to the top of the page
 
+Quote Post
2 Pages V  < 1 2  
Start new topic
Replies (15 - 28)
MaxP
post Oct 28 2015, 02:11 PM
Post #16


Enlisted
*

Group: Soldiers
Posts: 5
Joined: 31-March 15
From: Novocherkassk, Russia
Member No.: 10,572



The effect method doesn't work for me.
But I've done it easily with the supply object:
1. Create con and tweak file with the next code:
CODE
ObjectTemplate.create supplyObject soldier_supplyobject
ObjectTemplate.saveInSeparateFile 1
include soldier_supplyobject.tweak


CODE
ObjectTemplate.activeSafe SupplyObject soldier_supplyobject
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1

ObjectTemplate.radius 0.1
ObjectTemplate.healSpeed 3
ObjectTemplate.refillAmmoSpeed 0
ObjectTemplate.healStorageSize -1

So, name these files soldier_supplyobject.con and soldier_supplyobject.tweak

2. Add the nex line to the soldier tweak:
CODE
ObjectTemplate.addTemplate soldier_supplyobject


The difference from the effect method is that you can define the healing amount (storage size). I.e., only 200 hp would be healed, then the fortune ends smile.gif

This post has been edited by MaxP: Nov 11 2015, 06:31 AM
Go to the top of the page
 
+Quote Post
phale
post Oct 29 2015, 12:55 AM
Post #17


Major
****

Group: Soldiers
Posts: 164
Joined: 30-May 13
Member No.: 9,609



I'm wondering if it might be possible (through either method or a new one) to have the regeneration have a delay before it begins? Say, take damage, wait 5 seconds, then regenerate?


--------------------
Go to the top of the page
 
+Quote Post
Bubbles
post Oct 29 2015, 06:38 PM
Post #18


General
*****

Group: Soldiers
Posts: 1,466
Joined: 13-February 06
From: Earth
Member No.: 1,539



Doesn't Project Reality have this as part of their medic system?
Go to the top of the page
 
+Quote Post
MaxP
post Oct 30 2015, 08:20 AM
Post #19


Enlisted
*

Group: Soldiers
Posts: 5
Joined: 31-March 15
From: Novocherkassk, Russia
Member No.: 10,572



QUOTE (Bubbles @ Oct 30 2015, 03:38 AM) *
Doesn't Project Reality have this as part of their medic system?

No, it is the same as the stock system.
Soldiers have 100 HP, after dealing >25 damage they starts to bleed at 0.20 HP/s, with some effects.
There is a default parameter for this: ObjectTemplate.armor.hpLostWhileCriticalDamage

This post has been edited by MaxP: Oct 30 2015, 08:49 AM
Go to the top of the page
 
+Quote Post
MasterChiefRulZ
post Oct 30 2015, 09:32 AM
Post #20


You know the drill...
Group Icon

Group: Mr. Admin
Posts: 10,383
Joined: 31-December 03
From: Home
Member No.: 48



QUOTE (phale @ Oct 29 2015, 02:55 AM) *
I'm wondering if it might be possible (through either method or a new one) to have the regeneration have a delay before it begins? Say, take damage, wait 5 seconds, then regenerate?

It sounds reasonable with bits of code that refer to "delaytouse." I immediately think of grenades that have a timer before they can detonate, or the AIX flame grenade that takes a few seconds before it begins to emanate flames/damage.


--------------------
Go to the top of the page
 
+Quote Post
MaxP
post Nov 1 2015, 04:41 PM
Post #21


Enlisted
*

Group: Soldiers
Posts: 5
Joined: 31-March 15
From: Novocherkassk, Russia
Member No.: 10,572



Doesn't work with supply object.
Maybe the interaction with it starts with soldier spawning, not with the healing process?

P.S. My method (supply object) causes random problems whith soldier inventory, and sometimes server crash (value out of bounds). I'm trying to figure out why...

This post has been edited by MaxP: Nov 11 2015, 11:00 AM
Go to the top of the page
 
+Quote Post
DavidGeorge1991
post May 11 2016, 04:50 AM
Post #22


Captain
***

Group: Soldiers
Posts: 58
Joined: 20-November 14
From: Pearl of the Orient
Member No.: 10,400



Does anyone know how to do a script which a screen begins to blur, when your health is very low.

This post has been edited by DavidGeorge1991: May 11 2016, 04:54 AM


--------------------
Go to the top of the page
 
+Quote Post
DavidGeorge1991
post May 11 2016, 04:52 AM
Post #23


Captain
***

Group: Soldiers
Posts: 58
Joined: 20-November 14
From: Pearl of the Orient
Member No.: 10,400



And I forgot to add this:

http://static3.gamespot.com/uploads/scale_...0091112_004.jpg

This post has been edited by DavidGeorge1991: May 11 2016, 04:53 AM


--------------------
Go to the top of the page
 
+Quote Post
GreenEggs&Slam
post Jun 18 2017, 02:10 AM
Post #24


Private
**

Group: Soldiers
Posts: 25
Joined: 2-June 12
Member No.: 9,122



I've used this effect by on its own mod and set the heal speed to 1, and in my soldier tweak I've got it going in 1 HP increments from 75 HP, and ive set critical HP to 5 with 0.25 damage loss
The problems I'm facing is that the health regens really quickly from whatever health then slows down at 75, still goes quicker than I would like it too, but it atleast works.

How would I stop it from regenerating in that gap? and thankyou for the code!
EDIT - heres my code
us_light_soldier.tweak
CODE

rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 100
ObjectTemplate.armor.hitPoints 100
ObjectTemplate.armor.criticalDamage 5
ObjectTemplate.armor.hpLostWhileCriticalDamage 0.25
ObjectTemplate.armor.defaultMaterial 24
ObjectTemplate.armor.wreckhitpoints 320
ObjectTemplate.armor.explosionForceMod 25
ObjectTemplate.armor.explosionForceMax 1000
ObjectTemplate.armor.TimeToStayAsWreck 6
ObjectTemplate.armor.timeToStayAfterDestroyed 1
ObjectTemplate.armor.angleMod 1
ObjectTemplate.armor.wreckExplosionForceMod 0
ObjectTemplate.armor.wreckExplosionForceMax 0
rem ---EndComp ---
ObjectTemplate.armor.addArmorEffect 75 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 76 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 77 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 78 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 79 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 80 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 81 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 82 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 83 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 84 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 85 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 86 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 87 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 88 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 89 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 90 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 91 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 92 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 93 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 94 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 95 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 96 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 97 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 98 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 99 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 100 e_soldier_regen 0/0/0 0/0/0


e_soldier_regen.tweak
CODE

rem *** Generated with Bf2Editor.exe [created: 2005/3/21 14:16]
ObjectTemplate.activeSafe EffectBundle e_soldier_regen
ObjectTemplate.modifiedByUser dsu
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.createdInEditor 1
ObjectTemplate.hasMobilePhysics 0
rem -------------------------------------
ObjectTemplate.addTemplate S_e_soldier_regen_Start
ObjectTemplate.addTemplate soldier_regen_supp
rem -------------------------------------
ObjectTemplate.setStartOnEffects 0
ObjectTemplate.setStopOnEffects 0
ObjectTemplate.timeToLive CRD_NONE/-1/0/0
ObjectTemplate.randomAgeFactor CRD_NONE/1/0/0
ObjectTemplate.startAtCreation 1
ObjectTemplate.speedFromPhysics 0

ObjectTemplate.activeSafe Sound S_e_soldier_regen_Start
ObjectTemplate.modifiedByUser dsu

ObjectTemplate.create SupplyObject soldier_regen_supp
ObjectTemplate.modifiedByUser dsu
ObjectTemplate.damageSpeed -1
ObjectTemplate.healSpeed 1
ObjectTemplate.radius 0.1


This post has been edited by GreenEggs&Slam: Jun 18 2017, 02:14 AM


--------------------
Go to the top of the page
 
+Quote Post
Fastj@ck
post Jun 18 2017, 10:44 AM
Post #25


Major
****

Group: Soldiers
Posts: 252
Joined: 24-August 08
From: Germany
Member No.: 5,523



When i understand your post right ...

I understood, that you got your soldier regeneration work as intended below 75 Health but your regeneration rate is to quick, when you reached 75+ health?

Than it's because of this line :
CODE
ObjectTemplate.armor.hpLostWhileCriticalDamage 0.25

When you got 25% damage (100 - 25 =75) you start bleeding.

Now, you get shot and receive 60 damage. 40 hp's left and your regeneration works slowly because you heal and bleed same time.
When you reached 75 health, the bleeding stops but your healing is still active. The bleeding countered your healing rate when its below 75 health.

You could add another supply object effect, that get triggered by 75 Health with a lower healspeed below 1 like 0.25

or simpler :
CODE
ObjectTemplate.armor.hpLostWhileCriticalDamage 0.01

This causes the bleeding damage and trigger the supply object when you got 1 point of damage and the healrate works as you like.

But only when i understrood you right.

Edit: Or you mean you heal to fast up to 75 % health. Than remove some of those lines

CODE
ObjectTemplate.armor.addArmorEffect 75 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 76 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 77 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 78 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 79 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 80 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 81 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 82 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 83 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 84 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 85 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 86 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 87 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 88 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 89 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 90 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 91 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 92 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 93 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 94 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 95 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 96 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 97 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 98 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 99 e_soldier_regen 0/0/0 0/0/0
ObjectTemplate.armor.addArmorEffect 100 e_soldier_regen 0/0/0 0/0/0


Let some gaps between the lower hp values.
YOu heal and trigger directly another heal that triggers another instant heal etc. because you added to each "per point health" a supply object effect.

This post has been edited by Fastj@ck: Jun 18 2017, 10:54 AM
Go to the top of the page
 
+Quote Post
GreenEggs&Slam
post Jun 18 2017, 11:16 AM
Post #26


Private
**

Group: Soldiers
Posts: 25
Joined: 2-June 12
Member No.: 9,122



Sorry if what I wrote was confusing, What i meant was that the heath regen works fine, but heals very fast between 5-75hp, then from 75-100 it goes in the small increments, which effectively slows the healing process down which is what i want. But the 10-75 regen I do not want. I didn't manage to test if critical health worked, got distracted by this this problem.
EDIT - so my intentions are
0-5hp = bleeding
6-74hp = nothing
75-100 = healing

This post has been edited by GreenEggs&Slam: Jun 18 2017, 11:18 AM


--------------------
Go to the top of the page
 
+Quote Post
Fastj@ck
post Jun 18 2017, 12:35 PM
Post #27


Major
****

Group: Soldiers
Posts: 252
Joined: 24-August 08
From: Germany
Member No.: 5,523



Ah wait, me stupid hobbit,

QUOTE
Than it's because of this line :

CODE
ObjectTemplate.armor.hpLostWhileCriticalDamage 0.25

When you got 25% damage (100 - 25 =75) you start bleeding.

That is wrong. I copycat the wrong tweakline.

CODE
ObjectTemplate.armor.criticalDamage 75

When your health falls down to 75hp, you start bleeding.

CODE
ObjectTemplate.setStartOnEffects 0
ObjectTemplate.setStopOnEffects 0

This 0 brings my spidersense to tingle
CODE
ObjectTemplate.timeToLive CRD_NONE/-1/0/0
ObjectTemplate.randomAgeFactor CRD_NONE/1/0/0

I'm to long away from damage effects modding and the random digits. Check other CRD's.

http://www.bfeditor.org/forums/index.php?/...n-and-ai-files/
Check this Threads about the CRD's CreateRandomDigits.

This post has been edited by Fastj@ck: Jun 18 2017, 01:09 PM
Go to the top of the page
 
+Quote Post
GreenEggs&Slam
post Jun 18 2017, 02:25 PM
Post #28


Private
**

Group: Soldiers
Posts: 25
Joined: 2-June 12
Member No.: 9,122



I did some more testing and messing with the CRD codes did either nothing or broke it.
StartOnEffects seems to be a type of trigger, and with what i could find it starts when entering/exiting vehicles, explosions, firing etc.
However, removing the critical damage lines in the soldier tweaks did eliminate the problem of the small gap where it regenerated quickly, but instead no matter how much health you had it would regenerate until full health at a slow speed. 10-100 took roughly 30-45 seconds or more which works out really well.
I then also removed all of the addArmorEffect lines from the soldier tweaks and left one with a value of 75, which resulted in health not regenerating past 75.

so the effect seems to trigger when any health is lost, and the lines with the values are simply "stop points". Well atleast that's how it's working for me at the moment.


--------------------
Go to the top of the page
 
+Quote Post
Fastj@ck
post Jun 18 2017, 04:35 PM
Post #29


Major
****

Group: Soldiers
Posts: 252
Joined: 24-August 08
From: Germany
Member No.: 5,523



Look what kind of material your medikit have. In PR it is 73.

Tinker around if you can create a addArmorEffect that can be added to the soldier tweak.
The addArmorEffect get no attached supply object. Look for or create a damaging Effects\damagestates where the damaging material is the healing material. Maybe that works.

Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2017 - 04:21 PM