Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Re_emergent factions properly spawned in a their ancient regions ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re_emergent factions properly spawned in a their ancient regions ?

    I'm working on making vanilla factions re_emergent. The vanilla shadow faction system doesn't satisfy because I don't want to attach factions to each other. I'd like that factions randomly reemerge in their ancient regions.

    An example : If france conquered england, I'd like that england can reemerge in London if public order is low. But it must work if danemark conquered england instead of france. (that's why the shadow faction system makes no sense here, moreover the faction_emerge command is useless).

    I think I must use a complex script system, something like that :

    if public_order of London < 70% and faction_dead england
    provoke_rebellion London
    spawn_faction england
    give_settlement London to england
    spawn_army in London
    end_if

    Could you help me making the right script ?

  2. #2
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    I'd be extremely interested in getting re-emergence to work, and to centralize all research for it in one thread.

    Why does emerge_faction not suit you?

    Your "give region to faction" might work, if you make England unkillable as a faction. Currently a faction with no provinces or leaders simply disappears from the game, but there are settings for Mongols which specify them as alive even if they have no units or regions, so that they can emerge later on with additional hordes.

    The same principle should apply here. What you'd basically have is a script monitoring the 4-5 key english regions... basically all of Brittania and maybe Normandy.

    Code:
    If faction england has < 1 region, 
    And if region X has low happiness,
    Give region X to England,
    Spawn a small army
    Code:
    If faction england has < 1 region, 
    And if region Y has low happiness,
    Give region Y to England,
    Spawn a small army


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  3. #3

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    I gave the re_emergent ability to all the factions of the game, ran the game 100 turns (the AI playing alone), but the factions that were killed never respawned.

    I found no code to give a region to a faction, 'capture_settlement' doesn't work at all.

    I don't know how to test if a settlement is going to rebel.

  4. #4
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    I believe re_emergent simply makes the faction unkillable, which means that you'll never see its "faction destroyed" movie even if all the regions and characters are gone.

    But to actually bring a faction back you need a script, it seems.

    There's no way to test if a settlement is going to rebel, but off the top of my head I remember ways to test it for low happiness.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  5. #5

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    Quote Originally Posted by SigniferOne View Post
    I believe re_emergent simply makes the faction unkillable, which means that you'll never see its "faction destroyed" movie even if all the regions and characters are gone.
    Actually, I can see the 'faction destroyed' movie even if the faction is set to be 're_emergent'. I must test the effects of 'dead_until_ressurected' and 'dead_until_emerged'.

    Quote Originally Posted by SigniferOne View Post
    There's no way to test if a settlement is going to rebel, but off the top of my head I remember ways to test it for low happiness.
    Could you give me an example ?

    What about giving a region to a faction ?

  6. #6

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    Quote Originally Posted by Octavius View Post
    What about giving a region to a faction ?
    I've just tried to spawn an english army in a french settlement to see if the settlement would become english. The army spawned just near the settlement even if there is no garrison. Mmm... Doesn't work at all.

    Is there any possibility of simulating a diplomatic exchange of settlement ? This could be our last chance... But I didn't find anything about simulating diplomacy transactions.

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    The 'alive until resurrected' or some such line for the Mongols will only work if there is at least one family member alive. You might have to tackle that with an off map member of family (who will die at some point of old age)










  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    You will have to first make the settlement 'legal' for movement of that faction, meaning ownership has to be changed before you can spawn into that settlement.
    This situation causes errors in the descr_strat as well.










  9. #9

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    Yes but how to make the settlement 'legal' through scripting ?

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    First remove the garrison, then change ownership (no idea about the correct command)










  11. #11
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    I believe that if you change the ownership, the old garrison gets expelled anyway.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  12. #12
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    That's how it should work. But then I don't believe in the Easter Bunny either until he introduces himself personally again.
    I just remembered my experience when changing the ownership of a settlement in the descr_strat file and forgetting to move the old garrison. No automatic expelling there, just an error message.










  13. #13
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    Quote Originally Posted by gigantus View Post
    That's how it should work. But then I don't believe in the Easter Bunny either until he introduces himself personally again.
    I just remembered my experience when changing the ownership of a settlement in the descr_strat file and forgetting to move the old garrison. No automatic expelling there, just an error message.

    No no, you don't change province ownership in descr_strat.txt! That will of course give you an error, if you specify the city to be owned by one faction, and the garrison in it to belong to another. What I'm saying is, when you change ownership during the game, the garrison should be expelled. At the very least when you incite the province to rebel, the garrison definitely gets kicked out.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  14. #14

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    Hey everyone,

    some things I came across:

    -'re_emergent' keeps a faction in the code no matter if they have family members or not; the other commands ('dead_until_ressurected' and 'dead_until_emerged') are of no real use for re-emergent factions.
    -Setting up faction as a horde is not necessary for a faction to re-emerge; if they have 're_emergent' in their descr_strat (and descr_sm_factions?) entry, you may spawn any kind of unit for them. Unfortunatly, respawned factions will behave like a horde none the less (i.e. wandering off randomly, plundering and looting).
    -the 'emerge_faction' script command only works if you know who will conquer the faction that should re-emerge (because both have to be set up as shadow/shadowed factions in descr_sm_factions).

    On changing the ownership of a settlement: I know three commands only, but none of them are suitable for 'give region x to faction y'.
    1) Provoke_rebellion: seems to work for shadow/shadowed factions only and changes (or should change) ownership from shadowed to shadow faction. (Probably the most useful of the commands if it works - though I can't remeber if I ever tried it out in M2)
    2) console_command capture_settlement: changes ownership of a settlement to the local player. Pretty useless.
    3) console_command surrender_regions: gives specified faction's regions to the slaves; Pretty useless.

    Cheers,
    D.

    Retired creator of 'Das Heilige Römische Reich' - Get v. 0.7 here.
    -------------------------------------------------------------
    Visit my homepage.
    --------------------------------------------
    Proud son of jimkatalanos, grandson of Garbarsardar and father of DerDiskusWerfer and HannibalExMachina.

  15. #15

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    Quote Originally Posted by Dimitri_Harkov View Post
    -'re_emergent' keeps a faction in the code no matter if they have family members or not; the other commands ('dead_until_ressurected' and 'dead_until_emerged') are of no real use for re-emergent factions.
    -Setting up faction as a horde is not necessary for a faction to re-emerge; if they have 're_emergent' in their descr_strat (and descr_sm_factions?) entry, you may spawn any kind of unit for them. Unfortunatly, respawned factions will behave like a horde none the less (i.e. wandering off randomly, plundering and looting).
    -the 'emerge_faction' script command only works if you know who will conquer the faction that should re-emerge (because both have to be set up as shadow/shadowed factions in descr_sm_factions).
    I agree.

    Quote Originally Posted by Dimitri_Harkov View Post
    On changing the ownership of a settlement: I know three commands only, but none of them are suitable for 'give region x to faction y'.
    I think this is the main problem we have to create a non-hording reemergent faction.

    Quote Originally Posted by Dimitri_Harkov View Post
    1) Provoke_rebellion: seems to work for shadow/shadowed factions only and changes (or should change) ownership from shadowed to shadow faction. (Probably the most useful of the commands if it works - though I can't remeber if I ever tried it out in M2)
    Useless if we don't use the shadow system...

    Quote Originally Posted by Dimitri_Harkov View Post
    2) console_command capture_settlement: changes ownership of a settlement to the local player. Pretty useless.
    Certainly the most usefull command I think, we could change the local faction through scripting to give the settlement to that faction.

    However, this command doesn't work in my own tests... I don't understand why...

    Quote Originally Posted by Dimitri_Harkov View Post
    3) console_command surrender_regions: gives specified faction's regions to the slaves; Pretty useless.
    I never tested it.

  16. #16

    Default

    This is a small thing, but would the faction not dying cause problems with the win conditions that are set to outlive certain factions?

    Only with the shadow faction thing couldn't you have the same commands repeated but with every faction so they'd be a re-emergent command no matter who is the conqueror?

    Oh and they may be a way to make a settlement change hands by passing through the slaves. If console_command surrender_regions gives the region to the slave faction then you could then create another command that gave it to the re-emergent faction. I don't know the command but in RTW:BI I remember playing as the Eastern Empire and occasionally at the beginning the region where Georgia is today (I can't remember the name but it began with a K) automatically came into the player's hands. Surely the commands used then could be used here in M2TW?
    Last edited by Amroth; August 03, 2008 at 05:56 PM. Reason: dp
    "If you're boring, no amount of paintballing or high-speed white-water prostitution will change this."





  17. #17
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    I was just trying to point out that having a garrison in a settlement that has changed ownership will cause an error\crash.
    You are right with the rebellion, that kicks the garrison out, but I wasn't sure if the 'change of ownership' during the game would do the same. Hence my recommendation to script moving the garrison before changing ownership.










  18. #18
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    Just to comment on dead_until_emerged, this command is specified in the Britannia descr_strat.txt, for the barons_alliance faction. It prevents the faction from having to require provinces or leaders at startup. This barons_alliance is not only re_emergent (always in code, and not killable), but also not present in the game at startup: dead_until_emerged.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  19. #19

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    What is the difference between dead_until_emerged and dead_until_resurrected ? Are they used interchangeably ?

  20. #20
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Re_emergent factions properly spawned in a their ancient regions ?

    I don't know if _resurrected is used in any of the Kingdoms campaigns. CA usage would be the best way to find out what they do.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •