Allow mods to add new RMB blocks#2709
Conversation
|
RMB blocks by definition are only used at daggerfall locations as defined by location data. Any usage outside of this is also outside of the location & block indexes you're referring to. |
|
This PR allows RMB blocks to be used by mods, and not just at Daggerfall locations as defined by location data. Kab added the ability in Location Loader (World of Daggerfall's utility mod) to place an RMB block anywhere on the map, including outside traditional Daggerfall locations. However, in order for a mod to use custom RMB blocks, they need to first be added to WorldDataReplacement's new block index, because Location Loader calls RMBLayout.CreateBaseGameObject and other RMBLayout methods. I should add that this PR has been replaced by 2718 (#2718) which both allows mods to add custom RMB blocks and fixes the potentially game-breaking bug we discussed a couple of months ago caused by dynamically assigned block indices for custom RMBs. |
|
If this PR is now covered by another one, I'll close this. I do think the use for allowing mods to use RMBs for other purposes is fine, if they can fix any assumptions that rely on RMBs having an associated Location. DFU already uses RMBs for other purposes, such as the launcher screen's background. It makes sense to me that mods could reuse those templates for other purposes, especially given that we have a RMB editor that makes creating those convenient. |
Mods currently cannot access custom RMB blocks. New RMB blocks are only added to WorldDataReplacement's new block index when a player visits a regular Daggerfall location. This is a problem for mods like LocationLoader (in World of Daggerfall), which aims to add custom RMB blocks throughout the world, not just at regular locations. This PR simply sets WorldDataReplacement.AssignNextIndex to public, allowing LocationLoader to call it and add a new RMB block to the index.