aliens

Author Topic: spawnUnit: Always hostile?  (Read 7122 times)

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
spawnUnit: Always hostile?
« on: July 09, 2017, 11:54:32 pm »
I was experimenting with this setting on spawning different units, even neutrals
Any units spawned even if originally neutral are always hostile?
is there any way to change if a neutral unit is spawned from a friendly or neutral it stays neutral?

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #1 on: July 10, 2017, 01:20:55 am »
Not quite neutral but you could spawn the unit as a living weapon with a weapon that does zero damage?

I saw this video
on youtube of someone doing something with a friendly unit but not sure how they did it.

Maybe it is possible in extender?

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #2 on: July 10, 2017, 02:08:46 am »
Hmm, I shall examine that video and the PIRATEZ mod further especially for instances of spawnUnit:  and see what it might be doing, thank you , SideQuests.

here is what I had in mind though not confined to the following:

--In terror missions if a civilian is killed by an Alien, another spawns in that civilians place.
the score for killing civilans keeps going against you until you clear the aliens.

Currently the civilians spawn from killed civilians  but they are hostile and my guys shoot them.

--Spawned crewman from brewed-up tanks, or some other vehicle

--spawns from things I might throw
« Last Edit: July 10, 2017, 02:12:29 am by SteamXCOM »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #3 on: July 10, 2017, 02:23:30 am »
--In terror missions if a civilian is killed by an Alien, another spawns in that civilians place.
the score for killing civilans keeps going against you until you clear the aliens.

Have you considered that the aliens will be focused to killing those ever ending civilians instead of your units, thus making the mission easier?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #4 on: July 10, 2017, 02:29:02 am »
Have you considered that the aliens will be focused to killing those ever ending civilians instead of your units, thus making the mission easier?
And the game harder, but that can be adjusted by playing with the civilian spawn placement and the score per civilian. I say let the modder decide how it affects the game.

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #5 on: July 10, 2017, 03:20:21 am »
Have you considered that the aliens will be focused to killing those ever ending civilians instead of your units, thus making the mission easier?

Is their priority civilians? I thought they shot whomever they casteth eyes upon.
 In any case it might be a moot point if the continuously spawning of non-hostile civilians is  not possible.
 
 In investigating other mods, from what I gather at this time, all instances of spawnUnit: are in reference to a terrorist type unit, I did not yet find examples of its use to spawn  neutral units.

----------------
EDIT

What defines how many civilians are on a map, in going thru the terrains.rul files I see
    civilianTypes:
      - MALE_CIVILIAN
      - FEMALE_CIVILIAN
but do not see how many are added.

----------------Edit
Nevermind, in AlienDeployments.rul

civilians: 16
    terrains:
      - URBAN
    alert: STR_ALIENS_TERRORISE
« Last Edit: July 10, 2017, 04:19:28 am by SteamXCOM »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #6 on: July 10, 2017, 06:07:31 am »
And the game harder, but that can be adjusted by playing with the civilian spawn placement and the score per civilian. I say let the modder decide how it affects the game.

You can't do anything about the civilian spawn placement: the nodes used by civilians are the same as the terrorist units, unless you get rid of the 2 terrorist ranks. And changing the score per civilian won't affect the difficulty of the mission, only XCom score on Geoscape.

I say give a modder feedback and let him decide whether to listen or check it out himself

Is their priority civilians? I thought they shot whomever they casteth eyes upon.

As said above, nodes for spawning civilians are used by both them and terrorists, plus most maps will have an additional alien unit placed nearby. So, on the first turn it usually turns into a civilian massavre and then aliens start looking for other units (and bumping into XCom in the process). 'neverending' civilians would affect the usual AI behavior.
« Last Edit: July 10, 2017, 06:14:25 am by Hobbes »

Offline SteamXCOM

  • Colonel
  • ****
  • Posts: 150
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #7 on: July 10, 2017, 07:05:05 pm »
You can't do anything about the civilian spawn placement: the nodes used by civilians are the same as the terrorist units, unless you get rid of the 2 terrorist ranks. And changing the score per civilian won't affect the difficulty of the mission, only XCom score on Geoscape.

    I'm looking over the routes in MAPVIEW and yes, I see how that is.
However these things work, if we can understand them and their limits and what they can do or not ,  there can be some interesting things done.

Tank crews, but if they are going to be hostile upon the tank getting destroyed, then it is not desirable in that instance, but if it happens to an  alien tank where the crew would expected to be hostile then spawnUnit: could be used, for example. I have to check to see if they are dropping corpses because this I do not recall happening in my experiments with the civilians.

  At this time in experimenting, 
  --with increased numbers of civilians,
  -- or just only increasing hitpoints to the 16 original so they  last longer (takes longer for aliens to kill'em but also takes longer to stun'em and drag to safety ),
  --giving them more TU's, maybe they can run further away,
 
  These Terror missions; there is no "winning," in the sense of normal expectations, just trying to manage an impossible situation.
 
  hmm.. maybe I'll just load your TERRAIN PACK and play the game.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #8 on: July 10, 2017, 07:38:15 pm »
    I'm looking over the routes in MAPVIEW and yes, I see how that is.
However these things work, if we can understand them and their limits and what they can do or not ,  there can be some interesting things done.

There are limits to the system, most of what your ideas I've already tried/considered but I encourage you to experiment as much as possible, since it's the best way to learn. Just don't get too frustrated when you find out that your theoretical solution won't work ;)

Quote
Tank crews, but if they are going to be hostile upon the tank getting destroyed, then it is not desirable in that instance, but if it happens to an  alien tank where the crew would expected to be hostile then spawnUnit: could be used, for example. I have to check to see if they are dropping corpses because this I do not recall happening in my experiments with the civilians.

  At this time in experimenting, 
  --with increased numbers of civilians,

One possible side effect is that you'll see groups of civilians spawning in the same location because there aren't enough nodes for all the civilians.

Quote
  --giving them more TU's, maybe they can run further away,
 

This might be interesting but it can also mean that the civilians have more TUs to move away from your units so they'll end up chasing civvies across the map.
« Last Edit: July 10, 2017, 08:39:29 pm by Solarius Scorch »

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #9 on: August 07, 2017, 04:15:59 am »
So I approached the video poster for more info (didn't expect a reply so quickly :) ) and this is what he said:

"No, I had to make engine changes. I can't remember if I pushed those changes to OpenXCOM, and/or whether they were accepted. It was a long time ago now. If you head to the OpenXCOM forum, you could ask there if this feature is there and implementable via a ruleset."

Anyone around at the time recall these?

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: spawnUnit: Always hostile?
« Reply #10 on: August 07, 2017, 08:36:55 am »
Just so you know, this was the original thread for my UAV mod
https://openxcom.org/forum/index.php/topic,1304.msg11893.html#msg11893

I'm not sure if there was actually a pull request made, or if it was imported. I can have a look when I get home if I still have the code locally on my desktop, but my GitHub repo was deleted, and I'm not sure I can see anything relevant in SupSuper's repo.

Offline Wolfstarr

  • Colonel
  • ****
  • Posts: 248
    • View Profile
Re: spawnUnit: Always hostile?
« Reply #11 on: August 08, 2017, 12:01:32 am »
Thanks pmprog :)

Appreciate you posting to update the discussion!

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: spawnUnit: Always hostile?
« Reply #12 on: August 11, 2017, 11:19:48 pm »
I've checked my desktop, it only has one copy of the OpenXCOM source (that I can find), and it doesn't contain my UAV/Deploy Unit code I'm afraid.

I'm currently just moving back to Windows (I got fed up of my graphics drivers breaking on Linux, plus there's games only available to Windows that I would like to start playing again), but once my dev setup is back, I might look into recreating my deploy code... but we'll see