DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • February 17, 2019, 06:44:57 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: St. Patrick's Day Leprechaun Encounter  (Read 5220 times)
0 Members and 1 Guest are viewing this topic.
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5483



View Profile WWW
« on: March 16, 2005, 03:23:01 PM »

Well, we called it St. Patrick's Day, but this little module will work nicely year round anyhow.  This event is a three part 'quest' style forest special.  On the first run, the player finds a Leprechaun (maybe) and is tasked to find the missing pot of gold (normally found on second encounter) and then deliver it back to the Leprechaun (third encounter).

Configurable settings:
  • Number of times player can complete
  • Min/Max Gold for reward
  • Min/Max Gems for reward
  • Gold/Gems for welching Leprechaun
Brought to you by Robert and Talisman:

http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=1212
« Last Edit: March 09, 2007, 10:50:05 PM by Elessa » Logged

Play the latest beta version here on DragonPrime
Elessa
Faerie
Mod God
*****
Offline Offline

Posts: 3598


short, sweet and to the point


View Profile
« Reply #1 on: March 09, 2007, 10:51:07 PM »

added to file sharing area and updated download link in time for st. patrick's day!  Tongue
Logged

Uuma ma ten rashwe, ta tuluva a lle

Play the latest beta version here on LoGD DragonPrime - Axebridge
Kalisiin
Guest
« Reply #2 on: March 11, 2007, 11:39:45 PM »

Actually, there is a problem with this module.  I just tested it.

No matter how many times you put for repeat, it only ever lets you do this one time.  and it does not ever reset on newday or dragonkill.

I looked at the coding and figured out this was because you never put anything in to reset your "stage" pref back to zero after returning the pot of Gold to the Leprechaun.

So, if one were to do just that...then a player would only be able to do the event the number of times the repeat is set for, and then never again in that character's life...since the "done" pref never resets...either on a newday or a DK.

I fixed up my own version of this to make it a year-round module on my system by making the following changes, and in this order or the line numbers that I am referencing will be wrong...

First...add the following code at line 110 and line 139

Code:
set_module_pref ("stage",0);

Next...change the coding on line 55 to read as follows

Code:
if ($stage<2) {

Lastly...take out line 17 altogether.

This makes the file then unlimited...a player may run into this as many times as the game will give it to him...once he completes the quest, he can start the quest again, etc.

And this system keeps the "done" pref in the coding, so that it could be used in conjuction with Add-A-HOF if Admins wanted to do that.

The other way...you leave the coding on Line 55 alone...and leave the coding on Line 17 in....and it will then run for each player the specified number of times....and then never again will they be able to go on that quest.  You could set it for 2 or 1000 if you wanted.  but, once they have done it that many times...never again....because there is no reset on the "done" pref.

The last way this could be done (and this would destroy the ability to use the "done" pref as an Add-A-HOF....would be to add a hook in for newday or dragonkill which resets the "done" pref back to Zero.  Then...you can set "How many times to repeat" would be "how many times to allow per System Day?"  Or "How many times to allow per DK?"  depending on what your intentions were with this module.

For my purposes I have it as I now want it - unlimited, and a pref in place for Add-A-HOF.

BUT...I do not know what Robert and Talisman's actual intentions were with this module....all I know is that they never incorporated a reset of the "stage" pref...which made this so that, no matter what was set...it could never be done more than once.

I have provided in this posting several ways in which this could be fixed up - to meet the needs of an individual Admin who wants to play around....or if Robert and Talisman would like to re-code the little bits I pointed out, so that it matches what their intentions were with this module, it can be done.

At any rate, other than that, the module works great and is a really neat idea!

minor fix took care of the problem.
Logged
Iori
Mod God
*****
Offline Offline

Posts: 832


View Profile WWW
« Reply #3 on: March 12, 2007, 12:05:56 AM »

The last way this could be done (and this would destroy the ability to use the "done" pref as an Add-A-HOF....would be to add a hook in for newday or dragonkill which resets the "done" pref back to Zero.  Then...you can set "How many times to repeat" would be "how many times to allow per System Day?"  Or "How many times to allow per DK?"  depending on what your intentions were with this module.

Actually, you can just add an extra module pref that is used in conjunction with "done", such as "permdone" that gets incremented every time "done" is incremented, but is never reset. Keep the "How many times to repeat", etc based on just "done", and set Add-A-HOF to be based on "permdone".
Logged

Elessa
Faerie
Mod God
*****
Offline Offline

Posts: 3598


short, sweet and to the point


View Profile
« Reply #4 on: March 12, 2007, 12:41:40 AM »

heh... considering this is a holiday event.  why would it need to occur more than once?  it is a special treat.

i think the intent was to have a module, like polariae borealis, which is activated during a holiday, then deactivated/uninstalled.

a leprechaun isn't going to allow himself to be tricked and caught more than once.
Logged

Uuma ma ten rashwe, ta tuluva a lle

Play the latest beta version here on LoGD DragonPrime - Axebridge
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5483



View Profile WWW
« Reply #5 on: March 12, 2007, 12:54:52 AM »

There was actually a misplaced } which was causing the problem, apart from the missing resetting of the stage to 0.

As this module was written and last looked at about 2 years ago, I'm doing some revamping of it and will release an updated version shortly.
Logged

Play the latest beta version here on DragonPrime
Kalisiin
Guest
« Reply #6 on: March 12, 2007, 06:33:22 AM »

heh... considering this is a holiday event.  why would it need to occur more than once?  it is a special treat.

i think the intent was to have a module, like polariae borealis, which is activated during a holiday, then deactivated/uninstalled.

a leprechaun isn't going to allow himself to be tricked and caught more than once.


So who says it's the SAME leprechaun? Besides...if you're only intended to do the module once, then why have a setting for number of times to repeat?

there is another Leprechaun module for the forest, anyway, not to mention Kalazaar's famous Rainbow Quest, which happens year-round, and THAT leprechaun gets tricked and caught lots of times.

My point was - I did not know what Talisman's and Robert's actual intention was with the module, as I stated...so I posted several ways to fix it up that would have different effects.

For my part, I wanted a year-round event, as I also have the other leprechaun module installed (the one where you see a leprechaun relieving himself, and you "relieve him" of some of his gold) And i'd also have Rainbow Quest if I could find it.

On the other hand, I realized some would want just a holiday event...but maybe they would want it to run three, four, maybe 5 times for each player.  In which case, you'd still need a resetting of the "stage" pref back to zero, because, without THAT, no matter WHAT you set the "number of times to repeat" to, it was only going to play through one time.

The other possibilities were that, perhaps someone would want to limit the event to once per newday, or once per dragonkill, and keep it a year-round event, and so I posted THAT possibility.  Just use your addhooks and reset the "done" pref on that case.

Anyway, if ye read the original post from Talisman, here you go...

Quote
Well, we called it St. Patrick's Day, but this little module will work nicely year round anyhow.

He was the one who first raised the possibility of it being a year-round module.  Well, with that in mind, I concluded he intended for it to be POSSIBLE to be a year round event.  As it was coded at the time, it was not really possible to be that...as it was only goping to allow for one playthrough of the module per player.
Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #7 on: March 25, 2007, 09:05:37 PM »

Well, I want to say this module is kind of a bummer when you encounter it after solving it... perhaps cut the encounter chance to 0% once solved.

Or allow it to reset after encountering it 5 times or something.

These are just thoughts... I usually try to write things into the modules so that they aren't "Static"; in other words it somehow retains use after solving it.

If you have too many modules that do what this one does, you'll have a bunch of forest events that never do anything.

Just a thought Smiley
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
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
23 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search