aliens

Author Topic: Base Defense Mechanics  (Read 44214 times)

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Base Defense Mechanics
« Reply #60 on: April 15, 2015, 12:43:17 pm »
Why? because of risk of discovery ? Interceptors won't stop a retaliation battleship anyway.

Because you anyways need interceptors. Have you ever played without interceptors? ;)

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Base Defense Mechanics
« Reply #61 on: April 15, 2015, 03:45:51 pm »
If missile facilities had a chance to shoot down a UFO in radar range, there are some bases where I wouldn't put a hangar at all.
If the aliens detect and attack it, they can only enter through the access lift, so a pair of grandmothers armed brooms can hold them off.

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Base Defense Mechanics
« Reply #62 on: April 15, 2015, 04:27:32 pm »
You misunderstood the ruleset.

Small radar has radar range 1695. Large radar has radar range 2577. Even interceptor has radar range 672.
But the missile defense has defense range 160 (of course you can change it).

Therefore defense facilities can secure area around a base but this is very little area.
For example this area in (2577/160)^2=259.4 times less than area covered by large radar system.

Therefore interceptors need anyways, even if you want to use base defense.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Base Defense Mechanics
« Reply #63 on: April 15, 2015, 05:28:53 pm »
Ah sorry I hadn't looked at the numbers you had in mind.
I was thinking of something more like ICBM bases, able to protect a whole continent. So this capability would apply to missiles (efficient only against the small UFOs) and fusion balls, not lasers or plasma.
A tiny range would make it very unlikely to make a difference in the game.
I envisioned the missiles in flight as fast/slow as an interceptor, so it's a challenge to decide when to launch : too early and the missile runs out of fuel while chasing a UFO which hasn't found its target area, too late and the UFO can move out of range or lands.

Offline animal310

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Base Defense Mechanics
« Reply #64 on: October 14, 2017, 01:45:55 pm »
I’m sorry to bump old threads but I’ve been away for a while and have been searching through the threads. This looks like another fantastic peace of work but can anyone explain how I can add it to my game? It is possible to be used like a mod?
Base defence is one area where the game needed work and this looks very good!

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Base Defense Mechanics Ala Xenonauts
« Reply #65 on: December 01, 2017, 05:22:10 am »
I am aware this is a late response. I wish I had seen the post sooner, so I could have given my input.


I really enjoyed the fact that base defenses in Xenonauts reduced the number of attackers according to how much base defense you had, if it failed to repulse the attack. [snip] If defenses could reduce the number of attackers, I could see myself actually using them.

Possible?
if we start trying to "ape the competition" then we might give the impression that we're actually trying to compete.

I came up with this exact idea independently of xenonauts and posted it on these forums here. Excerpt from my post:

"4.) The damage done to the craft by the base defenses should have some impact on the aliens making it to the ground. A heavily-damaged ship would have multiple hull breaches and several aliens would have been killed or injured, and more may be hurt or killed in a hasty landing with structural integrity already failing. Heavily-damaged ships should drop fewer aliens, some of which would be already hurt. That way it's less of an all or nothing mentality on base defense."

It's a very basic idea that anyone could come up with independently. I don't see any reason to avoid adding the feature just because somebody else used it. Also, OpenXcom itself isn't in much of any competitive position. It's just here to make the game more moddable. You can add the capability for modders to make use of such a feature, and have it off by default. If Xenonauts feels competition pressure, it'll be from a specific mod. I don't think that'll happen, however. If anything, the two communities should be sharing ideas, and either one of us is probably an advertiser for the other.
« Last Edit: December 01, 2017, 05:26:08 am by The Reaver of Darkness »

Offline Dwarmin

  • Sergeant
  • **
  • Posts: 27
  • Smoke grenades saved the Earth
    • View Profile
Re: Base Defense Mechanics
« Reply #66 on: December 06, 2017, 09:46:30 pm »
Someone should really code this in. Not sure how hard it would be, but...wouldn't it be like making each defense a separate 'craft'? Only it's more or less just the targeting system tracking and locking on, with the weapons being fired from the base. It wouldn't stretch the imagination for UFO's to be able to fight at super long ranges, i.e, they bomb your defenses back.

