DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • August 20, 2019, 11:32:18 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3   Go Down
  Print  
Author Topic: Lost Little Girl - littlegirl.php  (Read 14243 times)
0 Members and 1 Guest are viewing this topic.
defproc
Militia
**
Offline Offline

Posts: 8


View Profile
« on: March 22, 2006, 07:03:24 AM »

File Thread: http://dragonprime.net/index.php?topic=4004.0

Lost Little Girl
 - A LoTGD Module [www.lotgd.org]

Written by defproc [www.defproc.co.uk / defproc at defproc.co.uk]
Copyright (c) 2006, defproc.co.uk

This module produces a forest event in which the player encounters a little
girl. This might sound weird but its based on a similar event in LORD2. The
player chooses whether to help the child find her mother or to ignore her.
If the player chooses to help her, he/she must defeat n* creatures to unlock
the 'find mother' village/inn event. If the player dies while accompanying a
girl, the girl's spirit is seen in the shades or graveyard shortly thereafter,
creating/increasing a 'guilt' stat for the player. Guilt deprives the player
of 2 forest fights per day for n* days. If the player manages to return the
child to its mother, he/she is given the option to accept a payment, details
(x** gold and y** gems) of which aren't known until the payment's accepted. If
the player refuses payment, charm is gained, 'guilt' decreases and the
'Unselfishness' buff (from Heidi) is applied for 20 rounds.

While accompanying a girl, the player has the option to kill her (again, from
LORD2 - I'm not a creep!). This option can be disabled* via the module
configuration in the grotto. Killing a girl gives the player 1 experience and
n* guilt days. A charm point is also deducted.

While travelling with a girl, an event may occur in which the girl insists on
taking a break to make a daisy chain. This costs a forest fight but heals the
player and gives 'inspiration' buff.

In the future I would like to add a 'mass murderer' feature, which has some
sort of effect when a player has killed more than n* girls. The lifetime
number of girls a player has killed is already recorded (and currently unused)
for this purpose.

* Admin-configurable value
** gold_reward = base_gold_reward* + (per_lvl_gold_reward* x playerlevel) and
    gem_reward = base_gems_reward* + (per_lvl_gems_reward* x playerlevel)

File Thread: http://dragonprime.net/index.php?topic=4004.0

Edit - masked email address
« Last Edit: March 02, 2007, 03:54:48 AM by defproc » Logged
Ironman
Guest
« Reply #1 on: March 22, 2006, 07:14:52 AM »

This sounds like a pretty cool mod.  If you haven't done so already, you may want to consider integrating it into the Alignment module.  So much towards good if you return the girl and so much towards evil if you kill her.  Also, maybe the charm loss for killing her could be made configurable?

Smiley
Logged
defproc
Militia
**
Offline Offline

Posts: 8


View Profile
« Reply #2 on: March 22, 2006, 07:50:10 AM »

Wow, I wasn't aware of an alignment module. An alignment feature was something I wished for while coding this! Thanks for pointing it out. Killing the girl will deduct alignment by n*, returning her and taking payment will increase it a little, and refusing the payment by more.

I'll make all the rewards and penalties configurable for the next version. Thanks for the feedback!
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #3 on: March 31, 2006, 12:21:26 AM »

I'm assuming you wanted line 214 after the if(name!="") part, or else soulpoints are always subtracted.
Logged

defproc
Militia
**
Offline Offline

Posts: 8


View Profile
« Reply #4 on: March 31, 2006, 02:10:38 AM »

Ah, thanks for pointing that out. Hopefully I'll be releasing an update soon with a few fixes and a few little extras. I must admit I hadn't spotted that one. Thanks again!
Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #5 on: April 20, 2006, 09:26:34 AM »

I uploaded this with a little fix... you were missing the rewards for finding her to be added.

Code:
$session['user']['gold']+=$addgold;
$session['user']['gems']+=$addgems;

So I fixed that, uploaded the new version, and changed the download address in the module.

Available for download at:
http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=163
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
Nighthawk873
Guest
« Reply #6 on: May 26, 2006, 10:13:38 PM »

Where exactly is the little girls morther?
Logged
Ironman
Guest
« Reply #7 on: May 27, 2006, 12:49:07 AM »

Once you have adventured the configured number of turns, you will see a link to her in the Inn.
Logged
SexyCook
Codemeister
****
Offline Offline

Posts: 430



View Profile WWW
« Reply #8 on: June 14, 2006, 05:18:12 PM »

First of all, let me thank you guys for another great module. My players are having quite a nice time taking care of the little lost girls, or sometimes plainly chopping their heads off.

Yet, I'm creating a german server, meaning I'm naturaly using Nightborn's Translation Module. What happens is, it seems this module isn't translation ready. So while in the php code you have outputs like
Quote
addnews("`%".$session['user']['name']." `&returned `%$name`& to her mother. For a `\$fee`&.");
what I get in the Translation Module is something like:
Quote
`%Newbie SexyCook `&returned `%Ellie`& to her mother. For a `$fee`&.

This pretty much means I need to translate every sentence for each girl, each player and each DK-Title using the Translation Module.

Which I didn't.

Naturally, at least in my eyes the only way to solve this was to change the php file itself. As far as I have seen in this forum and from the license agreement, modifying the php-file, even for a translation, is undesired and I should at least send a copy of the modification to the creator of the mod.

So my two questions are:

1. Do I send DaveS or defproc the file (or both)?

2. Do I need to modify in any way the description of the mod or the author name to make it clear that I have indeed modified the php file?
Logged
SaucyWench
Mod God
*****
Offline Offline

Posts: 2238


I'm a good girl.


View Profile WWW
« Reply #9 on: June 14, 2006, 06:41:57 PM »

1. Thank you for your changes =)

