Modding Help Create gun vendor?

Discussion in 'Starbound Modding' started by Dwayne_Hicks, Dec 10, 2013.

  1. Dwayne_Hicks

    Dwayne_Hicks Space Hobo

    Sounds a bit odd, but has anyone tried to create a gun merchant spawner? Or would like to give pointers how to?
     
  2. OptimoosePrime

    OptimoosePrime Poptop Tamer

    You could change the npc type in the spawner. I believe the basic "merchant" type will have random guns and swords for sale.

    Code:
    "npcTypeOptions" : ["merchant"],
     
  3. OptimoosePrime

    OptimoosePrime Poptop Tamer

    Or you could copy the merchant npc file and rename it to gunmerchant. Then change the following in the npctype file:

    Code:
    line 2: "type" : "gunmerchant",
    
    line 139: "categories" : [ "randomguns" ],
    Lastly, change the spawner npctypeoptions to "gunmerchant"
     
  4. Dwayne_Hicks

    Dwayne_Hicks Space Hobo

    Well that actually worked. Extremely well, might I add. Now my remaining problem is...the guns, the seem to do hardly any damage at all. is that a result of the patch or do values need to be modified?
     
  5. FoolsPower

    FoolsPower Subatomic Cosmonaut

    This is likely due to the level of planet you're on. The guns will get better depending on what level planet it is.
     
  6. OptimoosePrime

    OptimoosePrime Poptop Tamer

    I believe that is because the merchant is selling common random weapons.

    Starting at line 228 in the merchant.npctype you could adjust the values to something better and maybe adjust the cost for stronger weapons. For example:

    Code:
    "randomguns" : [
            [0, [
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "uncommonassaultrifle" } }, "cost" : 750 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "rareassaultrifle" } }, "cost" : 1000 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "legendaryassaultrifle" } }, "cost" : 1500 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "uncommonpistol" } }, "cost" : 375 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "rarepistol" } }, "cost" : 700 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "legendarypistol" } }, "cost" : 1000 }, 
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "uncommonmachinepistol" } }, "cost" : 375 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "raremachinepistol" } }, "cost" : 700 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "legendarymachinepistol" } }, "cost" : 1000 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "uncommonshotgun" } }, "cost" : 750 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "rareshotgun" } }, "cost" : 1000 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "legendaryshotgun" } }, "cost" : 1500 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "uncommonsniperrifle" } }, "cost" : 750 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "raresniperrifle" } }, "cost" : 1000 },
                    { "item" : { "name" : "generatedgun", "data" : { "definition" : "legendarysniperrifle" } }, "cost" : 1500 }
                ]]
            ],
     
  7. Dwayne_Hicks

    Dwayne_Hicks Space Hobo

    Indeed, sir, you were correct. Now is it possible to somehow modify any of the existing spawners into a new object to make a seperate gun merchant spawner>
     
  8. OptimoosePrime

    OptimoosePrime Poptop Tamer

    That should be the easy part. Just rename a copy of the spawner object and the .png. Then edit the spawner object file to have the correct name, icon, and images.
     
  9. Dwayne_Hicks

    Dwayne_Hicks Space Hobo

    Indeed! It worked. Now the question is...any way to get friendly guards to follow?

    Feel like having a good old fashioned bug hunt :p
     
  10. Dwayne_Hicks

    Dwayne_Hicks Space Hobo

    Alright, new question. Is it just me, or have some of the bullets ceased to function properly travelling in slow motion before finally firing at normal speed?

    Anyone know if theres a config to check?
     
  11. Mojodrago

    Mojodrago Void-Bound Voyager

    YES, this is awesome thanks for making and posting on this tread guys!
     
  12. ReXu Recon

    ReXu Recon Space Hobo

    sorry im new to this but where do i change the spawners
     
  13. Mojodrago

    Mojodrago Void-Bound Voyager

    In the Starbound folder search for 'spawners", open that folder.
    find the file named "spawner_tools", open it with a text editor,
    then scroll donw till you find where it says "npcTypeOptions" : [ "gunmerchant" ],
    It will say something different so change it to say that.

    I had the same problem but was able to fuigure if out, so np.
     
  14. kungfudude

    kungfudude Void-Bound Voyager

    Has anyone tried this on a server?
    It would be cool to have a personal legendary gun seller in my ship and everyone will be asking to come to my ship just to buy the guns xD.

    Btw, I've tried changing commonpistol blah blah blah to legendarypistol and stuff but it doesnt increase the damage only makes the gun legendary. Anyone help?
     
    Last edited: Dec 29, 2013
  15. Mojodrago

    Mojodrago Void-Bound Voyager

    You need to go to a higher level planet, that's the only way.
     

Share This Page