Also, I've always guessed that crashed alien ships take damage that (somehow? I don't know if this is a thing as I understand it) scales with the amount of damage you did to it in the air. At least, weaker guns seems to knock medium scouts down intact, and plasma launchers make them a flat piece at the ground. Engineer Aliens and soldiers usually die when the power cores rupture-there's a reason the commanders are usually seated far away from them. :P But this damage scaling seems to me like it could be applied to landing/attacking ships.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Base Defense Mechanics
« Reply #67 on: December 06, 2017, 10:16:13 pm »
Someone should really code this in. Not sure how hard it would be, but...wouldn't it be like making each defense a separate 'craft'? Only it's more or less just the targeting system tracking and locking on, with the weapons being fired from the base. It wouldn't stretch the imagination for UFO's to be able to fight at super long ranges, i.e, they bomb your defenses back.

Also, I've always guessed that crashed alien ships take damage that (somehow? I don't know if this is a thing as I understand it) scales with the amount of damage you did to it in the air. At least, weaker guns seems to knock medium scouts down intact, and plasma launchers make them a flat piece at the ground. Engineer Aliens and soldiers usually die when the power cores rupture-there's a reason the commanders are usually seated far away from them. :P But this damage scaling seems to me like it could be applied to landing/attacking ships.

There is no scaling of dogfight damage done to the battlescape on a crash site.  The UFO either gets a status of crashed or destroyed if you do too much dogfight damage. Once on the ground, each power source has a 75% chance of exploding before the mission - this is how damage appears in the battlescape.

Edit: This can't apply to base defense missions, since no UFO is spawned on the map. Perhaps bombardment of a landing site could be added, but likely it would only change the UFO's status to either crashed or destroyed, and you'd be back to the situation above.
« Last Edit: December 06, 2017, 10:19:06 pm by ohartenstein23 »

Offline bloodman123726

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: Base Defense Mechanics
« Reply #68 on: October 28, 2019, 12:56:13 pm »
Final version of Active base defense is ready.

The button "Activate base defense" will be shown only if ruleset "Active_Base_Defense.rul" loaded and the base has at least one defense facility.
In other cases will be shown the standard intercept window.
Each base can be activated separately.


If the defense was activated and found a suitable target then starts a dogfight window.
Will be chosen 2 most long-range weapons. Quantity of ammo = Quantity of facilities of this type  x  Maximum quantity of ammo for this facility.
Possible modes: not shoot / shoot / disable defense / allow disengage for UFO
One base can track only one target.


The window can be minimized if you not began an air battle.
After each use of base defense starts a recharge countdown (even after vanilla use of base defense).


Behaviour can be tuned via ruleset:
Code: [Select]
# X-COM 1 (UFO: Enemy Unknown) ruleset
defense:
  rechargeTime: 10      # minutes. If value == 0 then active defence will be disabled permanently.
  retaliationChance: 30 # 0..100 %. Chance to uncover the base by aliens after air battle.
#-----------------------------------
crafts:
  - type: STR_BASE
    requires:
      - STR_BASE_DEF
    sprite: 30
    damageMax: 100      # should be > 0. Actually not used.
    weapons: 2
#-----------------------------------
craftWeapons:
  - type: STR_MISSILE_DEFENSES
    sprite: 1
    sound: 5
    damage: 100         # the same as for launcher
    range: 40           # range in pixels: (range for facility)/4; i.e. 160/4 = 40
    accuracy: 50        # the same as for defence facility
    reloadStandard: 72
    ammoMax: 5          # maximum ammo for each defence facility
    launcher: STR_AVALANCHE_LAUNCHER
    projectileType: 1
    projectileSpeed: 8
  - type: STR_LASER_DEFENSES
    sprite: 4
    sound: 8
    damage: 70
    range: 50           # 200/4 = 50
    accuracy: 60
    reloadStandard: 24
    ammoMax: 5
    launcher: STR_LASER_CANNON
    projectileType: 4
  - type: STR_PLASMA_DEFENSES
    sprite: 5
    sound: 9
    damage: 140
    range: 60           # 240/4 = 60
    accuracy: 70
    reloadStandard: 24
    ammoMax: 5
    launcher: STR_PLASMA_BEAM
    projectileType: 5
  - type: STR_FUSION_BALL_DEFENSES
    sprite: 3
    sound: 7
    damage: 230
    range: 70           # 280/4 = 70
    accuracy: 80
    reloadStandard: 48
    ammoMax: 4
    launcher: STR_FUSION_BALL_LAUNCHER
    projectileType: 3
    projectileSpeed: 8
