Pyrel dev log, part 3

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Derakon
    replied
    Originally posted by AnonymousHero
    The user as in the player? Sounds like this could get annoying from a UI perspective (not to mention hard to balance).
    Yeah, I generally use "user" to refer to players, and "client" to refer to other programmers.

    AFAICT the auto-tiering thing is pretty simple: 1) "Compress" the DAG to minimize distance from the root to every other node while maintaining proper dependencies, basically maximal path compression. 2) Classify into tiers based on distance from the root node. This will give you the minimal number of necessary tiers and the nodes in each tier.

    I can think of at least one simple way to this: Do a topo-sort and build the tiers iteratively: If the next node in the topo-sorted list is pointed to directly by any node in the current tier, then start a new tier. If it isn't, then simply add to current tier. (With appropriate degenerate cases for the root, etc.)

    There may be far better algorithms for doing this, but it's been a few (well, many) years since I took any Graph Theory classes
    This is certainly doable and could possibly be useful for simplifying any UI we write about this problem, but it doesn't change the fact that we have to resolve loops somehow. It'd just tell us "Yep, you have an INT->MDS->DEX issue, you'll need an extra tier to handle that."

    Leave a comment:


  • Derakon
    replied
    Originally posted by buzzkill
    So your INT is partially derived from DEX? I still don't see what magic device skill HAS to do with it. It seems like an unnecessary middle-man.
    Magic device skill is in there because you're using a magical item to get the bonus; the hypothesis here is that high MDS makes you better at, well, wearing jewelry and the like. And as ekolis notes, INT is not the sole contributor to MDS.

    I think your moving into unlikely hypothetical situations, instead of creating a system that is going to deal with reality. Maintainers that want to accomplish the "unlikely" can always modify the source.
    Making a system that can deal with the current reality is pretty straightforward, because the current reality is not capable of doing anything especially complicated. But part of the reason to write Pyrel in the first place was to free ourselves from the limitations of the old system. You can bet that as soon as Pyrel 1.0 goes out (if not sooner) we'll be working on Pyrel v4 and playing around with all the special effects it can handle. So I don't think this situation is unlikely at all.

    Leave a comment:


  • ekolis
    replied
    Originally posted by buzzkill
    So your INT is partially derived from DEX? I still don't see what magic device skill HAS to do with it. It seems like an unnecessary middle-man.
    I think it's the other way around - INT normally affects magic device skill, but this special modifier would affect DEX based on magic device skill, so INT would be indirectly affecting DEX. Why the middleman, and not have INT affect DEX directly? Well, there could be other modifiers to your magic device skill besides that from INT!

    Leave a comment:


  • buzzkill
    replied
    Originally posted by Derakon
    (thus, an item that improves your DEX based on your magic device skill, which is based on your INT.)
    So your INT is partially derived from DEX? I still don't see what magic device skill HAS to do with it. It seems like an unnecessary middle-man.

    The idea here would be that any time a new Derived-tier modification is applied to the user's stats, it'd go onto the end of a queue; mods would be applied in the order on the queue. But the user would have access to the queue and would be allowed to re-order things as they wish. The default ordering then would be "order in which you received the mods", which is at least somewhat reasonable on its own.
    If this is the solution, then there's a a problem with the solution.

    I think your moving into unlikely hypothetical situations, instead of creating a system that is going to deal with reality. Maintainers that want to accomplish the "unlikely" can always modify the source.

    Leave a comment:


  • AnonymousHero
    replied
    Originally posted by Derakon
    It seems like any automatic decisionmaking we do on the order of operations would be "wrong" at some point, at least from the user's perspective -- they would want to do things in a different order to maximize their bonuses, and I can't think of any system that would be objectively logical (and thus justifiable) in all situations. So increasingly I'm leaning towards letting the user decide.
    The user as in the player? Sounds like this could get annoying from a UI perspective (not to mention hard to balance).

    AFAICT the auto-tiering thing is pretty simple: 1) "Compress" the DAG to minimize distance from the root to every other node while maintaining proper dependencies, basically maximal path compression. 2) Classify into tiers based on distance from the root node. This will give you the minimal number of necessary tiers and the nodes in each tier.

    I can think of at least one simple way to this: Do a topo-sort and build the tiers iteratively: If the next node in the topo-sorted list is pointed to directly by any node in the current tier, then start a new tier. If it isn't, then simply add to current tier. (With appropriate degenerate cases for the root, etc.)

    There may be far better algorithms for doing this, but it's been a few (well, many) years since I took any Graph Theory classes

    Leave a comment:


  • Derakon
    replied
    Hm, perhaps we're coming at this from the wrong angle.

    The original tiers -- Inherent, Permanent, Temporary -- were meant solely to decide how to apply multiplicative scaling factors. Like, if you had an item that increased your AC by 10%, which value did you use for that calculation? For that kind of situation, the existing tiers make perfect sense, both for programming and to the user. Items that you equip get to increase

    It's the interstat modifiers that are problematic -- basically everything that we would want to fall into the Derived tier. We can split this into two categories: the Derived-tier modifications that are on the character when they're born, and the Derived-tier modifications that they get during the course of play. The former is a game design problem -- you can just ensure that any Derived-tier mods on a character will not care about what order they are applied in, and then you have no problem. The latter is where order of operations really becomes an issue.

    It seems like any automatic decisionmaking we do on the order of operations would be "wrong" at some point, at least from the user's perspective -- they would want to do things in a different order to maximize their bonuses, and I can't think of any system that would be objectively logical (and thus justifiable) in all situations. So increasingly I'm leaning towards letting the user decide.

    The idea here would be that any time a new Derived-tier modification is applied to the user's stats, it'd go onto the end of a queue; mods would be applied in the order on the queue. But the user would have access to the queue and would be allowed to re-order things as they wish. The default ordering then would be "order in which you received the mods", which is at least somewhat reasonable on its own.

    Mm, and creating this chargen/later split does seem to mean that we'd want a second Derived tier (one for the mods created before chargen, which don't care about ordering; one for after, which does). Sorry, Magnate.

    Leave a comment:


  • Nick
    replied
    Originally posted by Derakon
    Nick: so how do we represent a directed acyclic graph to the users? How do we decide the structure of the graph? I note with some amusement that if it were up to the player to decide how to structure the thing, then we'd probably have an interesting little optimization problem...
    I think we would need a set of rules for how stats can modify each other, and then the DAG should be used for checking. The thing is, it is the fact that the graph has no cycles that is important - no cycles means you definitely have no troubles, cycles mean you definitely do.

    I am not thinking of the DAG as something that would be helpful directly to players, although maybe I'm wrong about that.

    Leave a comment:


  • Derakon
    replied
    Originally posted by Magnate
    Then it looks like you need another tier if you want to allow your example to happen. A sort of derived-from-derived.
    I suspect such an approach would just be turtles all the way down (i.e. you'd always find yourself wanting to provide another tier). For example, the INT -> Magic Device -> DEX problem could be extended by an item that increased your Stealth by your DEX score, so we have INT -> Magic Device -> DEX -> Stealth, each of which must be on a strictly greater tier than the one before.

    Leave a comment:


  • Magnate
    replied
    Originally posted by Derakon
    But you can't have a Derived-tier modifier based on another Derived-tier modifier -- mods can only use strictly lesser tier mods to calculate themselves. Otherwise you can still allow cyclical dependencies.
    Then it looks like you need another tier if you want to allow your example to happen. A sort of derived-from-derived.

    Leave a comment:


  • Derakon
    replied
    Originally posted by Magnate
    So isn't the problem in your example that the MDS-modifying-INT is in the wrong tier?

    MDS is a Derived stat: it is not calculated until the Derived modifiers are done (so that all DEX mods can affect it). It therefore cannot provide a Permanent-tier modifier to INT, but only a Derived-tier one, yes?

    So INT is modified by MDS after MDS is modified by DEX.

    Is that too simple?
    But you can't have a Derived-tier modifier based on another Derived-tier modifier -- mods can only use strictly lesser tier mods to calculate themselves. Otherwise you can still allow cyclical dependencies.

    Leave a comment:


  • Magnate
    replied
    Originally posted by Derakon
    Magnate: a stat is just a name that refers to a collection of stat modifiers. So for example, STR is a stat that, at the start of the game, has the base value of (10 + race modifier + class modifier). Does that help any?
    Yes - counter-intuitive but makes perfect sense now.

    So isn't the problem in your example that the MDS-modifying-INT is in the wrong tier?

    MDS is a Derived stat: it is not calculated until the Derived modifiers are done (so that all DEX mods can affect it). It therefore cannot provide a Permanent-tier modifier to INT, but only a Derived-tier one, yes?

    So INT is modified by MDS after MDS is modified by DEX.

    Is that too simple?

    Leave a comment:


  • Derakon
    replied
    Originally posted by buzzkill
    Aside from being hugely counter-intuitive, why would you want to do this? Magic device skill (MDS) is derived from INT (presumably). That makes sense. To modify INT, you would modify INT, not MDS. To modify MDS you would modify MDS, not INT. There has to be limits. Even given Nick's solution, there has to be limits.

    Either I'm wrong or missing something very obvious. Could you supply a better example.
    That was just a hypothetical example in a game where magic device derived from DEX instead of INT (presumably representing your ability to wave the wand properly or something). If you just swap DEX and INT wherever they appear in the example (thus, an item that improves your DEX based on your magic device skill, which is based on your INT), you'll get something closer to the reality of current Angband. It doesn't change the nature of the problem any.

    Nick: so how do we represent a directed acyclic graph to the users? How do we decide the structure of the graph? I note with some amusement that if it were up to the player to decide how to structure the thing, then we'd probably have an interesting little optimization problem...

    Magnate: a stat is just a name that refers to a collection of stat modifiers. So for example, STR is a stat that, at the start of the game, has the base value of (10 + race modifier + class modifier). Does that help any?

    Leave a comment:


  • Magnate
    replied
    Originally posted by buzzkill
    Aside from being hugely counter-intuitive, why would you want to do this? Magic device skill (MDS) is derived from INT (presumably). That makes sense. To modify INT, you would modify INT, not MDS. To modify MDS you would modify MDS, not INT. There has to be limits. Even given Nick's solution, there has to be limits.

    Either I'm wrong or missing something very obvious. Could you supply a better example.
    I think my main problem here is that I don't really understand the difference between a stat and a stat modifier. I think the problem is somewhere in the Derived tier, but I don't think I can work out what it is without that understanding.

    I fully agree with Derakon that Pyrel's design should facilitate future creativity by precluding the smallest possible number of modifiers.

    Leave a comment:


  • buzzkill
    replied
    Originally posted by Derakon
    So you could have a modifier that gives 50% of your DEX to your Magic Device skill, but not a modifier that gives 50% of your Magic Device skill to your INT. Such mods would be fundamentally not allowed. This bugs me since I really like the idea of magic device skill influencing core stats...
    Aside from being hugely counter-intuitive, why would you want to do this? Magic device skill (MDS) is derived from INT (presumably). That makes sense. To modify INT, you would modify INT, not MDS. To modify MDS you would modify MDS, not INT. There has to be limits. Even given Nick's solution, there has to be limits.

    Either I'm wrong or missing something very obvious. Could you supply a better example.

    Leave a comment:


  • Nick
    replied
    Originally posted by Derakon
    But can we come up with something better? Something that allows for complex interactions in "any direction", but is unambiguous about why things interact the way they do? Presupposing that any stat can modify any other stat, there must be a hierarchy; otherwise you will have circular dependency problems. But the current tier-based hierarchy needn't be the one we use -- you could have one where the hierarchy were simply the order in which the modifiers was applied, for example.

    Any ideas? Suggestions? Random neuron firings?
    The precise thing you need, rather than a hierarchy, is a directed acyclic graph. Without thinking too deeply, my guess is that you would keep the tiers, and label vertices with (stat, tier) pairs. Then you would draw edges based on what is allowed to influence what, and make sure that modification only occurs along edges.

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