Angband Forums > Sil Sil mod: probability to die
 Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 November 18, 2013, 11:07 #21 debo Veteran     Join Date: Oct 2011 Location: Toronto, Canada Posts: 2,386 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? __________________ Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'
November 18, 2013, 11:52   #22
half
Knight

Join Date: Jan 2009
Posts: 904
Quote:
 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.

November 18, 2013, 15:38   #23
wobbly
Veteran

Join Date: May 2012
Posts: 2,462
Quote:
 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

 November 18, 2013, 16:46 #24 debo Veteran     Join Date: Oct 2011 Location: Toronto, Canada Posts: 2,386 Haha, I knew it was a dumb question Thanks. __________________ Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'
November 18, 2013, 17:15   #25
LostTemplar
Knight

Join Date: Aug 2009
Posts: 670
Quote:
 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.

November 18, 2013, 19:16   #26
bron
Swordsman

Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 494
Quote:
 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)```

 November 18, 2013, 20:31 #27 taptap Knight   Join Date: Jan 2013 Posts: 710 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?
November 19, 2013, 09:57   #28
half
Knight

Join Date: Jan 2009
Posts: 904
Quote:
 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.

November 26, 2013, 03:33   #29
BlueFish
Swordsman

Join Date: Aug 2011
Posts: 414
Quote:
 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...

 Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Angband     AAR     Vanilla     Development     ToME     Sil     Variants     Competition The real world     Idle chatter     Oook! Obsolete     v4

 Similar Threads Thread Thread Starter Forum Replies Last Post Ycombinator Vanilla 8 May 27, 2010 23:11 Optimality Variants 49 November 25, 2009 01:06 ChodTheWacko Vanilla 4 October 3, 2008 19:28 bron Vanilla 7 May 25, 2008 09:16 Dragonboneman Vanilla 9 February 7, 2008 19:55

All times are GMT +1. The time now is 05:05.