Log in

View Full Version : Casualty Healing/Recovery rates...



gamerdude873
06-11-2008, 05:48
Hi

I was wondering if there was anything I could do to to modify the rate at which casualties recover. I'm sick of having a bunch of guys dieing and having only a handful get better. I know with doctors and stuff you can boost that rate, but i want to increase the basic rate. Is this possible? Or is it hard coded in the AI?

(BTW I play Europa Barbarorum, and my RTW vanilla version is 1.5 becuase of that. I don't have Barbarian Invasion, if any of that is important.)

Plz respond and ty

Makanyane
06-11-2008, 07:30
Sorry I'm pretty sure that's hard coded, so all you could do is adjust leaders traits / ancillaries, so you have more characters with a positive BattleSurgery effect.

Welcome to the forum :thumbsup:

Thor the Bassist
06-11-2008, 11:10
It may be possible with scripting though I dont know how to script at all?

Horseman
06-11-2008, 17:00
You could always add a trait (hidden maybe) that gives a boast and make it 100% chance at birth so that all family members get it.

This of course wont help captain led armies

gamerdude873
06-11-2008, 20:30
Most of my armies aren't lead by captains anyways. How would you add a trait like that? I have experience modding, but it's not extensive and i've never personally modded RTW.

HouseOfHam
06-11-2008, 20:51
You can't do it with scripting - the replenish_units command needs a general's name as a parameter.

A trait with a high Effect BattleSurgery value seems like the easiest solution. For example, something like this...

In export_descr_character_traits, add:


Trait HealingTouch
Characters family

Level HealingTouchLevel1
Description HealingTouch1_desc
EffectsDescription HealingTouch1_effects_desc
Threshold 1

Effect BattleSurgery 50

Level HealingTouchLevel2
Description HealingTouch2_desc
EffectsDescription HealingTouch2_effects_desc
Threshold 5

Effect BattleSurgery 60

Level HealingTouchLevel3
Description HealingTouch3_desc
EffectsDescription HealingTouch3_effects_desc
Threshold 10

Effect BattleSurgery 70


Then, in the triggers section, add (fixed):


Trigger HealingTouchTrigger
WhenToTest PostBattle

Condition isGeneral
and CharacterIsLocal
and WonBattle

Affects HealingTouch 1 Chance 100


In text\export_VnVs.txt, add (fixed):


{HealingTouch1}Healing Touch 1
{HealingTouch1_desc} Healing Touch, level 1
{HealingTouch1_effects_desc} Heals 50% of casualties
{HealingTouch1}Healing Touch 2
{HealingTouch2_desc} Healing Touch, level 2
{HealingTouch2_effects_desc} Heals 60% of casualties
{HealingTouch1}Healing Touch 3
{HealingTouch3_desc} Healing Touch, level 3
{HealingTouch3_effects_desc} Heals 70% of casualties


Sorry, I always have a ton of bugs when I write code off the top of my head, without checking syntax :)

Aradan
06-11-2008, 22:27
On a releated note, there seems to be a significant difference depending on whether the casualties were a result of missile fire or melee. Anybody has solid data on that?

HouseOfHam
06-11-2008, 22:44
No solid data, just observations. In general, it seems like wounds inflicted by missile weapons are easier to heal. It might have something to do with the amount of damage produced by the attack. Actually, that makes sense, since most units armed with missile weapons have lower damage.

Aradan
06-11-2008, 23:29
Not sure, even against peasants, wounds will not heal easily, while they do against "elite" archers. Where's a CA Dev when you need one...

gamerdude873
06-13-2008, 20:32
Thanks for the help i've been a little busy the past few days... so i'll try it out now

gamerdude873
06-13-2008, 20:59
BTW what does "CharacterIsLocal" trigger do? THe rest is self explanantory but does this mean that he has to be in your territory?

HouseOfHam
06-13-2008, 21:46
BTW what does "CharacterIsLocal" trigger do? THe rest is self explanantory but does this mean that he has to be in your territory?

Belongs to the faction controlled by the player - the same also applies to all other conditions containing the word Local

gamerdude873
06-14-2008, 05:11
Ahhh that helps.

Oh and I tried to modify the Character trait, and now the game crashes when i load the save. And i loaded multiple saved games, so i know it's not just my game. I'll keep playin with it, but are there any ideas in the meantime about the topic or better yet, how to fix the crash?

gamerdude873
06-14-2008, 05:20
Wait do i need to use a special editor for this, cause i just cut an pasted. I don't have a ton of experience with this stuff so bear with me...

If i do then that might explain the crash.

