Author Topic: Defense counters  (Read 3039 times)

Offline etheric42

  • Full Member
  • ***
  • Posts: 107
Defense counters
« on: March 17, 2018, 07:10:19 pm »
I'm playing around with the the basic ships today because I felt like it and I was editing KDL_Ships_FleetShips and I couldn't find where the defense_counter was set.

Code: [Select]
  <entity name="Fighter_Mark1" shared_cap="Fighter"
    ai_can_use_this_without_unlocking_it="true"
          visuals="assets/_finalgamemeshes/fleetships/fighter/fighter.prefab"
          icon_name="Official/Fighter" icon_border="Official/Fighter_Border"
          icon_shape_name="Official/Arrow" icon_shape_border="Official/Border_Arrow"
          category="Ship"
          size_scale="0.56"
          collision_priority="100"
          display_name="Fighter"
          description="One of the core &quot;triangle&quot; Fleet Ship types, Fighters are excellent at damaging Armored targets like Bombers, but are easily destroyed by anti-Evasive weapons such as lasers or the Missile Corvette's guided missiles."
          balance_strength_multiplier="1"
          balance_mark_level="Mark1"
          balance_defense="Evasion"
          balance_durability="MildTank"
          balance_fuel_cost="Normal"
          balance_power_cost="Free"
          balance_metal_cost="Low"
          balance_granularity="Normal_Div5Fighter"
          balance_speed="Normal"
          ship_or_structure_explosion_sfx="ShipSmall_Explosion"
          ship_or_structure_explosion_if_on_other_planet_sfx="ShipLostOnOtherPlanet_Explosion"
  >

If I wanted to set fighters to be good against a different kind of defense, where do I change that?  Is that set in a different file?  What am I missing?

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Defense counters
« Reply #1 on: March 17, 2018, 07:20:25 pm »
A ship has an associated weapons system. Like for fighters, it's
    <system type="Fighter_Gun" />                                                                                                                                                                                               

That is defined in KDL_Systems.xml elsewhere in the xml, where it specifies the type of weapon, in this case
Code: [Select]
  <system name="Fighter_Gun"                                                                                                                                                                                                   
          category="Weapon"                                                                                                                                                                                                     
          firing_timing="OnlyInRange"                                                                                                                                                                                           
          image_name="Invisible"                                                                                                                                                                                               
          shots_are_homing="true"                                                                                                                                                                                               
          balance_weapon_type="ArmorPiercingShell"                                                                                                                                                                             
          balance_rate_of_fire="Normal"                                                                                                                                                                                         
          balance_shots_per_salvo="1"                                                                                                                                                                                           
  >                                                                                                                                                                                                                             
  </system>                                                                                                                                                                                                                     

Then the shell is defined in
Balance_WeaponType/KDL_VanillaWeaponTypes.xml
Code: [Select]
        <weapon name="ArmorPiercingShell"                                                                                                                                                                                       
                display_name="Armor Piercing Shell"                                                                                                                                                                             
                counter_type="AntiArmor"                                                                                                                                                                                       
                range="Short"                                                                                                                                                                                                   
                shot_speed="Normal"                                                                                                                                                                                             
                shot_type="OrangeTracer_20ms"                                                                                                                                                                                   
    target_sorter="Standard"                                                                                                                                                                                                   
    voice_group="Fighter"                                                                                                                                                                                                       
        />                                                                                                                                                                                                                     

So you would need to change the counter_type.

You can hunt through all the Nanocaust stuff to see it in action in a self-contained fashion

Offline etheric42

  • Full Member
  • ***
  • Posts: 107
Re: Defense counters
« Reply #2 on: March 17, 2018, 11:48:30 pm »
Thanks.  I think I've got a handle on it now.  I didn't get the three-layer approach at first (ship, launcher, projectile) but I should be able to work it to do what I want now.

 

SMF spam blocked by CleanTalk