Sil mod: probability to die

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • BlueFish
    replied
    I have written a small modification to Sil in which after every attack, trap or probability that the player takes damage the following two things are computed:
    1 - distribution of the dealt damage (as in: probability of taking $n$ damage points for each $n$)
    2 - probability of being dead as a result of all the risks taken during the game, in millimort (https://en.wikipedia.org/wiki/Micromort). 1000 millimort equals probability 1 of being dead (note that they cannot be simply added).

    I think it's interesting because it quantifies exactly how many risks you are taking.
    This would also be an interesting way of flagging save scumming in a probabilistic way...

    Leave a comment:


  • half
    replied
    Originally posted by bron
    Code:
          1    50 ft    +6 Melee (6)
          1    50 ft    +4 Evasion (4)
        347   100 ft    +1 Melee (7)
        347   100 ft    +1 Evasion (5)
      1,234   150 ft    +2 Evasion (7)
    I like this format. Perhaps I could add an option to include this in the notes or not? My main worry at the moment is that they are too verbose.

    Leave a comment:


  • taptap
    replied
    I like the streams debo does, I like to watch replays of top Wesnoth players, I even occasionally watch Warband and Total War footage on youtube (of a few selected commentators, when I don't necessarily play the games). Wouldn't that be the highway: Complete surveillance in the dungeon (Morgoth is evil after all) and a replay to watch afterwards? Or would that be too large to handle?

    Leave a comment:


  • bron
    replied
    skill point distributions on the character notes
    I completely agree; this would be useful and instructive. I made this same suggestion in my very first Sil post over a year ago (http://angband.oook.cz/forum/showthread.php?t=5650), admittedly in a post that did a lot of newbie whining and complaining about a lot of random stuff. My thinking at the time was that I would probably learn something if I could see more details about how a character developed over time.

    As far as formatting goes, I would like to see the note include both the increment and the total value, although I think it should only track the "raw" skill value; not attempt to track the "effective" value, which can change often (e.g. you get stunned, or change to a weapon with a different plus-to-hit, etc.). I would go with a simple one-fact-per-line format, and I think the skill name should be fully spelled out. So something like:

    Code:
          1    50 ft    +6 Melee (6)
          1    50 ft    +4 Evasion (4)
        347   100 ft    +1 Melee (7)
        347   100 ft    +1 Evasion (5)
      1,234   150 ft    +2 Evasion (7)

    Leave a comment:


  • LostTemplar
    replied
    linked lists all the way, implemented in an external file. Twice if you need it for more than one type, since there are no templates
    Linked list implemented without any type dependence will work (use only pointers, no structs, you also need to pass element size to every function as parameter)

    If it is just for dice use array of bytes.

    Leave a comment:


  • debo
    replied
    Haha, I knew it was a dumb question Thanks.

    Leave a comment:


  • wobbly
    replied
    Originally posted by debo
    This is possibly a dumb question, but in what situation do you actually need to provide the entire list of protection die? Can you just compute the pair of [min prot roll, max prot roll], and then take a uniform random int in that closed interval?
    Think of the difference between[1d1+1d3] with 33% chance of 2,3 or 4
    & [1d2+1d2] with 25% at the outliers (2&4) & 50% in the middle 3

    Leave a comment:


  • half
    replied
    Originally posted by fph
    * make a global, extern, fixed-size variable (int a[A_MAX_SIZE]; and int a_size; ), and have the function fill it in
    * implement vectors as struct {int a[]; int size};
    * "double return values": e.g. int* frobnicate(int &size, ...), which returns a pointer and fills in &size
    * int[A_MAX_SIZE] frobnicate(...);
    * linked lists all the way, implemented in an external file. Twice if you need it for more than one type, since there are no templates
    * linked lists, but implemented in macros as far as possible (ŕ la z-virt.h)
    None of those really sound good to me, but I'm not sure I really understand the question. Unfortunately I'm not sure I could properly understand it without putting myself in a position where it is easiest for me to just solve it.

    Re the exisiting code, that could be factored by giving the functions a new argument which is a #defined constant that is either MINIMUM, MAXIMUM, or ROLL. I'm not sure how to add in the new one since I don't understand exactly what it does, but I think variable length arrays are unlikely to be the solution. If you really require a list of die rolls, then have an array of size 20, taking side numbers, where empty slots are 0s.

    Leave a comment:


  • debo
    replied
    This is possibly a dumb question, but in what situation do you actually need to provide the entire list of protection die? Can you just compute the pair of [min prot roll, max prot roll], and then take a uniform random int in that closed interval?

    Leave a comment:


  • fph
    replied
    Originally posted by fph
    I'd love to see it included, too. I can easily provide a diff/patch file that you can apply to the Sil source.

    There are some opportunities for refactoring the existing code while including this part; for instance, in Sil there are
    * a function that makes a protection roll and returns the result
    * two functions that compute min and max protection (for displaying)
    I added
    * a function that computes the probability distribution of the protection roll.
    The four are independent, but probably they should be merged not to duplicate the logic. I can work on it and similar issues.
    Let's suppose I do this refactoring. The clearest thing to me looks like a function that returns the list of sides of protection dice.
    So, very technical question for the developers: what's the angbandic way to handle variable-size arrays? I see different options:

    * make a global, extern, fixed-size variable (int a[A_MAX_SIZE]; and int a_size; ), and have the function fill it in
    * implement vectors as struct {int a[]; int size};
    * "double return values": e.g. int* frobnicate(int &size, ...), which returns a pointer and fills in &size
    * int[A_MAX_SIZE] frobnicate(...);
    * linked lists all the way, implemented in an external file. Twice if you need it for more than one type, since there are no templates
    * linked lists, but implemented in macros as far as possible (ŕ la z-virt.h)

    I see the global extern is used for some game-global values, but apart from that I really don't know which way to go.
    Normally in life I've been using a different approach, which is "life is too short for C, rename all files to .cpp and use STL vectors", but I see that it's not really indicated for Angband.

    (should I move this question to a separate thread?)

    Leave a comment:


  • HallucinationMushroom
    replied
    Originally posted by debo
    Uh, I think the skill allocation notes should be a totally different section. Even putting the abilities in the notes is not super useful, you have to scan and filter. I like how mpa-sil boxes the abilities into a dedicated section (although they're not ordered by depth taken there).
    Rare Debo disagreement here. It might be cluttered to have everything listed out in chronological order, but it would be a lot easier for me to read than having to cross check against abilities and other other notes. Like, if I wanted to mimic your human hador warrior, which I actually want to do, it would be easiest for me to check your stat distribution then read the notes for skill placement alongside notable kills, artifacts, and running commentary.

    Leave a comment:


  • debo
    replied
    Uh, I think the skill allocation notes should be a totally different section. Even putting the abilities in the notes is not super useful, you have to scan and filter. I like how mpa-sil boxes the abilities into a dedicated section (although they're not ordered by depth taken there).

    If you have the same "note format" but filter them into a separate section of the dump called "skill allocation", it will be easy to scan and copy the build.

    Of course you won't be able to see reactive allocations so easily this way (ie found artefact, player saying "ack cursed amulet of con!" into will then curse breaking)

    Leave a comment:


  • HallucinationMushroom
    replied
    Sorry, ironically getting the columns to line up is ugly in the forum box. There is likely an elegant way to keep formatting, but, I haven't learned it. (Edit:Okay, I monkeyed it with it and just put code tags around it... now it seems to display somewhat properly, but I have more than likely just broken it for somebody else)

    I manually made these kind of notes on a lot of my challenge characters for future reference... as those of you who know me, I have no memory.
    Like this guy,


    All the 7/5/3/1 things are evasion/melee/wis/perception breakdowns, but that is a running total and clunky. Kind of like with the initial stat purchases, they can be totaled or deduced if needed.
    Last edited by HallucinationMushroom; November 15, 2013, 17:44.

    Leave a comment:


  • bio_hazard
    replied
    Originally posted by half
    Any idea of how to format this so it is readable? e.g. mock up the first 500 ft of a character's skill progression in a format you'd like.
    Code:
       1         50'     [Mel 6(+6), Ev 6(+6)]
        906    200 ft    (Finesse) [Mel 7(+1), Ev 7(+1), Wil 2(+2)]
       1,752    300 ft    (Subtlety) [Stl 5(+5)]
       2,000    300 ft    [Ev 8(+1), Per 3(+3)]
       2,411    350 ft    (Parry)
    e: I have no idea how to implement this, but it would be fun to have a graphical replay (kind of like the Civ games give you), maybe with log(turn) on the X and depth, skills, abilities showing up as different series on the Y.
    Last edited by bio_hazard; November 15, 2013, 17:37.

    Leave a comment:


  • HallucinationMushroom
    replied
    Code:
    ... Because AbsoluteGo's Notes are hilarious...
    (And because he was top of recent submissions...)
    
    The biggest question would be how to display
     initial points and instances where multiple skill points are taken at once, I guess. 
    This is my first idea on what I would like to see. 
    
    Turn          Depth         Note
    0,001          50 ft         6 will **
    0,001          50 ft         5 evasion **
    0,001          50 ft         4 melee **
    0,473         100 ft         1 evasion **
    0,843         150 ft         (Power)
    1,880         200 ft         mmmm
    1,950         200 ft         2 will **
    2,072         200 ft         mmmm
    2,752         200 ft         Encountered Gorgol, the Butcher
    3,021         200 ft         Slew Gorgol, the Butcher
    3,167         200 ft         mmm
    3,676         250 ft         mmm i guess i want to use that
    3,678         250 ft         1 melee **
    3,678         250 ft         1 evasion **
    
    and so on
    Last edited by HallucinationMushroom; November 15, 2013, 17:42.

    Leave a comment:

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