A Total War Saga: TROY

A Total War Saga: TROY

Main Factions - AI Autoresolve Mod
Sheph 3 Sep, 2022 @ 4:08pm
Autoresolve for Troy
Innovative mod. Can you explain what each value means in the function modify_next_autoresolve_battle(0.9, 0.1, 0.1, 7, false)? --attacker win chance, defender win chance, attacker losses modifier, defender losses modifier. I especially don't understand the latter two.


I would like an autoresolve mod with a slight benefit for the human. Would these numbers be correct or do these just allow lopsidded victories?
< >
Showing 1-14 of 14 comments
rafswi7  [developer] 9 Sep, 2022 @ 4:49am 
In this example the attacker will sustain 0.1 (10%) of original losses, while defender will lose 7 times more troops, than normally.
rafswi7  [developer] 9 Sep, 2022 @ 4:50am 
With these numbers the human would win automatically pretty much all autoresolve battles,
Sheph 9 Sep, 2022 @ 5:05pm 
That's great. Do you know what the 0.9 and 0.1 in front mean? Win Chance...90% but how can that be if vastly outnumbered. It just increases the win chance 90% from the current value?
Sheph 9 Sep, 2022 @ 5:55pm 
One more thing: How can I set up a log to receive these messages? And why does it appear like you have an extra "end" at the wrap-up at the bottom?
rafswi7  [developer] 10 Sep, 2022 @ 3:36pm 
Yeah, the values are 0-1 so 1 means 100% win chance.

What log are you speaking of?
Sheph 10 Sep, 2022 @ 5:42pm 
out.ting as in out.ting("defender is major"). I'm testing it with human added in. It works but not as expected. I seem to lose just as badly when at a disadvantage, but my barely-win predictions usually turn into major wins. I wonder if the 7 number is out of range as well.
Sheph 11 Sep, 2022 @ 9:59am 
I switched it around and put human at disadvantage. It appears that there is no difference. In fact, some tests showed better results where this script was reversed (calling for a loss). Can we talk about the source of this mod? What situation was the script developed for? I'm testing it on Veteran battle difficulty and hard campaign settings mostly, but have also had similar results on hard hard and veteran veteran.
rafswi7  [developer] 15 Sep, 2022 @ 5:41am 
How your script looks like?
Sheph 16 Sep, 2022 @ 10:05pm 
I have established a baseline by loading the game without the script but with campaign var autoresolver set to minimal:
autoresolver_battle_result_accuracy_high_prediction_variation 0.0010
autoresolver_battle_result_accuracy_low_prediction_variation 0.0010
autoresolver_battle_result_accuracy_moderate_prediction_variation 0.0010
autoresolver_battle_result_accuracy_very_high_prediction_variation 0.0010
autoresolver_battle_result_accuracy_very_low_prediction_variation 0.0010
battle_combat_outcome_prediction_non_artillery_missile_accuracy 0.0010
Sheph 16 Sep, 2022 @ 10:13pm 
The script add on is at the end:
if attacker_is_major == true and defender_is_major == false then
--out.ting("major attacker v minor defender")
cm:modify_next_autoresolve_battle(0.9, 0.1, 0.1, 7, false) --attacker win chance, defender win chance, attacker losses modifier, defender losses modifier
elseif attacker_is_major == false and defender_is_major == true then
--out.ting("minor attacker v major defender")
cm:modify_next_autoresolve_battle(0.1, 0.9, 7, 0.1, false)
elseif attacking_faction:is_human() == false and defender_is_major == false then
--out.ting("minor attacker v major defender")
cm:modify_next_autoresolve_battle(0.7, 0.1, 0.1, 7, false)
end
end
end,
true
)
end
Sheph 16 Sep, 2022 @ 10:15pm 
If you can advise, I can help test next weekend. I would really like this to work. Right now, I am seeing most results about the same as not using the mod. The autoresolver seems to throw in highly variable results in each direction about 25% of the time.
Sheph 18 Sep, 2022 @ 6:45pm 
Any suggestions for that script? I have 2 lines where the human is defender that follow the pattern of the first one I added. I wonder if there are too many "end"s in there and it is not even running. I've tried it with all kinds of number values even .1, .9., 7,.1 as attacker doesn't budge the result average.
rafswi7  [developer] 21 Sep, 2022 @ 9:10am 
Is your script for Troy or other TW?
Sheph 22 Sep, 2022 @ 5:54pm 
That script is just an add-on to the one you posted here for this mod. I'm still waiting to know if it can be written better or the numbers have limits or something to make it work.
< >
Showing 1-14 of 14 comments
Per page: 1530 50