aliens

Author Topic: Base Defense Mechanics  (Read 43907 times)

x60mmx

  • Guest
Re: Base Defense Mechanics
« Reply #30 on: April 02, 2015, 01:27:02 am »
Actually it is not a mod. I wrote only 5 strings of code just for this screenshot :)
This is just an concept. At least at the moment ;)

Would you be interested in collaborating?  I am not a coder, but I am really creative and can handle the numbers and graphics.

Offline Jstank

  • Colonel
  • ****
  • Posts: 247
  • 100% Un-Professional XCOM Lets Player
    • View Profile
    • FINAL MOD PACK LP OUT SOON NOW RECRUITING! SIGN UP TODAY!
Re: Base Defense Mechanics
« Reply #31 on: April 02, 2015, 06:33:23 am »
The first step would be making it activate the base defense sequence against the specific UFO in the area. The key to making it work is making sure that that specific retaliation mission failed if it was shot down....

Throwing game donuts now duck!


Maybe make a super fast fighter, that has weapons similar to the calibre of base defense  that has a really really small range (fuel), and that also derives its base power from the number and type of base defense you have installed. Possible, that is not a question I can answer, but It might be simpler than messing with the current base defense mechanics.

You can now un-duck. Im done throwing donuts.

Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: Base Defense Mechanics
« Reply #32 on: April 02, 2015, 09:09:21 pm »
Spit-ball Incoming!!

Reading through this I see some ideas I really like, and had a few of my own...

I like the idea of smaller ships being designated as assault craft, this seems the simplest suggestion and goes a long way to making earlier defenses more relevant.

As for the base defenses being able to target UFOs flying by:

Activate a flag that changes the trajectory of the UFO to fly over the base then orbit it; if it finishes that base is detected if not generate crash site.

The defenses should have very different ranges and rates of fire, Missiles(Fusion/conventional) would have long range and low rate of fire, Beams would have high rates of fire but short range... this would also lend to combo options where you fire a few missile to get their attention then when they come close to investigate hitting them with beams.

And if I could drop a completely out there suggestion, I would like base defense to activate a mini game like this



or this



except instead of missiles you are trying to shoot deployment craft and your weapons reflect what base defense facuilities you have
« Last Edit: April 02, 2015, 09:13:29 pm by NoelBuddy »

Offline Jstank

  • Colonel
  • ****
  • Posts: 247
  • 100% Un-Professional XCOM Lets Player
    • View Profile
    • FINAL MOD PACK LP OUT SOON NOW RECRUITING! SIGN UP TODAY!
Re: Base Defense Mechanics
« Reply #33 on: April 03, 2015, 04:59:48 am »
Thats what I envisioned the first time I came on these forums.

Its one of those would be really cool if sort of things to think about. However we have to work within the confinements of the orginal code. Something way too drastic like that would be way too much work to accomplish. Ideally that would be what we all (I) want. Missile Command within xcom. But we have to deal with the reality that it just is too much of a departure of the original code.


The closet thing I can think of is maybe someone could make a map that looks like land and sky, with cyber disks at the top of the stage advancing south and modified stationary MWP tanks at the bottom shooting at those cyber discs. That seems really far out there though and although possible I don't think people would like it. It would probably look wonky as hell and tying it into the base defense mechanics would take alot of pushing.

Like I said cool to think about but probably out of the realm of open xcom.




x60mmx

  • Guest
Re: Base Defense Mechanics
« Reply #34 on: April 03, 2015, 05:42:14 am »
I'm not interested in introducing minigames to X-Com, just reducing redundancy. 

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11702
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Base Defense Mechanics
« Reply #35 on: April 03, 2015, 02:32:12 pm »
I believe this minigame will be introduced along the tactical air combat minigame (the Xenonauts air combat model, but turn-based).









(Late April Fool.)

Offline NuclearStudent

  • Captain
  • ***
  • Posts: 90
    • View Profile
Re: Base Defense Mechanics
« Reply #36 on: April 06, 2015, 08:29:58 am »


Dude, can you share the code with us? This would be absolutely awesome to see in-game.

Offline pilot00

  • Colonel
  • ****
  • Posts: 487
  • Back in the day it was gameplay not a feature....
    • View Profile
Re: Base Defense Mechanics
« Reply #37 on: April 09, 2015, 11:14:08 pm »
Pfiu,...... At least I am a big sucker and I always forgets Aprils fools. I was scared there for a moment.

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Base Defense Mechanics
« Reply #38 on: April 11, 2015, 10:14:30 pm »
Active base defense ready to use :)

1. Activate defense:


2. Track down an UFO:


3. Shot down the UFO:


The branch: https://github.com/redv/OpenXcom/tree/active_base_defense
Difference: https://github.com/SupSuper/OpenXcom/compare/master...redv:active_base_defense

