-
Notifications
You must be signed in to change notification settings - Fork 11
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
Expose and expand respawn point selection logic options for dedicated server operators #284
Open
GooberRF
wants to merge
32
commits into
rafalh:master
Choose a base branch
from
GooberRF:newrespawns
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DF Use New Spawn Logic: true +Try Avoid Last: true +Try Avoid Enemies: true
…, update readme and changelog
is-this-c
reviewed
Oct 12, 2024
is-this-c
reviewed
Oct 12, 2024
is-this-c
reviewed
Oct 12, 2024
is-this-c
reviewed
Oct 12, 2024
I've significantly overhauled this PR. It now provides the ability to customize and modify the stock game spawn selection behaviour, which is a substantially better approach. It also ups the limit of spawn points from 32 -> 2048. |
…into newrespawns
GooberRF
changed the title
Implement improved and flexible respawn point selection logic
Expose and expand respawn point selection logic options to dedicated server operators
Oct 26, 2024
GooberRF
changed the title
Expose and expand respawn point selection logic options to dedicated server operators
Expose and expand respawn point selection logic options for dedicated server operators
Oct 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds several options under the
$DF Player Respawn Logic:
"group" indedicated_server.txt
. These options on the whole provide server operators with a level of customizability of the respawn point selection logic that they've never had previously.The default values shown below are functionally identical to the stock game behaviour, with the only notable caveat that the RNG method is
std::mt19937
(typically more performant and has better results) as opposed torand
.Default values:
Explanation of options:
+Respect Team Spawns
- Self-explanatory: if true (default), respect team flags on spawn points. If false, ignore them. Option can be useful if for example, a server wanted to run TDM on a CTF map but use DM-style RNG spawn selection logic as if it were a DM map.+Prefer Avoid Players
- If true (default), players have a higher likelihood of spawning away from other players, though RNG is still applied (via the same method as in the stock game).+Always Avoid Last
- If true, avoid spawning the player at the same location twice in a row.+Always Use Furthest
- If true, remove RNG from the equation and always spawn the player at the furthest spawn point from other players. (unless that's the last one they spawned at andAlways Avoid Last
is also on - in that case, use the second furthest)+Only Avoid Enemies
- If true, when calculating the distance a spawn point is away from players (with eitherPrefer Avoid Players
orAlways Use Furthest
), ignore teammates and only consider distance away from enemies.+Use Item As Spawn Point
- Takes item types from items.tbl. If any specified, when the level loads, generate additional respawn points at every instance of the item type specified. Add additional+Use Item As Spawn Point
lines to specify additional item types for generated spawns. Expects format+Use Item As Spawn Point: "Medical Kit" 9
0
, it will always generate them regardless of Multiplayer Respawn Point count. This is to allow server operators additional control - ie. only spawn players at Medical Kits IF the level has an insufficient number of spawn points configured. The idea behind this is that if the map has enough spawn points without generating more, it's best to just use those, however if the map doesn't have enough, generating additional spawn points would be needed to make it playable and allow the server operator to run that map in their rotation when they otherwise would be unable. (I plan to use this extensively at Game Night to expand the pool of playable maps)This PR also:
This PR revolves #56