So, I created an rocket launcher, and it's working, but now I need a custom projectile. Well, I've done the sprites, the script but, somehow, It doesn't works and the launcher shoots nothing. I don't know if I have to sign it in hte player.config.path likeI did with the gun. If it is, how can I do it? Also, how can I make the custom .frames works too?
Hello, you need a projectile.frames, projectile.png (the sprites) and .projectile file to make it work, it would help to show your logfile, my projectile didnt work once, because of typing error and this shows easily up in a logfile the .frames file has to have the same name as the .projectile file just copy an existing one, rename it and change it to your needs the important values are: "size" : [length of one frame, height of one frame] defines the size of one frame "dimensions" : [count in a row, quantity of rows] I hope that helps
Here's the .projectile Code: { "projectileName" : "dnrocket", "image" : "dnrocket.png", "animationCycle" : 0.2, "frameNumber" : 4, "damageKindImage" : "icon.png", "lightColor" : [255, 255, 128], "pointLight" : true, "actionOnReap" : [ { "action" : "config", "file" : "/projectiles/explosions/regularexplosion2/regularexplosionknockback.config" } ], "statusEffects" : [ ], "emitters" : [ "rocketsmoke" ], "flippable" : true, "power" : 10.0, "speed" : 1.0, "acceleration" : 150, "physics" : "dnrocket", "damageType" : "NoDamage", "damageKind" : "default" } And the .frame Code: { "frameGrid" : { "size" : [20, 7], "dimensions" : [4, 1], "names" : [ [ "0", "1", "2", "3" ] ] } } Ps: Code edited duo mistake They adress: dkrpg\projectiles\guns\rocket
Your .projectile seems more like a .activeitem file look at other .projectile files, they look more like this: acidexplosion.projectile for instance(\_unpacked\projectiles\acidexplosion): Code: { "projectileName" : "acidexplosion", "image" : "acidexplosion.png", "animationCycle" : 0.3, "frameNumber" : 5, "speed" : 0, "damagePoly" : [ [-16, 0], [-10, -10], [0, -16], [10, -10], [16, 0], [10, 10], [0, 16], [-10, 10] ], "animationLoops" : false, "piercing" : true, "flippable" : true, "damageKind" : "acid" } so you have to add a dnrocket.projectile file similiar to the acidexplosion content
Hmm, could you please start a game, and use your weapon, after this post your logfile (\starbound\storage\starbound.log) here please, that would help alot
Here is: Code: [12:03:40.754] [Info] UniverseClient: Joined server as client 1 [12:03:57.502] [Info] UniverseServer: Warping player 1 to ClientShipWorld:771d6b908ba36fb38b438d48ce9e1326=1067.2.1024.31 [12:05:07.593] [Error] Could not load image asset '/items/active/weapons/ranged/gun/default', using placeholder default. (AssetException) No such asset '/items/active/weapons/ranged/gun/default' [12:05:23.633] [Warn] Could not spawn Projectile of type 'dnrocket', exception caught: (ProjectileDatabaseException) Unknown projectile with typeName dnrocket. [12:05:23.788] [Error] Could not load image asset '/items/active/weapons/ranged/gun/default:2.2', using placeholder default. (AssetException) No associated frames file found for image '/items/active/weapons/ranged/gun/default' while resolving image frame '/items/active/weapons/ranged/gun/default:2.2' [12:05:28.092] [Warn] Could not spawn Projectile of type 'dnrocket', exception caught: (ProjectileDatabaseException) Unknown projectile with typeName dnrocket. [12:05:29.347] [Warn] Could not spawn Projectile of type 'dnrocket', exception caught: (ProjectileDatabaseException) Unknown projectile with typeName dnrocket. [12:05:29.384] [Error] Could not load image asset '/items/active/weapons/ranged/gun/default:3.2', using placeholder default. (AssetException) No associated frames file found for image '/items/active/weapons/ranged/gun/default' while resolving image frame '/items/active/weapons/ranged/gun/default:3.2' [12:05:32.164] [Warn] Could not spawn Projectile of type 'dnrocket', exception caught: (ProjectileDatabaseException) Unknown projectile with typeName dnrocket. [12:05:32.195] [Error] Could not load image asset '/items/active/weapons/ranged/gun/default:1.2', using placeholder default. (AssetException) No associated frames file found for image '/items/active/weapons/ranged/gun/default' while resolving image frame '/items/active/weapons/ranged/gun/default:1.2' [12:05:35.080] [Warn] Could not spawn Projectile of type 'dnrocket', exception caught: (ProjectileDatabaseException) Unknown projectile with typeName dnrocket. [12:05:40.216] [Warn] Could not spawn Projectile of type 'dnrocket', exception caught: (ProjectileDatabaseException) Unknown projectile with typeName dnrocket. [12:05:43.860] [Warn] Could not spawn Projectile of type 'dnrocket', exception caught: (ProjectileDatabaseException) Unknown projectile with typeName dnrocket.
I have a similar problem and it says it had an error loading because it cannot parse json file. do you know what might be wrong?