Advertisement
Guest User

Untitled

a guest
Aug 4th, 2016
1,540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. PAYDAY 2: Commissioner Garret's Budget: design document:
  2. Problem:
  3. The current code for cop spawn waves is completely hardcoded and has no potential for combining custom cop mods, alongside being a complete pain in the ass to edit.
  4. It also does not take into consideration anything like dead civs or hostages or any of that.
  5.  
  6. Goal:
  7. Provide a simple to use easy method to implement custom cops without overriding other modders changes and allowing for more freeform wave designs that react
  8. to how the heist is progressing.
  9.  
  10. Solution:
  11. The solution is rather simple on paper. The cop spawning code will rely on a Budget, refreshed and determined at the end of each wave, and the start of the heist for the first wave.
  12. There are 4 main define types here:
  13. the LEVEL
  14. the COP GROUP
  15. the BUDGET STATUS
  16. the DIFFICULTY
  17.  
  18. A LEVEL define exists in the code for each level. It loads if the current level is the same as its ID.
  19. The LEVEL holds the following details:
  20. Level ID: the ID that corresponds to this level define for the budget.
  21. Base Budget: What is the default budget for this map for spawning cops?
  22. Main Enemy: Either SWAT or Akan. COP GROUPS that do not have the same Enemy Group as the level's Main Enemy will not spawn.
  23. Subgroups: Any COP GROUPS marked as a subgroup will only spawn if that subgroup is included in the level define, like Mendozas.
  24. For Example:
  25.  
  26. Jewellery Store:
  27. Level ID: "whatever_the_store_id_is"
  28. Base Budget: 1000
  29. Main Enemy: "swat"
  30. Subgroups: nil
  31.  
  32. A COP GROUP define exists in the code for each group of cops that could spawn. It spawns and loads if the budget can afford it and all the criteria is met.
  33. the COP GROUP holds the following details:
  34.  
  35. List Of Enemies: list of enemy ids to spawn
  36. Cost: How much will be subtracted from the wave budget to spawn this cop group
  37. Enemy Type: SWAT or Akan, or if its a subgroup, that subgroup, such as Mendoza.
  38. Required Wave Multiplier: What is the required wave multiplier for us to spawn? If not defined, always potentially spawnable.
  39. Required Difficulty: Same as above, but for difficulty. If not defined, always potentially spawnable.
  40. Required Dead Civs: Only show up if X amount of civvies are dead.
  41. Required Hostages: Only show up if Y amount of civvies are hostages.
  42.  
  43. For Example:
  44.  
  45. 3 Blue SWATs and a Taser
  46. List Of Enemies: list("id_for_bluswat",
  47. "id_for_bluswat",
  48. "id_for_bluswat",
  49. "id_for_taser")
  50. Cost: 125
  51. Enemy Type: "swat"
  52. Required Wave Multiplier: nil
  53. Required Difficulty: nil
  54. Required Dead Civs: nil
  55. Required Hostages: nil
  56.  
  57. The DIFFICULTY define determines the difficulty's settings for how the budget should be impacted by stuff.
  58. The DIFFICULTY contains these variables:
  59.  
  60. Name: Name of difficulty.
  61. Wave Multiplier: How much should the wave multiplier go up by every wave? The base wave multiplier is 1.
  62. Difficulty Multiplier: The base difficulty multiplier. Multiplied against the current budget each wave, with the result subtracted from the budget.
  63. Custody Multiplier: How much should players being in Custody effect the budget? Multiplied against the current budget each wave, with the result subtracted from the budget.
  64. Hostage Multiplier: How much should each Hostage effect the budget? Multiplied against the current budget each wave, with the result subtracted from the budget.
  65. Dead Civ Multiplier: How much should each Dead Civ effect the budget? Multiplied against the current budget each wave, with the result subtracted from the budget.
  66.  
  67. EXAMPLE:
  68.  
  69. OVERKILL:
  70. Name: Overkill
  71. Wave Multiplier: 0.35
  72. Difficulty Multiplier: 2.5
  73. Custody Multiplier: 0.15
  74. Hostage Multiplier: 0.2
  75. Dead Civ Multiplier: 1.1
  76.  
  77. the BUDGET STATUS is the active status of the budget for the heist. It starts when the heist goes loud.
  78. The BUDGET STATUS has these variables:
  79. Current Budget: What's the current budget?
  80. Current Wave: Whats the current wave?
  81. Wave Multiplier: Whats the current wave multiplier? Starts at 1.
  82. Current Difficulty: Whats the current difficulty?
  83. Dead Civs: How many civs are dead?
  84. Hostages: How many hostages are there?
  85. Heisters In Custody: How many Heisters are in custody?
  86.  
  87. For counting the budget, the wave multipliers and difficulty mults. would be calculated first, and then the removal multipliers such as hostages and custody heisters calculated on the budget afterwards.
  88.  
  89. This should allow for us to easily add new cops to the game with the game more dynamically replying to how things are going.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement