Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alien eggs/Chrysalis don't appear to hatch after some time and spawn new units (Battlescape) #935

Closed
makus82 opened this issue Aug 12, 2020 · 7 comments
Labels
Not Yet Implemented This fix or feature is not yet implemented or merged with trunk

Comments

@makus82
Copy link
Contributor

makus82 commented Aug 12, 2020

I use Skirmish map
image

and wait hour in game tyme and they dont hatch . i running close to them and then hide on top of ufo and wait
and from 2 eggs and 2 chrysalis not one hatch.

Will try in game and in OG...

@makus82
Copy link
Contributor Author

makus82 commented Aug 12, 2020

also strange thing all map burned out and where fire was close to upper diagonal surfaces that surfaces dissaper or collapsed
image
image

@FilmBoy84
Copy link
Collaborator

FilmBoy84 commented Aug 12, 2020

The disappearing of diagonals is the same as in OG
They count as "destroyed" by fire so collapse and disappear

The fire remaining above burnt units is reported in #398

Chrysallis will certainly NEVER hatch in skirmish as time is calculated from the "start" time of a mission and the Chrysalis takes 2 hours to 3 days to hatch IIRC (will have to check the OG code to confirm)

When testing the OG and Beta2 you will have to start the mission at the point the Chrysallis is ready to hatch on Cityscape

If you do not do this, the game will not hatch the Chrysallis in Battlescape due to the "Time bug" in the original game

I get the feeling that this is another "not complete in the original game" thing, that means it does happen, but the circumstances are so rare it's hard to replicate except by chance

It needs a "fix" and implementation in OpenApoc because the mission time bugs from the Original Game are a long-standing problem (Time in a mission should advance the same amount of time in cityscape on mission close)
But no solution is really there for Turn Based play (How long is a turn???? We need to get the correct values and code from the OG to work out our own solution)

But all of this should probably be resolved as an option
For example "Chrysalis due to hatch in Cityscape can hatch in Missions" Y/N

When starting the battlescape mission, it does a check of aliens present for a "IsReadyToHatch" flag or something similar

@makus82
Copy link
Contributor Author

makus82 commented Aug 12, 2020

How about psi link tells all aliens in UFO or building that they under atack and all eggs should hatch as soon as possible...
and all eggs/Chrysalis sets random 10-20 min in game time

@FilmBoy84 FilmBoy84 added the Not Yet Implemented This fix or feature is not yet implemented or merged with trunk label Aug 25, 2020
@Istrebitel
Copy link
Collaborator

Istrebitel commented Sep 23, 2020

I believe in OG there was no such function. The spread of aliens is clearly defined in code, I don't remember but someone was reverse-engineering the code when I was programming for the project, and I was using his guides as well as ufopaedia and faqs to implement alien life cycle logic.

Aliens have growth options. Every alien has a list of aliens it can grow into and the chance. Basically its egg-multi-hyper-crysalis-something-death. It's hardcoded in the extractor, because I believe it's not stored in the game files but hardcoded in the OG. So every hour aliens first move and then grow, growth has a chance, there is no timer, like, this will hatch in X hours, no, it's rather "this has X% chance to hatch every hour".

If this would be implemented, we would have a "happy hour" where multiworm may randomly split into hyperworms, or an anthropod or skeletoid could randomly die of a heart attack, or a hyperworm that almost killed your helpless agent turns into a crysalis on the spot... Nonsense, really? I guess we could do that but it would be bonkers, AND it would be very much expected (since it happens right at the hour mark).

I propose:

  1. First priority would be to implement OG. That means, time reverts after battle ends, and everything goes as if battle took no time.

  2. Second priority would be to implement time passing while battle goes on, so, after battle is finished, the craft and the agents are locked on the cityscape for the time it took for battle to happen. If they are destroyed during this time (like, if something kills the alien downed ufo or xcom craft recovering it or destroys the building's tile where agents are) then they die. If they survive the cityscape then they are unlocked and everything happens just like in OG from there on. In this case, still no alien life cycle during battle (and whole infilitration logic for the building battle takes place in should stall, so, no movement out of it, no growth, no infiltration - just skip buildings with battle in progress).

Neat mini feature here would be to have a snapshot of agent states at different minutes in battle, and animate those on the cityscape - like, agents would lose, gain health, etc

  1. Third priority would be to implement alien lifecycle during battle, if previous option is on. In that case, instead of checking every hour, every alien would do a similar check on the beginning of combat and have a (hidden) timer for its growth. So instead of rolling i.e. a 20% chance every hour, it repeatedly roll 20% untill success, counting number of tries it took, that's number of hours, subtract a random amount of time ranging from 0 to 59m59s, and set that as a growth timer. When it elapses, do the "Growth" logic - so, heart attack for final aliens, or transformation for those who grow into something. If grown into something - kill this, spawn grown alien, start another timer for it, this time adding an hour on top, so alien cannot roll a "minus 59m59s" and one hour to transform again next second.

That would be no issue to implement, only possible problem is that you have a hyperworm in a closet who cannot properly spawn a crysalis since there's no 2 adjacent tiles there, but that would be really a very minor bug and would just be described in "known bugs" as "will not fix" kind of thing, or we could just opt to kill such hyperworms (so, if can't spawn next alien, then you just die). Would make sense in code too - first we kill, then we try to spawn, can't spawn - do nothing. And IRL - its time to transform but it can't find suitable environment so it fails and dies.

@FilmBoy84
Copy link
Collaborator

Welcome back and thanks for concise and detailed response @Istrebitel and agreed, fixing the OG Time Bug is the most pressing issue next to emulating the OG behaviour

I do like your solution to the Egg/Chrysallis spawn behaviour; TBH i had never thought to include the other aliens growing (e.g. Anthropod "heart attack") as this was something I had never witnessed - only the rupture and spawn of chrysalis - which if it was not in the OG, must have been in an early version (and i can now see why it would have been removed). Thanks for confirming.

@Istrebitel
Copy link
Collaborator

Istrebitel commented Sep 24, 2020

@FilmBoy84 well if we implement lifecycle, we implement lifecycle, right? I think it makes no sense to implement just eggs and crysalises, but not multiworms, hyperworms and deaths? There's a reason why they die - it's in the ufopaedia - you learn that aliens are not suited to survive in human environment, so it would make sense for agents to sometimes, rarely, notice sudden alien deaths in combat, we could also introduce a new kind of message ("mysteriously dies") if it doesn't exist yet, would make sense.

It would actually be very easy to implement this, like, I estimate this to be 1-2 hours work, after we implement the number 2, time passing on, which would be about 3-4 hours work, the "Freezing" of agents and transports, new messages and interface for that.

For now, just leave this as a planned feature from the list of such OG (or whatever you call them) features.

@FilmBoy84
Copy link
Collaborator

Moved to Issue #941 so closing here to clear up the tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not Yet Implemented This fix or feature is not yet implemented or merged with trunk
Projects
None yet
Development

No branches or pull requests

3 participants