DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • April 23, 2018, 02:20:02 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3 ... 9   Go Down
  Print  
Author Topic: Overhauled Marriage  (Read 27657 times)
0 Members and 1 Guest are viewing this topic.
Nightborn
Guest
« on: January 30, 2006, 11:24:19 AM »

This an overhauled version of CortalUX marriage.

Changes:
-->Switched from the internal scheme of comma seperated and | seperated saving to array based saving. Also now saves sent and received flirtpoints where it should do... although this might be considered redundant, it might be easier to locate errors.

-->Added a hook where you can hook in and add flirt items. You may also use this to execute entire modules. I personally plan a poetry module. Use the enclosed chocolates module as a base.

-->Fixed a few bugs, like the ring bug (you wouldn't need to buy a ring even if the admin setting said so) and some smaller bugs. I have -not- taken a look at the Grammar.

-->Faster due to the split up of the marriage_func into some "real" functions and the rest to library files that are enclosed once you need them. (still left the functions in it)

-->Autodivorce can happen if you fall below a certain amount of flirtpoints -> the ones you need to marry. You can turn this off if you want.

-->Decrease of flirtpoints of an admin-settable amount on each newday. (you can turn this off)

-->You can't flirt with anybody. The admin can set that all flirts to people higher than xx % charmpoints will fail. The same is a setting for people below (the % are based on the higher character).

-->enclosed abigail version works with the flirtpoints, you can receive xx flirtpoints for a abigail present (admin setting... if no marriage is installed, this works just like the normal abigail)

--> enclosed a converter for "old" flirtpoints

--> currently removed the hook to footer-runmodule, replaced it by footer-oldchurch ...YET THIS WON'T WORK NOW. Wait for 1.1.0 DragonPrime Edition

--> also altered the buff to an array("...%s...",$name); form that does NOT WORK CORRECTLY with 1.0.6 or below. I recommend to change this single line in marriage.php until the new version 1.1.0 DragonPrime Edition is out. (okay, I am ahead of time but hey...)

--> uhm, there may be things I forgot, but well.

Please report bugs once you encounter them. Thanks.


Have fun ^^

http://dragonprime.net/users/Nightborn/cortal_marriage.zip
« Last Edit: January 30, 2006, 12:07:20 PM by Nightborn » Logged
blue_skies
Guest
« Reply #1 on: January 30, 2006, 11:44:56 AM »

I dunno if you looked into this, but before, when you got married, and before the new day came, it was possible for you to propose to Seth/Violet. And then the thing would be kinda screwy... just thought I'd let ya know. Wink
« Last Edit: January 30, 2006, 11:47:15 AM by Daphne » Logged
Nightborn
Guest
« Reply #2 on: January 30, 2006, 11:59:45 AM »

Yes, actually you can not only propose to seth & violet but as far as I know to other players as well.

Only if the proposal is accepted, you will be married.

I don't think something bad will happen, because if the proposal is accepted, the $session['user']['marriedto'] will change from seth/violet to the new partner. therefore it won't break anything.

Am I wrong? If yes, let me know where. Smiley But thanks for your useful hint.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: February 01, 2006, 04:51:28 PM »

You should default the auto-divorce to Off. I uploaded the module and found myself being divorced from my girlfriend, never having had flirted in the first place.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #4 on: February 01, 2006, 07:01:13 PM »

Missing 2 db_prefix()'s in abigail.php.
« Last Edit: February 01, 2006, 07:05:48 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #5 on: February 01, 2006, 07:15:12 PM »

abigail has this on "leave" (you probably wanted to put Seth/Violet in the else clause):

Code:
      if ($partner['name'] <> "") {
         output("`5Not having any gems to buy a gift for %s`5, you wander sadly away.`n`n", "`^".$partner['name']);
      } else {
         output("`5Not having any gems to buy a gift for %s`5, you wander sadly away.`n`n", "`^".$partner['name']);
      }
Logged

Helping you help yourself.
White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #6 on: February 01, 2006, 09:13:15 PM »

I believe line 53 in module marriage_dohook.php should be
Code:
            require_once("lib/partner.php");
so that players don't get multiple function declaration errors.
Logged

Helping you help yourself.
Nightborn
Guest
« Reply #7 on: February 02, 2006, 12:21:03 AM »

Hi, thanks for the feeback

a) switched autodivorce for flirtpoint to Off (yes, would be better if you update)

b) added the missing db_prefs

c) the require in the do_hook is better, because if you require the function more than once, in the second call of the hook it will be an undeclared function that I call.... not good really. I had problems with that in the past ^^ the require is not called twice withing a block as far as I see (if you have problems, let me know)

d) I replaced the Seth/violet parts with the get_partner function (I rewrote abigail some time ago) and the $partner['name'] refers to you married beloved's name I read from the db.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #8 on: February 02, 2006, 12:29:34 AM »

c) the require in the do_hook is better, because if you require the function more than once, in the second call of the hook it will be an undeclared function that I call.... not good really. I had problems with that in the past ^^ the require is not called twice withing a block as far as I see (if you have problems, let me know)
You need to use "require" for the dohook-file but in there you have to use require_once for all other lib-files ... Wink
Logged

Running for more than three years now:
Nightborn
Guest
« Reply #9 on: February 02, 2006, 12:36:49 AM »

yep, that's what I meant as it was in the do_hook.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #10 on: February 02, 2006, 12:47:24 AM »

Yes... The dohook-file needs to be require()d... All other libs within the dohook-file need to be require_once()d... (especially files defining functions.)

Logged

Running for more than three years now:
Nightborn
Guest
« Reply #11 on: February 02, 2006, 12:50:02 AM »

ok, changed that.
Logged
White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #12 on: February 02, 2006, 01:10:53 AM »

Thanks, I actually did have problems with it (couldn't log in because of a message stating that the get_partner function was already declared).

As for abigail, I see your point, but I don't think you see mine. All I'm saying is that you have two identical lines that make the entire if statement unnecessary if you're doing the same thing whether the condition is true or false.
Logged

Helping you help yourself.
Nightborn
Guest
« Reply #13 on: February 02, 2006, 01:20:36 AM »

Hm, yes, I did not much to the abigail as it works.

Sorry, changed the lines, last one to systempartner.
Logged
White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #14 on: February 02, 2006, 06:42:02 PM »

Abigail: no charm?

Original:
Code:
        if (get_module_pref("liked")==1){
            output("`5\"`%What a wonderful surprise! Your gift was very thoughtful! I shall show everyone!`5\"`n`n");
            output("`^You gain some charm!`n");
            $session['user']['charm']+=2;
         }

Yours:
Code:
        if (get_module_pref("liked")==1){
            output("\"`%What a wonderful surprise! Your gift was very thoughtful! I shall show everyone!\"`n`n");
            output("`^You gain some charm!`n");

         }

I haven't looked too thoroughly, so if this is how it should be in the new version then I'm sorry to bother you about this.

EDIT: The reason I asked: marriagepoints are affected in this case, but when someone doesn't like your gift, you still lose charm points.
« Last Edit: February 02, 2006, 07:15:00 PM by White Knight » Logged

Helping you help yourself.
Pages: [1] 2 3 ... 9   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
22 Guests, 1 User
Stephen.Kise
Home Forums News Downloads Login Register Advanced Search