My idea is to have a throwable item (in this case, a kunai) to spawn multiple projectiles similar to a shotgun. My question is if this can be done with JSON coding and the *.thrownitem type. I have been attempting this for a while now and have been going back and forth with making it an actual shotgun, making it a dagger with a shotgun-like secondary and fiddling with the *.thrownitem JSON file. Currently, the *.thrownitem is the only one that works. All of the other items have failed to instantiate with "buildunrandweapon.lua." Can anyone help my with this? Can you make a throwable item spawn multiple projectiles, or can you have a shotgun-like Alt Ability without creating extra Lua code?
You could make a custom projectile like /projectiles/throwable/firework2/firework2.projectile set the "timetolive" to zero that way it immediately splits off, giving the illusion of multiple projectile being fired. You would put in kunai as the "firework3" and have your thrownitem point to your custom projectile.
I'm pretty sure that happens automatically, but it may require "inheritSpeedFactor", I found a better example in /projectiles/guns/unsorted/pollenpumpgas/pollenpumpgasspray.projectile
Cant you just... make a new projectile that spawns all the projectiles you want? Just as... all the other projectiles that do just that... already do? IE: trishot
Turns out you can spawn multiple projectiles with the variable periodicActions in projectileConfig. This is what I did for testingkunai.thrownitem: Code: { "itemName" : "testingkunai", "rarity" : "Legendary", "category" : "throwableItem", "inventoryIcon" : "testingkunai.png", "image" : "testingkunai.png", "shortdescription" : "Testing Kunai", "description" : "A kunai with probably way too much power.", "ammoUsage" : 0, "edgeTrigger" : false, "windupTime" : 0.0, "cooldown" : 0.1, "projectileType" : "testingkunai", "projectileConfig" : { "periodicActions" : [ { "time" : 0, "repeat" : false, "action" : "sound", "options" : [ "/sfx/projectiles/throw_item.ogg" ] }, { "time" : 0, "repeat" : false, "action" : "projectile", "type" : "testingkunai", "angleAdjust" : 5 }, { "time" : 0, "repeat" : false, "action" : "projectile", "type" : "testingkunai", "angleAdjust" : -5 }, { "time" : 0, "repeat" : false, "action" : "projectile", "type" : "testingkunai", "angleAdjust" : 10 }, { "time" : 0, "repeat" : false, "action" : "projectile", "type" : "testingkunai", "angleAdjust" : -10 } ] } } Also, I added two bounces and piercing to the projectile. It's... a bit broken. Last question: can I adjust the positions of the secondary projectiles instead of the angles? Actually, better yet, is there a place that contains all the JSON variables in Starbound?
I don't know of such a place, which is why i have attempted to do it myself. Unfortunately it isn't very reader-friendly right now. Is there anything specific you are looking for? Edit: Nevermind, theres a book now: http://community.playstarbound.com/resources/starbound-detailed-modding-e-book-unofficial.4743/
Funny that you mention that, because I noticed not only that yesterday, but also a suite of plugins for Starbound coding in the text editor Atom. It's pretty nice.