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

Larva surge is limited by marines/xenos ratio #3592

Merged
merged 16 commits into from
Jun 27, 2023

Conversation

ihatethisengine
Copy link
Contributor

@ihatethisengine ihatethisengine commented Jun 11, 2023

About the pull request

Xenos after hijack now get larva based on marines/xenos ratio. Instead of infinite larva, larva surge will try to increase the initial amount of xenos on hijack to 50% of marines forces over time (with a minimum of 5 larvas, if xenos already have good numbers).

Explain why it's good for the game

Initially, if I remember correctly, larva surge was brought into the game to discourage marines from early meta-evacuations, which is fair. But consequently, it really hurt the hijack sequence. Even if marines evac fair and square, larva surge still comes in action and makes situation for marines even worse, utterly discouraging everything but either boomrushing the Alamo or holding lifeboats to evac.

This resulted in hijacks being very repetitive and boring. More than that, larva surge is extremely busted on lowpop due to the fact you can get around 20 xenos from nothing, making lowpop hijack even less interesting. So with this change marines will still get punished for evaccing with good numbers, but won't be penalized as much for honest evacuations.

So hopefully, we will see more variety of hijacks and more interesting stories!

P.S. if you have a better formula, let me know.

Testing Photographs and Procedure

My friend @Diegoflores31 tested this for me, thanks! Screenshots & Videos

Put screenshots and videos here with an empty line between the screenshots and the <details> tags.

Changelog

🆑 ihatethisengine
balance: larva surge is limited by marines/xenos ratio
fix: xenos no longer get free larva from abandoned facehuggers during hijack
/:cl:

@github-actions github-actions bot added the Balance You need to be a professional veteran game maintainer to comprehend what is being done here. label Jun 11, 2023
@fira
Copy link
Member

fira commented Jun 11, 2023

Also i second 1:5 doesn't sound like a good ratio, but i'm no balanss person

@ihatethisengine
Copy link
Contributor Author

I mean, before there was no larva surge at all. This has never been a big issue. If you hijack, usually it means you have already won and have enough xenos to deal with the rest of marines. So 1 per 5 over hive count sounds pretty fair for me.

For example, we have 30 xenos against 90 marines. This is pretty winnable ratio on its own. 60/5 = 12. After twelve minutes we would have 42 xenos (if no one dies of course). If we have 20 xenos against 100 marines (probably evac was not really justified), larva surge would grant 80/5=16 xenos. If anything, this is still too many, not too few. On low pop we can get situation like 10 xenos vs 30 marines. 20/5=4. A huge number for lowpop, but at least not as overwhelming as infinite amount.

@Huffie56
Copy link
Contributor

Redoing my argument.
1-You also need to consider that those new xeno probably won't be able to evolve to T2 since queen will be off ovi.
2-each time a marine will die it will reduce the maximum of xeno hive can get.
3- let's say their is 50 marines left shispide when you hijack.
with 1:5 ratio that would mean you will gain only up to 10 xeno to assault their position.
in my opinion this is to much of a nerf and would be close to removing the larva surge...

@ihatethisengine
Copy link
Contributor Author

  1. Marines dying won't reduce the number, the number is being generated only once, when queen hijacks.
  2. This is not quite how it works, I might need to rephrase it. But anyway, you get xenos for free. And 10 xenos is more than enough and anyway hijack rarely takes more than 10 minutes. More than that, okay, we got xenos POV, they need more xenos to assault marines' position. But what about marines? Are they just bound to fail anyway? Or maybe they should have a chance to hold out?

@Huffie56
Copy link
Contributor

  1. Marines dying won't reduce the number, the number is being generated only once, when queen hijacks.

    1. This is not quite how it works, I might need to rephrase it. But anyway, you get xenos for free. And 10 xenos is more than enough and anyway hijack rarely takes more than 10 minutes. More than that, okay, we got xenos POV, they need more xenos to assault marines' position. But what about marines? Are they just bound to fail anyway? Or maybe they should have a chance to hold out?

i didn't understood what you where doing at first it seem so i just took a look at the math in your code.
hijack_burrowed_left = max(n_ceil((ship side_humans_count - xenos_count) / 5), 1)

