aliens

Author Topic: A thread for little questions  (Read 1318022 times)

Offline legionof1

  • Moderator
  • Commander
  • ***
  • Posts: 1900
  • Bullets go that way. Money comes this way.
    • View Profile
Re: A thread for little questions
« Reply #855 on: January 26, 2018, 12:28:06 am »
Well know how vs use well is very different matter. Mortars reward sitting in one spot crouched for most of a map. AI units spend alot of TU dithering around there general spawn area. A mortar enemy basically has to spawn on a roof or other similar flat open space to have much impact. The AI simply dosen't understand concepts like moving to superior position based on weapon wielded/terrain configuration.

Offline Ethereal_Medic

  • Commander
  • *****
  • Posts: 941
  • Pet Lokk'Nar 9,99 $/hour
    • View Profile
Re: A thread for little questions
« Reply #856 on: January 26, 2018, 12:04:37 pm »
If the A.I. would be able to think outside of the box they would start to use proximity-/landmines to box your crew inside your craft and use smoke-screens to their own advantage.
They would remember where your hands are standing and throw various amounts of grenades at your last-known position.
With the spotter-sniper code they can at least do something against you if one of their soldiers has vision on you.

Introducing such human-like cryptic thinking could only work if the A.I. has map-hack knowledge and could calculate where to move to get the utmost efficiency out of their TU's and vision-field.
For example: The A.I. knows where your airbus has landed and stockpiles the whole map around your starting location, creating a shooting gallery just like the human player can do.
Unless you love lead-poisoning you can't go out of the airbus without getting shot by the A.I. camping you.
Ofc it's possible to delay this superior A.I. thinking for 1-2 turns so the player can actually deploy somewhat save-ish.

Offline Eddie

  • Commander
  • *****
  • Posts: 560
    • View Profile
Re: A thread for little questions
« Reply #857 on: January 26, 2018, 05:06:30 pm »
Personally, I think the next step to make xcom more fun lies in the development of a better AI. But we are getting there.