Attach the changes here, or the file. It can be uploaded to the right area. Generally people pop a private message to the authors to let them know they've made changes. Authors are usually grateful! (and regardless, they cannot stop you.)

2. This is your decision. There is a thread about author crediting. http://dragonprime.net/index.php?topic=2841.0

It is up to you to decide whether you think the changes are significant enough to put yourself into the author information. You might want to consider leaving the author info untouched and just add a little comment in the top of the file, like, "Translation fixed by SexyCook".
Logged

SaucyWench
Owner of GemDust.com and Darton City proudly hosted by LunarPages
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #10 on: June 14, 2006, 07:47:29 PM »

Just so you know, you don't have to  keep my name on the module if you make more "fixes" to it...

I just put my name on the author page because I was insecure about whether I would cause more problems than fix them so it was more of a "warning" to people than anything Smiley

If you know your code is valid and it's a fix, then you can just change the version number and put a little code at  the beginning like this:

//V1.5 Fixed translation readiness by SexyCook
« Last Edit: June 14, 2006, 07:49:35 PM by DaveS » 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
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #11 on: June 14, 2006, 09:11:35 PM »

did you make sure you put the soulpoints fix in there this time too? Smiley
Logged

SexyCook
Codemeister
****
Offline Offline

Posts: 430



View Profile WWW
« Reply #12 on: June 15, 2006, 03:21:27 AM »

Not at all, thank you guys for the game and modules. I'm learning quite a lot of php and sql and having fun at the same time. Smiley

I attached the file in my post, here's a short changelog

- Added "by DaveS" to "V1.1" on line 54
- Added "V1.2" line on now line 55
- changed "author" and "version" values on lines 65 and 66
- translation ready-ed every "output", "addnews" and "pageheader"
- added kickme's fix to the soulpoints bug in line 216


There were 2 exceptions to the translation readying:
- "apply_buff('Inspiration'," beginning at line 240 I didn't touch, as arrays are not discussed in this thread
- "addnav("Little %s",$name);" doesn't work in line 243, marked it as a comment and changed it to "addnav("Little Girl");" in line 244
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #13 on: June 15, 2006, 03:32:20 AM »

There were 2 exceptions to the translation readying:
- "apply_buff('Inspiration'," beginning at line 240 I didn't touch, as arrays are not discussed in this thread
- "addnav("Little %s",$name);" doesn't work in line 243, marked it as a comment and changed it to "addnav("Little Girl");" in line 244
Buffs are translated by the core - no need to do anything in a module here...

the correct syntax for the nav would be:

Code:
addnav(array(Little %s", $name), $link_wher_you_should_go_to);
Logged

Running for more than three years now:
SexyCook
Codemeister
****
Offline Offline

Posts: 430



View Profile WWW
« Reply #14 on: June 15, 2006, 04:08:59 AM »

The trouble with the buff is the translation readying, as it contains:
Quote
            "name"=>"`%$name's Inspiration",
            "roundmsg"=>"`^Your gift from `%$name`^ inspires you.",
right now I'm having to translate each name and roundmsg for each girl.


As far as I can see the old
Quote
      addnav("Little ".$name);
on line 343 is only there to give a title to the options side menu.
Changing it to
Quote
addnav(Little %s", $name);
makes a link out of "Little %s", that's why I changed it to "Little Girl", which leaves this line as an options title.

« Last Edit: June 15, 2006, 04:13:42 AM by SexyCook » Logged
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

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