Results 1 to 18 of 18

Thread: Disable the AI

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Disable the AI

    Is there any way to turn the retarded AI completely off?

    I tried via the command ai_active_set but it doesn't seem to work. Maybe it's my script that's flawed?

    Code:
    monitor_event FactionTurnStart FactionType russia
    	           and I_TurnNumber = 0
    	           and not FactionIsLocal
    
                       ai_active_set off
    
    terminate_monitor
    end_monitor

  2. #2
    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: Disable the AI

    You switch the AI off, nothing moves. Simple as that.
    You could try to delete the contents of config_ai_battle and descr_campaign_ai_db and see what happens. But I would think that that would be counterproductive - No AI files, no AI moves (and possibly untold CTDs)


    Edit: according to the Docudemons the command is correct. But why use it only for one faction?
    Has the command any effect all ? (see my previous comment)
    Last edited by Gigantus; August 09, 2009 at 03:20 AM.










  3. #3
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Re: Disable the AI

    So I can't turn the AI of just a faction off?
    I just want the ai of a faction to damn stop moving it's armies around instead of defending its only city


    But then, my script didn't turn any AI off.

    Quote Originally Posted by gigantus View Post
    Edit: according to the Docudemons the command is correct. But why use it only for one faction?
    Has the command any effect all ? (see my previous comment)
    Because said faction only has 1 city, and it keeps emptying it (only FL and 1 unit in it), while at start they have 10 units...
    And that city is a village - no walls -, so all they have to do is attack it and bam, faction destroyed
    Last edited by axnsan; August 09, 2009 at 03:22 AM.

  4. #4
    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: Disable the AI

    It is a bit more difficult than that. Have a look into this file: descr_campaign_ai_db and you will see that it is highly complicated indeed.

    Xeryx has been working on this since M2TW got released, I think - and he is still tuning it.

    It is a matter of getting the parameters right.










  5. #5
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Re: Disable the AI

    Look, all I want to do is turn russia's (Ents') AI off if it's not controlled by a player. So they don't do anything, but stay in their cozy settlement.

    I was hoping someone knows a way to do this or can spot something that is wrong with my script... since this doesn't seem to have any effect.

  6. #6
    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: Disable the AI

    You could freeze them like the Aztecs.










  7. #7
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default

    !

    And now the game freezes on their turn.
    Last edited by Archaon; August 14, 2009 at 06:06 AM. Reason: double post

  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: Disable the AI

    No lol rofl or whatever will match that!
    freeze_faction_ai aztecs
    unfreeze_faction_ai aztecs










  9. #9
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Re: Disable the AI

    Yes. I did that (with a script to make sure they're not controlled by the player) and now the game doesn't go past their turn

  10. #10
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Disable the AI

    Quote Originally Posted by axnsan View Post
    Yes. I did that (with a script to make sure they're not controlled by the player) and now the game doesn't go past their turn
    Post the log, hopefully it's set to *script* trace or higher level logging.

  11. #11
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Re: Disable the AI

    Here. As far as I can tell nothing is wrong, but sicne the AI is frozen it can't end its turn. My guess would be that I have to:

    Make the faction not appear in the list (like it's done for aztecs and rebels) - how is it even done ?
    And if it means that it will have to be non playable, it's a no go anyway.

    or

    Make a script that will end the turn for russia everytime it's their turn - any idea if there is a command for ending the turn ?

  12. #12
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Disable the AI

    Freezing a faction shouldn't make it unable to end its turn. You should probably have it as nonplayable, though.

  13. #13
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Re: Disable the AI

    Oh well it seems you're right. I'll just make some traits to hold their generals in place. Hopefully the AI won't move the units without generals outside the city...

    Anyway, +rep to you both for trying to help

  14. #14

    Default Re: Disable the AI

    I wonder were your idea's come from axnsan.. wouldn't be here would it..

    EDIT: anyone registered to the dev forum can see the thread in the link above.

  15. #15
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Re: Disable the AI

    Actually you're not the only guy with a brain on this planet.

    From play testing it became obvious to me that the ents were trying to expand. So they only logical thing to do was to either kill their ai or make their characters unable to move. Obviously disabling the ai was beter, so i tried that first.


    And your idea consists of toggling the ai on/off based on various things, while I just wanted to shut it down once and for all

    Why am I even explaining this to someone who won't accept that people can think?

  16. #16

    Default Re: Disable the AI

    Sad.. you 'were' a team member - before you read the script work i posted in July and started this thread to show that you thought of it all on your won..

    Now your next argument will be that you have memory lapse and you didn't know about 'our' work when you 'thought' all this up on your own..

    Anyway - I am not going to seek any official action on TWC - i am satisfied to have you off the DaC team. period.

    Would you like me to delete these posts?

  17. #17
    axnsan's Avatar Protector Domesticus
    Join Date
    Dec 2008
    Location
    Timisoara, Romania
    Posts
    4,437

    Default Re: Disable the AI

    Oh yeah actually, I did have a memory lapse. Probably the reason I didn't use your script or any of 'your' work.
    BTW, your comment about seeking an official action on TWC is ridiculous.

    Whatever, it's not like I lost anything for not being in your 'team' anymore. I could care less.

    Sure, delete them.

  18. #18
    Germanicu5's Avatar Will buy spare time...
    Join Date
    Feb 2009
    Location
    Not Zee Germany
    Posts
    2,101

    Default Re: Disable the AI

    some clarification: ai_active_set off command concerns battle ai and deleting battle AI files doesn't make ai passive during battles.

    Even if you delete all instances and paks, there's still hardcoded "stock" ai that will be used. This is the reason why people can include whatever fantasy code they like in xml AI files and it won't spoil much - and will even look like working for inexperienced user ( I haven't checked it for campaign AI, but I'm close to assuming it's similiar).

    Regards
    I have no memory of this place.

Posting Permissions

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