I recently vitnessed the AI doing something useful. It was a zombified Academy outpost on the urban/slum map at night, second month after start. The strix zombie got on the roof of a house and  camped there. It pretty much kept me pinned down, as it was in a perfect firing position. If any gal moved into an open area, the strix zombie would reaction fire on her (it didn't move so always had full tu). I set up defensive positions in a house. Took out most of the wall on the first floor. The roof protected my gals from the strix. With the mini pocket las pistol, I slowly chipped away at the hp of the strix zombie on the neighboring house. There were also two chryssalids patroling the space between the houses. When they came close to my house, they could be killed with the anchor firing down from the first floor. It was only possible to win this map because of high damage anchor and endless ammo mini las pistol. Nice challange.

Next example: On a ratmen rodeo my gal came under archer fire from an unseen enemy. Somehow a ratman I never saw spotted one gal, and a ratman hunter could use that info to shoot her over a wall  with his bow.

Bottom line, as long as the AI has info on your position like the strix with its 40 range psi vision, they do make good use of arcing fire weapons. This could be improved with a little bit of code: if no target is currently available and unit has area of effect weapon (grenade, mortar, etc.), try to bombard tile where enemy was spotted the previous round. Enable this behavior with by setting the artillery flag to true on the unit.
An addition to that: When weapon has area effect and no direct line of fire is possible, see if neighboring tiles can be shot at.

This sniper/spotter behavior could be used in mission design: There is one immobile/slow unit called the security system. It has 40+ psi vision and gives info to sniper enabled units. Killing the security system will give you tactical benefits on the map. This would be suitable for alien base assaults for example. Or terror missions, where the security system is an armored vehicle, where the mobile command center is located (Alien 2 style).

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: A thread for little questions
« Reply #858 on: January 26, 2018, 05:28:14 pm »
Personally, I think the next step to make xcom more fun lies in the development of a better AI. But we are getting there.

I recently vitnessed the AI doing something useful. It was a zombified Academy outpost on the urban/slum map at night, second month after start. The strix zombie got on the roof of a house and  camped there. It pretty much kept me pinned down, as it was in a perfect firing position. If any gal moved into an open area, the strix zombie would reaction fire on her (it didn't move so always had full tu). I set up defensive positions in a house. Took out most of the wall on the first floor. The roof protected my gals from the strix. With the mini pocket las pistol, I slowly chipped away at the hp of the strix zombie on the neighboring house. There were also two chryssalids patroling the space between the houses. When they came close to my house, they could be killed with the anchor firing down from the first floor. It was only possible to win this map because of high damage anchor and endless ammo mini las pistol. Nice challange.

Next example: On a ratmen rodeo my gal came under archer fire from an unseen enemy. Somehow a ratman I never saw spotted one gal, and a ratman hunter could use that info to shoot her over a wall  with his bow.

Bottom line, as long as the AI has info on your position like the strix with its 40 range psi vision, they do make good use of arcing fire weapons. This could be improved with a little bit of code: if no target is currently available and unit has area of effect weapon (grenade, mortar, etc.), try to bombard tile where enemy was spotted the previous round. Enable this behavior with by setting the artillery flag to true on the unit.
An addition to that: When weapon has area effect and no direct line of fire is possible, see if neighboring tiles can be shot at.

This sniper/spotter behavior could be used in mission design: There is one immobile/slow unit called the security system. It has 40+ psi vision and gives info to sniper enabled units. Killing the security system will give you tactical benefits on the map. This would be suitable for alien base assaults for example. Or terror missions, where the security system is an armored vehicle, where the mobile command center is located (Alien 2 style).

The first example is just the normal AI + psi vision; new AI code had nothing to do with it.

The artillery fire on your supposed position is just un-fun - IIRC one of the beta versions of Xenonauts AI would guess where your soldiers were based on where they weren't, and then start tossing explosives your way.  This is an example of bad game mechanics - your soldiers die just for existing on the battlefield.

Offline Martin

  • Colonel
  • ****
  • Posts: 438
    • View Profile
Re: A thread for little questions
« Reply #859 on: January 26, 2018, 08:07:01 pm »
The artillery fire on your supposed position is just un-fun

Never having to worry about losijng a hand unless you make a serious fuckup is also un-fun 8)

Everything player can do to the AI, the AI should be able to do back.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: A thread for little questions
« Reply #860 on: January 26, 2018, 08:16:57 pm »
Never having to worry about losijng a hand unless you make a serious fuckup is also un-fun 8)

Everything player can do to the AI, the AI should be able to do back.

Consider this: if the AI could do everything a player can, wouldn't it just immediately fire a blaster bomb or explosive into any open transport as soon as one of their units spots it? Or drop proximity mines all around your craft? I assure you, taking the AI down this route leads to more frustration than its worth, and is why you don't see such AI often in games.

Also, symmetric balance is boring, and having such an AI would require complete rewrite of much of the deployments in the mod, as it's written to use the given AI.  Difficulty can be bumped up in other ways if necessary.

Offline Starving Poet

  • Colonel
  • ****
  • Posts: 265
    • View Profile
Re: A thread for little questions
« Reply #861 on: January 26, 2018, 08:40:43 pm »
Xenonauts early beta had an AI that tossed grenades where it thought you might be - wound up being way overpowered since they start the map knowing exactly where you aren't.


Offline legionof1

  • Moderator
  • Commander
  • ***
  • Posts: 1900
  • Bullets go that way. Money comes this way.
    • View Profile
Re: A thread for little questions
« Reply #862 on: January 27, 2018, 12:23:02 am »
What i would prefer to see is maybe not everything the player can do, but at the very least snipers and mortars and other artillery like weapons should at the very least attempt to reach high ground. Not dither around indoors, in alleyways or under trees(just arcing weapons). Having a handful of powerful units just pass/fail to impact a map on nothing more then spawn RNG feels pretty bad.

Offline Ethereal_Medic

  • Commander
  • *****
  • Posts: 941
  • Pet Lokk'Nar 9,99 $/hour
    • View Profile
