I've seen some people having issues with the new guns, including myself. I've figured out why most guns are probably not working. The format hasn't changed that much, but something in that format did. Let's take a look at this: Code: { "itemName" : "cheatgun", "inventoryIcon" : "cheatgunicon.png", "dropCollision" : [-8.0, -3.0, 8.0, 3.0], "maxStack" : 1, "rarity" : "Legendary", "description" : "Pew Pew!", "shortdescription" : "Overpowered Gun", "image" : "cheatgun.png", "handPosition" : [-3.5, -3], "firePosition" : [20, 1.5], "fireTime" : 0.075, "twoHanded" : false, "level" : 100, "projectileType" : "trishot", "projectile" : { "speed" : 60, "power" : 12000, "color" : [10, 255, 10] } } This is a gun that currently works in the new version. The interesting thing though, is this bit: "power" : 12000, So, they completely changed how guns scale. This power attribute now does 2 things. One: It sets the damage for a weapon. 12000 power, is actually fairly close to 3500 damage with the trishot projectile. Now here comes the drawback. This same power attribute also determines how much power is being used per shot. So, basically, the higher the damage, the higher the energy cost. Now, if you add this gun to your game yourself, you'll probably notice you can't even shoot it. That's because you don't have the energy to cope with this amount of energy usage. I had to change my custom armor as well to include enough energy and energy regen to make it work with a 12000 power gun. So there you go, a small bit of information about the new gun rebalance. Hope it helps someone!
Recoil can be handled with the 'fireTime' argument as far as I've noticed. I haven't looked into sounds and muzzle flashes yet, but pretty sure you can use the same as the guns in the generated weapons files, like this: Code: "fireSound" : [ "/sfx/gun/fireblast.wav" ], And Code: "muzzleFlashes" : [ "/animations/muzzleflash/flamemuzzle/flamemuzzle.animation" If you want to add custom ones, mimic the folder structure in your mod's folder. So in the case of the sound, make a folder called sfx in your mod folder, which contains a gun folder, which contains the sound effect you want.
Code: { "itemName" : "raygun", "inventoryIcon" : "raygunicon.png", "dropCollision" : [-8.0, -3.0, 8.0, 3.0], "maxStack" : 1, "rarity" : "Legendary", "description" : "Nigga please work.", "shortdescription" : "Ray Gun", "image" : "raygun.png", "handPosition" : [-5.5, -3], "firePosition" : [12, 3], "fireSound" : [ "/sfx/gun/raygun.wav" ], "fireTime" : 0.50, "twoHanded" : false, "level" : 100, "projectileType" : "raygunProjectile", "projectile" : { "speed" : 60, "power" : 1000, "color" : [10, 255, 10] } } Can you take a look at this and tell me why that wouldn't be working? The .wav file worked last time fine.
For the record the new damage to energy ratios are located in a file under "assets\leveling\levelingmultipliers.functions" That said this change has annoyed me, mostly because it removed my ability to have a non-combat gun still cost energy.
Is your raygun.wav in a mimiced version in your own mod folder? Same goes for the projectile, is the projectile file in a mimiced version in your own mod folder? Yeah, it seems like it only takes away some of the customization possible. It seems like a 'dirty' way to balance all of their guns at the same time, instead of rebalancing all seperate files by using a different argument alltogether.
That's odd. You could try to place the sound file into the actual vanilla folders and see if it works. If it does, atleast you know your problem lies somewhere that the game doesn't load the folder it's in correctly if you try and load it from your own mod. By the way, try recrafting it. Changes don't actually come through for the weapon you're currently already holding. I'm fairly sure you did this already, but it's worth a shot.
The "level" parameter also affects the energy per shot, with energy-per-damage shrinking as gun level increases. Presumably this is how randomly generated guns work too, so you can find guns in Sector X that do thousands of damage but have reasonable energy costs. Level 4 seems to be where the energy per shot matches the damage per shot. Maybe someone else can confirm this, but all guns that I've adjusted to level 4 are like this. If the level goes below 4, they cost more energy to shoot than their damage dealt. If the level is above 4, they cost fewer energy than points of damage dealt. At level 6, the damage is double the energy cost. (this is all with single shot weapons, pistols) EDIT: It seems like this effect caps at level 10, which I guess makes sense given the current threat level system. At level 10 (or higher), the energy cost appears to be equal to 10% of the weapon power. At level 9, it's 15%. Level 8, it's 25%. Though, I'm SURE I've seen randomly generated guns after this update that did not exactly follow this rule.
Damn. Sorry man, good luck with it. If you find a solution, please post it here for anyone else having the same issue. And no problem, this helps all of us. I've tried before to set the level to a 100. I first expected a damage increase, which wasn't there. I haven't actually tested the level influencing energy costs, I'll try that somewhat later. If this is true though, that would be a very nice thing to have and basically replaces the energy per shot from before, although somewhat gimped.
So is there no way yo make a high power low energy cost gun now? I had my gun set to how I wanted it, it shoots really fast but using a lot of energy. No it's too op because they can just keep shooting and plow through the enemy.
Try setting the level on your gun very high. As Matterialize just posted, it might just affect energy costs.
Okay so for testing I first set the level to 100, that made it cost like no energy, I could fire it forever. Then to level 500 same thing. Set it back to level 1 and it used a bit of energy, but not enough. Then I set it to level 4 and it used even less energy than level 1..... So now I'm really confused. xD
Yeah, it would still be better if we could just specify energy per shot with its own argument instead of relying on the current system to calculate it. See the edit to my earlier post: the effective weapon levels are 1-10. At level 4, the energy consumption should be the same as the damage per shot.
{ "itemName" : "x1lmg", "inventoryIcon" : "x1lmg.png", "description" : "An X1 LMG", "shortdescription" : "X1 LMG", "dropCollision" : [-8.0, -3.0, 8.0, 3.0], "maxStack" : 1, "level" : 50, "rarity" : "Rare", "inspectionKind" : "gun", "image" : "X1LMG.png", "recoilTime" : 0.005, "handPosition" : [-12, -2], "firePosition" : [29, 4], "classMultiplyer" : 0, "fireTime" : 0.095, "twoHanded" : true, "pointLight" : "true", "lightColor" : [30, 255, 30], "projectileType" : "carrot", "projectile" : { "speed" : 95, "power" : 125, "color" : [30, 255, 30] }, "muzzleEffect" : { "animation" : "/animations/muzzleflash/x1lmgmuzzle/x1lmg.animation", "fireSound" : [ { "file" : "/sfx/gun/x1lmgfire.wav" } ] } } I had only changed the projectile type and it dosnt work (I am using someone elses mod) how do I fix this? I am just wanting to change the projectile type.
Is carrot a valid projectile? No, it is not. I'm pretty sure you can't just shoot whatever you feel like out of the gun unless it's already a projectile.
Looking at the bow files (which are also .gun), it looks like there are a few extra fields under Projectile that can be used. Namely, "speedCurve" and "powerCurve" (and possibly other curves that I haven't seen in the game's assets), which both reference a leveling function. By writing your own sets of leveling functions, you should be able to make a gun have any energy-per-shot value that you want... and it also looks like you could probably make the scaling work past level 10, too.