Page 1 of 1
[15.35] get_cease_fire is false for neutral force
Posted: Mon Oct 09, 2017 4:31 pm
by Adil
Entities of player and neutral forces do not attack each other. Yet the command:
Code: Select all
game.player.force.get_cease_fire"neutral"
returns false. (As well as other variants of obtaining the diplomatic stance between the player and the trees.)
Actually, the neutral force seems to be at war with every other force.
Re: [15.35] get_cease_fire is false for neutral force
Posted: Mon Oct 09, 2017 5:55 pm
by Rseding91
Thanks for the report. The cease_fire mechanic was added long after the neutral force system was put in place and was never intended to be used with it. Similarly how the "get_friend" function says false when you check it against itself - it's just outside of the scope of what it's meant to do.
The neutral force is neutral to everyone - implicitly. Adding it to every force that exists would do nothing but add more data to the save file and complicate the logic further.
Re: [15.35] get_cease_fire is false for neutral force
Posted: Tue Oct 10, 2017 5:50 pm
by Adil
Well, for now it complicates the checks of two forces relations and introduces behavior contradicting to the documentation.
The documentation for the functions simply says:
get_cease_fire(other) → boolean
Will this force attack members of another force?
get_friend(other) → boolean
Is this force a friend?
There is no "you should check yourself if the force is neutral" warning there.
And is there any reason not to put something like this:
Code: Select all
if (force.name=="neutral") {return true; };
inside the function, rather than inside the code that expects the function to do its thing.