chest lootgroups

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Jolopelli

chest lootgroups

Post by Jolopelli »

I have here a excerpt from a lootgroup:

Code: Select all

lootgroup treasuremapchest2
{
	gold		6d100+600
	Random	Gems			1d4		50
	Random	AllWeapons		1d3		50
	Random	AllArmor		1d3		50
	Random	Circle1Scrolls		1d2		25
	Random	Circle2Scrolls		1d2		25
	Random	Circle3Scrolls		1d2		25
	Random	Reagents		2d4		50
	Random	NecroRegs		1d4		50
	Random	Potions			1d4		50
	Random	TreasureMapSpecial	1		10
	Random	Junk			1d8-1	        50

	magic_quality	4
	magic_group	Wands		50
	magic_group	AllWeapons	50
	magic_group	AllArmor	50
}
Here is what I want to know:
  • does 1d4 stand for 1 dice 4 sides?
If not, what does 1d4 convert into and what does 2d4 convert into?
Bytehawk
Apprentice Poster
Posts: 56
Joined: Fri Feb 03, 2006 2:25 am

Post by Bytehawk »

> does 1d4 stand for 1 dice 4 sides?
Exactly.
Jolopelli

Post by Jolopelli »

1d4 = 25 or 50 or 75 or 100 then?
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

1d4 means that a random number between 1 and 4 inclusive will be generated.

It is the same as 1 * RandomInt(4) + 1 in escript. 2d4 would be the same as 2 * (RandomInt(4) + 1) etc. Just think of the number on the right side of the 'd' as the maximum random number that can be generated from 1 to that number and the number on the left side of the 'd' as the multiplier that will operate on the random number.
Jolopelli

Post by Jolopelli »

thank you, that is a very good breakdown
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

I always thought of like table top rp games, i.e. D&D. 1D6 meant a single 6 sided dice. The number you could get would be between 1 and 6. Now you might find this listed in some places also. 1D4+2, this means a single 4 sided dice (you can get between 1 and 4) plus 2. So the total would be between 3 and 7.
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

Me too Tritan but you'd be surprised how many people, and I mean young and old people, who have never played or seen D&D or any game like that.
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

It does not surprise me in the least. I had to explain this to my nephew once and we very surprised at what those meant. It is funny really that most games use this method to determine the chance of something happening too.
Post Reply