Re: A thread for little questions
« Reply #863 on: January 27, 2018, 11:47:06 am »
To play around the Spawn RNG each spawn-point on a map would need a selection of units allowed to exist there.
e.g. on the roof you only allowed to spawn enemies with sniper-rifles and mortars or indoors foes with shotguns/flamers

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: A thread for little questions
« Reply #864 on: January 27, 2018, 04:20:36 pm »
To play around the Spawn RNG each spawn-point on a map would need a selection of units allowed to exist there.
e.g. on the roof you only allowed to spawn enemies with sniper-rifles and mortars or indoors foes with shotguns/flamers

That is already somewhat possible, but it's on the modder to decide with alien rank numbers and priorities on spawn nodes.

Offline RSSwizard

  • Commander
  • *****
  • Posts: 793
    • View Profile
Re: A thread for little questions
« Reply #865 on: January 29, 2018, 11:44:39 pm »
What i would prefer to see is maybe not everything the player can do, but at the very least snipers and mortars and other artillery like weapons should at the very least attempt to reach high ground. Not dither around indoors, in alleyways or under trees(just arcing weapons). Having a handful of powerful units just pass/fail to impact a map on nothing more then spawn RNG feels pretty bad.

I was designing (in concept) an xcom clone for years and I looked into alot of situations like this for how a programmer might address the AI. There were a couple things that I saw in terms of strategy that I ought to chime in about. This would require building an internal database of layout information for the map ingame similar to RMPs for the AI to access.

Superior positions are good but how do you define/label a superior position? In terms of height you want to check from the top of the map down where the tallest map blocks are - not the vertical height of one but the highest vertical dimension that has a Floor tile (not sure if trees have floor tiles or just object/wall tiles). You can get more detailed than this if you want but it would involve weighting the map block's vertical accessibility by doing additional vertical checks at intermediate locations inbetween the center tile to the edge (3x3 grid, etc) that way if its got a tall smokestack in the middle of it that wont define its accessibility as much.

(edit - in the game concept I was designing the map would have various waypoints and handles in it similar to the RMP system but also for predefining where these types of locations were so that it wouldnt have to be handled algorithmically... it also would have had waypoints that had an Inverse Linkage to them so that the AI could use them with tactical movement rules and would know which nearby waypoints that a given one Cannot Be Reached from. I dont think this is an option for openxcom though because it would dictate needing to define additional data for map blocks)
(It was also going to handle "Object Binding" by connecting multi-leveled objects together via grouping, and establishing structural integrity so that you could have building and object collapses similar to XcomApocalypse, and there would have been weight tolerances so that it discouraged bringing Power Armor and Vehicles into and across certain structures because they could collapse - and you would take falling damage from it. And algorithmically it would also measure floor tiles connecting to each other with a strength based on its toughness, so if you blow a big enough hole in a floor and it doesnt have much support below it, it might collapse most of the floor but it wouldnt collapse the floor tiles that were adjacent to the wall)

Now you want to check among those which ones are 1 map block adjacent to the given unit (increase by 1 radius if they have more than 100 TUs). And pick the one which is closest to them. They will look for stairs or elevators tiles to ascend upwards and take the closest path to them until they reach them. If the unit has reached a Roof then they will also need to move to within 2 tiles of the Edge of its floor tiles in order to get a line of fire at anyone on lower floors (make it 3 tiles if they are only on a 1 story building).

Its also important to program in variance like priority to go to the Roof, verses looking for Windows to fire out of. Big buildings like the ones in the EuroSyndicate missions will have AI going crazy trying to get up on the roof when they will likely only find themselves moving up to the Top Floor and not being able to get to an exposed roof.

