Bug Can't spawn NPC Faction

    Joined
    May 3, 2015
    Messages
    3
    Reaction score
    0
    • Purchased!
    Everytime I try to spawn a NPC Faction I get an Error Message: "n must be positive" or "Not type of integer"
    Its on a Server.
     
    Joined
    Jul 17, 2013
    Messages
    1,429
    Reaction score
    205
    • Tester
    i havnt tried to spawn a NPC faction yet but what was the exact syntax you did use to do it ?
     

    Centauri

    Ancient Lurker & Modder
    Joined
    Sep 19, 2013
    Messages
    201
    Reaction score
    160
    • Legacy Citizen 10
    Was going to post a thread of my own, but saw this right near the top of the list already.

    I have had the first of the 2 errors that ColonelSawyer has had when I have tried spawning in npc factions on my server.



    This error happens when using the commands
    • /npc_spawn_faction
    • /npc_spawn_faction_pos_fixed
    As a test, I had tried entering the example command to see if it was error on my part, however, it gives the same error. ( /npc_spawn_faction "My NPC Faction" "My Faction's description" "Outcasts" 10 )


    I have looked in the server logs to try to find the error shown, but have not seen anything.
     
    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    Everytime I try to spawn a NPC Faction I get an Error Message: "n must be positive" or "Not type of integer"
    Its on a Server.
    As a test, I had tried entering the example command to see if it was error on my part, however, it gives the same error. ( /npc_spawn_faction "My NPC Faction" "My Faction's description" "Outcasts" 10 )
    Is this on servers that did not get NPC's on the map when the NPC update came out? Because Generalmoneys seems to try to spawn the Outcasts faction.

    If so then you have another problem that needs fixing first. Look into this thread.

    Once the map has been initiated with the NPC's then the commands to spawn in other NPC should work.

    EDIT: Generalmoneys gives a detailed description below. (y)
     
    Last edited:

    Centauri

    Ancient Lurker & Modder
    Joined
    Sep 19, 2013
    Messages
    201
    Reaction score
    160
    • Legacy Citizen 10
    I have found a way that appears to have fixed the problem, allowing NPC factions to automatically spawn (As long as you have the configs set up for automatic generation); it is easy to mess up however. I also have had yet to test entering the commands to spawn in new faction ingame however.

    This was done between my linux debian based server hardware and my personal windows PC.

    Keep in mind that this requires FTP to the server files.
    1. Backup server-database folder on the server.
    2. Download the universe folder the server uses in the server-database folder of StarMade.
    3. Put the downloaded world file into your local StarMade directory's server-database folder.
    4. Change any configs you would like to the local version of the "npcSpawnConfig.xml", found in the npcFactions directory.
    5. Load the world file locally.
    6. Once ingame, you will find that the NPC factions will spawn in automatically, either using the default settings or the custom settings you put into npcSpawnConfig.xml.
    7. After they load in, exit the game, and put the new universe folder in your server's server-database folder, after deleting the old world file. (Make sure you have backed up that folder just in case you mess up on the first try)
    8. Take the CATALOG.cat file from the server files you backed up, and replace the one in the new universe folder with the one from the backup, fixing any catalog problems that pop up. (I had found that doing this messed up the authors of the cataloged ships)
    9. Boot up the server, and if everything is done properly, you will now have NPC factions on your server.

    This should fix the problem with the spawning in of factions.