The branch compatible with regular OpenXcom.
All settings moved to the ruleset: https://github.com/redv/OpenXcom/blob/active_base_defense/bin/data/Ruleset/Active_Base_Defense.rul
Therefore the mod can be easily reconfigured or disabled.
Code: [Select]
# X-COM 1 (UFO: Enemy Unknown) ruleset
defense:
  rechargeTime: 10      # minutes. If value == 0 then active defense 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: 1  #26   # I need new icon
    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 facility
#    reloadCautious: 96    # not used
    reloadStandard: 72
#    reloadAggressive: 48  # not used
    ammoMax: 100    # in fact, maximum is 6x6-1 = 35
    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
#    reloadCautious: 24
    reloadStandard: 24
#    reloadAggressive: 24
    ammoMax: 100
    launcher: STR_LASER_CANNON
    projectileType: 4
  - type: STR_PLASMA_DEFENSES
    sprite: 5
    sound: 9
    damage: 140
    range: 60       # 240/4 = 60
    accuracy: 70
#    reloadCautious: 24
    reloadStandard: 24
#    reloadAggressive: 24
    ammoMax: 100
    launcher: STR_PLASMA_BEAM
    projectileType: 5
  - type: STR_FUSION_BALL_DEFENSES
    sprite: 3
    sound: 7
    damage: 230
    range: 70       # 280/4 = 70
    accuracy: 80
#    reloadCautious: 64
    reloadStandard: 48
#    reloadAggressive: 32
    ammoMax: 100
    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:
#      26: Resources/Base_Defense/bd_geoscape.png
#-----------------------------------
extraStrings:
  - type: en-US
    strings:
      STR_ACTIVATE_DEFENSE: Activate Base Defense
  - type: en-GB
    strings:
    strings:
      STR_ACTIVATE_DEFENSE: Activate Base Defence

Next I plan change icons of craft to something like a point defense turret:


And yes, active base defense it is lot of fun :)

Offline Ridаn

  • Colonel
  • ****
  • Posts: 269
    • View Profile
Re: Base Defense Mechanics
« Reply #39 on: April 11, 2015, 10:19:29 pm »
Aww yeah! Thats awesome.
What about multiply bases though?

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Base Defense Mechanics
« Reply #40 on: April 11, 2015, 10:23:07 pm »
Each base has own defenses.
« Last Edit: April 12, 2015, 01:35:13 am by redv »

Offline Jstank

  • Colonel
  • ****
  • Posts: 247
  • 100% Un-Professional XCOM Lets Player
    • View Profile
    • FINAL MOD PACK LP OUT SOON NOW RECRUITING! SIGN UP TODAY!
Re: Base Defense Mechanics
« Reply #41 on: April 12, 2015, 07:32:41 am »
Nice work! That is really awesome  8)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Base Defense Mechanics
« Reply #42 on: April 12, 2015, 08:00:33 am »
Great stuff! Hope this will get pulled into Master or Extended branch!
Bonus points for a chance to trigger base discovery!

From the Interception screen I can see each defensive building is represented by a separate weapon. What if a base has more than 2 types of defensive buildings?
« Last Edit: April 12, 2015, 08:02:05 am by Dioxine »

Online Yankes

  • Commander
  • *****
  • Posts: 3326
    • View Profile
Re: Base Defense Mechanics
« Reply #43 on: April 12, 2015, 12:15:32 pm »
Great stuff! Hope this will get pulled into Master or Extended branch!
Bonus points for a chance to trigger base discovery!

From the Interception screen I can see each defensive building is represented by a separate weapon. What if a base has more than 2 types of defensive buildings?

Probably other way around :) This branch could benefice form Extended feature of 4 weapons. Even if you like alter heavily interceptor window you could squeeze 6 weapons but without ammo numbers.
Over all I think this is interesting idea but probably going too far form my extended version.

Offline redv

  • Colonel
  • ****
  • Posts: 335
    • View Profile
Re: Base Defense Mechanics
« Reply #44 on: April 12, 2015, 01:00:51 pm »
Actually this branch not ready yet for merging.

In first, active base defense never used before in Xcom series. Therefore I'm not sure, that it will be accepted to the master branch. For extended version need to rewrite code, i.e. add 2 more weapons (actually need much more changes).

Second, I see that this version less than perfect. The interface should be redesigned.

1. Is it craft? Should be icons of defense turrets.
2. These buttons disabled. One can be repurposed to enable/disable base defense. But what to do with second one?
3. Need replace icon to point defense turret. It's easy.

I think about special build just for testing and feedback.

From the Interception screen I can see each defensive building is represented by a separate weapon. What if a base has more than 2 types of defensive buildings?

Even if you have three or four types of base defense facilities, will be chosen only two types. Which exactly types is not determined. Can be any. Actually this is a problem.

It is obvious, that blaster defense is best. But what will be best defense in general case? Is best defense that most powerful? Or best defense which has maximum range? Or best defense which can shoot rapidly? May be best accuracy should be taken into account? I think about maximum range.

In other hand, are you really will to use more than 2 types of base defense in one base? ;)
« Last Edit: April 12, 2015, 04:48:42 pm by redv »