(to address this bug you can weight that the 2nd or 3rd story is fine enough to gain an advantage)
(Edit - its also worth mentioning that some kinds of weapons are NOT good for shooting from an advantage point, either because of Accuracy or Effective Range, and it would be easy enough to set default standards for this so that the AI doesnt move units with Sawed Off shotguns and Holdout Pistols to the 3rd story balcony. Whether you could say they were more advantageous because of the vertical distance or not is questionable, but going to a higher elevation has a greater marked effect for what we'd consider sniping - or especially explosive weapons - and particularly grenades)

Weapon Selection is also important for arcing weapons and explosives. Shooting out of a window is bad news if you have a rocket launcher, even though in real life a user of such a weapon would have no problems firing out of a window without hitting it. So someone using a blast weapon should only fire out of areas that have a Gap in wall tiles rather than a Window.

For the same reason someone with an arcing weapon (like a tftd deep one) should only look for Gaps in walls to shoot from because their projectile needs a more stringent line of fire to it - sure they can shoot out of a window but that wouldnt be the priority for movement. These units would set a higher weight to moving onto the roof.

(lets consider the Snakewoman mutant civvie, she has an arcing projectile spit attack, this would affect those units and they would try to move to higher elevations to lob spit as if it were mortars - in a way this would be beneficial since it also makes them harder to get into Melee with)


Another major AI advantage is taking cover intelligently. Hazard Assessment zones is one way to handle this. Measured in 5x5 blocks with the center of that block being the anchor for it. Starting for every 10x10 map block check from the top down to the first floor tile it reaches in the center, if that has an open center to it (there is a line of fire directly to at least 3 cardinal directions) then a Hazard anchor is dropped there - this is a vulnerable spot to be. The Hazard Anchor extends vertically from the top of the map to 1 floor below the location where the assessment was made.

(in Space most blocks would receive this, and it would be warranted because it is a very open place, even on the space station locations the first floor inside would be considered a dangerous place. However since it only targets 5x5 squares it means the AI will sorta move in a jigsaw fashion through space since its trying to avoid the center of each map block - but since you'd likely introduce variance by doing a Bravery check that may not matter)

But in gameplay the trick is detecting what is actually hazardous and which types of weapons are more hazardous. So while gameplay is going on any time an enemy makes a shot at the AI that unit will check the line of fire compared to its visibility (in an rpg type game a spot check would be made)... okay I know where the bearer of that weapon is now. Since that unit is now in danger drop a temporary Hazard anchor there... but then also calculate the field of view for the shooter from where they fired, in a swath (to avoid intense calculation maybe, step it by 2 degrees each time) and drop Hazard Anchors positioned in a grid for each ray traced on that which hits a ground tile.

What kind of weapon was used? Damage caused is one factor (Damage divided by the armor effectiveness multiplier actually) but Blast damage is alot more dangerous because even close counts with that.Effective blast radius * 10 is added to the Damage for this assessment.
(so a rocket launcher doing 120 damage is going to have double the hazard rating of a heavy plasma doing 115 damage, but a panzerfaust doing 120 damage with a 0.65 armor effectiveness and an effective blast radius of 3 is only going to be treated as doing around 215)
(effective blast radius being calculated first by checking the actual blast radius, and if Power / Radius Reduction is lower then that value is used instead... common sense size here)

Maybe measure these hazard ranks for every 45 points total. Maybe add one rank to this if the weapon has at least 6 burst shots so that minigun style weapons are given some credit for that. Maybe take accuracy into consideration, add 1 rank if that weapon has more than 120% aimed accuracy (this would put shotguns in that category). Number of pellets from a buckshot blast should also be factored in but id say a multiplier to damage would be much lower, such as 1.0 + (Pellets-1)*0.1 so a boom gun would be treated as 95 damage for this purpose (+2 ranks)


This is for determining the level of danger that each Hazard Anchor has associated with it. The degree of danger for each one decreases one step for every turn that goes by... which the one who provoked that danger has not been spotted there (at the lowest rank it takes 2 turns for it to be cancelled). If that particular shooter is observed firing again redo that assessment and reduce the prior Hazard Anchors to the lowest rank. These assessments should only be done Once per turn.

If the AI observes a shot Impacting an area but does not observe the shooter who did it, it will drop a low rank Hazard anchor within the 5x5 grid that the shot impact was located. Maybe also use the trajectory from the shot to drop another anchor in the next 5x5 grid. This should only be assessed 1 time per weapon even if its got buckshot or fires multiple shots (the first one that hits is the only one that matters)

If a unit happens to be inside a hazard zone they will trace a line of fire from themselves to the anchor for it, and if there is no line of fire then they will ignore it (if you cant see the spot that is risky to be shot from). Not perfect but it would prevent units behind a wall from reacting to a hazard spot that was located outside.

So in addition for pointing out to the AI which areas are open danger areas, it also points out to the AI which areas have been made dangerous as a result of combat, which changes as the battle goes on due to its fluid nature. Big dangerous weapons like cyberdisk plasma guns or rocket launchers will get AI to avoid areas they've seen those weapons in action, if the user of that weapon is spotted somewhere else then they pose that hazard over there - but the location that they were at previously will still linger because of the buddy system (another unit may be in a position to fire from there) and because the enemy unit may swing back to that spot.

How strongly the AI curtailed its movement as a result of exposure rules - I think it should be up to the unit's Bravery, possibly a skill test in order to make it random. The AI should only do it once per turn for each unit IF they are confronted with a hazard zone.

The intelligence of the unit may also come into play in some manner, for example weighting higher ranking Hazard Anchors while ignoring the lowest tier ones if heavy duty stuff is being used, if the intelligence is high enough (ie, at least 5) then they can go ahead and reassess the target while the AI remains aware of the location of that target even if they dont have a line of sight check (predicting where the wielder of that weapon went and alerting the rest of the units of their faction)

This is a complex, dynamic way of handling "sneaky AI" at least in terms of picking which areas and targets are more dangerous to avoid.
« Last Edit: January 30, 2018, 01:11:40 am by RSSwizard »

Offline vortex

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: A thread for little questions
« Reply #866 on: February 18, 2018, 08:36:40 am »
Hi Folks,

I search all the bootypedia (two times) about Workers, without finding where they are described.
My original question was a reference to a previous comment on the base layout: should I pick large vaults or an armada of workers ?

Offline cc

  • Colonel
  • ****
  • Posts: 244
    • View Profile
Re: A thread for little questions
« Reply #867 on: February 18, 2018, 11:21:31 am »
My original question was a reference to a previous comment on the base layout: should I pick large vaults or an armada of workers ?
Workers give you 4 space in exchange for a 5 000 monthly cost.
A Large Vault gives you 500 storage space in exchange for a 7 500 monthly cost and 4 base tiles.

In the beginning you may want to use a Large Vault because it's a lot cheaper. In the later game, you'll want to replace all vaults with workers and slaves as base tiles are a lot more precious than vault space. The extra cost can be offset by producing items, having Courtesans, or shifting Contraband.

TL;DR: Use Workers if you have the money. Vaults are for poor people. ;)

Offline Darkfirephoenix

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: A thread for little questions
« Reply #868 on: February 18, 2018, 05:56:17 pm »
Couple of questions:
How do I get my crafts to shadow enemy crafts (so I can follow those friggin probes to a mission), the game doesn't let me minimise the "engagement" screen
Mechtoids: How to get em/where... and did I screw myself cause I already got "Contacts: Reticulans"?
Where the hell do I get that "Secure Freight" (or such) tech/item from? Without it anything that needs the "Activities: Commercial" research is locked...

Thanks for your help in advance! :D

Offline Ethereal_Medic

  • Commander
  • *****
  • Posts: 941
  • Pet Lokk'Nar 9,99 $/hour
    • View Profile
Re: A thread for little questions
« Reply #869 on: February 18, 2018, 08:50:33 pm »
See attachment. Hit the switch on the top-left of the window to 'shadow' a ship.

You get mechtoids from the biggest reticulan shipping and during reticulan bunker mission (probe).
I guess you did boned yourself with getting "Contacts: Reticulans" before you could finish all individual topics such as mechtoid and mechtoid corpse.
Somewhere is a fix for that.

To get 'secure freight' you've to research the topic: "Heavy Freighter Flight Plan"

To get this topic, you've to read Heavy Freighter Documentation first.