DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • October 20, 2018, 05:36:47 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Module to randomly disable/enable forest events  (Read 1263 times)
0 Members and 1 Guest are viewing this topic.
caust1c
Guest
« on: June 27, 2006, 03:31:48 PM »

I was reading a post about, forgive me if I am wrong with the person, Robert saying he likes to cycle through the forest events, enabling and disabling them to add to the variety.. I really liked this idea, but I am very lazy.

Does anyone have some ideas on how to make a module that would randomly do this...  I'm fairly new to coding PHP but in my mind, it doesn't seem like something that should be too terribly difficult..

I just don't really know where to start on this, and if any of the experienced coders have some ideas on which approach I should take, I would really appeciate the advice before I spend too much time working on it.  Unless of course someone has/is already worked on it.

Thanks!
Logged
SexyCook
Codemeister
****
Offline Offline

Posts: 430



View Profile WWW
« Reply #1 on: June 27, 2006, 03:49:23 PM »

Hm, so the same events are present the whole day, you'd have to generate a random number between x and y on a newday-runonce function. After which the module would have to change the active/inactive setting of modules for events based on that random number.

As I see it, there are two problems. First, you'd have to list each event-module you have installed in this module. Secondly, how to create the dependance to the random number, so you don't end up with days where NO MODULE is active.
Logged
caust1c
Guest
« Reply #2 on: June 27, 2006, 04:09:45 PM »

Very good points... I'll stew on this overnight and try to think of a decent way...  I suppose though, is it really that hard for me to just click on activate/deactivate every few days? Tongue  Soooo lazy!
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5479



View Profile WWW
« Reply #3 on: June 27, 2006, 04:11:54 PM »

Very good points... I'll stew on this overnight and try to think of a decent way...  I suppose though, is it really that hard for me to just click on activate/deactivate every few days? Tongue  Soooo lazy!

You could also use a *gasp* paper listing of your modules, and manage their cycles...
Logged

Play the latest beta version here on DragonPrime
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
64 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search