DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • May 18, 2013, 04:38:24 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Orphanage problems.  (Read 580 times)
0 Members and 1 Guest are viewing this topic.
RaynDarren
Mod God
*****
Offline Offline

Posts: 638


View Profile WWW
« on: August 16, 2012, 05:57:20 PM »

So, I made this module and am now having trouble getting parts of it to work. I have absoutely no idea why it isnt wroking as it works just fine on my test server.

Problems:
1. Children don't age
2. You cannot rename your child
3. After adoptin your child you automatically get the link to make them as a character.

Help please? Files attached.

Oh and the zip contains 33 files, if that can be consolidated I'd love a suggestion as to how.
Logged

Visit me at my new home!
Eclypse ~ Xpert
Militia
**
Offline Offline

Posts: 75


View Profile
« Reply #1 on: August 16, 2012, 06:45:20 PM »

To start off.. I think it would be a lot easier to get help if we knew where the problems were occuring.. Since the aging (leveling?) process was easy to find..

Line 78 - 92 in dohook.php:

Code:
<?php
if ($levelsincelevel <= $levelsetting){
output("`n`%%s `^is slowly growing up!`n",$name);
$levelsincelevel++;
set_module_pref("lsl",$levelsincelevel);
?>


Should it not be:

Code:
<?php
if ($levelsincelevel <= $levelsetting){
output("`n`%%s `^is slowly growing up!`n",$name);
increment_module_pref("lsl");
increment_module_pref("level");
?>


Again.. Correct me if I am wrong.. This is just very confusing. Tongue
Logged

Senior Administrator, Coder, and Head of Staff

tynastera.com
isleofdarkness.com
Boris735
Mod God
*****
Offline Offline

Posts: 532


View Profile
« Reply #2 on: August 16, 2012, 08:44:11 PM »

So, I made this module [...]

By "made" do you mean that you changed some of the text?  It seems that you should be retaining more of an attribution in it than just "based on academy".
Logged
RaynDarren
Mod God
*****
Offline Offline

Posts: 638


View Profile WWW
« Reply #3 on: August 16, 2012, 11:03:56 PM »

All the outputs have been changed, I've added pages and pages of new material and altered or removed approximately 25% of the code. I believe the "based on academy" notation stands. I never claimed it to be my code.
Logged

Visit me at my new home!
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #4 on: August 17, 2012, 11:53:35 AM »

All the outputs have been changed, I've added pages and pages of new material and altered or removed approximately 25% of the code. I believe the "based on academy" notation stands. I never claimed it to be my code.

When output changes (translations) are the majority of the changes, and/or trivial portions of code are removed/changed, the practice is to provide attribution in the form of "Sichae, with significant alteration by Rayn".

When the mechanics of the code have been changed significantly (added code, etc), then it would be "Rayn, based on Academy by Sichae".

Note that in both cases, the author's name is included and not just the name of the module.  In some cases, there are more than one module using the same name but by different authors.

It may seem a relatively minor matter, however it is this type of issue that gave birth to DragonPrime in the first place hence it is one we remain rather sensitive about.   Wink
Logged

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

Posts: 638


View Profile WWW
« Reply #5 on: August 17, 2012, 06:37:50 PM »

Noted, sorry, I didn't mean to step on any toes or anything.

The author line now reads: RaynDarren, based on Academy by Sichae. Please note that this change HAS NOT been made in the version at the top of this thread as I wish to fix the problems first.
Logged

Visit me at my new home!
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #6 on: August 17, 2012, 09:41:45 PM »

Noted, sorry, I didn't mean to step on any toes or anything.

The author line now reads: RaynDarren, based on Academy by Sichae. Please note that this change HAS NOT been made in the version at the top of this thread as I wish to fix the problems first.

Thanks!
Logged

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

Posts: 638


View Profile WWW
« Reply #7 on: August 17, 2012, 10:26:35 PM »

NP, Smiley

So, will Experts; code fix my problem?
Logged

Visit me at my new home!
Afkamm
Mod God
*****
Online Online

Posts: 1563

MarcTheSlayer


View Profile WWW
« Reply #8 on: August 18, 2012, 08:09:54 AM »

In the file agency.php you've still left a lot of words relating to the academy. Mainly words like academy, knight and squire.

You can delete lines 10 and 11 as the download and vertxtloc links will be wrong now.

I looked through the code and couldn't see anything that allowed the player to name their baby in the first place, so renaming is out. The code does point to 2 settings which don't exist that stored pre set names, but that's all.


Do you really need so many chat areas in this module? I counted 20! Smiley
Logged

Eclypse ~ Xpert
Militia
**
Offline Offline

Posts: 75


View Profile
« Reply #9 on: August 18, 2012, 10:09:58 AM »

My code should only fix the error you have with the aging of the children.

Your other problems are difficult to find...

I have a question for you:

Have you already tried making it so you can change the name of the children, and it just didn't work?

For your 3rd problem, you want to make it so players can PLAY their adopted child as a character?
Logged

Senior Administrator, Coder, and Head of Staff

tynastera.com
isleofdarkness.com
RaynDarren
Mod God
*****
Offline Offline

Posts: 638


View Profile WWW
« Reply #10 on: August 18, 2012, 01:35:05 PM »

My code should only fix the error you have with the aging of the children.
Thank you very much, I shall try that right now!

Quote
Your other problems are difficult to find...

I have a question for you:

Have you already tried making it so you can change the name of the children, and it just didn't work?

Yes, in the original code, there are names that randomly get assigned to the squire, I've removed that as i wanted only "baby boy" and "baby girl". The name change part simply doesn't appear, It doesn't look like the "if" is triggering.

Quote
For your 3rd problem, you want to make it so players can PLAY their adopted child as a character?

Correct. At this point, they'd have to log out and make a new character - whenever they chose. I've thought of hooking novalty acounts to it, but haven't actually done it yet. Might that be a solution?

Thanks for all your help!
~Rayn
Logged

Visit me at my new home!
Eclypse ~ Xpert
Militia
**
Offline Offline

Posts: 75


View Profile
« Reply #11 on: August 18, 2012, 05:29:43 PM »

My code should only fix the error you have with the aging of the children.
Thank you very much, I shall try that right now!

Smiley

Quote
Quote
Your other problems are difficult to find...

I have a question for you:

Have you already tried making it so you can change the name of the children, and it just didn't work?

Yes, in the original code, there are names that randomly get assigned to the squire, I've removed that as i wanted only "baby boy" and "baby girl". The name change part simply doesn't appear, It doesn't look like the "if" is triggering.

Can you please direct me where this is happening? Tongue

Quote
Quote
For your 3rd problem, you want to make it so players can PLAY their adopted child as a character?

Correct. At this point, they'd have to log out and make a new character - whenever they chose. I've thought of hooking novalty acounts to it, but haven't actually done it yet. Might that be a solution?

Thanks for all your help!
~Rayn

Yes, I was actually going to suggest you look into the Novalty Accounts module. ^^
Logged

Senior Administrator, Coder, and Head of Staff

tynastera.com
isleofdarkness.com
RaynDarren
Mod God
*****
Offline Offline

Posts: 638


View Profile WWW
« Reply #12 on: August 18, 2012, 05:42:57 PM »

Quote
Quote
Your other problems are difficult to find...

I have a question for you:

Have you already tried making it so you can change the name of the children, and it just didn't work?

Yes, in the original code, there are names that randomly get assigned to the squire, I've removed that as i wanted only "baby boy" and "baby girl". The name change part simply doesn't appear, It doesn't look like the "if" is triggering.

Can you please direct me where this is happening? Tongue
[/quote]
It should be appearing in  case_hall, but only after the child is adopted.

The code appears to be there, but it's not working.

lines  16-24
Code:
if (get_module_pref("lsl") >= get_module_setting("level") && get_module_pref("level") < get_module_setting("max")){
addnav(array("%s `^Ages!", $classarray[$class]),"runmodule.php?module=agency&op=train&type=level");
output("");
}
if (get_module_pref("level") == $max[$class]) {
output("");
addnav("`%Advance `#Age `RG`Lr`Ro`Lu`Rp","runmodule.php?module=agency&op=train&type=upgrade");
}

The 2 navs there don't appear anywhere.
Logged

Visit me at my new home!
Eclypse ~ Xpert
Militia
**
Offline Offline

Posts: 75


View Profile
« Reply #13 on: August 18, 2012, 06:40:28 PM »

Quote
Quote
Your other problems are difficult to find...

I have a question for you:

Have you already tried making it so you can change the name of the children, and it just didn't work?

Yes, in the original code, there are names that randomly get assigned to the squire, I've removed that as i wanted only "baby boy" and "baby girl". The name change part simply doesn't appear, It doesn't look like the "if" is triggering.

Can you please direct me where this is happening? Tongue
Quote
It should be appearing in  case_hall, but only after the child is adopted.

The code appears to be there, but it's not working.

lines  16-24
Code:
if (get_module_pref("lsl") >= get_module_setting("level") && get_module_pref("level") < get_module_setting("max")){
addnav(array("%s `^Ages!", $classarray[$class]),"runmodule.php?module=agency&op=train&type=level");
output("");
}
if (get_module_pref("level") == $max[$class]) {
output("");
addnav("`%Advance `#Age `RG`Lr`Ro`Lu`Rp","runmodule.php?module=agency&op=train&type=upgrade");
}

The 2 navs there don't appear anywhere.

I will take a look at that as soon as I am free.

1 thing I noticed, in all of your Suites (and any other commentary section you have implemented), you have the following code:

Code:
require_once("lib/commentary.php");
addcommentary();
output("`n`n");
commentdisplay("birthingSuitePrivate","Say",25,"says");

Which displays this:

Code:
alindaroom
25

Above the commentary line where players type.

It SHOULD be:

Code:
addcommentary();
viewcommentary ("nameofroomhere","Speak", 35, "says");
« Last Edit: August 18, 2012, 06:42:12 PM by Xpert » Logged

Senior Administrator, Coder, and Head of Staff

tynastera.com
isleofdarkness.com
RaynDarren
Mod God
*****
Offline Offline

Posts: 638


View Profile WWW
« Reply #14 on: August 18, 2012, 06:42:32 PM »

Right, I did that cuz I'm gonna add it to Afkamm's reworkd "Who's Here" module Smiley. He's looking at it now, I managed to break it too Sad.
Logged

Visit me at my new home!
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


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

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
24 Guests, 2 Users
Aeo , Afkamm
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search