Files
roll20-character-sheets/Stars_Without_Number_Revised/Source/pug/ship.pug
T

286 lines
16 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-
const hulls = ["BATTLESHIP", "BULK_FREIGHTER", "CARRIER", "CORVETTE", "FLEET_CRUISER", "FREE_MERCHANT", "HEAVY_FRIGATE", "LARGE_STATION", "PATROL_BOAT", "SMALL_STATION", "STRIKE_FIGHTER", "SHUTTLE"]
input(type="hidden", name="attr_ship_class_normalised", value="").ship-class
input(type="hidden", name="attr_ship_vehicle_type", value="SHIP").input-type
.type.col-2.core-box.flex-between.edit
h3(data-i18n="VEHICLE_TYPE")
select(name="attr_ship_vehicle_type")
option(value="SHIP", data-i18n="SHIP", selected)
option(value="MECH", data-i18n="MECH")
option(value="VEHICLE", data-i18n="CUSTOM")
.menus.col-3.core-box.flex-between
h3(data-i18n="QUICK_MENUS")
input(type="hidden", name="attr_macro_ship_weapons", value="")
button(type="roll", name="roll_ship_weapon_macro", data-i18n="WEAPONS", value=`/w "@{character_name}" &{template:swn-default} {{charname=@{ship_name}}} {{title=^{WEAPONS}}} {{buttons=@{macro_ship_weapons}}}`).unstyled-button
button(type="roll", name="roll_ship_travel_cost", data-i18n="TRAVEL_COST", value=`&{template:swn-default} {{charname=@{ship_name}}} {{title=^{TRAVEL_COST}}} {{info=You will travel for [[?{Distance?}]] hexes, starting from ?{Starting from?|Edge of system, 0|Other, 2}, and ending in ?{Ending in?|Edge of system, 0|Other, 2}. It will take [[(?{Distance?}*6+?{Starting from?|Edge of system, 0|Other, 2}+?{Ending in?|Edge of system, 0|Other, 2}) / ?{Drive Rating?}]] days and cost [[((?{Distance?}*6+?{Starting from?|Edge of system, 0|Other, 2}+?{Ending in?|Edge of system, 0|Other, 2}) / ?{Drive Rating?}) * @{ship_crew} * 20 ]] credits in life support costs.}}`).unstyled-button
//- Ship header
.info.core-box-text.flex
+text-input("ship_name", "NAME").col40.grow.important
.text-input.col25.grow.focusinfo
input(type="text", name="attr_ship_hulltype", list="hulltype-list")
datalist(id="hulltype-list")
each type in hulls
option(data-i18n=type)
.label(data-i18n="HULL_TYPE")
//.details(data-i18n="HULL_TYPE_BLURB")
+text-input("ship_class", "CLASS").colsixth.vehicle-type.vehicle-type-ship.vehicle-type-mech
+text-input("ship_size", "SIZE").colsixth.vehicle-type.vehicle-type-custom
+text-input("ship_cargo_tonnage", "CARGO").colsixth.vehicle-type.vehicle-type-ship
+text-input("ship_ground_speed", "GROUND_SPEED").col25.vehicle-type.vehicle-type-custom
+text-input("ship_home_port", "HOME_PORT").col20.vehicle-type.vehicle-type-ship
.text-input.price.center.col20.grow
input(type="text", name="attr_ship_price")
label.label
input(type="checkbox", name="attr_ship_calculate_price", value="1")
span(data-i18n="PRICE") Price
//+text-input("ship_price", "PRICE").col20.grow Price
+text-input("ship_operating_cost", "OPERATING_COST").col20.grow
+text-input("ship_maintenance_cost", "MAINTENANCE COST").col20.grow
+text-input("ship_last_maintenance", "LAST_MAINTENANCE").col20.grow
.data.core-box-text
+text-input-duo(
"ship_fuel",
"ship_fuel_max",
"FUEL",
{type: "number", min: 0, value: 0})(type="number" min="0" value="0")
.vehicle-type.vehicle-type-ship.vehicle-type-custom Fuel
+text-input("ship_speed", "SPEED")(type="number", min="0")
+text-input("ship_ac", "AC")(type="number", min="0")
+text-input("ship_armor", "ARMOR")(type="number", min="0")
+text-input("ship_command_points", "CP_GAIN")(type="number", min="0", value="0") CP Gain
+text-input-duo(
"ship_life_support",
"ship_life_support_max",
"LIFE_SUPPORT",
{type: "number", min: 0, value: 0})(type="number" min="0" value="0")
.vehicle-type.vehicle-type-ship.vehicle-type-custom Life Support
+text-input-trio(
"ship_crew_min",
"ship_crew",
"ship_crew_max",
"CREW_MIN/CURRENT/MAX",
{type: "number", min: 0},
{type: "number", min: 0})(type="number", min="0")
.vehicle-type.vehicle-type-ship.vehicle-type-custom Crew Min/Current/Max
//+text-input("ship_crew_min", "CREW_MIN")(type="number", min="0").vehicle-type.vehicle-type-ship.vehicle-type-custom
//+text-input("ship_crew", "CURRENT")(type="number", min="0", value="0").vehicle-type.vehicle-type-ship.vehicle-type-custom
//+text-input("ship_crew_max", "MAX")(type="number", min="0").vehicle-type.vehicle-type-ship.vehicle-type-custom
.stats.core-box-text
+text-input-duo("ship_hp", "ship_hp_max", "HIT_POINTS", {min: "0"})(min="0").important
input(type="hidden", name="attr_ship_power" value="0").input-color-negative
+text-input-duo("ship_power", "ship_power_max", "FREE_POWER", {min: "0", value: "0"})(value="0", readonly) Free Power
input(type="hidden", name="attr_ship_mass" value="0").input-color-negative
+text-input-duo("ship_mass", "ship_mass_max", "FREE_MASS", {min: "0", value: "0"})(value="0", readonly) Free Mass
input(type="hidden", name="attr_ship_hardpoints" value="0").input-color-negative
+text-input-duo("ship_hardpoints", "ship_hardpoints_max", "FREE_HARDPOINTS", {min: "0", value: "0"})(value="0", readonly) Free Hardpoints
//- Weapons
.section
+sectionheader("show_ship_weapons", "WEAPONS")
.ship-weapons
.generate.flex-start.edit.vehicle-type.vehicle-type-ship
select(name="attr_generate_ship-weapons_source").generate-source
option(value="", data-i18n="CHOOSE_WEAPON", selected)
option(value="charged_particle_caster", data-i18n="CHARGED_PARTICLE_CASTER").frigate
option(value="flak_emitter_battery", data-i18n="FLAK_EMITTER_BATTERY").frigate
option(value="fractal_impact_charge", data-i18n="FRACTAL_IMPACT_CHARGE").fighter
option(value="gravcannon", data-i18n="GRAVCANNON").cruiser
option(value="lightning_charge_mantle", data-i18n="LIGHTNING_CHARGE_MANTLE").capital
option(value="mag_spike_array", data-i18n="MAG_SPIKE_ARRAY").frigate
option(value="mass_cannon", data-i18n="MASS_CANNON").capital
option(value="multifocal_laser", data-i18n="MULTIFOCAL_LASER").fighter
option(value="nuclear_missiles", data-i18n="NUCLEAR_MISSILES").frigate
option(value="plasma_beam", data-i18n="PLASMA_BEAM").frigate
option(value="polyspectral_mes_beam", data-i18n="POLYSPECTRAL_MES_BEAM").fighter
option(value="reaper_battery", data-i18n="REAPER_BATTERY").fighter
option(value="sandthrower", data-i18n="SANDTHROWER").fighter
option(value="singularity_gun", data-i18n="SINGULARITY_GUN").capital
option(value="smart_cloud", data-i18n="SMART_CLOUD").cruiser
option(value="spike_inversion_projector", data-i18n="SPIKE_INVERSION_PROJECTOR").cruiser
option(value="spinal_beam_cannon", data-i18n="SPINAL_BEAM_CANNON").cruiser
option(value="torpedo_launcher", data-i18n="TORPEDO_LAUNCHER").frigate
option(value="vortex_tunnel_inductor", data-i18n="VORTEX_TUNNEL_INDUCTOR").capital
span(name="attr_generate_ship-weapons_info").generate-info
label.generate-button
input(type="checkbox", name="attr_generate_ship-weapons_button")
span(data-i18n="ADD")
fieldset.repeating_ship-weapons
input(type="hidden", name="attr_weapon_api", value="")
input(type="hidden", name="attr_weapon_price")
button(type="roll", name="roll_Attack", value!="&{template:swn-attack} {{charname=@{ship_name}}} {{title=@{weapon_name} @{weapon_qualities}}} {{attack=[[1d20 + @{weapon_attack_bonus}[Attack Bonus] @{modifier_query}]]}} {{damage=[[@{weapon_damage}]]}} @{weapon_use_ammo} @{weapon_api}").display.invisible-button
.display.grey-box-bordered
input(type="hidden", name="attr_weapon_broken", value="0").hider
span.broken.space-after #[span(data-i18n="BROKEN")]:
span.name.space-after
span(name="attr_weapon_name").space-after
input(type="hidden", name="attr_weapon_attack_bonus").add-plus
span(name="attr_weapon_attack_bonus")
span
| (
span(name="attr_weapon_damage").space-after
span.space-after #[span(data-i18n="DAMAGE").lower];
span(name="attr_weapon_qualities")
input(type="hidden", name="attr_weapon_range", value="").hide-empty
span.vehicle-type.vehicle-type-mech
| ; #[span(data-i18n="RANGE")] #[span(name="attr_weapon_range")]
| ; #[span(data-i18n="POWER")] 
span(name="attr_weapon_power")
| , #[span(data-i18n="MASS")] 
span(name="attr_weapon_mass")
| , #[span(data-i18n="HARDPOINTS")] 
span(name="attr_weapon_hardpoints")
| )
input(type="hidden", name="attr_weapon_use_ammo", value="0").hider
span.vehicle-type.vehicle-type-ship.vehicle-type-custom
| . #[span(data-i18n="AMMO")]: 
input(type="number", name="attr_weapon_ammo").inline-input
|  / 
span(name="attr_weapon_ammo_max")
.edit.flex-wrap.grey-box-bordered
+text-input("weapon_name", "NAME").name
+text-input("weapon_power", "POWER")(type="number", value="0", min="0").center.number
+text-input("weapon_mass", "MASS")(type="number", value="0", min="0").center.number
+text-input("weapon_hardpoints", "HARDPOINTS_SHORT")(type="number", value="0", min="0").center.number
+fake-text-input("BROKEN").center.broken
input(type="checkbox", name="attr_weapon_broken", value="1")
+text-input("weapon_attack_bonus", "ATTACK_BONUS_SHORT")(type="number", value="0").center.number
+text-input("weapon_damage", "DAMAGE")(value="0").center.damage
+text-input("weapon_qualities", "QUALITIES").qualities.grow
+text-input("weapon_range", "RANGE").range.vehicle-type.vehicle-type-mech
+text-input-duo("weapon_ammo", "weapon_ammo_max", "", {min: "0"})(min="0").vehicle-type.vehicle-type-ship.vehicle-type-custom
label.label
input(type="checkbox", name="attr_weapon_use_ammo", value="{{ammo=[[@{weapon_ammo} - 1]] / @{weapon_ammo_max}}}")
span(data-i18n="AMMO")
//- Fittings
.section.cols-2.rows-2
+sectionheader("show_ship_fittings", "FITTING")
.ship-fitting
.generate.flex-start.edit.vehicle-type.vehicle-type-ship
select(name="attr_generate_ship-fittings_source").generate-source
option(value="", data-i18n="CHOOSE_FITTING", selected)
option(value="advanced_lab", data-i18n="ADVANCED_LAB").frigate
option(value="advanced_nav_computer", data-i18n="ADVANCED_NAV_COMPUTER").frigate
option(value="amphibious_operation", data-i18n="AMPHIBIOUS_OPERATION").fighter
option(value="armory", data-i18n="ARMORY").frigate
option(value="atmospheric_configuration", data-i18n="ATMOSPHERIC_CONFIGURATION").fighter
option(value="auto_targeting_system", data-i18n="AUTO_TARGETING_SYSTEM").fighter
option(value="automation_support", data-i18n="AUTOMATION_SUPPORT").fighter
option(value="boarding_tubes", data-i18n="BOARDING_TUBES").frigate
option(value="cargo_lighter", data-i18n="CARGO_LIGHTER").frigate
option(value="cargo_space", data-i18n="CARGO_SPACE").fighter
option(value="cold_sleep_pods", data-i18n="COLD_SLEEP_PODS").frigate
option(value="colony_core", data-i18n="COLONY_CORE").frigate
option(value="drill_course_regulator", data-i18n="DRILL_COURSE_REGULATOR").frigate
option(value="spike_drive_2", data-i18n="SPIKE_DRIVE_2").fighter
option(value="spike_drive_3", data-i18n="SPIKE_DRIVE_3").fighter
option(value="spike_drive_4", data-i18n="SPIKE_DRIVE_4").frigate
option(value="spike_drive_5", data-i18n="SPIKE_DRIVE_5").frigate
option(value="spike_drive_6", data-i18n="SPIKE_DRIVE_6").cruiser
option(value="drop_pod", data-i18n="DROP_POD").frigate
option(value="emissions_dampers", data-i18n="EMISSIONS_DAMPERS").fighter
option(value="exodus_bay", data-i18n="EXODUS_BAY").cruiser
option(value="extended_life_support", data-i18n="EXTENDED_LIFE_SUPPORT").fighter
option(value="extended_medbay", data-i18n="EXTENDED_MEDBAY").frigate
option(value="extended_store", data-i18n="EXTENDED_STORE").fighter
option(value="fuel_bunkers", data-i18n="FUEL_BUNKERS").fighter
option(value="fuel_scoops", data-i18n="FUEL_SCOOPS").frigate
option(value="hydroponic_production", data-i18n="HYDROPONIC_PRODUCTION").cruiser
option(value="lifeboats", data-i18n="LIFEBOATS").frigate
option(value="luxury_cabins", data-i18n="LUXURY_CABINS").frigate
option(value="mobile_extractor", data-i18n="MOBILE_EXTRACTOR").frigate
option(value="mobile_factory", data-i18n="MOBILE_FACTORY").cruiser
option(value="precognitive_nav_chamber", data-i18n="PRECOGNITIVE_NAV_CHAMBER").frigate
option(value="psionic_anchorpoint", data-i18n="PSIONIC_ANCHORPOINT").frigate
option(value="sensor_mask", data-i18n="SENSOR_MASK").frigate
option(value="ship_bay_fighter", data-i18n="SHIP_BAY_FIGHTER").cruiser
option(value="ship_bay_frigate", data-i18n="SHIP_BAY_FRIGATE").capital
option(value="ships_locker", data-i18n="SHIPS_LOCKER").frigate
option(value="shiptender_mount", data-i18n="SHIPTENDER_MOUNT").frigate
option(value="smugglers_hold", data-i18n="SMUGGLERS_HOLD").fighter
option(value="survey_sensor_array", data-i18n="SURVEY_SENSOR_ARRAY").frigate
option(value="system_drive", data-i18n="SYSTEM_DRIVE").fighter
option(value="teleportation_pads", data-i18n="TELEPORTATION_PADS").frigate
option(value="tractor_beams", data-i18n="TRACTOR_BEAMS").frigate
option(value="vehicle_transport_fittings", data-i18n="VEHICLE_TRANSPORT_FITTINGS").frigate
option(value="workshop", data-i18n="WORKSHOP").frigate
span(name="attr_generate_ship-fittings_info").generate-info
label.generate-button
input(type="checkbox", name="attr_generate_ship-fittings_button")
span(data-i18n="ADD")
fieldset.repeating_ship-fittings
input(type="hidden", name="attr_fitting_price")
.display
input(type="hidden", name="attr_fitting_broken", value="0").hider
span.broken.space-after #[span(data-i18n="BROKEN")]:
span(name="attr_fitting_name").name.space-after
span.space-after
| (#[span(data-i18n="POWER")] 
span(name="attr_fitting_power")
| , #[span(data-i18n="MASS")] 
span(name="attr_fitting_mass")
| ).
span(name="attr_fitting_effect").description
.edit.flex.grey-box-bordered
+text-input("fitting_name", "NAME").name
+text-input("fitting_power", "POWER")(type="number", value="0").center.number
+text-input("fitting_mass", "MASS")(type="number", value="0").center.number
+fake-text-input("EFFECT").effect
textarea(name="attr_fitting_effect")
+fake-text-input("BROKEN").center.broken
input(type="checkbox", name="attr_fitting_broken", value="1")
//- Defenses
.section
+sectionheader("show_ship_defenses", "DEFENSES")
.ship-defenses
.generate.flex-start.edit.vehicle-type.vehicle-type-ship
select(name="attr_generate_ship-defenses_source").generate-source
option(value="", data-i18n="CHOOSE_DEFENSE", selected)
option(value="ablative_hull_compartments", data-i18n="ABLATIVE_HULL_COMPARTMENTS").capital
option(value="augmented_plating", data-i18n="AUGMENTED_PLATING").fighter
option(value="boarding_countermeasures", data-i18n="BOARDING_COUNTERMEASURES").frigate
option(value="burst_ecm_generator", data-i18n="BURST_ECM_GENERATOR").frigate
option(value="foxer_drones", data-i18n="FOXER_DRONES").cruiser
option(value="grav_eddy_displacer", data-i18n="GRAV_EDDY_DISPLACER").frigate
option(value="hardened_polyceramic_overlay", data-i18n="HARDENED_POLYCERAMIC_OVERLAY").fighter
option(value="planetary_defense_array", data-i18n="PLANETARY_DEFENSE_ARRAY").frigate
option(value="point_defense_lasers", data-i18n="POINT_DEFENSE_LASERS").frigate
span(name="attr_generate_ship-defenses_info").generate-info
label.generate-button
input(type="checkbox", name="attr_generate_ship-defenses_button")
span(data-i18n="ADD")
fieldset.repeating_ship-defenses
input(type="hidden", name="attr_defense_price")
.display
input(type="hidden", name="attr_defense_broken", value="0").hider
span.broken.space-after #[span(data-i18n="BROKEN")]:
span(name="attr_defense_name").name.space-after
span.space-after
| (#[span(data-i18n="POWER")] 
span(name="attr_defense_power")
| , #[span(data-i18n="MASS")] 
span(name="attr_defense_mass")
| ).
span(name="attr_defense_effect").description
.edit.flex.grey-box-bordered
+text-input("defense_name", "NAME").name
+text-input("defense_power", "POWER")(type="number", value="0").center.number
+text-input("defense_mass", "MASS")(type="number", value="0").center.number
+fake-text-input("EFFECT").effect
textarea(name="attr_defense_effect")
+fake-text-input("BROKEN").center.broken
input(type="checkbox", name="attr_defense_broken", value="1")
//- Notes
.section.cols-3
+sectionheader("show_ship_other)", "NOTES")
.halfgrid
textarea(name="attr_ship_notes")
textarea(name="attr_ship_other_notes")