Compact Leveled Lists - ProbablyManuel/requiem GitHub Wiki
Leveled Items and Characters are used in Requiem to randomize loot and encounters. The likeliness of spawns can be controlled by adding a specific entry multiple times to a list. However, if you want to achieve a more fine-grained control over spawn ratios, this can quickly become tedious copy&paste work. And tweaking the numbers later is also a time-consuming and boring task.
Requiem alleviates this feature by introducing compact leveled lists which avoid all the boilerplate for leveled lists that spawn exactly one item. (You can still use a non-zero non-chance in leveled items if you want.)
To use this feature you must first enable REQ Tags for your mod and add the REQ:UNROLL
tag. After doing so, you can declare your leveled list with a special EditorID to enable this feature.
A leveled item can be declared as compact list by giving it an EditorID <Prefix>_CLI_<RecordName>
, where <Prefix>
should be some common identifier for your mod's records (no underscores) <RecordName>
is the EditorID you'd normally give to the record. Let us consider an example from Requiem: xxAD3854 <REQ_CLI_Treasure_GemsCheap>
, a leveled item for spawning random gem treasure.
Level | Count | Reference |
---|---|---|
1 | 1 | 00063B42 |
1 | 6 | 00063B45 |
1 | 6 | 00063B46 |
1 | 3 | 0006851E |
1 | 3 | 00068521 |
1 | 1 | 00068522 |
The Reqtificator will replace each entry in this list with Count-many entries of the same item with Count set to 1. So after processing this list it will contain 1x1 ruby, 6x1 garnets, 6x1 amethysts, 1x1 flawless ruby, 3x1 flawless garnet and 3x1 flawless amethysts. Or in terms of spawn chances:
- 5% chance to spawn a ruby
- 5% chance to spawn a flawless ruby
- 15% chance to spawn a flawless garnet
- 15% chance to spawn a flawless amethyst
- 30% chance to spawn a garnet
- 30% chance to spawn a amethyst
If you want tweak your spawn ratios later, you can quickly adjust the count values in your plugin instead of having to add/remove entries in the leveled item.
Compact Leveled Characters work exactly the same way, the only difference is that their EditorIDs follow the pattern <Prefix>_CLChar_<RecordName>
.