DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • October 17, 2018, 01:48:01 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Gardenflirt (and marriage)  (Read 7062 times)
0 Members and 1 Guest are viewing this topic.
anpera
Guest
« on: May 03, 2004, 01:22:09 PM »

Description:
Now players can flirt AND MARRY other players.
I know there are a few marriage scripts out there but I never got one. Here comes the translation of mine.

Violet and Seth are fully included in the action and act like any other player. Married players can flirt with each other in the gardens to get "Lover's protection". Marriage can break up the same way it does with Violet/Seth. If charm gets too low, divorce is the consequence. To be unfaithful is another way to lose the partner. And there is no difference between Violet/Seth or any other player in this case.
Even if your partner is dead you can flirt by asking the gypsy for help.
(A list of all couples is displayed in (new) Hall of Fame.)

Author: anpera

Version: 1.0

For LoGD: 0.9.7+jt

Installation Instruction:
See GARDENFLIRT.ZIP. Message was too long Shocked
Code:
----- Download and UnZIP:
http://dragonprime.net/users/anpera/gardenflirt.zip

----- Follow instructions in gardenflirt-instructions.txt

----- Upload and replace files:
gardens.php with gardens.php

----- Upload files:
female.gif to images/female.gif
male.gif to images/male.gif
(icons are from gender mod for phpBB)

Notes:
This hack uses the unused field "charisma" in accounts table and the "marriedto" field, so no changes on database are needed.

This addon changes data of other players in database, so it is affected by the "DB-Refresh-Bug" in 0.9.7.. I.e. if two players are online at the same time when they marry, it is a small chance that marriage is overwritten by one of them with session data in the very same moment it was entered into database. It is the same with gold transfers in bank and nothing that can be changed for now.

If someone asks for same-sex marriage just tell them to remove one gender from create.php and all other affected files and to choose violet/Seth by random. There is no use for gender in the game if they want to mix up. (Had this discussion several times now and don't want to go through this again and again. To quote inn.php: "sorry, no lezbo action here.") Tongue Wink
« Last Edit: December 06, 2004, 01:50:16 PM by anpera » Logged
Odyssey
Guest
« Reply #1 on: June 04, 2004, 06:10:51 AM »

I just have a question about the mechanics of the mod.  What triggers the charm ratings?  When I try to flirt with a female character, I get the message that she leaves the Gardens, and that I should work on my charm.   However, in my Info chart, there's no Charm rating.  Is there something else that I need to add to the game?

  If it matters, I'm a level two and she's a level one; both with 0 dragon kills.

Thanks!
Logged
anpera
Guest
« Reply #2 on: June 04, 2004, 07:26:44 AM »

You and her need more than 0 charm and you must not have 5 charmpoints more or less than she has. Charm is not displayed anywhere. It is one of the few values which only can be found out very roughly by talking to Violet or Seth.

Both of you are very "young" so I guess one or both of you have 0 charm. So try to get some charm out there! You have a good chance for a successful flirt if you both get the same answer from Violet/Seth.
Once you have flirted with her you should wait for her respond flirt with you. If you flirt alot with her and she doesn't with you, the gasp between you charmpoints gets bigger and you can not flirt anymore. Successful lirts gain charm. Btw. if you're drunk you shouldn't flirt in the gardens.

After both of you flirted 5 times with each other you are able to marry. On the 5th flirt you ask for marriage and she can say yes by flirting with you her 5th time.
From now on both of you should flirt with each other every day to keep the marriage alive. Every day you lose 1 charm (just like it is if you're married with Violet or Seth). Difference in charmpoints doesn't matter anymore now. But if one of you falls back to 0 charm your marriage brakes up and you have to start over from the beginning.

Good luck! Wink
Logged
anpera
Guest
« Reply #3 on: June 07, 2004, 03:59:13 PM »

Changed a line in installation instructions (thx 2 robert for reporting).

Code:
Find:
       addnav("Marry him","inn.php?op=seth&flirt=7");

       ----- Replace with:
       if ($session[user][charisma]!=4294967295) addnav("Marry him","inn.php?op=violet&flirt=7");

now is

Code:
Find:
       addnav("Marry him","inn.php?op=seth&flirt=7");

       ----- Replace with:
       if ($session[user][charisma]!=4294967295) addnav("Marry him","inn.php?op=seth&flirt=7");
Logged
Odyssey
Guest
« Reply #4 on: June 09, 2004, 05:06:51 PM »

You and her need more than 0 charm and you must not have 5 charmpoints more or less than she has.

Do they only show up on the list, if they are within the +/- 5 range?  Or is it everybody of the opposite sex, and if they are over or under, you keep walking?
And it looks like you can't flirt with dead people either, correct?

    My server is a growing game, so we don't have tons of players yet; and all of us is at different stages of the game...  Is there a way that I can change the code to let everybody flirt with everybody else, reguardless of their charm rating?  It seems like, for me at least, I go in and only have gotten a list of people once or twice.    

Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #5 on: June 10, 2004, 01:09:35 AM »

I'm not sure but this issue has already been discussed in another thread. Anyway it's quite easy to let player flirts with everyone by removing these 2 lines:
Code:
      } else if (abs($row[charm]-$session[user][charm])>10 && $session[user][charisma]!=4294967295){
         output("You stroll over to  `6$row[name]`0. You start to talk with each other but somehow it does not want to turn into a flirt. You decide to try again later and go back into the village.");

Anyway I strongly suggest you to leave the code as it is, and increment the diff charm ($session[user][charm])>10 ) to 20 or more for a short period.

Rgds Excalibur
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
anpera
Guest
« Reply #6 on: June 18, 2004, 04:48:32 AM »

The list displays all chars of the opposite sex that are alive. You can't flirt with dead persons. Chars with more ore less charm than you are displayed but you can't flirt with them. This is done to make sure they really 'love' each other.

I fully agree with Excalibur. Smiley

By the way: After you're married there is no limitation in charm anymore. Even if you're dead you are able to flirt with your partner. Ask the gypsy  Wink
Logged
Interloper
Guest
« Reply #7 on: July 03, 2004, 11:13:27 PM »


Recently installed this mod only to discover that my girlfriend and I can't marry each other in the game because we share a computer.

 Lips Sealed

I understand how (particularly in large games) people marrying their own characters could pose a problem, but I'm only running a small game for a select group of people.

So... My question is -- is there any way I can disable this protective measure?
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5479



View Profile WWW
« Reply #8 on: July 04, 2004, 01:12:08 AM »

The check here is done based on your last used IP addresses.  Go through the file and remove the areas that compare $session[user][lastip]
Logged

Play the latest beta version here on DragonPrime
Interloper
Guest
« Reply #9 on: July 04, 2004, 05:09:49 AM »


No worries, thanks for the reply.  Cheesy

I'm still trying to get my head around lots of stuff and I figure since there's a good place to ask my questions that it's better to do that than make uninformed guesses.

 Cool
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #10 on: July 15, 2004, 02:33:24 AM »

some players are able to be married to by more than 1 player.  12 in some instances.  where is the check to see if the person is already married or not?
Logged

anpera
Guest
« Reply #11 on: July 15, 2004, 04:18:30 AM »

It is impossible to marry more than one person with gardenflirt. The field in database doesn't allow multiple entries.

The problem here seems not to be the check in script but a common problem with the way LoGD does session-DB refreshes. The same problem occurs on gold transfers and any other mod that deals with data of other players while the other player is online. On slow servers it occurs more often.

If player A marries player B two values in the account data of player B are changed directly in database. But NOT in the session of player B! Normally this isn't a problem. But if player B clicks something (no matter what) in the same moment the changes from player A are stored in database, the data could be overwritten by the old values from player B.

As far as I figured it out, the following happens:
- player A clicks on "marry" and player A clicks something somewhere else a few ms earlier.
- player B reads out his account data from database into his session.
- player A saves changes on player B's account data in database.
- At this moment both are married as they should. But then:
- player B's data is saved back from session into database after the rest of his script is done.
- player A is married with player B and player B is solo again - and can be married by player C, too.

If this happens on your server you should marry the two people "by hand". You can enter the two values in user editor. (acctid of partner in field "marriedto" and the maxvalue in field "charisma".)

Only solution I have so far is to LOCK accounts table while executing common.php, but that would be a very hard performance issue I guess.

Oh btw. are there other marriage-mods installed on your server?
« Last Edit: July 15, 2004, 04:19:04 AM by anpera » Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #12 on: July 15, 2004, 09:14:40 AM »

well, i have yours, unmodded, and the chapel.  no one really uses the chapel though.

i really dont think what you describe is the problem though.  like i said, one person have been married to 12 times.   sometimes players say they dont even know they are married to someone when it happens.
Logged

sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #13 on: July 16, 2004, 06:24:26 PM »

perhaps it has something to do with the flirts?  i have people who have empty flirt fields, but are married.

EDIT:  hmmm, something most interesting just happenned.  person A was shown to have been married to by 13 people.  she filed for divorce, and all her marriages were disolved.  BUT, here is the weird part, Person B now fills all those same spots Person A was in.  
Logged

Interloper
Guest
« Reply #14 on: December 03, 2004, 06:57:09 PM »


I've just noticed a small problem with this mod I hope somebody can help me with.

After a divorce has occured through lack of charm, a character visiting the garden to flirt with the person they were divorced from sees:

Quote
Flirted 4294967295 times with you

Which obviously isn't right.  Shocked

So... If anyone could help I would appreciate it.

 Smiley
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

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