Page 2 of 2 FirstFirst 12
Results 21 to 39 of 39

Thread: How to disable autoresolve for the player

  1. #21
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    You could use the I_ConflictType Naval condition to handle the auto resolve in sea battles (remove the initial autoresolve entry).

    Code:
    monitor_event GeneralAssaultsGeneral true
        if I_ConflictType Naval
            autoresolve false
        end_if
        if not I_ConflictType Naval
            autoresolve true
        end_if
    end_monitor
    Please note that I haven't tested this.
    Last edited by Gigantus; October 20, 2014 at 08:36 PM.










  2. #22
    Ego123's Avatar Tiro
    Join Date
    Oct 2011
    Location
    Linz, Austria & Sighetu Marmatiei, Romania
    Posts
    293

    Default Re: How to disable autoresolve for the player

    Quote Originally Posted by Gigantus View Post
    You could use the I_ConflictType Naval condition to handle the auto resolve in sea battles (remove the initial autoresolve entry).

    Code:
    monitor_event GeneralAssaultsGeneral true
        if I_ConflictType Naval
            autoresolve false
        end_if
        if not I_ConflictType Naval
            autoresolve true
        end_if
    end_monitor
    Please note that I haven't tested this.
    Unfortunately does not work,the campaign is unrecognized,Thanks for trying,I would leave this excentric thing for the future because now I have a lot of work to do on vital stuffs of my sub-mod.

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

    Default Re: How to disable autoresolve for the player

    Those should be restrict_autoresolve and no doubt the log will be reporting some kind of error.

  4. #24
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    My bad.










  5. #25
    Ego123's Avatar Tiro
    Join Date
    Oct 2011
    Location
    Linz, Austria & Sighetu Marmatiei, Romania
    Posts
    293

    Default Re: How to disable autoresolve for the player

    Something like this?

    monitor_event GeneralAssaultsGeneral true
    if I_ConflictType Naval
    restrict_autoresolve false
    end_if
    if not I_ConflictType Naval
    restrict_autoresolve true
    end_if
    end_monitor

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

    Default Re: How to disable autoresolve for the player

    Yes. Though I don't know if GeneralAssaultsGeneral fires on naval battles. Try it out and let us know.

    Hmm, not sure if it fires for settlement/fort battles either.

  7. #27
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    That would be GeneralAssaultsResidence










  8. #28
    Ego123's Avatar Tiro
    Join Date
    Oct 2011
    Location
    Linz, Austria & Sighetu Marmatiei, Romania
    Posts
    293

    Default Re: How to disable autoresolve for the player

    Sorry guys,I forget to post the result I added like this in the campaign_script

    monitor_event GeneralAssaultsResidence true
    if I_ConflictType Naval
    restrict_autoresolve false
    end_if
    if not I_ConflictType Naval
    restrict_autoresolve true
    end_if
    end_monitor

    The campain is recognized but is not a change,I still have the posibility of autoresolve battles

  9. #29
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    Maybe the event is unsuitable. Possibly this one (from Aik's earlier code) might work:

    Code:
    monitor_event    ScrollOpened    ScrollOpened    prebattle_scroll










  10. #30
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: How to disable autoresolve for the player

    How can I restrict withdraw from battle for player in some script cases?

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  11. #31
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    Test for your condition, then set a a counter. Then in principle you could use the event from post #8 and instead of forcing the click of a button disable the end_siege button. Somehow an re-enabling of the button will have to be scripted as well.

    If your goal is that the player has to fight then post #8 is all you need.










  12. #32
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: How to disable autoresolve for the player

    Thanks, it works. I wanted a little different thing - to disable withdraw button when AI siege player's settlement. I made a script when rebels siege settlement with small garrison, without siege_settlement - I break a wall with console_command so they no need to wait while siege equipment will be built. And when I press withdraw on prebattle screen player's garrison go back to a settlement and no battle occures. So, if I could disable withdraw button player can choose to fight or to autoresolve (battle result is doubtlessly lost for player). #8 way is good and working of course.

    And one more issue with this script - I wanted to open gates for rebels (as if there's a traitor in a settlement), but command damage_wall {settement_name} gate doesn't work, I have to damage wall, which is less realistic, you know )

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  13. #33
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    Check this stuff. Some related things here.

    Apparently 'gate' destroys the gate house (shooting and oil disabled) - which does not open the gate.










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

    Default Re: How to disable autoresolve for the player

    Quote Originally Posted by bitterhowl View Post
    I made a script when rebels siege settlement with small garrison, without siege_settlement - I break a wall with console_command so they no need to wait while siege equipment will be built. And when I press withdraw on prebattle screen player's garrison go back to a settlement and no battle occures.
    Do you mean that you're using "siege_settlement ... attack" without doing a "maintain" first? That does create a situation where the Withdraw button is enabled. Doing a maintain immediately before it fixes it...

    siege_settlement my_general, the_settlement, maintain
    siege_settlement my_general, the_settlement, attack

  15. #35
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: How to disable autoresolve for the player

    Thanks a lot! I've read Taiji's list earlier, I learned about damage_wall from it at first time. And I haven't seen maintain+attack in scripts that I discover. Just one nore thing - how spy can open settlement gate? Opening gates from inside is more realistic for my purpose.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  16. #36
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    The simple presence of spy initiates a chance of the gates opening. The better the subterfuge traits of the spy the better the chance. You can stack the effect with up to three spies. It's nearly 100% then I think.

    You would have to spawn and move spies into a settlement prior to the attack I assume. Afterward use the kill_character command to get rid of them again.










  17. #37
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: How to disable autoresolve for the player

    Do rebels have spies? And it's pity that there's no console command for that.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  18. #38
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,129
    Blog Entries
    35

    Default Re: How to disable autoresolve for the player

    They do have provisions for spies, but they are not enabled afaik. Might need a recruiting line in the EDB.

    There is the perfect_spy command but I think that only works in conjunction with a script. (Never tried it)










  19. #39

    Default Re: How to disable autoresolve for the player

    Quote Originally Posted by Gigantus View Post
    Maybe the event is unsuitable. Possibly this one (from Aik's earlier code) might work:

    Code:
    monitor_event    ScrollOpened    ScrollOpened    prebattle_scroll
    Just in case anyone else was googling like I was for an autoresolve-disable (for purists) that doesn't break naval battles, your suggestion works. Thanks a ton!

    Code:
    ;
    ; Campaign script
    ;
    script
    
    
    ;------------------- DISABLE AUTORESOLVE ----------------------;
        
        monitor_event    ScrollOpened    ScrollOpened    prebattle_scroll
            if I_ConflictType Naval
                restrict_autoresolve false 
            end_if
            if not I_ConflictType Naval
                restrict_autoresolve true
            end_if
        end_monitor

Page 2 of 2 FirstFirst 12

Posting Permissions

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