You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New system to make LL handle block/location variants through a more global "rules" system, rather than letting users do specific variant assignments themselves.
DFU's WorldDataVariant
WDV is what we're dealing with. What items (ie: files) and what operations WDV allows limits what we can do without sending PRs to Gavin
Items:
Location variant (ex: Daggerfall_wod)
New Location
Block variant (ex: ALCHALAA00_wod)
Building variant (ex: ALCHALAA00.0_wod)
Operations:
SetLocationVariant(location, variant) -> change Daggerfall to Daggerfall_wod
Scripts are applied by mod order (if a mod has multiple scripts, their order is random)
Question: Global scripts, script per region, script per map pixel?
Scenario:
Scenario 1
World of Daggerfall has script Daggerfall.rmbs.txt which sets ALCHALAA00 to variant _wod in location key 12317
Alchemy Expanded depends on World of Daggerfall, and therefore has "higher priority" (lower on the list)
Alchemy Expanded has HighRock.rmbs.txt, which sets ALCHALAA00 to _ae in location key 12317
When location 12317 is loaded, Alchemy Expanded wins, and the WoD instruction is ignored (clashing location and block target)
Scenario 2
World of Daggerfall has script Daggerfall.rmbs.txt which sets ALCHALAA00 to variant _wod in location key 12317
Alchemy Renovated has a building replacement as ALCHALAA00.RMB-60-building0_ar.json
Building variant still applies to ALCHALAA00_wod
Items:
RMBVariantRules
CSV file with .rmb.csv extension
Each line forces a "target" block to a specified variant, if conditions are met
Rules are not built into the mod - they're used only for the generator
Rules
We can divide conditions in three type
Global
Rule applies to all the blocks with the target in the location
The effect can be applied with WorldDataVariant.SetBlockVariant(blockName, variant, locationKey)
A block variant is sufficient
Local
Rule applies only to certain blocks with the target in the location,
ex: North Edge, No Edge, ...
The effect cannot be applied with WorldDataVariant.SetBlockVariant(blockName, variant, locationKey)
Therefore, we need a location variant
Runtime
Rule applies depending on runtime conditions,
ex: quest active
Depending on other conditions, might be global or local. Global rules still work as block variants, and local rules as location variants
This requires extra runtime to apply and remove the variant as needed
ALCHALAA00 is the target block. When the region is Daggerfall and the climate is haunted woods, the _dhw variant (ex: ALCHALAA00_dhw) should be set
RMBVariantScript
Text file with .rmbs.txt extension. Each line has a specific format
Set of instructions for knowing what variants to apply where
Instruction may have runtime constraints (ex: quest id)
Scripts are part of a built mod
Issues:
For any runtime rule we invent, extra data needs to be hardcoded here. VariantLoader will not try to find what rules it was generated from.
We might not invent that many
Format <locationkey> <blockname> <blockvariant> [quest <quest_id>]
or <locationkey> variant <locvariant> [quest <quest_id>]
The text was updated successfully, but these errors were encountered:
New system to make LL handle block/location variants through a more global "rules" system, rather than letting users do specific variant assignments themselves.
DFU's WorldDataVariant
Items:
Operations:
Notes:
VariantLoader
Tools:
RMBVariantScriptGenerator
RMBVariantRules -> RMBVariantScripts + location variants
VariantLoader
Question: Global scripts, script per region, script per map pixel?
Scenario:
Scenario 1
Scenario 2
Items:
RMBVariantRules
Rules
Global
Local
ex: North Edge, No Edge, ...
Runtime
ex: quest active
Format
OLD_BLOCK VARIANT RULE1 ... RULEN
ex:
ALCHALAA00 _dhw Daggerfall HauntedWoods
RMBVariantScript
Issues:
Format
<locationkey> <blockname> <blockvariant> [quest <quest_id>]
or
<locationkey> variant <locvariant> [quest <quest_id>]
The text was updated successfully, but these errors were encountered: