Skip to content

Change specified odds from "1 to [arbitrary]" to summed weights #9

@CyclopeanArts

Description

@CyclopeanArts

The following tables are functionally identical:

new Table('BiomeRouter', [
    new TableEntry(1, 1, 'Route to Land Biome'), // mainland tag required
    new TableEntry(2, 2, 'Route to Ocean Biome')  // island tag required
    new TableEntry(3, 6, 'Route to Hypothetical Third Biome')
])

&

new Table('BiomeRouter', [
    new TableEntry(1, 16, 'Route to Land Biome'), // mainland tag required
    new TableEntry(17, 33, 'Route to Ocean Biome')  // island tag required
    new TableEntry(34, 100, 'Route to Hypothetical Third Biome')
])

Therefore, I assume we are currently identifying the roll for the table by finding & taking the lowest & highest min/max numbers in the table.

This makes it annoying to edit table odds because the odds of every table entry depends on every other entry's specified min/max odds.

Would it be substantially less performance-friendly to instead have min/max odds be weights that are summed across the table to establish the minimum & maximum roll?

new Table('BiomeRouter', [
    new TableEntry(1, 'Route to Land Biome'), // mainland tag required
    new TableEntry(1, 'Route to Ocean Biome')  // island tag required
    new TableEntry(4, 'Route to Hypothetical Third Biome')
])

This would let us set weights relative to other entries in the table with ease, and it would dramatically simplify the process of adding or removing entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions