Weapon Modding: Creating New weapons
Everything I know
component_sets
the component_sets in the common folder are used for adding your component into ship designer
.txt files define the key (used to identify component?), icon (located in gfx/interface/icons/ship_parts) , and icon frame (always set to = 1)
component_templates
component_templates seem to create your component. Three types of files in component_templates folder: {.txt, .csv, .ods}
txt file contains weapon_component_template:
key,
size (small, medium, large)
entity (ship_designer turret entity)
damage {min = damage max = damage} (IDK if overidden in .csv files/.ods files? should be: tachyon_lances show up as doing 85-232 damage.)
windup = { min = value max = value } (IDK what this does)
total_fire_time = value (IDK what this does, or if is animation, etc.)
range = value (adjusts weapon range)
accuracy = value (decimal value, adjusts weapon accuracy)
type = instant (whether there is a lag between weapon firing and damage incurred?)
icon = "GFX_ship_part_ICONNAME" (located in gfx/interface/icons/ship_parts?)
icon_frame = 1 (always this, IDK why)
power = -120 (seems to take power value from here instead of csv files, when I added in a new weapon, it took the -486, which was copied from tachyon_lance, NOTE: tachyon_lances only use 120 power.)
cost = value (mineral cost in ship designer, also don't how to overide this in ship designer, IIRC, tachyon lances DO NOT COST 6 minerals, IIRC cost 120)
component_set = KEY (set in component_set/NAME.txt folder)
projectile_gfx = "component_name" (presume animation played at firing)
tags = { weapon_type_energy } (energy, kinetic, projectile)
csv file:
spreadship containing all relevate component damage values:
key;cost;power;min_damage;max_damage;shield_damage;shield_penetration;armor_penetration;min_windup;max_windup;cooldown;range;accuracy;missile_speed;end
key (used in component_set,component_template)
cost (presumably cost in minerals, not sure how to make .csv overide .txt)
power (re above.) (same format, requires negative to use power)
min_damage: minimum damage weapon inflicts (tachyon_lance values here, but new weapons not overidden?)
max_damage: max_damage weapon inflicts (once again, values here and in txt files do not match)
shield_damage: bonus % damage done to shields (IDK how to check this)
shield_penetration: % how much will go through shields (IDK how to make this work)
armor_penetration: (same as above)
min_windup (know idea, values don't seem to match txt files either)
max_windup (re min_windup)
cooldown: presume time (in seconds) it takes weapon to reload
range: distance before weapon activate?, same as above
accuracy (same as above)
missile_speed (presume time before damage is applied, see comment in ods file.)
EDIT: NO VALUE IN CSV IS SAME as txt files
ods file:
same as csv file, but organized into a more readable table... don't know what for. accuracy however is more specified.
adding technologies
modding technologies fairly straitforward. create a txt file, name it (somehing like modname.technology seems to work)
set the tech name, (e.g. tech_name_this_tech )
set cost, (how much points this needs, can be custom value, or standarized @tier#{1-3}cost#{1-4} value, set at beginning of tech files. If you want a custom cost, such as 20000, set cost = 20000)
area: {physics, society, engineering} (what research_branch tech is in)
category = { biology } sets category for trait bonuses, etc. (particles, see tech files or wiki)
tier = {0,1,2,3} sets tier of tech. Not sure specifics just no higher tier techs cost more (maybe b/c of @tier3cost4 values, more on this later)
weight_modifier (adjusts chance of getting tech in research pool)
ai_weight (adjusts ai weighting of tech, whether ai will choose tech or not.)
NOTE: tech does not need a line of code like unlocks = weapon component. check vanilla files for more proper formatting.)
GFX (not sure from here)
to add icons, go to gfx/interface/icons (folders further divide type of icons)
ship_parts, technologies, etc.
to change animations, need to add files to models? particles? and projectiles folder.
create the model: go to gfx/models/combat_items
need a entities.asset file to modify animation, draws animation from particles.
three entities for muzzle (muzzle flash), hit and shield hit (hit and shield hit seem to use same particle)
create custom particles: go to gfx/particles/combat_items
create txt files
create a hit_effect no shield hit effect needed, (re above)
create a muzzle
all of these seem to adjust color, and any relevaten animation info.
create projectile: go to gfx/projectiles
seems to define hit and miss animations, requires entities (hit_entity, shield_hit_entity, muzzle_flash_entity