faction_set_all_relation ally command for NPC factions - except consider neutral enemy ones.

    Support?

    • Yes.

      Votes: 0 0.0%
    • No.

      Votes: 0 0.0%

    • Total voters
      0
    Joined
    Aug 21, 2013
    Messages
    240
    Reaction score
    24
    • Community Content - Bronze 1
    Okay, I have learnt how to create new NPC factions

    (example: /faction_create_as -3 "The Federation" "your name here_ in double-quotes if_it_has_spaces")

    (must be a negative number, else it's an ordinary fac.)

    but... what if I want that faction to consider neutral ally? /faction_set_all_relations -3 ally never works with NPC factions for some reason. And, it should also never work with factions which consider neutral enemy.

    I know of /faction_set_relation -3 -2 ally, but... that's not automatic when a new faction is created etc.

    My suggestion is this: /faction_set_npc_relation (negative id) (ally/enemy/neutral) so that we can have NPC factions that are allies with all those who aren't enemies with them, so that The Federation aren't allies with Pirates!

    So, support?
     
    Joined
    Jun 27, 2013
    Messages
    896
    Reaction score
    166
    The whole factions part of StarMade in its current form is more of a proof-of-concept or early development stand-in, with lots of potential, but eventually marked for change.

    I think I see where you're coming from, but I don't think this is how it should work, or how it even can work (among NPCs).
    A neutral faction should be that, neutral, and not come to the help of another faction just because they happen to be neutral too. Neutral to whom? Say you have factions P, T, and X.
    P has T and X as enemies (and everyone else, really)
    T is neutral towards P and X (hard to believe as P has been harrowing T forever, but T have their principles)
    Now let's say X is neutral towards T and P - how should they react if they witness a fight between P and T?
    Should they change their relationship towards P? Or towards T?
    What if P were neutral towards X - as per your suggestion X should consider both P and T as allies. Should X risk war with P? Or would T declare X enemy if X were not coming to their aid? Can we even assume T has any knowledge about the relationship between P and X? From T's point of view, P and X might indeed be allies...
    These are questions that can't be answered by a simple script logic, or at least they shouldn't be left to a script - within minutes, the entire neutral universe would change their stances to enemy or ally, and you wouldn't even need a "neutral" option to begin with.
    Better to have the sysadmin create their NPC factions with the proper relationships defined, and reliably so.

    So yeah, no, not really in support of this suggestion... not until the faction system is expanded way beyond tristate logic.


    /faction_set_all_relations -3 ally never works with NPC factions for some reason. And, it should also never work with factions which consider neutral enemy.
    That would be because faction_set_all_relations has only one parameter, namely the relationship of every faction towards every faction. I have no idea why anyone would need that except to start a universal thermonuclear war before the final server reset; I don't see any useful application as it is just too broad and unspecific.

    As an intermediate solution, faction_set_all_relations could be modified, or another command introduced, say "faction_default_relation ID enemy/neutral/ally", such that it takes two arguments, sets the stance of the specified faction towards all other current factions, and continues to monitor for new factions, to set the relation towards them as they are created.

    For example to recreate the pirates, one would use "faction_create_as -1 "The Pirates" "The Dread Pirate Roberts"; faction_default_relation -1 enemy" to make certain they still are the misanthropes they always were.

    This way factions can bulk-set everyone, and then fine tune individual relationships.


    /faction_set_relation -3 -2 ally
    The command to set the relationship between two factions is faction_mod_relation -3 -2 ally , that just as an aside. And no, it hasn't changed since the OP ; )