Results 1 to 7 of 7

Thread: Can we script Rome siege?

  1. #1

    Default Can we script Rome siege?

    I am trying to force HRE to siege Rome (a simulation of the sack of Rome):
    Code:
        if not I_IsFactionAIControlled papal_states	and not I_SettlementOwner Roma = hre
    		spawn_army
    		faction hre
    		character random_name, general, age 23, x 212, y 181, label Rome_italy_invasion1
    		traits NaturalMilitarySkill 3
    			unit   NE Bodyguard			exp 2 armour 0 weapon_lvl 0
    		end
      end_if
    
    
      siege_settlement Rome_italy_invasion1, Roma, maintain
    The unit is created next to Rome, but it doesn't siege the city for some reason...
    Is Rome special or something? I am doing something wrong maybe?

  2. #2
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: Can we script Rome siege?

    What are the starting relations between papal states and HRE in your descr_strat ? Are they at war and with -1.0 faction standing ?

  3. #3

    Default Re: Can we script Rome siege?

    They might be indeed in good terms. In that case I wonder if there is a way to script hre declaring war on papal states?

  4. #4

    Default Re: Can we script Rome siege?

    Hmm... Checked yesterday and they have a -0.1 relation.
    So it doesn't look different than when I use this on other factions.

  5. #5
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: Can we script Rome siege?

    -0.1 is almost nothing. Try -1.0 instead, they will really hate each other much more. In faction standings, also set them at_war already.

  6. #6
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Can we script Rome siege?

    I assume they're not allies either then.

    I wonder if there is a way to script hre declaring war on papal states?
    console_command diplomatic_stance hre papal_states war

    But scripting them to lay siege to papal_states would already do that.

    Are you sure the internal name is Roma? In vanilla it is Rome. I tried "Roma" at first and got a log error. (It worked after I fixed that, without needing to declare war first.)

    If this is being done during turn end (your script doesn't show when it's being done) then maybe they do lay siege but break it off within hre's turn. If I was the AI then I wouldn't want to be maintaining a siege with just a general either.

    You will need to move that siege_settlement into the if...end_if block above it, otherwise it will be trying to lay siege even if nobody was spawned. Not that this is your problem here.

  7. #7

    Default Re: Can we script Rome siege?

    Quote Originally Posted by Withwnar View Post
    I assume they're not allies either then.


    console_command diplomatic_stance hre papal_states war

    But scripting them to lay siege to papal_states would already do that.

    Are you sure the internal name is Roma? In vanilla it is Rome. I tried "Roma" at first and got a log error. (It worked after I fixed that, without needing to declare war first.)

    If this is being done during turn end (your script doesn't show when it's being done) then maybe they do lay siege but break it off within hre's turn. If I was the AI then I wouldn't want to be maintaining a siege with just a general either.

    You will need to move that siege_settlement into the if...end_if block above it, otherwise it will be trying to lay siege even if nobody was spawned. Not that this is your problem here.
    You were right, they actually were breaking the siege because the army was obviously too weak to take Rome. I added a proper army with cannons and it fixed the issue.

    Thanks for the diplomacy command by the way, I needed that for another script anyway .

Posting Permissions

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