1-wouldn't it be more clear if you calculate the ratio you desire first?
desired number of xeno depending on ratio = ship-side_humans_count/5
2-then you calculate if the xeno have enough numbers.
if(xenos_count<desired xeno number
3-then you fill the larva surge pool as intended to respect the ratio.
surge pool max number = desired number of xeno - xeno_count

i don't know if it's clear.... just ignore if it's not.

@ihatethisengine
Copy link
Contributor Author

Hmm, interesting suggestion, but I am not quite sure what number or ratio should be desirable. 1/5 is not enough for sure, 1/3 sounds better, but then hives with better ratio won't get larva at all. Which is not bad on its own (they already have numbers), but is probably too much of a nerf. My idea would at least give some larva even if hive is strong enough, without giving too many.

@Huffie56
Copy link
Contributor

Huffie56 commented Jun 11, 2023

Hmm, interesting suggestion, but I am not quite sure what number or ratio should be desirable. 1/5 is not enough for sure, 1/3 sounds better, but then hives with better ratio won't get larva at all. Which is not bad on its own (they already have numbers), but is probably too much of a nerf. My idea would at least give some larva even if hive is strong enough, without giving too many.

you could calculate the number you give them differently if they have more than the ratio you aim for?
if(xenos_count=>desired xeno number
maybe a fix number?
surge pool max number = 5

@ihatethisengine
Copy link
Contributor Author

ihatethisengine commented Jun 11, 2023

Fixed number won't work because we have lowpop and highpop. Although 5 seems to be fine. I'll think about this. And let's see what balance dev has to say.

Alternative formula:
hijack_burrowed_left = max(n_ceil(shipside_humans_count / 3) - xenos_count, 5)

@Wintermote

This comment was marked as off-topic.

@ihatethisengine
Copy link
Contributor Author

Good points, changed formula to hijack_burrowed_left = max(n_ceil(shipside_humans_count * 0.4) - xenos_count, 5) (* 0.4 and / 2.5 is the same)

Copy link
Member

@morrowwolf morrowwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it go to 50% of shipside population. Thanks.

@morrowwolf morrowwolf marked this pull request as draft June 18, 2023 18:50
@ihatethisengine
Copy link
Contributor Author

And done!

@ihatethisengine ihatethisengine marked this pull request as ready for review June 18, 2023 18:54
@morrowwolf morrowwolf added the Balance Approved This PR has had its balance and gameplay-affecting aspects approved. Cry to the Head-maint about it. label Jun 18, 2023
@github-actions
Copy link
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale beg a maintainer to review your PR label Jun 26, 2023
Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not something that can be tested well locally and must be test merged once ready to get a feel for what needs tweaking (e.g. surge_cooldown, surge_incremental_reduction, and hijack_burrowed_left).

@Drulikar Drulikar added Testmerge Candidate we'll test this while you're asleep and the server has 10 players Needs Testing Need to test it on the guinea pigs (production server) and removed Stale beg a maintainer to review your PR labels Jun 26, 2023
@Drulikar Drulikar marked this pull request as draft June 26, 2023 09:43
@Drulikar Drulikar marked this pull request as ready for review June 26, 2023 10:39
Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look fine in code - I'm sure Morrow will be on top of how it feels in practice.

@Drulikar Drulikar added the Fix Fix one bug, make ten more label Jun 26, 2023
@morrowwolf morrowwolf added this pull request to the merge queue Jun 27, 2023
Merged via the queue into cmss13-devs:master with commit 5c4b138 Jun 27, 2023
github-actions bot added a commit that referenced this pull request Jun 27, 2023
cm13-github added a commit that referenced this pull request Jun 27, 2023
github-merge-queue bot pushed a commit that referenced this pull request Aug 10, 2023
# About the pull request

This PR is a followup to #3592 fixing runtimes when hijack occurs
because it was assumed the mob's job was a datum/job when it actually is
a string.

# Explain why it's good for the game

Code shouldn't runtime.

Fixes: 

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/b9f47464-07d3-4972-af6d-21dd7dffd3e9)

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl: Drathek
fix: Fixed runtimes with hijack not calculating roles correctly for
hijack larva surge
/:cl:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Balance Approved This PR has had its balance and gameplay-affecting aspects approved. Cry to the Head-maint about it. Balance You need to be a professional veteran game maintainer to comprehend what is being done here. Fix Fix one bug, make ten more Needs Testing Need to test it on the guinea pigs (production server) Testmerge Candidate we'll test this while you're asleep and the server has 10 players
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants