DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 19, 2013, 10:46:38 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Really simple question  (Read 576 times)
0 Members and 1 Guest are viewing this topic.
scrubclub
Militia
**
Offline Offline

Posts: 10


View Profile
« on: April 20, 2012, 10:08:46 AM »

I really have looked, but haven't been able to come up with anything here...

My question: On a game settings page, how do I know what a chance number means?

For example, if it says "Chance for something special to happen in the forest" and I pick "20," does that mean a 1 in 20 chance, once every 20 times it's triggered, or a 20% chance?
Logged
Boris735
Mod God
*****
Offline Offline

Posts: 532


View Profile
« Reply #1 on: April 22, 2012, 01:14:29 AM »

This is a good question!  In the specific instance mentioned, the fact that (at least on my installation) the field entry is a drop-down box from 0 to 100 strongly suggests that the chance is a percentage (and I believe that this is correct).

The DragonPedia page on settings simply says the uninformative "chance", but is worth looking at for other questions you have about settings.

(I'd edit that page to be clearer about what "chance" means, but I don't have DragonPedia edit access... or I have forgotten my account details.)


EDIT: Corrected the URL; apologies!
« Last Edit: April 24, 2012, 05:24:19 PM by Boris735 » Logged
Afkamm
Mod God
*****
Offline Offline

Posts: 1563

MarcTheSlayer


View Profile WWW
« Reply #2 on: April 22, 2012, 07:48:22 AM »

It's not a percentage. If you look at the code you'll find this in the module_events function.

Code:
if (e_rand(1, 100) <= $basechance) {

So the higher you set the chance, the more likely it is that you'll get an event. Smiley
Logged

ArthuruhtrA
Mod God
*****
Offline Offline

Posts: 553


chown -R us ./base


View Profile WWW
« Reply #3 on: April 22, 2012, 08:57:00 AM »

The closest of your guesses is "once for every 20 times it's triggered".
Logged

Dragons of MythMy Modules | Tynastera!
BOWTIES ARE COOL
Boris735
Mod God
*****
Offline Offline

Posts: 532


View Profile
« Reply #4 on: April 22, 2012, 06:30:15 PM »

It's not a percentage. If you look at the code you'll find this in the module_events function.

Code:
if (e_rand(1, 100) <= $basechance) {

So the higher you set the chance, the more likely it is that you'll get an event. Smiley

So, um, in what way is $basechange not a percentage chance, then?
Logged
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #5 on: April 22, 2012, 06:56:48 PM »

Perhaps in version 1.1.3 of LoGD (if there shall be one), the option should say "Percentage that a function is triggered" or "Function is triggered 1 in how many times?" or something. Jussayin. ^^
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
Novelus|Grant|DarknessFalls
Captain of the Guard
***
Offline Offline

Posts: 229


Its not the beginning, or the end, that matters.


View Profile WWW
« Reply #6 on: April 22, 2012, 07:21:56 PM »

Perhaps in version 1.1.3 of LoGD (if there shall be one), the option should say "Percentage that a function is triggered" or "Function is triggered 1 in how many times?" or something. Jussayin. ^^

Correct me if I am wrong, but yes, it is 'One out of (insert number here) chances. The other thing... I thought the next release was going to be 1.2.0  and not 1.1.3  o.o
Logged

Not Nadez. Got it?
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #7 on: April 23, 2012, 08:52:42 PM »

@boris - you now have edit access to the Dragonpedia, login is the same as your forum login.

@novelus - the version number will depend on what we release.  If it is just some minor bug fixes (which we are overdue in releasing), it will likely be 1.1.3.
Logged

Play the latest beta version here on DragonPrime
Novelus|Grant|DarknessFalls
Captain of the Guard
***
Offline Offline

Posts: 229


Its not the beginning, or the end, that matters.


View Profile WWW
« Reply #8 on: April 24, 2012, 12:50:38 PM »


@novelus - the version number will depend on what we release.  If it is just some minor bug fixes (which we are overdue in releasing), it will likely be 1.1.3.

Thank you, Talisman, for letting me know!
Logged

Not Nadez. Got it?
Boris735
Mod God
*****
Offline Offline

Posts: 532


View Profile
« Reply #9 on: April 24, 2012, 05:28:06 PM »

@boris - you now have edit access to the Dragonpedia, login is the same as your forum login.

Thank you, Talisman!  I've added the explanatory note (and corrected the URL to the settings in my earlier post).
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
29 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search