Page 1 of 1
Explorations/Random Events
Posted: Tue Aug 26, 2014 1:37 pm
by njfrlng
Is there a way to set how often specific events happen while exploring?
example:
%50 of the time a generic comment with no effect will be displayed.
%20 of the time you will gain %.1 strength
%10 of the time you will find a random amount of gold
%1 of the time you will find a super item
etc...
Re: Explorations/Random Events
Posted: Tue Aug 26, 2014 4:11 pm
by Chris
What language?
PHP:
Code: Select all
$randomPercentage = rand(1,100);
if($randomPercentage >= 50) {
// %50 of the time a generic comment with no effect will be displayed.
} elseif($randomPercentage >= 20) {
// %20 of the time you will gain %.1 strength
} elseif($randomPercentage >= 10) {
// %10 of the time you will find a random amount of gold
} elseif($randomPercentage == 1) {
// %1 of the time you will find a super item
}
Re: Explorations/Random Events
Posted: Tue Aug 26, 2014 6:43 pm
by njfrlng
thanks.
NWE has it so you can just add events and throw in any effects. I see that you can randomly add how much of something they recieve using similar code. But the actual generation of the events must have to be edited in the actual mod itself.
Thanks for the help
Re: Explorations/Random Events
Posted: Wed Aug 27, 2014 4:32 am
by a_bertrand
No currently the exploration module doesn't have % of chances for the events. But nothing prevent you to implement it if needed

Re: Explorations/Random Events
Posted: Thu Aug 28, 2014 1:32 pm
by njfrlng
a_bertrand wrote:No currently the exploration module doesn't have % of chances for the events. But nothing prevent you to implement it if needed

Therin lies the problem, im a noob! lol
Re: Explorations/Random Events
Posted: Thu Aug 28, 2014 2:55 pm
by a_bertrand
Well... sadly you will not be able to fully implement YOUR game without starting to dig into the code and create new modules and / or change existing one. It's an engine not a pre-made game. Advantage is that you will have your game at the end, and not a game made by somebody else.