DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • June 22, 2018, 11:53:53 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: New Specialty Idea That Incorporates Moon Phases  (Read 502 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline

Posts: 450

View Profile
« on: February 27, 2018, 10:02:11 PM »

OK...so I have been thinking for a while of creating...or modifying an existing specialty...to be dependent on the phase of the moon/moons in your game.

Let me just see if I have all the steps...if I am missing anything would someone kindly point it out??

step 1. moons.php has to be required
step 2. it has to check how many and which moons are active, moon1, moon2, and moon3
step 3. it has to check for what phase that moon is and assign a value to that in numerical format...what I worked out is
new = 1
crescent, waxing or waning = 2
half = 3
gibous, waxing or waning = 4
full = 5

now...we could do the following:

if one moon is active, use that power number as a multiplier for effects and duration of the buff.

if two moons or three moons are active...could either use the total number...or an average of the two or three as a multiplier

Not sure which would be better to do here...maybe an average

step 4. we set it so that when power is 3 (average) the buff/duration is normal length.  So anything above 3 increases the power, where anything below 3 reduces it.

Now all we need to do is call the prefs from moons, figure the power numbers, based on their setting of moonplace...to assign the power number to that moon.

Does that basically cover what I am trying to accomplish here, or did I miss anything?

Example:  so let's say I have a full, a half and a gibbous.  so I have 5 + 3 + 4 = 12

Now I could get an average of 4 on that, so my multiplier is now 4...whereas 3 produces the average result.

To get there, I'd need to take the existing specialty and reduce it's power to 1/3 normal...so that a power of 1 would produce the lowest.  a power number of three would produce the original result...and a power number of five would produce the highest number...right??

OR...would it be better to assume they have only one moon, or tie it to one moon...and pick the highest moon, the lowest moon or the average, in between moon?

Kinda feeling around for opinions on how to proceed.  I think I know the coding concept here...and how to achieve it...I'm more looking for opinions on how to make this balance.

Obviously it is rare as all heck to have three fulls or three news at the same time.

Or perhaps it might be better to make three specialties, one for each moon?

Offline Offline

Posts: 450

View Profile
« Reply #1 on: February 27, 2018, 10:10:40 PM »

P.S.  Another idea is to leave the values of the original specialty as is...and use the power number or average...to set a multiplier.

Example if power = 1 multiplier = .75
if power > 1 but < 2 multiplier = .90
if power >2 but  < 3 multipler = 1.00
if power > 3 but < 4 multiplier = 1.10
if power > 4 but < 5 multiplier = 1.25
if power = 5 multiplier = 1.40

for example.

Thinking this could be the better way...

Because I could hook to newday...having it fetch the values at newday, and set the multiplier as a pref in the specialty module.

Then also have a newday message that corresponds to that multplier setting...

You feel the power of the moons or

The power of the mons does not seem as strong for you today...or some such...

Of course...so I don't forget...I need a pref of how many moons are active...to know what to divide by, easy enough to fetch the settings and get the boolean values and increment a setting accordingly for each active moon.

Some of what I am writing here is more for me, lol
« Last Edit: February 27, 2018, 10:15:14 PM by TGTarheel » Logged
Offline Offline

Posts: 450

View Profile
« Reply #2 on: February 28, 2018, 04:30:25 AM »

OK, so I worked this out in the moons.php file - so when I release my modified specialties, as it depends on moons, - and specifically my altered moons.php file I will need to include that.

I did the calculations for moonpower in the moons file, in the newday hook...to make sure that the calculation would be done on newday...so that the specialty would have no chance of pulling yesterday's values...by having it pull values from there first.  I wanted new values set first THEN pull values.

So...I am right here, now, yes...per the license...any module I make like this...I will need to release, since it is dependednt on moons.php...and I will need to include my modified moons file, otherwise the whole thing would not work.  Just making sure I am following the rules.

OK, I appear to have this working on my test server.  Once I test a bit further to be sure it is all working right, I will release the modules here.
« Last Edit: March 01, 2018, 03:26:36 PM by TGTarheel » Logged
Mod God
Offline Offline

Posts: 1744

View Profile
« Reply #3 on: March 02, 2018, 03:55:14 PM »

Is your modified moons.php file backwards compatible?

Check My Modules for the latest versions.
Offline Offline

Posts: 450

View Profile
« Reply #4 on: March 03, 2018, 09:41:09 AM »

Is your modified moons.php file backwards compatible?

It should work with any 1.x.x version.  I did not change it much, just added a few settings and prefs to accommodate the power of the moons, based on their phase.

But to use the specialties I uploaded, you also need to use the moons.php I included.

It won't work with the original moons.php

Well, I did not upload yet, I am about to...along with something else I just did.
Pages: [1]   Go Up
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
43 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search