PC Mode
Org Mobile Site
Forum > Rome: Total War > Rome: Total War > R:TW Modification > Modding Questions >
Thread: Casualty Healing/Recovery rates...
gamerdude873 05:48 06-11-2008
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

Reply
Makanyane 07:30 06-11-2008
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

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

Reply
Horseman 17:00 06-11-2008
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

Reply
gamerdude873 20:30 06-11-2008
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.

Reply
HouseOfHam 20:51 06-11-2008
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:
Code:
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):
Code:
Trigger HealingTouchTrigger
    WhenToTest PostBattle

    Condition isGeneral
            and CharacterIsLocal
            and WonBattle
            
    Affects HealingTouch 1 Chance 100
In text\export_VnVs.txt, add (fixed):
Code:
{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 :)

Reply
Aradan 22:27 06-11-2008
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?

Reply
HouseOfHam 22:44 06-11-2008
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.

Reply
Aradan 23:29 06-11-2008
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...

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

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

Reply
HouseOfHam 21:46 06-13-2008
Originally Posted by gamerdude873:
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

Reply
gamerdude873 05:11 06-14-2008
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?

Reply
gamerdude873 05:20 06-14-2008
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.

Reply
gamerdude873 07:12 06-14-2008
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)

Reply
Squid 08:37 06-14-2008
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.

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

Reply
HouseOfHam 15:30 06-14-2008
Originally Posted by Squid:
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.

Reply
gamerdude873 23:02 06-14-2008
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...

Reply
gamerdude873 06:40 06-15-2008
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!)

Reply
Makanyane 07:19 06-15-2008
To get the message you do need to add a line to the level/s you want the message for eg:
Code:
	Level HealingTouchLevel1
		Description HealingTouch1_desc
		EffectsDescription HealingTouch1_effects_desc
                GainMessage HealingTouch1_gain_desc
		Threshold 1
and
Originally Posted by :
{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!)

Reply
gamerdude873 03:53 06-16-2008
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)

Reply
Squid 04:07 06-16-2008
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.

Reply
Makanyane 07:45 06-16-2008
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).

Reply
gamerdude873 06:58 06-17-2008
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!

Reply
vdpk7 08:28 07-09-2008
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

Reply
Aradan 10:41 07-09-2008
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.

Reply
vdpk7 15:31 07-09-2008
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..

Reply
Up
Single Sign On provided by vBSSO