NPC Faction, How do you make them do things?

    StormWing0

    Leads the Storm
    Joined
    Jun 26, 2015
    Messages
    2,126
    Reaction score
    316
    • Community Content - Bronze 1
    I know there have a config file you can edit to make them do different things but I've been wondering what does what in the thing for a some time. I'm trying to make a config for a Hyper Aggressive faction that will expand rapidly and be near constantly at war with all other factions. Basically this is the type of faction that would automatically open up on anything in its territory and try to actively exterminate anything else in the galaxy.

    Anyone have ideas on how to edit the config file we get to for making it do at least some or all of this?


    The reason I'm trying to make this happen is mostly to have something to test against and to see what'll happen and yes I'm aware of the lag nuking that'll happen.
     

    Asvarduil

    Builder of Very Small Ships
    Joined
    Apr 17, 2015
    Messages
    272
    Reaction score
    133
    • Community Content - Bronze 1
    • Purchased!
    So, in your world's server database folder, you'll find a folder called npcFactions.

    In that folder, there's a folder for each faction (e.g. Outcasts, Scavengers)

    Within that folder, there's a file called npcConfig.xml. In that file there's a diplomacy section with notes on how to set diplomacy state between factions.
     

    StormWing0

    Leads the Storm
    Joined
    Jun 26, 2015
    Messages
    2,126
    Reaction score
    316
    • Community Content - Bronze 1
    So, in your world's server database folder, you'll find a folder called npcFactions.

    In that folder, there's a folder for each faction (e.g. Outcasts, Scavengers)

    Within that folder, there's a file called npcConfig.xml. In that file there's a diplomacy section with notes on how to set diplomacy state between factions.
    I can assure you those notes between lines aren't as clear as they need to be, I've been looking through those files and the notes aren't as helpful as I'd thought they'd be.



    Just listen to Criss's sweet voice.
    Helps up to a point at least it makes it easier to plan out ships and stations. :)
     
    G

    GDPR 302420

    Guest
    Although NPC factions are cool to have on servers, they are the most destructive feature of this game in terms of server stability.

    Servers like Brierie learnt this the hard way when the NPC factions clogged up their database to the point where they have to wipe the world and start fresh, a hyper expanding aggressive faction is a bad idea.

    Of course, I won't try and stop you but be warned, although Schine likely will not admit it NPC factions is the most destructive and unstable feature they have added to this game.
     
    • Like
    Reactions: Ithirahad

    StormWing0

    Leads the Storm
    Joined
    Jun 26, 2015
    Messages
    2,126
    Reaction score
    316
    • Community Content - Bronze 1
    Yes I know. NPC faction need some kind of limiter on them where they have to use shipyards to spawn new ships and maybe some kind of builder or engineering crew hauler ship for building stations. Also being forced to pay in blocks and other resources to fill the BPs used might help, since no resources no new ships or stations meaning no ability to attack. Like with abandoning systems at some point the NPC faction should cut its loses and wait to see what happens.
     

    Asvarduil

    Builder of Very Small Ships
    Joined
    Apr 17, 2015
    Messages
    272
    Reaction score
    133
    • Community Content - Bronze 1
    • Purchased!
    StormWing0 - I did some research last night on the file I listed, and while it doesn't exactly help you, it might be useful regardless.

    The npcFaction.xml files describe a state machine regarding how the faction behaves in-game. Specifically involving the Diplomacy stuff, those comments pertain to the contents of the diplomacy section beneath it. Each action - declaring war, being at war, concluding a peace treaty, trading with friends, etc. - all control a 'Diplomacy Points' counter. Typically, destructive actions (war) decrease the counter to 0. Constructive actions (peace, trade) increase the counter.

    It might be possible, with some experimentation, for you to manipulate the factions' diplomacy counters/state machines such that they're always hostile to each other, always neutral to anyone else, and always friendly to friends. Thus, you could spawn in ships, set those ships to NPC factions, and have the death match you want.

    Empowered by said finds, I tried to find where the world's current diplomacy states all live. I had no luck. :(