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

Implement 999 per-actor production queue limit. #15006

Merged
merged 4 commits into from Apr 22, 2018

Conversation

Projects
None yet
6 participants
@pchote
Copy link
Member

pchote commented Mar 29, 2018

This PR implements ProductionQueue.QueueLimit and ProductionQueue.ItemLimit to limit the number of items that can be queued in total and for each actor type respectively.

A per-item limit of 999 is defined to fix a game-breaking MP exploit while remaining large enough that nobody can reasonably complain. This also fixes the "Training" production notification when trying to queue units that have already reached their build limit.

Testcase: Try to queue more than 999 of some actor type (or reduce the number, and try to build more than that).
Testcase: Set QueueLimit: 1 and relive the frustration from the original game.
Testcase: Try to queue a second tanya while the first is already training (with instant build and all tech cheats disabled). Notice that it now plays the correct audio.

@pchote pchote added this to the Next release milestone Mar 29, 2018

@MustaphaTR

This comment has been minimized.

Copy link
Member

MustaphaTR commented Apr 3, 2018

D2k mod lacks BuildingInProgress notification and crashes when i reach 999. Original game didn't play any sound when you click a cameo when something else is being built.

Testcasses work fine on RA mod but i'm not sure that enable tech cheat should bypass these. It currently can:
resim

@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Apr 3, 2018

Testcasses work fine on RA mod but i'm not sure that enable tech cheat should bypass these. It currently can:

This was intentional, based on the precedent of it disabling build limits and production type / exit restrictions in addition to the prerequisites. If there is enough objection then I have no real issue with changing it.

@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Apr 3, 2018

Original game didn't play any sound when you click a cameo when something else is being built.

I guess we should expand #14892 to also cover sound notifications, and default all of these notifications to nothing.

@IceReaper

This comment has been minimized.

Copy link
Contributor

IceReaper commented Apr 5, 2018

As for the KKnD Mod i want to implement a behavior of stacking up to 10, and 11 will be "infinite". Does it make sense to implement my behavior into this pr too?

@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Apr 6, 2018

There are a number of fiddly details to consider there, so it would be best left to a different PR.

@GraionDilach
Copy link
Contributor

GraionDilach left a comment

Looks good to me aside of the D2k crash, 👍 if there's a dummy sound until that other PR fixes the issue properly.

@pchote pchote force-pushed the pchote:cap-production-queue-length branch from 2963103 to 4715e2b Apr 6, 2018

@pchote pchote force-pushed the pchote:cap-production-queue-length branch from 4715e2b to e1705af Apr 6, 2018

@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Apr 6, 2018

Fixed.

@reaperrr reaperrr merged commit 7508a13 into OpenRA:bleed Apr 22, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
[Desc("The build time is multiplied with this value on low power.")]
public readonly int LowPowerSlowdown = 3;

[Desc("Notification played when production is complete.",
"The filename of the audio is defined per faction in notifications.yaml.")]
public readonly string ReadyAudio = "UnitReady";

[Desc("Notification played when you can't train another unit",
[Desc("Notification played when you can't train another actor",
"when the build limit exceeded or the exit is jammed.",
"The filename of the audio is defined per faction in notifications.yaml.")]
public readonly string BlockedAudio = "NoBuild";

This comment has been minimized.

@abcdefg30

abcdefg30 Apr 22, 2018

Member

Might this cause #15071? You removed NoBuild from the notifications but I don't see any overwrites for BlockedAudio.

@pchote pchote deleted the pchote:cap-production-queue-length branch Apr 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.