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...
Explorations/Random Events
Re: Explorations/Random Events
What language?
PHP:
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
}
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: Explorations/Random Events
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
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
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: Explorations/Random Events
No currently the exploration module doesn't have % of chances for the events. But nothing prevent you to implement it if needed 

Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer
Re: Explorations/Random Events
Therin lies the problem, im a noob! lola_bertrand wrote:No currently the exploration module doesn't have % of chances for the events. But nothing prevent you to implement it if needed
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: Explorations/Random Events
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.
Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer