New Weapon Reads all stats from file except for Cooldown?

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

MarKr

First Lieutenant
18 Badges
Nov 10, 2017
210
4
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris
  • Stellaris: Humanoids Species Pack
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
Hello,

I wanted to create an improved version of Cloud lightning weapon. I made all the tech and stuff and instead of placing the new weapon stats into the "weapon_components.ods" (partially also because I don't have any editor capable of editing .ods format and don't want to install one just for changing one weapon) I just placed the stats into the "weapons_critters_cloud" file of my mod directly so there is something like:

damage = { min = 1 max = 150 }
cooldown = 4.5
range = 60
accuracy = 1.00
tracking = 0.30
(then the shield and armor penetration etc.)

Now the weird part is that in the game, when I take a look at the weapon, all the stats I have set in the file are there, only the cooldown shows "0.00" and because there is no cooldown the effective weapon damage per day (second) is about 75500.

Does anybody have any idea why all the other stats from the file are used and only the cooldown is ignored?
 
To provide more details, the weapon file looks like this:
Code:
### Improved Cloud Weapon

weapon_component_template = {
    key = "SPACE_CLOUD_LIGHTNING_2"

    size = large
    entity = "large_space_cloud_weapon_entity"
    type = instant
    icon = "GFX_ship_part_arc_emitter_2"
    icon_frame = 1
    projectile_gfx = "arc_emitter"
    tags = { weapon_type_energy }
    ai_tags = { weapon_role_anti_hull }
  
    component_set = "SPACE_CLOUD_WEAPON_2"
    prerequisites = { "tech_space_cloud_weapon_2" }
    resources = {
        category = ship_components
        cost = {
            alloys = 25
        }      
        upkeep = {
            energy = 55
            alloys = @s_t3_upkeep_alloys
        }
    }
  
    damage = { min = 1 max = 150 }

    accuracy = 1
    tracking = 0.3
    range = 60
    shield_penetration = 1
    armor_penetration = 1
    cooldown = 3.5

}
As I said - all the values are there, except for the cooldown:
20190412013903_1.jpg

Any ideas are welcomed...
 
I think you probably missed some other values. If i take a look into weapon_components.ods and weapon_components.csv i see the following list of values:

cost
power
min_damage
max_damage
hull_damage
shield_damage
shield_penetration
armor_damage
armor_penetration
min_windup
max_windup
cooldown
range
accuracy
tracking

Maybe it could help to include some other probably missing values of this list?

If you try to mod a missile/swarmer missile type of weapon you will probably also need the following values:

missile_speed
missile_evasion
missile_shield
missile_armor
missile_health
missile_retarget_range

btw: in case you change your mind and want to download a free editor for ods files: download open office :)
 
Thanks for the tip. I will give it a try.

I think that "power" is how much energy the weapon consumes on the ship and that should be covered in my files in the "upkeep" part. As far as I know, if you keep the armor/shield/hull_damage empty, it simply means "not modified against it" so the damage remains withinin the min/max values. With that being said - any idea what the "max/min_windup" does?

EDIT:
I tried adding the min/max_windup to 1-19 and the cooldown went up to "1". I found here on the forum that the formula for cooldown is (average_windup + cooldown)/10, so when I set the cooldown to 35 in the game it should give 4.5 seconds cooldown. However it did not matter what I set as the cooldown number, it was always "1". So I gave up on that and edited the csv file and now it works fine. I am not sure if the values outside the csv file need to be set in some special way to work but in the end the scv/ods file edit was a lot less of trouble.
 
Last edited: