Author Topic: Civilians fighting back  (Read 15457 times)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Civilians fighting back
« Reply #15 on: February 05, 2016, 03:01:14 pm »
no, turnsSinceSpotted isn't used for aliens, it measures how long since an xcom unit was spotted by aliens.
civilians can see 20 tiles, but this is offset by their lack of ability to share information between units. (whereas the aliens communicate via turnsSinceSpotted, and the player can see and target any revealed unit, no matter who's selected or how far away they are)

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: Civilians fighting back
« Reply #16 on: February 05, 2016, 04:56:05 pm »
Thanks for explanation, Warboy :)

no, turnsSinceSpotted isn't used for aliens, it measures how long since an xcom unit was spotted by aliens.
So, theoretically, if I add a routine in TileEngine.cpp that set it to 0 for alien unit every time it's spotted by civilian (FACTION_NEUTRAL) it should work without corrupting anything? Then I can refer to it in CivilianBAIState.cpp in similar way as in alien AI?

civilians can see 20 tiles, but this is offset by their lack of ability to share information between units. (whereas the aliens communicate via turnsSinceSpotted, and the player can see and target any revealed unit, no matter who's selected or how far away they are)
Well, even if in game reality civilians don't have means of communication between them (X-com probably have radios and aliens - some psionic link) they could hear screams and alien howls, which should be enough to run like hell from it's source :) I wonder if implementing this could increase their chances - still their low TU and health won't make things easy. I also wonder if there will be some difference if I increase the number of tries civilian take to calculate route (besides making hidden movement longer of course)

Also, if you don't mind teaching a noob - is there any function that could return position of X-com craft? My be useful for making civilians run to Skyranger by modifing setupEscape to favor tiles closer the craft.
« Last Edit: February 05, 2016, 05:02:52 pm by psyHoTik »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Civilians fighting back
« Reply #17 on: February 05, 2016, 05:24:35 pm »
Well, even if in game reality civilians don't have means of communication between them (X-com probably have radios and aliens - some psionic link) they could hear screams and alien howls, which should be enough to run like hell from it's source :) I wonder if implementing this could increase their chances - still their low TU and health won't make things easy. I also wonder if there will be some difference if I increase the number of tries civilian take to calculate route (besides making hidden movement longer of course)

I personally think it'd be superfluous; the observable changes wouldn't be worth all that work.

Unless you're thinking ahead of making armed civilians... :)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Civilians fighting back
« Reply #18 on: February 05, 2016, 05:34:45 pm »
Ohh, the routine of "go to the Skyranger" would be immensely useful... but to implement for the aliens, not civilians :) After all, any sane commander would try to kill the intruders before they'll leave the landing craft (so eg. aliens could use first turns to converge towards the landing craft, and, say, after taking 50% casaulties, towards their own ship to take defensive positions).

Offline hellrazor

  • Commander
  • *****
  • Posts: 2027
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Civilians fighting back
« Reply #19 on: February 05, 2016, 06:52:03 pm »
hm.. civilians moving towards x-com craft.
hm... Chryssalids in pursuits of civilians.
hm.... chryssalids creating a fucking ton of zombies near x-com craft.
hm..... im am all for it!

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: Civilians fighting back
« Reply #20 on: February 05, 2016, 07:14:02 pm »
I personally think it'd be superfluous; the observable changes wouldn't be worth all that work.
Not to mention it'll probably use CPU to the point of hindering the gameplay, may cause crashes and will break mod compatibility... Let's do it :)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Civilians fighting back
« Reply #21 on: February 06, 2016, 02:36:58 pm »
If the changes aren't observable from player's point of view, it makes the game "play with itself" which is pointless.

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: Civilians fighting back
« Reply #22 on: February 06, 2016, 03:07:50 pm »
If the changes aren't observable from player's point of view, it makes the game "play with itself" which is pointless.
I totally agree. All I want to do is to try to make my own build to test it. Nothing official.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Civilians fighting back
« Reply #23 on: February 06, 2016, 04:34:40 pm »
I totally agree. All I want to do is to try to make my own build to test it. Nothing official.

That's great and fun if you intend to code it yourself.

We have preciously few coders interested in adding new features, so they shouldn't be asked to add something just for one person's amusement. Let's focus on changes that can benefit possibly the largest percentage of people, OK? :)

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: Civilians fighting back
« Reply #24 on: February 06, 2016, 05:50:37 pm »
That's great and fun if you intend to code it yourself.
I do :) When I started this thread I thought that coding a game is totally out of my reach but now I see it may be actually fun to try ;)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Civilians fighting back
« Reply #25 on: February 06, 2016, 07:59:56 pm »
I do :) When I started this thread I thought that coding a game is totally out of my reach but now I see it may be actually fun to try ;)

Cool! Good luck then! :)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Civilians fighting back
« Reply #26 on: February 08, 2016, 11:59:24 am »
now that all the opinions are out of the way...

no, there is no such function.

you could iterate tiles looking for a floor marked as "entrance" but this is far from foolproof

Offline Xtendo-com

  • Colonel
  • ****
  • Posts: 118
    • View Profile
Re: Civilians fighting back
« Reply #27 on: April 24, 2016, 02:24:27 pm »
I think that can be implemented without mush of code rewrite if we don't need to write fight functions completely for civilians. Civilians don't have sprite when holding weapons so they look weird when you give a gun. But they can throw something, like kitchen knife that actually an instant grenade with invisible explosion and one tile distance blast. Technically when they tries to escape, calculate a chance to throw knife, give a knife to his hand, find nearest visible target and throw knife.