Results 1 to 13 of 13

Thread: Question to Shogun or Mike regarding -ai parameter

  1. #1
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Question to Shogun or Mike regarding -ai parameter

    Q: MikeB mentioned an auto-run feature that can be used to run a game without player intervention. This would be very useful for mod testing. Is there any way we can activate it now? If not, will we be able to in the future?

    A: MikeB was very naughty to mention that and will shortly be fighting the company bear to pay for his mistake. :) This is a feature we use internally for debugging. Autorun is not something that we've openly advertised for released versions, and it's not normally something that a player would want to do, simply because they are *playing* the game rather than *watching* stuff happen. However, there's a -ai command line option that turns autorun on in release builds after the 1.2 patch. This doesn't work with earlier versions of the game.
    Any way to pause or temoraly disable ai autorun?
    Currently if I start game with -ai, it goes and goes and never stops.

    And if I save game, and load it (after removing -ai), it still goes and goes...
    No way to stop it.

    And stoping is crucial, if I (and other moders) need to examine AI player game.


    Mike, Shogun?
    Please?
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  2. #2
    robotica erotica Member Colovion's Avatar
    Join Date
    May 2004
    Location
    Victoria, Canada
    Posts
    2,295

    Default Re: Question to Shogun or Mike regarding -ai parameter

    post pics of the bear
    robotica erotica

  3. #3
    Spindly Killer Fish Member ShellShock's Avatar
    Join Date
    Aug 2004
    Location
    UK
    Posts
    189

    Default Re: Question to Shogun or Mike regarding -ai parameter

    I might be able to add support in RomeSage to disable the -ai switch in the save file, assuming it is simply a few bytes that are affected, but I won't be able to do anything until the weekend.
    He does sit in gold, his eye red as 'twould burn Rome.

  4. #4
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Question to Shogun or Mike regarding -ai parameter

    That is an answer that doesn't bode well for the modding community. Do they actually realize that people are modding their game?

  5. #5
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Question to Shogun or Mike regarding -ai parameter

    Quote Originally Posted by ShellShock
    I might be able to add support in RomeSage to disable the -ai switch in the save file, assuming it is simply a few bytes that are affected, but I won't be able to do anything until the weekend.
    Better then nothing.
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  6. #6
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Question to Shogun or Mike regarding -ai parameter

    Here is a replay from Shogun at TWC:
    @Player 1
    Just asked around and the two console commands you need are halt_ai and run_ai, which do exactly what the names suggest on the campaign map screen. You open the console by hitting the ~ key during play. Hope that helps!
    Unfortunately, it seems that this command is disabled in console, at least in 1.2
    Not like it is first time, since some other commands can only be accessed by scripts and not console.

    So, I'm again stucked...
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  7. #7

    Default Re: Question to Shogun or Mike regarding -ai parameter

    The halt_ai command certainly works through a script because Myrddraal uses it in his Hot Seat mod. Don't know about the run_ai one though.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  8. #8
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Question to Shogun or Mike regarding -ai parameter

    Unfortunately I can't seem to run any script (nor starting nor, "show me") when -ai is turned on.
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  9. #9

    Default Re: Question to Shogun or Mike regarding -ai parameter

    Hmmm... that's strange, not even a campaign script huh? They should be referenced automatically.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  10. #10
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Question to Shogun or Mike regarding -ai parameter

    I was wrong.
    Campaign starting script works.
    I just tested it with simple toggle_fow script.

    And later I tried one with halt_ai at start and it didn't started autoai even with -ai enabled.


    EDIT:
    Although I'm not sure would script that lasts more then 1 turn would work. I think I had some problems with that.
    My plan was to make script that would stop autorun after 10-20 turns and start it again after pressing end of turn.

    If it could work, it could be great tool for moders.
    Last edited by player1; 07-28-2005 at 16:52.
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  11. #11
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Question to Shogun or Mike regarding -ai parameter

    I succeeded in making small script to run AI for X turns (2 years in this case). After that game is stoped and can't be continued (since AI is disabled).

    Code:
    script 
    	suspend_during_battle on
    	while I_TurnNumber < 4
    	end_while					
    	console_command halt_ai
    end_script
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  12. #12
    Spindly Killer Fish Member ShellShock's Avatar
    Join Date
    Aug 2004
    Location
    UK
    Posts
    189

    Default Re: Question to Shogun or Mike regarding -ai parameter

    Does anyone still want me to try and add support to RomeSage for toggling the ai switch? I don't want to put in the effort if no one is going to use it
    He does sit in gold, his eye red as 'twould burn Rome.

  13. #13
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Question to Shogun or Mike regarding -ai parameter

    Yes,
    Because whatever scripting stuff I do to stop it, every time I load saved game, it starts auuoruning again.
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

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