Sorry, I can't help you.![]()
Even I don't understand why the game changes the turn simply by changing the faction controlled.![]()
I wonder if the factions involved in this system of changes make any movement and when.
Sorry, I can't help you.![]()
Even I don't understand why the game changes the turn simply by changing the faction controlled.![]()
I wonder if the factions involved in this system of changes make any movement and when.
They do. The script wouldn't have much point otherwise.Originally Posted by Monkwarrior
I wrote a couple of drafts to try and explain why it works, but they all got a bit cumbersome. Briefly, there's an order in which factions take their turns, and it loops. What happens in this mod is:
1. The AI plays for any faction that isn't you until it's your turn.
2. The script waits until it's your turn, and then makes "you" into someone else who is later in the turn sequence.
3. The AI plays for any faction that isn't you until it's your turn.
Rinse, lather, repeat. Every faction has "its turn" played by the AI. The only weakness is that if someone does something to your faction when it's not your faction's turn and you have to respond... well, you're still in charge of the faction and you have to respond.
I've more or less finished dealing with this weakness, though. The script now autoresolves battles and dismisses diplomacy windows.
Incidentally, I did a whole bunch of experiments with the -ai command line. I think what makes it weird is that a game started under -ai can't load any scripts.
nor can you continue a game after starting it with the -ai command, you can after taking some actions, but you cant just press the turnbutton after disabling the AI again, or at least I couldnt after freezing the AI using the "halt_ai (optional; faction)" as the players turn would end but the AI never actually started its turn ....
G
If you use "console_command control faction" rather than halt_ai, the ai seems to keep playing turns for all of the other factions.
I've been trying to figure out whether the -ai switch turns off something that can be turned on again, so far as getting scripts running again goes. No progress yet.
I can confirm that you can use a background_script with the -ai command if you launch it automatically using the Campaign script. You know:Incidentally, I did a whole bunch of experiments with the -ai command line. I think what makes it weird is that a game started under -ai can't load any scripts.
So then, you can use the script to halt the game the turn you want to control any faction using the command:advance_advice_thread Background_Script_Thread no_dismiss
wait 1
select_ui_element advisor_portrait_button
simulate_mouse_click lclick_up
"console_command control faction"
I posted it in a similar thread of this forum when I discovered it, I'm sorry I have not read this topic before to explain it here.
I have been using this way to debug my scripts and the campaign balance for long time now, with great results.
BTW, as Red Spot always says, I can also confirm that you don't need to use the combo with "simulate_mouse_click lclick_down", just needed the click_up.
mrtwisties, apologies if I've slightly lost track of where you've got to with this.
Does your version give you an autosave you can re-load do you know?
I'm running testing at the moment with script automatically launched from campaign script and then also triggering ER's year jump script to go on 200 turns (BI mod), that works fine for balance issues, but I'm getting occassional CTD about 140 turns in which is probably script generated unfortunately. It autosaves whilst on year jump but save doesn't seem to know who you are so crashes if trying to re-load. I could really do with being able to re-load before CTD as never manage to be watching campaign at right point to see what problem area is otherwise. (watching campaign prevents CTD occuring, it just happens as soon as you get distracted!)
Not used mods before? Looking for something small and fun?!Download the:
Bookmarks