gamerdude873
06-14-2008, 07:12
NVM i have new problem now after i've solved this one (i used notepad++ to fix). Now, i got the game loaded and fought a battle, and now all my generals have hundreds of traits that they should not have. Like "Revenge agaisnt the Sabeans". (i've never fought them!) and whole crudload of really bad traits, but not healing touch. Any Ideas that might help are welcome!!!

(RLLY welcome)

Squid
06-14-2008, 08:37
Traits are generally not save game compatible, if you want any shot of the change being save game compatible, add the new trait to the bottom of the trait list, the trigger can go anywhere, as can the descriptions in export_VnV. As an aside there are a couple of mistakes in the trait code above, the trigger is incorrect, as the affects line isn't correctly formed, also you are missing the level name entries for the three levels.

Flying Pig
06-14-2008, 12:08
I think there's a bonus for heroic units that kill a lot and lose a few - they regenerate a lot more. I think.

HouseOfHam
06-14-2008, 15:30
Traits are generally not save game compatible, if you want any shot of the change being save game compatible, add the new trait to the bottom of the trait list, the trigger can go anywhere, as can the descriptions in export_VnV. As an aside there are a couple of mistakes in the trait code above, the trigger is incorrect, as the affects line isn't correctly formed, also you are missing the level name entries for the three levels.

Fixed. :dizzy2::smash:

gamerdude873
06-14-2008, 23:02
I thought some parts of that script looked kinda funky when i compared it to the other scripts. Thanks a bunch guys, i'll go implement it and check it out. I'll start a new game and see if that fixes the wierd traits issue too...

gamerdude873
06-15-2008, 06:40
ARGGGHHHH.....

I followed all the suggestions... The trait works now for my saved game (the only thing is that it doesn't send me a message saying that he got it...not important though). My trouble is that i can't start a new game at all. I get another CTD...

THis isn't a huge issue at the moment, but it would be nice to fix it now ahead of time. THanks.

(I feel like i'm playing a sick and twisted version of "Wack a Mole" right now. One thing fixed, another breaks!)

Makanyane
06-15-2008, 07:19
To get the message you do need to add a line to the level/s you want the message for eg:

Level HealingTouchLevel1
Description HealingTouch1_desc
EffectsDescription HealingTouch1_effects_desc
GainMessage HealingTouch1_gain_desc
Threshold 1
and

{HealingTouch1_gain_desc} Message blurb............
in the text file

If you can't start a new campaign I'd suspect a problem in descr_strat, check any changes you made in that.
(have fun mole whacking!)

gamerdude873
06-16-2008, 03:53
Where the heck do you put this? You didn't exactly say, and i can't find where it might go:

"{HealingTouch1_gain_desc} Message....."

and whats the file path for "descr_strat"? I can't find that either...

Sorry, but like i said, i'm still learning the ropes for this.

(And just a reminder... I'm using Europa Barbarorum incase any1 missed that in first post)

Squid
06-16-2008, 04:07
Search is your fried, search the EB directory to find descr_stat, and the gain message goes in the same place as all the other messages.

Makanyane
06-16-2008, 07:45
oh well, if you hadn't found descr_strat.txt before (in .../data/world/maps/campaign/campaign_name...)
then you can't have made an error in it!

Did you remove any old traits while you were doing this? Note also that the trigger can go anywhere in the trigger section at the bottom of the traits file. But don't put a trigger in amongst the traits or you'll stop the traits below it being read (If it accepts it at all).

gamerdude873
06-17-2008, 06:58
hmm well it seems to have worked itself out... for now.

I got the message system working more or less.

Oh well Ty every1 and thanks 4 help!

vdpk7
07-09-2008, 08:28
hi all, will battlesurgery work with rtw.exe? and how can i enable it on computer controlled factions and to the loosing side as well..

will this work?

Trigger HealingTouchTrigger
WhenToTest PostBattle

Condition isGeneral
and CharacterIsLocal
and CharacterIsNotLocal
and WonBattle
and LooseBattle

Affects HealingTouch 1 Chance 100

Aradan
07-09-2008, 10:41
First of all, this trigger will never work, because a battle can't be won and lost at the same time (there is no "or" operator on the engine, you'd have to use different triggers). Secondly, even if it is triggered, it will not "activate" the trait at that time and heal soldiers, it will just give the trait to the general. And finally, it's hardcoded afaik that the losing side cannot heal its casualties. AI-controlled factions can take the trait too, of course if you don't put a "CharacterIsLocal" condition in the trigger.

vdpk7
07-09-2008, 15:31
yea, thats what i was thinking.. i should have seperated the two conditions to make it clearer, eheh.. and too bad if it wont work with the loosing side though..