Cross posting this from Suggestions subforum as maybe some of you would be interested in voting for this.
has_ai_personality should check not the AI personality name but new parameter called, for example, 'id' or 'type' so multiple, similar but slightly different personalities (eg. "nonslaver_hegemonic_imperialists") can be easily added preserving behavior from other files associated with given personality without time consuming and potentially conflicting changes to game files like civics, federations, opinion modifiers, etc.
In vanilla we have for example:
hegemonic_imperialists = {
...
behaviour = {
...
slaver = yes
...
}
...
}
and we could add:
nonslaver_hegemonic_imperialists = {
type = hegemonic_imperialists
...
behaviour = {
...
slaver = no
...
}
...
}
and has_ai_personality = hegemonic_imperialists would return true for nonslaver_hegemonic_imperialists
This parameter could be optional (in which case it fallbacks to personality name) so no changes in vanilla personalities would be necessary.
With that change alone I understand we would still need to add text (diplo greetings, ui labels) associated with new personality name but that is much less conflict prone with other mods than, lets say, civics file. Alternatively this too could work with fallback to texts from 'type' parameter if direct match is not found. That would make adding slight variations of AI personalities very simple. Adding new, less aggressive honorbound_warriors based on having some civic would be super fast.
This change does not seem very work intensive and would make additively modding in new personalities much easier.
has_ai_personality should check not the AI personality name but new parameter called, for example, 'id' or 'type' so multiple, similar but slightly different personalities (eg. "nonslaver_hegemonic_imperialists") can be easily added preserving behavior from other files associated with given personality without time consuming and potentially conflicting changes to game files like civics, federations, opinion modifiers, etc.
In vanilla we have for example:
hegemonic_imperialists = {
...
behaviour = {
...
slaver = yes
...
}
...
}
and we could add:
nonslaver_hegemonic_imperialists = {
type = hegemonic_imperialists
...
behaviour = {
...
slaver = no
...
}
...
}
and has_ai_personality = hegemonic_imperialists would return true for nonslaver_hegemonic_imperialists
This parameter could be optional (in which case it fallbacks to personality name) so no changes in vanilla personalities would be necessary.
With that change alone I understand we would still need to add text (diplo greetings, ui labels) associated with new personality name but that is much less conflict prone with other mods than, lets say, civics file. Alternatively this too could work with fallback to texts from 'type' parameter if direct match is not found. That would make adding slight variations of AI personalities very simple. Adding new, less aggressive honorbound_warriors based on having some civic would be super fast.
This change does not seem very work intensive and would make additively modding in new personalities much easier.