Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Sil

Reply
 
Thread Tools Display Modes
Old November 18, 2013, 12:07   #21
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,386
debo is on a distinguished road
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.'
debo is offline   Reply With Quote
Old November 18, 2013, 12:52   #22
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 904
half is on a distinguished road
Quote:
Originally Posted by fph View Post
* 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.
half is offline   Reply With Quote
Old November 18, 2013, 16:38   #23
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,433
wobbly is on a distinguished road
Quote:
Originally Posted by debo View Post
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
wobbly is offline   Reply With Quote
Old November 18, 2013, 17:46   #24
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,386
debo is on a distinguished road
Haha, I knew it was a dumb question Thanks.
__________________
Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'
debo is offline   Reply With Quote
Old November 18, 2013, 18:15   #25
LostTemplar
Knight
 
Join Date: Aug 2009
Posts: 670
LostTemplar is on a distinguished road
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.
LostTemplar is offline   Reply With Quote
Old November 18, 2013, 20:16   #26
bron
Swordsman
 
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 493
bron is on a distinguished road
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)
bron is offline   Reply With Quote
Old November 18, 2013, 21:31   #27
taptap
Knight
 
Join Date: Jan 2013
Posts: 710
taptap is on a distinguished road
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?
taptap is offline   Reply With Quote
Old November 19, 2013, 10:57   #28
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 904
half is on a distinguished road
Quote:
Originally Posted by bron View Post
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.
half is offline   Reply With Quote
Old November 26, 2013, 04:33   #29
BlueFish
Swordsman
 
Join Date: Aug 2011
Posts: 414
BlueFish is on a distinguished road
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...
BlueFish is offline   Reply With Quote
Reply


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

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 Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hit probability calculation Ycombinator Vanilla 8 May 28, 2010 00:11
Crafting-focused Angband mod under development Optimality Variants 49 November 25, 2009 02:06
Question regarding good/great probability ChodTheWacko Vanilla 4 October 3, 2008 20:28
Feature request: mod for birth_no_artifacts bron Vanilla 7 May 25, 2008 10:16
Probability of using Rods of Teleport Other? Dragonboneman Vanilla 9 February 7, 2008 20:55


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


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.