Question to Shogun or Mike regarding -ai parameter
Quote:
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?
Re: Question to Shogun or Mike regarding -ai parameter
post pics of the bear :2thumbsup:
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.
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?
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. ~D
Re: Question to Shogun or Mike regarding -ai parameter
Here is a replay from Shogun at TWC:
Quote:
@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...
:cry: :cry: :cry:
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.
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.
Re: Question to Shogun or Mike regarding -ai parameter
Hmmm... that's strange, not even a campaign script huh? They should be referenced automatically.
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.
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
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 ~;)
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.