Action scripts - AngerNodes manipulation#442
Action scripts - AngerNodes manipulation#442FS-21 wants to merge 89 commits intoPhobos-developers:developfrom
Conversation
in SetTheMostHatedHouse() & GetTheMostHatedHouse()
|
Nightly build for this pull request:
|
YRIDZE
left a comment
There was a problem hiding this comment.
Please, review your code for properly formatted "if" long statement separation (most of them I highlighted) and "switch" statements (availability of the required blank lines). And also break up long log lines.
Co-authored-by: YRIDZE <78161538+YRIDZE@users.noreply.github.com>
Co-authored-by: YRIDZE <78161538+YRIDZE@users.noreply.github.com>
Co-authored-by: YRIDZE <78161538+YRIDZE@users.noreply.github.com>
Co-authored-by: YRIDZE <78161538+YRIDZE@users.noreply.github.com>
Co-authored-by: YRIDZE <78161538+YRIDZE@users.noreply.github.com>
Co-authored-by: YRIDZE <78161538+YRIDZE@users.noreply.github.com>
When using ObjectInfo or the AngerNode Action is executed successfuly some debug lines will be written in debug.log with the current AngerNode values of each house.
|
For the testing of the PR I added some new debug lines that will appear in debug.log each time the action is executed successfuly or ObjectInfo is used. Data will look like this:
How interpret each House's line?: |
c3d0a52 to
1abda28
Compare
Then I'll add the FA2 references from the previous map events PR here if you agree. |
ScriptExt::GetTheMostHatedHouse(...) was refactored due the multiple duplicated portions of code and other feedback changes-
Co-authored-by: Kerbiter <crabiter@vivaldi.net>
|
Added FA2 documentation of these script actions as requested. Isn't nothing more left right? |
2128644 to
799ea22
Compare
b429215 to
280b1c8
Compare
This pack of actions manipulates the hate of the houses towards other houses. This don't replace the game function "make_enemies()" but helps the AI to pick the one with highest value for being the most hated (the main enemy of the house used in the AI trigger tag called "OnlyTargetHouseEnemy").
The hate table values of all Houses increase quickly depending of how much time another house is attacking by another house & decreases very slow in moments of peace.
Curiosity note: this can be used for overriding the known MP bug of allied AI with the human player at the beginning of the games that they start as pacifists until they get attacked by others (because their only hated player is the 1º human player and that one is "ally" so they can't attack him).
The same reason explains why initially in the MP battle all AI houses attacks the player.
No official documentation yet but I'll copy here all the details & possible values of each action: