PDA

View Full Version : creating building tree - need help understanding some code



Rien
04-24-2015, 20:41
I could not find a building tree for eb 2 like the ones for eb 1 where you can clearly see the connection between the various buildings for each faction. So I decided to try make them myself. I have no previous experience with modding or the reading the desrc files so I set out learning but there are still some lines of code I do not understand. I hope someone can help me understand them, I marked the line like this.

if a building tree exists let me know (then I have more playtime )
I will start with the bosporan building tree (my next campain) and then move to the other hellenic factions and so on, as time allows
help and tips are always welcome.

building colony_hellenistic
{
religion rel_h
levels helcol_one helcol_two helcol_three helcol_ref
{
helcol_one requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, } ...
{
capability ;;; Recruitment pool - 8 * 0.03
{
recruit_pool "hellenistic cavalry hippakontistai" 1 0.06 2 0 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_pontos, f_pergamon, f_bosporan, }
recruit_pool "hellenistic cavalry baktrioi hippotoxotai" 1 0.06 2 0 requires factions { f_baktria, }
recruit_pool "hellenistic infantry phalangitai" 1 0.09 3 0 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, }
recruit_pool "hellenistic infantry akontistai" 1 0.06 2 0 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, }
recruit_pool "hellenistic infantry toxotai" 1 0.03 1 0 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, }
religion_level bonus 1 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, } and not region_religion rel_h 30 and event_counter ecReligionUpdate 1
law_bonus bonus 1 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, }
farming_level bonus -1 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, }
}
material stone
construction 4
cost 4800
settlement_min town
upgrades
{
helcol_two requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, } ...
}

Haithabas
04-25-2015, 10:01
religion_level bonus 1 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon, f_bosporan, } and not region_religion rel_h 30 and event_counter ecReligionUpdate 1

Both are conditions for the religion_level bonus 1, both triggers must fire then you will have a culture update (hellenic in this case)

Condition 1 : and not region_religion rel_h 30: if your hellenic culture is below 30% then this "trigger" fires / above 30% it´s inactive

Condition 2: event_counter ecReligionUpdate is a scripted event in campaign_script.txt. Every year ( we use a four year cycle in EB2 ) you gain 1 ReligionUpdateCounter. And if you have two of them, then the script trigger fire and the event_counter ecReligionUpdate (in EDB) is active. In other words every 8 turns in-game.

Edit: maybe this was every 4 turns, I don't remember.

Rien
04-25-2015, 12:52
Thanks for the clear explanation

if someone can confirm whether it is 4 or 8 turns it would be great, i will try to put in as much relevant info as possible