1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

Making weapons with /spawnitem fire quickly

Discussion in 'Starbound Discussion' started by Valthero, May 8, 2017.

  1. Valthero

    Valthero Intergalactic Tourist

    Hi! I'm trying to make an MG42-esque gun in Starbound. Unfortunately, I can't seem to make it fire as quickly as I'd like.

    /spawnitem commonassaultrifle 1 '{"shortdescription":"TestMG","seed":125345,"primaryAbility":{"baseDps":20,"fireTime":0.1,"energyUsage":101},"altAbilityType":"flashlight","altAbility":{}}'

    For some reason, fireTime seems capped; no matter if I set it to 0.1, or 0.0001, it fires at the same rate. I'd like for it to fire at least twice as fast as it is now. Any ideas?
     
  2. NuclearSlayer52

    NuclearSlayer52 Phantasmal Quasar

    i have pretty much no idea how/what any of this means/does but energy usage at most would give you 3 shots i think (pretty sure unmodded energy at most without cheats is 250 aka the generic armor) so it might be going faster but you seem to be running out of energy before it makes a noise that youre out so it seems theres no difference (also without armor you have 100 energy) so try changing the energy usage to 10?

    and by try i mean ill test your command and edit this if the command work or if i change it ill say which part k

    EDIT:
    cant figure it out but it might just be the animation and sound thats limited (if ive understood from testing 0.1 fire is 1 second 10 shots so items with 0.9 are 10 shots 9 seconds so 0.5 is 5 seconds 10 shots aka 1 shot every half second so 0.0001 firetime is 0.0001 seconds per shot or 10000 shots per second and the basedps is damage per second making the gun kinda suck... as you split 20 damage between 10000 bullets/pixels in a line shape/shots so 10000 dps and 0.0001 means 1 damage per shot

    or i think the game detects it by:
    BaseD(amage)P(er)S(econd)*FireTime=D(amage)P(er)S(hot) (20*0.1=2)
    EnergyUsage*FireTime=EnergyPerShot (101*0.1=10.1
    FireTime=Numerator/Denominator (0.1=1/10)
    Denominator=RateOfFire (10=RateofFire/ShotsPerSecond)


    should be able to use that to help but its likely there is actually a cap on weapons so you dont go onto servers and "troll" (grief people steal their items and so on) people as your inventory is saved on your pc/laptop not on the server
     
    Last edited: May 8, 2017
  3. DraikNova

    DraikNova Spaceman Spiff

    If you're talking about how often the damage numbers show up, yeah, that's capped. However, weapons can definitely fire faster than the numbers show up; in this case, the total damage from these shots is combined when it shows the damage. This happens even if you use a normal sword, actually; sometimes, the sword will show, say, 16 damage for each of the three parts of its combo, other times, it'll show 32 for the first two parts, and then 16 for the last (this is just an example; swords actually do different amounts of damage in each part of their combos).
     
    oinkgamer likes this.
  4. Valthero

    Valthero Intergalactic Tourist

    @NuclearSlayer52
    Yeah, I'll balance the damage and energy later, this is just for testing purposes to get the fire speed correct.

    @DraikNova
    It doesn't matter to me how often the damage numbers show up. I'm just trying to make the gun fire really really fast.


    EDIT:
    I managed what I was intending by adding a "stances" variable.

    /spawnitem commonassaultrifle 1 '{"shortdescription":"TestMG","seed":125345,"primaryAbility":{"stances":{"cooldown":{"duration":0.05}},"baseDps":20,"fireTime":0.05,"energyUsage":101},"altAbilityType":"flashlight","altAbility":{}}'

    Now to balance it!
     
    seganku likes this.
  5. DraikNova

    DraikNova Spaceman Spiff

    Well, pretty much all weapons in the vanilla game have a baseDPS of 10 or so, give or take 3 points of DPS. Given that flashlight is a relatively weak altability, I would go for 11 baseDPS if I were you, and decide on a tier. Since most of your gameplay will probably be at tier 6, that'd be the most appropriate tier in all likelihood.
     

Share This Page