"Dynamic" Gamemode using rulesets #27599
Contrabang
started this conversation in
Documents
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is not TG's dynamic gamemode.
Motivation
Our gamemodes absolutely SUCK codewise. They contain some of the most copy-pasted code, and black magic code, all wrapped up into a shit-fest of unmaintained part of the codebase. Everything that has touched these gamemodes in the past forever (?) has been to just add new things.
Proposal
A new gamemode, for now called 'Dynamic' in lack of a better name. This gamemode will be the main gamemode, replacing traitor, vamp, cling, and extended gamemodes. However, it will be created in such a way that is functionally identical, you can still roll shifts with no antags, or just vamp and cling antags. It will currently handle just roundstart antags. This gamemode is an absolute requirement for any new antagonists, our old system is only accumulating more code debt as time goes on.
Goals
The Inner Machinations
This will be implemented by rulesets (inspired by tg's dynamic roundstart code). The most important part of these rulesets are 4 variables,
ruleset_cost
,ruleset_weight
,cost
, andweight
. These correspond to 2 different budgets in the dynamic gamemode, the "ruleset budget" and the "antagonist budget". The ruleset budget is a weighted probability, choosing between 0 and 3. The antagonist budget is equal to the number of round-start readied up players. This antagonist budget is heavily inspired by trifecta, and does not accurately mimic how vamptot/vampcling work. When a gamerule rolls, it will automatically have at least 1 antagonist for it.Weights determine how likely it is for that antagonist to be picked, i.e. grabbing marbles out of a closed bag. Costs determine how much budget to remove to choose that ruleset/antagonist. For example, here are the 3 current rulesets below.
When picking a ruleset such as traitor, the ruleset would have a
11/(11 + 12 + 9) * 100
= 34.375% chance being chosen, at the cost of 1 ruleset budget. However, you would not be able to roll rulesets that are already in play, so a vampire ruleset being chosen as a second ruleset would be12/(12 + 9)
= 57.14% chance. Lets see an example.This will also fix weird gamemode bugs, like not being able to roll chaplain in vamp-cling gamemodes if you become a changeling.
Requirements
#new_round_alert
channelFuture Projects
Here are some things that ideally should be incorporated into this gamemode
Wizard should not be implemented as part of this gamemode, as wizard rounds should end when the wizards die. On the other hand, high damage antagonists such as malf AIs, Hijackers, and command antagonists could also have new rulesets created for specifically them, to better control how often they happen.
FAQ
Q: Why?
A: The code is shit, and it must go. It will be a requirement for new antagonists, like Heretic.
Q: Wont this make us crazy insane like TG dynamic?
A: Nope, this will be keeping the same consistency of antagonists as we've had before Dynamic. We wont be having wizard-nukie-vampire rounds (at least, without adminbus).
Q: Why is Extended being removed?
A: While it is being removed, it will have the same probability to have no antags in this gamemode as before with extended. There will be no more or less "extended" shifts than there was before.
Q: Why is Autotraitor still a separate gamemode?
A: It introduces too much complexity, and created not seen before behavior of rolling traitor while late into the shift while there are vampires and changelings.
Q: Why does this have a design doc, isnt this just an improvement of code?
A: Yes, it is 99% an improvement, but gamemodes are a core part of the gameplay. They must be careful designed with consideration of this.
Beta Was this translation helpful? Give feedback.
All reactions