aliens

Author Topic: [DONE][Suggestion] Base Defense Facility Ammunition  (Read 1066 times)

Offline skyhawk

  • Colonel
  • ****
  • Posts: 106
    • View Profile
[DONE][Suggestion] Base Defense Facility Ammunition
« on: December 04, 2019, 01:17:00 am »
In vanilla TFTD [And there's an equivalent in EU/UFO I believe] there's a late-game weapon type called the PWT. It requires ammunition that is very expensive in Zrbite.

There's a craft PWT launcher, which likewise requires very Zrbite expensive projectiles.

Then there's a base defense facility, which costs no exotics to build [You've already addressed this], but can also fire at incoming hostiles without a care in the world, because its ammunition is free.

This suggestion will not have any impact at all on vanilla, but allow modders to easily correct this situation:

facilities.rul
  Add two attributes
    ammunitionType: default none
    ammunitionCount: default 0
    [optional] noAmmoMessage: default 'NO AMMO'? # This would allow per-facility type no ammo strings

The logic is very straightforward. During a base defense, this facility cannot fire if the required ammunition is not present [Print a message like 'NO AMMO']. If the facility does fire, subtract the ammunition from stores.

OPTIONAL - Allow reduced damage with incomplete ammo loads. For example - the facility has a defense strength of 1000 and an ammo count of 4 [4 torpedo launchers]. If there's only two torpedoes in stock, the facility will fire for a strength of [(1000/4) * 2]. Some way of communicating to the player that ammunition was insufficient would be a good idea, but I'm not sure the best way to handle that.

This will also require tweaking the UFOPedia to show the required quantity and type of ammunition.
« Last Edit: October 31, 2020, 11:51:19 pm by Meridian »

Offline davide

  • Commander
  • *****
  • Posts: 548
    • View Profile
Re: [Suggestion] Base Defense Facility Ammunition
« Reply #1 on: December 08, 2019, 08:26:58 am »
« Last Edit: January 07, 2020, 01:49:07 am by davide »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6841
  • OXCE developer
    • View Profile
    • My Wiki
Re: [DONE][Suggestion] Base Defense Facility Ammunition
« Reply #2 on: October 31, 2020, 11:54:08 pm »
Added.

Code: [Select]
facilities:
  - type: STR_MISSILE_DEFENSES
    defense: 500
    hitRatio: 50
    ammoNeeded: 2                       # default 1
    ammoItem: STR_AVALANCHE_MISSILES    # default empty
    fireSound: 5
    hitSound: 10

Code: [Select]
  STR_NO_AMMO: "NO AMMO!"

No partial loads.
No custom messages per facility.

Ufopedia will show the info under the "INFO" button (a.k.a. Stats for Nerds).
Or you can just update the description.
« Last Edit: November 22, 2020, 04:07:17 pm by Meridian »

Offline skyhawk

  • Colonel
  • ****
  • Posts: 106
    • View Profile
Re: [DONE][Suggestion] Base Defense Facility Ammunition
« Reply #3 on: November 01, 2020, 12:19:48 am »
Unexpected Necromancy!

Thanks Meridian.