#-----------------------------------
facilities:
  - type: STR_MISSILE_DEFENSES
    defenseRange: 160   # maximum range is 280 miles (70*4 = 280)
  - type: STR_LASER_DEFENSES
    defenseRange: 200
  - type: STR_PLASMA_DEFENSES
    defenseRange: 240
  - type: STR_FUSION_BALL_DEFENSES
    defenseRange: 280
#-----------------------------------
extraSprites:
  - type: INTICON.PCK
    width: 352
    height: 80
    subX: 32
    subY: 40
    files:
      27: Resources/ActiveBaseDefense/abd_geoscape.png
  - type: INTERWIN2.DAT
    width: 160
    height: 556
    singleImage: true
    files:
      0: Resources/ActiveBaseDefense/abd_interwin2.png
#-----------------------------------
extraStrings:
  - type: en-US
    strings:
      STR_ACTIVATE_DEFENSE: Activate Base Defense
      STR_CANT_MINIMIZE_DURING_BATTLE: Can't minimize during battle
  - type: en-GB
    strings:
      STR_ACTIVATE_DEFENSE: Activate Base Defence
      STR_CANT_MINIMIZE_DURING_BATTLE: Can't minimize during battle

The code: https://github.com/SupSuper/OpenXcom/compare/master...redv:active_base_defense
The code compatible with latest nightlies.

If you have an interest I'll try to build an standalone exe (I never did it before:)

Could someone please take a look at this if they have the time to compile this into the aforemention standalone mod? I tried to do such but it does not seem to work at all with the latest nightly. Thanks.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Base Defense Mechanics
« Reply #69 on: October 28, 2019, 01:02:20 pm »
Could someone please take a look at this if they have the time to compile this into the aforementioned standalone mod? I tried to do such but it does not seem to work at all with the latest nightly. Thanks.

This feature request was never added to OpenXcom.
Thus you can't use the aforementioned ruleset to make a mod.

Offline bloodman123726

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: Base Defense Mechanics
« Reply #70 on: October 28, 2019, 01:09:19 pm »
This feature request was never added to OpenXcom.
Thus you can't use the aforementioned ruleset to make a mod.

So it is not possible at all to make a standalone mod that can manage a similar result?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Base Defense Mechanics
« Reply #71 on: October 28, 2019, 01:32:57 pm »
So it is not possible at all to make a standalone mod that can manage a similar result?

Mods can only add features that are supported by the engine.

And this one is not supported by the engine.

If you want this, you'd need to change the engine.

wcho035

  • Guest
Re: Base Defense Mechanics
« Reply #72 on: October 28, 2019, 03:44:14 pm »
I don't know why you guys are moaning about base defense missions. I personally find base defense missions are most fun part in the game.

First, you need to design your base smartly. Always separate the airlocks and the hangers away from the other base structures.

Have choke points where the Aliens has to get through. Usually I have the airlock as a choke point between the hangers and the other base facilities.

Always position your soldiers near the choke point at the first turn of the battle, and then fight your way to win.
 

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Base Defense Mechanics
« Reply #73 on: October 28, 2019, 04:45:23 pm »
I don't know why you guys are moaning about base defense missions. I personally find base defense missions are most fun part in the game.

First, you need to design your base smartly...

A lot of people know all that and still dislike base defense missions, probably because they get stale really fast when the aliens send one battleship after the other. But this thread is more dedicated to peoples' dislike of weak base defense facilities (laser and missile defense) because there's no use for them in the game.

Also, there have been some updates to base defense facility code since this discussion took place in 2015 and some in 2017:
 * Base facilities can now launch projectiles onto the geoscape, and aliens can spawn projectiles onto the geoscape which can hit player bases and damage or destroy facilities. Tech Comm
 * Base facilities can cost any type of item to build, and can refund some or all of that item (or other items) when they are removed. (buildCostItems)
 * A global variable can be set which will make UFOs drop less aliens based on their remaining hit points. (lessAliensDuringBaseDefense: true)
Ruleset Reference Nightly (OpenXcom)

Keep in mind all of these are options for mods, and none of them affect the unmodded game.

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: Base Defense Mechanics
« Reply #74 on: October 28, 2019, 04:46:33 pm »
I would agree with that. So long as you design your base right these missions should be easier than alien bases which need to be done at some point. Only if your troops are being mind-controlled all the time should base defence missions turn into a nightmare. Also if you avoid shooting down every ufo/uso that comes along you should keep these missions to a minimum.