Author Topic: Request for a bit of basic help with a small thing...  (Read 5004 times)

Offline Lord Of Nothing

  • Full Member Mark II
  • ***
  • Posts: 174
Request for a bit of basic help with a small thing...
« on: May 13, 2020, 07:47:35 pm »
Basically, I liked my spire in AI War classic with the railgun setup, and I was wondering how hard it would be to add it in.
So for example, we have:

Code: [Select]
    <entity name="SpireRailFrigate"
tags="SpireFrigate"
visuals="Assets/_DLC1/FallenSpire/Spire1Frigate/SpireFrigate.prefab" visuals_bundle="exp1_the_spire_rises"
icon_name="Official/Spire_Frigate" gimbal_icon_size_multiplier="1.5"
voice_group="Spire"
uses_large_health_bar="true"
category="Ship"
size_scale="7.4"
visuals_scale_multiplier="3.2"
y_offset_of_icon="30"
collision_priority="3000"
display_name="Spire RailFrigate"
description="A variant on the smallest of the fully military ships used by the Spire. Instead of the near ubiquitous Spire Coilbeam, this variant mounts an array of less damaging but longer ranged railguns."
starting_mark_level="Mark1"
cost_for_ai_to_purchase="5000" strength_multiplier="1.4"
hull_points="300000" shield_points="300000" speed="Normal1"
armor_mm="180" albedo="0.7" engine_gx="22" mass_tx="6"
metal_cost="200000" energy_consumption="22500"
ship_or_structure_explosion_sfx="ShipLostMassive_Explosion"
ship_or_structure_explosion_if_on_other_planet_sfx="ShipLargeLostOnOtherPlanet_Explosion"
ship_or_structure_explosion_sfx_happens_if_not_mine_and_on_other_planet="true"
            exp_to_grant_on_death="-1"
should_never_be_captured_by_another_faction="true"
            priority_as_ai_target="BigThreateningWeapon" priority_as_frd_target="BigThreateningWeapon" priority_to_protect="BigFavoriteToy"
>
    <system name="Railcannon" display_name="Spire Heavy Railcannon"
category="Weapon" firing_timing="OnlyInRange"
damage_per_shot="30000" range="EssentiallyInfinite" shot_speed="VeryFast" rate_of_fire="Misery"
shot_type_data="ExtremeLongRangeRailgun"
>
    </system>
    <system name="Railcannon" display_name="Spire Railcannon"
category="Weapon" firing_timing="OnlyInRange"
damage_per_shot="6000" range="EssentiallyInfinite" shot_speed="VeryFast" rate_of_fire="Normal"
                shots_per_salvo="4" fires_salvos_sequentially="false"
shot_type_data="ExtremeLongRangeRailgun"
>
    </system>
    </entity>

    <entity name="SpireRailFrigateNeuralNet"
            tags="SpireCityBuildMenu"
            visuals="Assets/_DLC1/FallenSpire/SpireFrigateNeuralNet/SpireFrigateNeuralNet.prefab" visuals_bundle="exp1_the_spire_rises"
            icon_name="Official/NeuralNet" icon_overlay="Official/NeuralNet_SpireFrigate" gimbal_icon_size_multiplier="1.5"
            voice_group="Spire"
            uses_large_health_bar="true"
            category="Ship"
            size_scale="7.4"
            visuals_scale_multiplier="25"
            y_offset_of_icon="30"
            collision_priority="810"
            display_name="Spire RailFrigate Neural Net" display_name_for_sidebar="Neural Net - RailFrigate"
            description_short="This facility allows the City to build an extra two Spire RailFrigates. They are built via a Shipyard."
            description="This facility allows the City to build an extra two Spire RailFrigates.  If the facility is destroyed, the extra RailFrigates will also be destroyed.  The City Center must be functional for the cap to increase, but a nonfunctional City Center won't decrease the cap. They are built via a Shipyard."
            starting_mark_level="Markless" build_sidebar_categories_i_am_part_of="SpireCity"
            cost_for_ai_to_purchase="10000" strength_multiplier="1.2" city_socket_cost="1" base_ship_cap_in_custom_city="2" added_ship_cap_in_custom_city_per_city_level="1" added_ship_cap_in_custom_city_per_city_level_above_level="1"
            hull_points="2000000" shield_points="2000000" speed="Immobile"
            armor_mm="180" albedo="0.7" mass_tx="6"
            metal_cost="500000" energy_consumption="15000"
            ship_or_structure_explosion_sfx="ShipLostMassive_Explosion"
            ship_or_structure_explosion_if_on_other_planet_sfx="ShipLargeLostOnOtherPlanet_Explosion"
            ship_or_structure_explosion_sfx_happens_if_not_mine_and_on_other_planet="true"
            exp_to_grant_on_death="-1" is_nonfunctional_when_on_planet_not_owned_by_my_faction="true"
            priority_as_ai_target="BigThreateningWeapon" priority_as_frd_target="BigThreateningWeapon" priority_to_protect="BigFavoriteToy"
            ship_type_name_to_grant_more_of_in_custom_fleet="SpireRailFrigate" ship_type_count_to_grant_more_of_in_custom_fleet="2"
>
    <metal_flow purpose="SelfConstruction" throughput="2500"/>
    <system name="HeavyBeamCannon" display_name="Spire Coil Beam"
category="Weapon" firing_timing="OnlyInRange"
damage_per_shot="30000" range="High2" shot_speed="Normal" rate_of_fire="Devourer"
shot_type_data="HeavyBeamInvisible"
beam_length_multiplier="1.3"
hits_all_intersecting_targets="true"
shots_detonate_immediately="true"
                is_coilbeam="true"
>
    </system>
    <system name="LaserPulse" display_name="Laser Pulse"
category="Weapon" firing_timing="OnlyInRange"
damage_per_shot="3000" range="High2" shot_speed="Normal" rate_of_fire="Misery"
shots_per_salvo="20" fires_salvos_sequentially="false"
shot_type_data="LaserPulse_DeepBlue"
>
    </system>
    </entity>

Placed in a uniquely named file in the right place in ...Steam\steamapps\common\AI War 2\Expansions\1_The_Spire_Rises\GameData\Configuration\GameEntity
I know the location part is fine since the neural nets appear in game, can be built and have the expected properties.

The question is: What else do I need to do in order to have the actual ship be built? At present, the Nets can be built, but they do not add the ship cap to the fleet, so what other steps need to be taken to achieve this, or, what have I done wrong? (Hopefully something fairly simple!)

Thanks in advance for taking the time to answer an idiot. :)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Request for a bit of basic help with a small thing...
« Reply #1 on: May 20, 2020, 11:45:33 am »
You're not an idiot at all!

In terms of the spire stuff in particular, it really was not designed very flexibly when it comes to how the neural nets grant things.  I'll make a change and post back here, so that you can have that work.  If it gets to a point where it feels good and is something you and others all like, I'd be happy to take it into the main game if you want -- I can imagine that others that would also like this.  But that's up to you, and no pressure.

First I need to get the code to be more generalized so that it will read in your stuff properly, though.  I think your setup is correct.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Request for a bit of basic help with a small thing...
« Reply #2 on: May 20, 2020, 12:02:48 pm »
Done for the next build:

* The fallen spire (expansion 1) code that allows for neural nets to grant new types of frigates and destroyers has been made a lot more general-purpose so that people can mod in their own neutral nets with specific frigates and destroyers (or whatever else, frankly) and have that function properly.  Previously it was not possible to add custom neutral nets, but now you can do it just via xml alone.

Thanks!

So sorry about the long wait on a reply.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Lord Of Nothing

  • Full Member Mark II
  • ***
  • Posts: 174
Re: Request for a bit of basic help with a small thing...
« Reply #3 on: May 20, 2020, 05:42:08 pm »
Thanks very much for that, it should be interesting to play around with once I finish my current game. :)

Considering how busy you are I think the reply was pretty quick!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Request for a bit of basic help with a small thing...
« Reply #4 on: May 21, 2020, 09:47:50 am »
It's my pleasure!  And thanks for being understanding. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!