Results 1 to 15 of 15

Thread: working on a reemerging factions mod for eb bi?

  1. #1

    Default working on a reemerging factions mod for eb bi?

    i'm would like to work on a particular reemergence of defeated factions

    all you know that when lots of factions disappears, the game tends to become an ahistorical and boring one, with 2 or 3 superpowers sending tons of armies against you. and you passing the rest of your life in calmly defeating each. many suggest to pay attention to other factions, to care about the weaker ones, etc, to avoid this inevitability. i think it's cheating, and i think there is a best solution

    if a faction disappears, i can script it appears as a powerful, migratin, faction on the edge of the map. when the game goes on and nations became powerful and stronger and more extended exterminating each other, this process will simulate a new event: unsustainable barbarian invasions (unless estabilishing a sort of "pax romana" where each limes-faction is a paceful living ally). i don't care the this barbarian will name, for example, "epeiros", or "koinon hellenon". it's disgusting, i know, but it's hardcoded and i cannot change it. maybe, they will tend to settle in their original settlements. don't care. i only wand they make the game interesting again after 100 years of playing and only 3 superpowers surviving

    so, some two starting questions:
    1) i made hording possible, modifying descr_sm_factions, adding some files in ui (i'm sorry, i'm not at home, i'll be more accurate), adding a string in a file i don't remember actually, and creating a new hord unit ad-hoc, but when rebelling, disappeared factions' settlements seems produce a ctd (so: the reemergence tag in descr_strat is needed? or am i missing something regarding a banner that has to appear on that occurrence?)
    2) scripting a horde army for a disappeared faction will make it not moving? i heard of that. in my mind, faction reappearing has to be made via descr_event in an edge region with a settlement<1 condition, but there is also to consider that it may become true while it hording. otherways, all this stuff could be scripted, but are there any limitations in ai?

    please don't tell me take a look at this guide: http://www.twcenter.net/wiki/Hording...tions_-_RTW/BI
    it sure depends on my mistakes, but found it usefulness

    edited:
    script command faction_emerge can be used for bi?
    Last edited by maxborgatti; 08-17-2009 at 14:58.

  2. #2

    Default Re: working on a reemerging factions mod for eb bi?

    very very interesting project, i'm sorry i can't help you...

  3. #3
    Xsaçapāvan é Skudra Member Atraphoenix's Avatar
    Join Date
    Jul 2008
    Location
    İstanbul, Turkey
    Posts
    1,402

    Default Re: working on a reemerging factions mod for eb bi?

    My solution is simple just script :

    monitor_event CharacterTurnStart FactionType all
    and CharacterIsLocal

    and I_NumberOfSettlements seleucid = 2
    add_money seleucid, 100000

    and I_NumberOfSettlements armenia = 2
    add_money armenia, 100000

    and I_NumberOfSettlements parthia= 2
    add_money parthia, 100000

    ....


    and I_NumberOfSettlements seleucid = 1
    add_money seleucid, 200000

    and I_NumberOfSettlements armenia = 1
    add_money armenia, 200000

    and I_NumberOfSettlements parthia= 1
    add_money parthia, 200000


    .... goes on for each faction.
    My scripting info is very limited so ask any experienced script modder.
    you may create units but it will be torture to write its code because you have to specify the city or you have to give units randomly. so basically to add money for them to hire mercenaries is my humble solution other than giving each faction hording ability.



    My Submods for EB
    Spoiler Alert, click show to read: 
    My AAR/Guides How to assault cities with Horse Archers? RISE OF ARSACIDS! (A Pahlava AAR) - finished
    History is written by the victor." Winston Churchill

  4. #4

    Default Re: working on a reemerging factions mod for eb bi?

    ok i thank you all, really, but i'm a stubborn one

    my plan is to
    1) introduce loyalty in eb bi, that is necessary to archieve
    2) the conditions to make faction resurrect thanks to rebellion, then
    3) adding a script that forces rebellions as empires grow

    plus

    4) link money_script to empire extension: raised down from more of 4 regions, stopped when a faction goes over 10

    i abandoned faction emergence via descr_events as i think it's scriptable only from medieval 2 (where you can script something like create_event), so actually it can succeed only once, correct me if wrong

    wondering on hording

    always considering help of course, if someone can give

    if i'll archieve anything, i'll post

  5. #5
    Xsaçapāvan é Skudra Member Atraphoenix's Avatar
    Join Date
    Jul 2008
    Location
    İstanbul, Turkey
    Posts
    1,402

    Default Re: working on a reemerging factions mod for eb bi?

    wait for EB2,
    you will have more modding opportunities than RTW.



    My Submods for EB
    Spoiler Alert, click show to read: 
    My AAR/Guides How to assault cities with Horse Archers? RISE OF ARSACIDS! (A Pahlava AAR) - finished
    History is written by the victor." Winston Churchill

  6. #6
    EBII Bricklayer Member V.T. Marvin's Avatar
    Join Date
    Aug 2007
    Location
    Directing the defence of Boiotergion
    Posts
    3,361

    Default Re: working on a reemerging factions mod for eb bi?

    Hi Atra,

    I like your script to help losing factions, but I see something that seems as an error to me:

    IIRC the max ammount of money you can give via console command is 40.000, therefore your script
    Quote Originally Posted by Atraphoenix View Post
    Code:
    and I_NumberOfSettlements seleucid = 2
    add_money seleucid, 100000
    
    and I_NumberOfSettlements armenia = 2
    add_money armenia, 100000
    
    and I_NumberOfSettlements parthia= 2
    add_money parthia, 100000
    
    ....
    
    
    and I_NumberOfSettlements seleucid = 1
    add_money seleucid, 200000
    
    and I_NumberOfSettlements armenia = 1
    add_money armenia, 200000
    
    and I_NumberOfSettlements parthia= 1
    add_money parthia, 200000
    would give only 40.000 in both cases, therefore it would equally suffice to state simply

    Code:
    and I_NumberOfSettlements seleucid < 3
    add_money seleucid, 40000
    
    and I_NumberOfSettlements armenia < 3
    add_money armenia, 40000
    
    and I_NumberOfSettlements parthia < 3
    add_money parthia, 40000
    
    etc.
    Also a bit puzzling to me is the opening condition of yours:

    Quote Originally Posted by Atraphoenix View Post
    Code:
    monitor_event CharacterTurnStart FactionType all
    and CharacterIsLocal
    This means that the script would give the money (40.000) for each character your faction have. For example, if you just start your game as a faction with 2 cities, 5 FMs, 3 spies and a diplomat, all factions (including yours!) with 1 or 2 cities would get 360.000 mnai. Is that really what you want?

    I would propose to modify your "help-the-losers" script:
    Code:
    monitor_event CharacterTurnStart FactionType seleucid; faction gets money for each of its characters
    
    and not CharacterIsLocal; this would exclude human controlled factions from any benefits
    and I_NumberOfSettlements seleucid < 3; only small factions with 1 or 2 cities will get anything
    add_money seleucid, 10000; seems to me as more reasonable ammount - just personnal preference
    Hope that makes sense!

  7. #7
    Xsaçapāvan é Skudra Member Atraphoenix's Avatar
    Join Date
    Jul 2008
    Location
    İstanbul, Turkey
    Posts
    1,402

    Default Re: working on a reemerging factions mod for eb bi?

    as you know I am terrible on scripting the only script I managed to work on EB is my hotseat mod.



    My Submods for EB
    Spoiler Alert, click show to read: 
    My AAR/Guides How to assault cities with Horse Archers? RISE OF ARSACIDS! (A Pahlava AAR) - finished
    History is written by the victor." Winston Churchill

  8. #8

    Default Re: working on a reemerging factions mod for eb bi?

    i thank you all, mates, one more time, for coding and suggestions and simple support

    i'll have some time for testing only during the weekend, and i saw some code in previous posts, so i started from the bottom of my plan: scripting, hopefully somewone will test for me (as i think it will be savegame compatible)

    i have totally revised section 5 of the ebbs script: money assistance

    1) removed every "first xxx years help". if this is an has-to-be, please tell me. i removed it only in order to simplify the resulting code
    2) unified "difficult start help" (an every-four-turns help) and "city income bonus" (an every-turn help). note that moneyhelp is summing (so the total are: 6000 each turn when ai faction 0<3 settlements, 2700 when 3< 6, 1200 when 6<9, 300 when 9<16)
    3) removed the parameter for the number of human player settlement used for confrontation, becouse i thought it was someway only a little assistance and directed to big-scale-endless conflicts when your empire grows up. correct me if misundarstanding. and tell me if i can remove the numPlayerSettlements counter declaration (no more used now)
    4) removed low-treasure help: when ai is small, has help. when is big, difficulties. when is low on money, no move. the only think i suppose can be added, is a condition that monitors ai doesn't go too much in red, so: losing an army, or acquiring a new land, can immediatrly make ai balance "green"
    5) untuched slave section

    and finally

    6) introduced rebellions for bigger ai empires in foreign capital cities subdued. to simulate this, the script adds population each turn when ai has more of 16 settlements, and adds tons of population-rebels when ai goes over 25 settlements. in this way, settlement public order goes down, and they rebel. i couldn't test it, so values surely has to be adjusted (as to see the effects of 8000 people more a year, minus the population maluses)

    i think making faction resurrectable (as empire east-west rebels in bi) will allow to use a randomized provoke_rebellion instead of increasing population, and rebel capitals won't go slave but factionally

    next step. now please tell me your testing/opinion/suggestions on modifying

    i post rome-seleukids as an example; tell me if you need the whole file

    PS: i (obviously?) excluded faction capital cities from each, cause in the hurry of scripting i thaught a nonsense making rome rebelling do rome when empire extends

    ;Rome

    ;Cap treasury
    monitor_event FactionTurnStart FactionType seleucid
    and not FactionIsLocal
    and Treasury > 300000
    console_command add_money seleucid, -40000
    console_command add_money seleucid, -40000
    end_monitor

    ;city income bonus joined with difficoult start help - year difference removed - rebellion added
    monitor_event SettlementTurnStart FactionType seleucid
    and not FactionIsLocal
    ;and Treasury < 100000
    if I_NumberOfSettlements seleucid < 3
    console_command add_money seleucid, 3800
    end_if

    if I_NumberOfSettlements seleucid < 6
    console_command add_money seleucid, 1500
    end_if

    if I_NumberOfSettlements seleucid < 9
    console_command add_money seleucid, 900
    end_if

    if I_NumberOfSettlements seleucid < 16
    console_command add_money seleucid, 300
    end_if

    if I_NumberOfSettlements seleucid < 25
    and I_NumberOfSettlements seleucid > 16
    ;disorders simulation in capital cities - has to be turned in randomized provoke_rebellion when shadowing ready
    if I_SettlementOwner Oxtraca = seleucid
    console_command add_population Oxtraca, 500
    end_if
    if I_SettlementOwner Gergovia = seleucid
    console_command add_population Gergovia, 500
    end_if
    if I_SettlementOwner Bibracte = seleucid
    console_command add_population Bibracte, 500
    end_if
    if I_SettlementOwner Swebotráustástámnoz = seleucid
    console_command add_population Swebotráustástámnoz, 500
    end_if
    if I_SettlementOwner Buridava = seleucid
    console_command add_population Buridava, 500
    end_if
    if I_SettlementOwner Ambrakia = seleucid
    console_command add_population Ambrakia, 500
    end_if
    if I_SettlementOwner Pella = seleucid
    console_command add_population Pella , 500
    end_if
    if I_SettlementOwner Sparte = seleucid
    console_command add_population Sparte, 500
    end_if
    if I_SettlementOwner Amaseia = seleucid
    console_command add_population Amaseia, 500
    end_if
    if I_SettlementOwner Armavir = seleucid
    console_command add_population Armavir, 500
    end_if
    if I_SettlementOwner Gava-Roxsalanna = seleucid
    console_command add_population Gava-Roxsalanna, 500
    end_if
    if I_SettlementOwner Nisa = seleucid
    console_command add_population Nisa, 500
    end_if
    if I_SettlementOwner Baktra = seleucid
    console_command add_population Baktra, 500
    end_if
    if I_SettlementOwner Chighu = seleucid
    console_command add_population Chighu, 500
    end_if
    if I_SettlementOwner Seleukeia = seleucid
    console_command add_population Seleukeia, 500
    end_if
    if I_SettlementOwner Maryab = seleucid
    console_command add_population Maryab, 500
    end_if
    if I_SettlementOwner Alexandreia = seleucid
    console_command add_population Alexandreia, 500
    end_if
    if I_SettlementOwner Kart-Hadast = seleucid
    console_command add_population Kart-Hadast, 500
    end_if
    if I_SettlementOwner Camulosadae = seleucid
    console_command add_population Camulosadae, 500
    end_if
    end_if

    if I_NumberOfSettlements seleucid > 25
    ;major disorders simulation in capital cities - has to be turned in randomized provoke_rebellion when shadowing ready
    if I_SettlementOwner Oxtraca = seleucid
    console_command add_population Oxtraca, 2000
    end_if
    if I_SettlementOwner Gergovia = seleucid
    console_command add_population Gergovia, 2000
    end_if
    if I_SettlementOwner Bibracte = seleucid
    console_command add_population Bibracte, 2000
    end_if
    if I_SettlementOwner Swebotráustástámnoz = seleucid
    console_command add_population Swebotráustástámnoz, 500
    end_if
    if I_SettlementOwner Buridava = seleucid
    console_command add_population Buridava, 2000
    end_if
    if I_SettlementOwner Ambrakia = seleucid
    console_command add_population Ambrakia, 2000
    end_if
    if I_SettlementOwner Pella = seleucid
    console_command add_population Pella , 2000
    end_if
    if I_SettlementOwner Sparte = seleucid
    console_command add_population Sparte, 2000
    end_if
    if I_SettlementOwner Amaseia = seleucid
    console_command add_population Amaseia, 2000
    end_if
    if I_SettlementOwner Armavir = seleucid
    console_command add_population Armavir, 2000
    end_if
    if I_SettlementOwner Gava-Roxsalanna = seleucid
    console_command add_population Gava-Roxsalanna, 2000
    end_if
    if I_SettlementOwner Nisa = seleucid
    console_command add_population Nisa, 2000
    end_if
    if I_SettlementOwner Baktra = seleucid
    console_command add_population Baktra, 2000
    end_if
    if I_SettlementOwner Chighu = seleucid
    console_command add_population Chighu, 2000
    end_if
    if I_SettlementOwner Seleukeia = seleucid
    console_command add_population Seleukeia, 2000
    end_if
    if I_SettlementOwner Maryab = seleucid
    console_command add_population Maryab, 2000
    end_if
    if I_SettlementOwner Alexandreia = seleucid
    console_command add_population Alexandreia, 2000
    end_if
    if I_SettlementOwner Kart-Hadast = seleucid
    console_command add_population Kart-Hadast, 2000
    end_if
    if I_SettlementOwner Camulosadae = seleucid
    console_command add_population Camulosadae, 2000
    end_if
    end_if

    end_monitor

  9. #9
    EBII Bricklayer Member V.T. Marvin's Avatar
    Join Date
    Aug 2007
    Location
    Directing the defence of Boiotergion
    Posts
    3,361

    Default Re: working on a reemerging factions mod for eb bi?

    That is really cool! I like the idea of provoking rebellions in subdued capitals. Good work!

    Just a thought - I cannot verify the exact codes (and whether it is actually doable right now, sorry):
    - you may use the "provoke_rebellion" command anyway, regardless whether you have made the faction reemergent or not, as there is always a chance, if the faction still exist, that the city would go to the faction rather than to rebels (determined by who has build the latest tier of the government building.

    - you may try to tie the likelihood of a rebelion to the strength of the Faction leader by adding another condition like "and I_FactionLeader Attribute Influence < 8" - this may add a bit of realism and random factor to the occurence of the rebellions...


    Anyway, good luck in your eforts and let us know how is it going!

  10. #10

    Default Re: working on a reemerging factions mod for eb bi?

    ok!

    for taught 1, i read somwhere the command can be used, but doesn't happens nothing until you enable loyalty. that's what i'm working on now. and obviously has to be enebled faction re-emergence

    thaght 2: good idea, and it can be mixed with loyalty of the governor, as in bi

    this evening i'm planning to test the script so to move on the next step

  11. #11
    Xsaçapāvan é Skudra Member Atraphoenix's Avatar
    Join Date
    Jul 2008
    Location
    İstanbul, Turkey
    Posts
    1,402

    Default Re: working on a reemerging factions mod for eb bi?

    you can make all the factions emergent in BI in faction descr text files, but scripting is harder than it.
    good luck...



    My Submods for EB
    Spoiler Alert, click show to read: 
    My AAR/Guides How to assault cities with Horse Archers? RISE OF ARSACIDS! (A Pahlava AAR) - finished
    History is written by the victor." Winston Churchill

  12. #12

    Default Re: working on a reemerging factions mod for eb bi?

    i bet you're right atra!

    aniway, i tested the3 script as it is with a roman campaing

    start saying i'm not satisfied

    ptolemaiois (> than 25 provinces) grew, as usual, more and more. amaseia and armavir rebelled 4-5 times and turned back to pontos and armenia. but they simply didn't care, encircled them, and make them disappear. they still rebels but, at the moment, go to slave faction as i had't time to make the resurrecitng mod

    nisa slowly rebelled to baktrians (> than 16 provinces) and turned back to phalavans

    seleukeia seems to be very well governed. ptolemaiois manage it, despite the fact that it reached the limit of 216000 population

    lusontannan (> than 16 provinces) are expanding, but at the time no rebellions happened in celtic capitals conquered

    the money is good for casse, ptolemaiois and saka rauka

    that's it, at 230bc

    i'm planning to do three things:

    1) making all recruitments wait 4 turns, just to make losing battles harder in order to refit armies
    2) giving money penalities to faction over 25 provinces
    3) lowering conditions to 12 and 16 provinces (16 and 25 seems to be too much)

    and, obviously, work on faction reappireang

  13. #13

    Default Re: working on a reemerging factions mod for eb bi?

    by the way, i succeded on resurrecting! i made a littel mod, then i took the romans, started a new game, razed epeiros, make them rebel, and they reemerged. and now they're moving, my little beautiful eppeys

    i will now go on on exploring this new feature, and than mixing with the scripted conditions if all goes well

    i'll post what i did - have to say that is a mixture of other independent posts i took in the forum, one focusing on loyalty, the other on resurrecting, but i mainly followed a guide by stuie, that i'll report almost exactly:

    You need to mod the following files:

    1. descr_sm_factions.txt
    Add "shadowed_by" and "shadowing" to the appropriate factions.

    2. descr_event_enums.txt
    Add in the text from the BI files that relates to shadow factions (I actually just used the BI file and it worked).

    3. descr_event_images.txt
    Add in the events relating to shadow factions (again, I just used the BI file).

    4. descr_sounds_events.txt
    Add in the sounds relating to shadow factions (or use the BI file).

    5. export_descr_character_traits.txt
    Add in the appropriate loyalty traits.
    nb: i didn't as i wasn't interested in that

    6. text\event_strings.txt
    Add in the BI shadow event strings.

    7. text\event_titles.txt
    Add in the BI shadow event titles.

    8. text\message_text_lookup.txt
    Add in the character rebels/joins and city gained/lost stuff from BI. (I copy and pasted everything in from BI and that works fine).

    9. text\tooltips.txt
    Add in the loyalty tooltips from the BI file.

    10. world\maps\campaign\imperial_campaign\descr_strat. txt
    Add in LoyaltyStarter traits for characters in the appropriate factions.
    nb: i didn't as i wasn't interested in that

    11. \ui\"faction"\interface\stratpage_02.tga
    Copy in the "ring" symbol from the BI file.

    then you have to add the re_emergent line in the descr_strat, under the relative faction

    edit:
    it seems that a faction can have only ONE shadowing faction: if you assign twenty shadowings, the rebels will go only to the first. but i think that with scripting this limit can be circumvented
    Last edited by maxborgatti; 08-25-2009 at 18:05. Reason: adding test

  14. #14

    Default Re: working on a reemerging factions mod for eb bi?

    I hope you can do it i would love to see this mod work

  15. #15

    Default Re: working on a reemerging factions mod for eb bi?

    provoke_rebellion doesn't seem to work

    aniway, i archieved my initial objectives: whith the modifications i did, when a faction will be too big and i want another re_emerge, i will simply modify the shadowings in descr_sm_factions, load eb, and once in the game add_population via console until the settlements rebel, and the faction is back

    testing that in a new campaign, i'll also experiment the effects of "crucial battles" (raising battlesurgery and the turns needed for recruitment i will make loser of battle work long before raising other armies)

    as atra said, scripting all that stuff is a work too big

    i did a little guide for reemerging and all the stuff discovered by the way
    https://forums.totalwar.org/vb/showthread.php?t=121113
    Last edited by maxborgatti; 08-26-2009 at 14:03.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO