Modding to increase difficulty
Posted: Fri Apr 28, 2017 8:11 pm
Update: There is now a tactical combat AI mod available by harpy eagle that massively increases AI performance and difficulty
It doesn't add or change any existing game elements to vanilla but it will make the AI much-much smarter when using all the existing tools at its disposal including Assault Shuttles
Be sure to check it out and download from http://stars-in-shadow.com/forum/viewto ... ?f=5&t=666
It will increase difficulty dramatically without resulting to "cheating" the mechanics
------
So in order to increase AI difficulty in a reasonable manner without breaking game mechanics, I was playing around a bit with the config files.
The lowest-hanging fruit, the way I see it are Marauders, who are too aggressive and technologically advanced for the AI to compete with
Thanks to the help of siyoa, targeted following file to reduce their handicaps:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\raiders.lua
Reduced their resource bonuses to be below of normal AI strength:
local difficulty_to_value_curve = {
normal= function(pop) return 60+200*pop end,
}
local difficulty_to_min_psudeo = {
normal=60,
}
local difficulty_to_cost_mult = {
normal=10,
}
Adjusted their tech bonuses to match AI tech scaling:
[75] = tech_costs.early(.5),
[150] = tech_costs.early(1),
[200] = tech_costs.mid(.2),
[250] = tech_costs.mid(.7),
[300] = tech_costs.mid(.9),
[350] = tech_costs.late(.1),
Now on to the AI: It is too friendly toward the player, largely due to the favors and low border tension
Found this files as a possible cure:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\Encounters\generic_resource_request.lua
Increased penalty for refusing help:
refused_help_issue=5
refused_help_issue=10
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\diplo_issues.lua
Uncommenting the last couple of parameters here and increasing penalty for boarder tension + reducing positive relationship effects does not work - file gets syntax error though the placeholders are there maybe from an earlier reference
Increased at least my planets>Their planets penalty to -20
To make AI more interesting, changed below before starting new game:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\new_galaxy.lua
Reduced tech cost multiplier to 0.9 to keep AI tech progress fun
Resource multiplier to 1.5 (AI is loosing ships left and right so is not noticeable by the player unless over 200%)
Ship cost multiplier to 0.9 as it seems to lead to odd ship building behaviour)
To make things a bit more easy on the AI, using small maps with 5 players, and set habitable planet count and pirate raid chance to minimal
Another successful scenario is to go bit: around 170 systems and 7 empires. This will leave the AI plenty of room to expand and build up (it will not be hampered by Raiders due to the above settings).
With the above, the AI managed to expand and build fleets quite early on, and their fleets seem to be balanced in their composition.
Next: would be nice to have an influence cost included in the soft resource request rejection, so that the AI gets angrier faster.
Has anyone an idea if this can be coded into for example the below file?:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\Encounters\generic_resource_request.lua
It doesn't add or change any existing game elements to vanilla but it will make the AI much-much smarter when using all the existing tools at its disposal including Assault Shuttles
Be sure to check it out and download from http://stars-in-shadow.com/forum/viewto ... ?f=5&t=666
It will increase difficulty dramatically without resulting to "cheating" the mechanics
------
So in order to increase AI difficulty in a reasonable manner without breaking game mechanics, I was playing around a bit with the config files.
The lowest-hanging fruit, the way I see it are Marauders, who are too aggressive and technologically advanced for the AI to compete with
Thanks to the help of siyoa, targeted following file to reduce their handicaps:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\raiders.lua
Reduced their resource bonuses to be below of normal AI strength:
local difficulty_to_value_curve = {
normal= function(pop) return 60+200*pop end,
}
local difficulty_to_min_psudeo = {
normal=60,
}
local difficulty_to_cost_mult = {
normal=10,
}
Adjusted their tech bonuses to match AI tech scaling:
[75] = tech_costs.early(.5),
[150] = tech_costs.early(1),
[200] = tech_costs.mid(.2),
[250] = tech_costs.mid(.7),
[300] = tech_costs.mid(.9),
[350] = tech_costs.late(.1),
Now on to the AI: It is too friendly toward the player, largely due to the favors and low border tension
Found this files as a possible cure:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\Encounters\generic_resource_request.lua
Increased penalty for refusing help:
refused_help_issue=5
refused_help_issue=10
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\diplo_issues.lua
Uncommenting the last couple of parameters here and increasing penalty for boarder tension + reducing positive relationship effects does not work - file gets syntax error though the placeholders are there maybe from an earlier reference
Increased at least my planets>Their planets penalty to -20
To make AI more interesting, changed below before starting new game:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\new_galaxy.lua
Reduced tech cost multiplier to 0.9 to keep AI tech progress fun
Resource multiplier to 1.5 (AI is loosing ships left and right so is not noticeable by the player unless over 200%)
Ship cost multiplier to 0.9 as it seems to lead to odd ship building behaviour)
To make things a bit more easy on the AI, using small maps with 5 players, and set habitable planet count and pirate raid chance to minimal
Another successful scenario is to go bit: around 170 systems and 7 empires. This will leave the AI plenty of room to expand and build up (it will not be hampered by Raiders due to the above settings).
With the above, the AI managed to expand and build fleets quite early on, and their fleets seem to be balanced in their composition.
Next: would be nice to have an influence cost included in the soft resource request rejection, so that the AI gets angrier faster.
Has anyone an idea if this can be coded into for example the below file?:
\\Steam DIR\steamapps\common\Stars in Shadow\Lua state\Encounters\generic_resource_request.lua