View Full Version : Testing with -ai
Dol Guldur
07-06-2007, 23:03
Does anyone have and tips or tricks for testing mods with the -ai command? It's great to have it run while you go off doing something else, but how do you check what is going on and what might cause a CTD should that happen? If you load the saved game it just reverts back to Ai-control and you cannot access necessary information.
EDIT: halt_ai console does work (missed it, the rest do not it seems)
Makanyane
07-06-2007, 23:55
It's not quite an answer to your question but after advice here:
https://forums.totalwar.org/vb/showthread.php?t=78706&highlight=autorun
I found that good answer for campaign testing was using a variation on ER's year jump script, which should work as well for you if you have spare factions in BI it can apply to. To reset date it runs to you have to change script before you start so its not entirely flexible but does give you back complete control at the end of that pre-set time so you can look around, in conjunction with perfect spy script you can get pretty good idea what ai factions have been doing without you, albeit for set term.
If you CTD within that term you'd need to set to shorter term and then go on manually to try and find problem date, if its date related.....
(does halt_ai do anything useful except stall it in fixed position?)
Dol Guldur
07-07-2007, 00:35
Yes, halt_ai gives you control (though limited) of your faction (though freezes it I believe if done on a turn that is not your originally-selected faction?) - it's not a perfect solution. run_ai starts up the ai again.
It'll do for now. I'm not messing with scripts - they are too temperamental in whether they decide to work or not ;) (though I have perfect spy).
Do you remember why autosave can sometimes cause CTDs? I get no ctds but when I switched on auto_save to true I - every 50 years or so - get a ctd that just happens to occur on the autosave. We have autosave switched off (and so it will remain) but just wondered what caused it. I'm sure my coding is not at fault :laugh4:
Do you remember why autosave can sometimes cause CTDs?
Can be caused by a bad name. As an experiment, I once set a character's surname to a carriage return. The game was fine with this until I hit the end turn button: the game autosaved and crashed. If memory serves, wlesmana had this very problem with -ai.
[EDIT: Sorry. Here's (https://forums.totalwar.org/vb/showthread.php?t=74045) the thread: wlesmana actually didn't have the problem when using -ai.]
Dol Guldur
07-07-2007, 18:32
Thx. I think everything is all right now ;)
Teleklos Archelaou
07-09-2007, 16:43
Wow, I didn't know you could halt it. Nice tip!
Dol Guldur
07-09-2007, 18:09
Glad to be of use, Teleklos! ;)
Good to know :yes:
In the same topic, Has anybody been able to use some of these console commands: list_ancillaries, list_traits or test_ancillary_localisation?
If that don't work, could you tell me how do you (modders) adjust the chances of ancillaries and traits?. I mean, do you know a way to see all the ancillaries and traits that appear in game?
I think the best way could be to use -ai, then halt_ai, then change the control to other factions (using scripts), and then inspect the characters one by one... but I don't know if there is a better method.
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.