Log in

View Full Version : modding in a new trait



The Stranger
02-26-2012, 02:51
is there anyone who knows a bit about modding traits?

i wish to make all units recruitable generals in order to get a bit more time feeling into it. but i dont want all recruited generals to become interlopers when they are in an allied city.

so my idea was to make a new trait, captain which recruited generals get when recruited in a 1-3 province building instead of 4.

i tried adding this but then the game ctd's


Trait Captain
Characters family
;Hidden

Level Captain_1
Description Family_Member_desc
EffectsDescription Family_Member_effects_desc
Threshold 1


Trigger Becomes_Captain
WhenToTest CharacterTurnEnd

Condition IsGeneral
and Trait FamilyMember = 0
and Trait ClientRuler = 0
and Trait Type4Governor = 0
and Trait RecruitedGeneral = 1
and EndedInSettlement
and not SettlementBuildingExists = gov4
and not SettlementBuildingExists = govnomad

Affects RecruitedGeneral -1 Chance 100
Affects Captain -1 Chance 100


hmmm and i also miraculously corrupted my export_descr_character_traits.txt

does anyone have a working one to spare?

d'Arthez
02-26-2012, 09:20
http://www.mediafire.com/?5wwouxahq6ta6hc

Just the zipped export_descr_character_traits. Can't help with the modding issue

konny
02-26-2012, 11:20
i wish to make all units recruitable generals in order to get a bit more time feeling into it.This will most likely not work because according to my observation the AI does not recruit generals on its own, follows it would not recruit anything at all in this setting.

Another problem would be FM count: the game allows for about one FM per province held. This count includes (seems to include) generals not connected to the family tree. When all your units would be generals you would most likely not get any births anymore and run in danger of your faction dying out (in this case FMs outside the tree are not counted).

The next problem would be that the game pics the frist valid unit for this faction with the general_unit tag as bodyguard for FM members. Because zillions of local units are available to everyone you would end up with something like Sweboz FMs having classical hoplites as bodyguard or Selecuid FMs coming of age with a bodyguard of British skirmishers.



but i dont want all recruited generals to become interlopers when they are in an allied city.

so my idea was to make a new trait, captain which recruited generals get when recruited in a 1-3 province building instead of 4.In this case it would be easiest to remove the trait interloper, or rather the triggers leading to it. You wouldn't have any use for Type4Governors anyways given that now each commander of a unit of Levels would be entitled to rule a province.

The Stranger
02-26-2012, 13:01
The next problem would be that the game pics the frist valid unit for this faction with the general_unit tag as bodyguard for FM members. Because zillions of local units are available to everyone you would end up with something like Sweboz FMs having classical hoplites as bodyguard or Selecuid FMs coming of age with a bodyguard of British skirmishers.

this problem can be easily solved... but ye ok, i see what you mean about the rest :S too bad.

Rahl
03-06-2012, 18:04
About your crash: You know that changes to the trait-file aren`t save game compatible?

konny
03-06-2012, 19:20
That's right, but it shouldn't cause CTDs, just messes up the traits your generals already have. A CTD by ECDT would usually be resulting from an invalid character, a misplaced tag, and other "hard errors".

jirisys
03-09-2012, 02:19
This should be in the modding section, shouldn't it?

MOROOOOOOOS!

~Jirisys ()