AI surrender |
Scrolling all the files in Utilities Folder, I've seen a strange thing... this one:
// Do we surrender?
set perform_surrender := (pct_compare >= lng_Politics_Min_Score_Pct_Diff_To_Surrender)
if (perform_surrender) and (Sys_Get_Random_Long(1, 4) >= 2) then
set perform_surrender := FALSE
endif
if (not Sys_Are_We_Computer_Player(sys_long_Player_ID)) then
// Ministers used by human players should never surrender.
set perform_surrender := FALSE
endif
if (Sys_Is_Game_Using_Teams()) and (from_plr > 0) then
if (not Sys_Empire_Politics_Is_Player_On_Our_Team(sys_long_Player_ID, from_plr)) then
set perform_surrender := FALSE
endif
endif
It seem that for letting an AI to surrender, you must have more point (seeing Global Variables, I see you must have five time the point), but also the random number must be 2/3/4, so, if you have more than 5 time point you have 75% possibility of successfull requesting the enemy empire to surrender. But in all this code there is one little BUG... here:
if (perform_surrender) and (Sys_Get_Random_Long(1, 4) >= 2) then
set perform_surrender := FALSE
endif
this part of the code say that if you have more than five times point (perform_surrender) and the random number is 2 or more (Sys_Get_Random_Long(1, 4) >= 2) then the enemy empire DON'T surrend!!! (set perform_surrender := FALSE)
Changing the FALSE to TRUE the enemy empire would surrender... not?

Re: AI surrender
No, not a mistake. Just a different way to look at the programing. I've learned from this just where to make it MORE difficult for the AI to surrender. Thanks
Unole!
Directive 721: Cover your own a$$ first. Solo
Re: AI surrender
I can't remember now the last time anyone surrendered to me, even when they were crushed. Perhaps my reputation precedes me. 
Re: AI surrender
if default meaning of perform_surrender := FALSE
then AI will never surrender, at the start should be string perform_surrender := TRUE
Re: AI surrender
I'll have to check those settings. 
Re: AI surrender
The AI has never once surrendered to me in SEV since I bought the game the day it came out, nor in the demo the months preceding. 25% chance my ass. lmao. I can send an enemy that I've completed dominated, have over 10x the score of, 10 messages demanding their surrender every turn for 20 turns and never get a single surrender. I can have them down to a single planet with 125M and no way to get off the planet, surround the planet with my ships, and even move a ship onto the same sector as their planet that won't attack them, and they still don't surrender. I remember them saying they did an update to fix that, too, and apparently it didn't work.
Based on that, the code that says surrender=false means that they will never surrender, and the true means they will 25% of the time, unless you've changed the %. I do the same thing with every race, I try to get the maximum population I can, fill up planets that have the wrong air type for my people and let the new race use those planets. But out of the thousands of races I've crushed, not a one has surrendered to me. The only time I've ever seen anyone surrender is when a race rebels from the AI and the AI gets it back 2 turns later.




Re: AI surrender
That depends on how easily you want the enemy empire to roll over and play dead. If you change (Set perform_surrender := FALSE) to (set perform_surrender := TRUE) then yes, the enemy empire will surrender MORE OFTEN. 75% chance of surrender. The current programming only allows a 25% chance of a surrender. I like to think of my enemies as arrogant and prideful enough to fight to the death. Which I am quite content to provide to them.
Unole!
Directive 721: Cover your own a$$ first. Solo