DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • July 26, 2017, 03:51:21 AM
Home Forums News Downloads Login Register Advanced Search
* *
DragonPrime Menu
Login
 
 
Resource Pages
Search

  Show Posts
Pages: [1] 2 3 ... 113
1  Modules, Themes and other customizations for your game / Completed Forest, Village and Travel Events for Version 1.x.x / Re: Abigail The Street Hawker Is Narrow-Minded - I Fixed This... on: July 17, 2017, 09:20:45 AM
Quote
Yes, but how to deal with all those modules that assume a binary gender system?

You'd just have to edit every single one of them. One you figure out the correct code it's just a case of copy and paste. Smiley

To do what you're wanting, it may be easier to edit the core code to allow for more than 2 sexes. It's your game, hack away. Cheesy

For example on the registration form it asks you to pick a sex and after each choice you could have the pronouns in brackets.

You might have to draw the line somewhere, after all this is a fantasy game where you're supposed to become someone other than yourself. Smiley
2  Modules, Themes and other customizations for your game / Completed Forest, Village and Travel Events for Version 1.x.x / Re: Abigail The Street Hawker Is Narrow-Minded - I Fixed This... on: July 16, 2017, 03:54:21 PM
The genders can be easily dealt with. A module to add a dropdown menu of all the different types to the registration form. This would be displayed on the player's bio page for role playing purposes. Smiley
3  Modules, Themes and other customizations for your game / Completed Forest, Village and Travel Events for Version 1.x.x / Re: File Discussion - the patrol on: July 16, 2017, 03:40:53 PM
Yes, but it shouldn't matter if it only appears in one city or them all, the new name needs to be saved when it's changed. Smiley
4  Modules, Themes and other customizations for your game / Completed Forest, Village and Travel Events for Version 1.x.x / Re: File Discussion - the patrol on: July 16, 2017, 12:30:35 PM
Unless I'm missing something, I don't think it's required and that IF statement can be removed.

If the villagename has been changed then the old name needs to be updated. Smiley
5  Modules, Themes and other customizations for your game / Completed Forest, Village and Travel Events for Version 1.x.x / Re: File Discussion - the patrol on: July 15, 2017, 12:03:44 PM
Hi,

Code:
<?php
case 
"changesetting":
if ($allowall == 1){
        
if ($args['setting'] == "villagename") {
            
if ($args['old'] == get_module_setting("wapatloc")) {
                
set_module_setting("wapatloc"$args['new']);
            
}
        
}
    
}
    
break;

Where does $allowall come from?
6  Modules, Themes and other customizations for your game / Completed Forest, Village and Travel Events for Version 1.x.x / Re: Abigail The Street Hawker Is Narrow-Minded - I Fixed This... on: July 15, 2017, 11:55:18 AM
Yeah there's been many a discussion over the years about how there's only 2 sexes in the game and a gender field should be added etc. Hopefully the next version that's being worked on will have these. Smiley
7  Coding Support / Coding Support Desk / Re: Anyone want to help with my Luck system? on: July 14, 2017, 08:23:39 AM
Nice module, a few pointers for you. Smiley

1. Your module is called luck, so all functions within the file must start with this. get_luck() or set_luck should be reversed. Also maybe change luck() to luck_add().

2. You need to hook into where mounts are bought and sold and add/remove luck there as needed.

Have you thought about luck just being used to stop a player from dying? Mounts/pets/events give luck up to 100%, but instead of dying, part of your luck is used up to save you, decided in the settings.

1. Mount gives you +50.
2. Pet gives you +15.
3. You find gold in the village, that was lucky +5
4. Wow, you find a gem in the forest +5.
5. A forest creature has a luck of 10, but only if it defeats you does it's luck get removed from the players to calculate if the player's lucky enough to not die.

Code:
<?php
$players_luck 
75;
$creatures_luck 10;

if( (
$players_luck-$creatures_luck) > rand(1100) )
{
    
// Player lives!!!!
    // Some luck was used up to save you, get value from settings.
}

6. Luck gets reset on a newday.

Regarding adding an event hook, these should be done in the install function and look something like,
Code:
<?php
module_addeventhook
("village","\$bought=get_module_pref(\"bought\", \"abigail\");return (\$bought?0:50);");

Smiley
8  Modules, Themes and other customizations for your game / Completed Forest, Village and Travel Events for Version 1.x.x / Re: New Module - Miyagi's Topiary on: July 11, 2017, 08:44:56 AM
This is the discussion thread to discuss the module, put a link at the bottom of the first post linking to the submission thread. The first post in the submission thread should link back here and also have the file attached. Smiley
9  Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Custom Colors : File Submission/Discussion on: July 07, 2017, 07:27:16 AM
Yeah sorry Aeolus. </offtopic>
10  Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Custom Colors : File Submission/Discussion on: July 06, 2017, 08:13:05 PM
0.97/0.98 were very much hands on with no plug and play modules. You wanted nav links? You had to add them to the code to link to the other file. So people who run those versions will have made any changes to keep them running. Smiley
11  Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Wrongful Wraiths v1.2.6 (Modified) on: July 06, 2017, 07:58:22 PM
http://php.net/manual/en/language.types.string.php

Have a quick gander at this page to show/explain the differences between single and double quotes. Smiley
12  Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Custom Colors : File Submission/Discussion on: July 06, 2017, 05:58:47 PM
I'm actually surprised that v1.1.0 runs, there have been so many depreciated php functions that if you tried to install the unmodded v1.1.2, it just gives errors. Smiley

In the grotto, if you have the raw sql/php options, go to the php box and enter,

Code:
<?php
phpinfo
();

PHPMyadmin is just a free web based interface to allow for easy access to the sql database.

Quote
I am a pretty poor intermediate level coder

We all started somewhere, and the more you look through the LotGD files/modules, the more you'll see the struction and common function calls and understand them. All the modules basically follow the same layout.

I haven't coded in years and even when I did I'd only class myself as acceptable. I've no idea how classes work. Cheesy
13  Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Wrongful Wraiths v1.2.6 (Modified) on: July 06, 2017, 05:47:00 PM
Yes, that's perfectly fine. The curly brackets as I like to call them hold the session variable name together as it has keys, without them you get an error.

if you want to, you can change it to,
Code:
<?php
$location 
$session['user']['location'];
page_header("Wraith's $location House of Spanking");


Smiley
14  Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Item system on: July 06, 2017, 05:35:44 PM
The basic item shop by default only buys/sells items from the Loot category.

Try these changes at your own peril!
Code:
<?php
//
//-----[ FIND (line 133) ]-----
//
shopnav("runmodule.php?module=basicitemshop&op=sell""Loot"true$session['user']['acctid'], true);

//
//-----[ REPLACE WITH ]-----
//
// Note that the shopnav() function checks for an array so this should work.
//
shopnav("runmodule.php?module=basicitemshop&op=sell", array("Loot","cat2_name","cat3_name","etc"), true$session['user']['acctid'], true);



//
//-----[ FIND (line 144) ]-----
//
$inventory get_inventory($session['user']['acctid'], 0"Loot");
while (
$item db_fetch_assoc($inventory)) {
if ($item['sellable'] == false) continue;
$quantity += $item['quantity'];
$goldvalue += $item['sellvaluegold'] * $item['quantity'];
$gemvalue += $item['sellvaluegems'] * $item['quantity'];
}

//
//-----[ REPLACE WITH ]-----
//
// Note that the get_inventory() function wont accept an array. :(
//
$categories = array('Loot','Cat2_name','Cat3_name','etc');
foreach( 
$categories as $catname )
{
$inventory get_inventory($session['user']['acctid'], 0$catname);
while( $item db_fetch_assoc($inventory) )
{
if( $item['sellable'] == false ) continue;
$quantity += $item['quantity'];
$goldvalue += $item['sellvaluegold'] * $item['quantity'];
$gemvalue += $item['sellvaluegems'] * $item['quantity'];
}
}

//
//-----[ FIND (line 233) ]-----
//
$sql "SELECT itemid FROM ".db_prefix('item')." WHERE class = 'Loot' AND sellable = 1";

//
//-----[ REPLACE WITH ]-----
//
$categories = array('Loot','Cat2_name','Cat3_name','etc');
$classes "IN (".join(","$categories).")";
$sql "SELECT itemid FROM ".db_prefix('item')." WHERE class $classes AND sellable = 1";


If that works, you could think about creating a setting to put the categories in, that way they wouldn't be hard coded to the file. Smiley
15  Modules, Themes and other customizations for your game / Completed Modules for version 1.x.x / Re: Custom Colors : File Submission/Discussion on: July 06, 2017, 04:50:29 PM
Thing is, there really shouldn't be any major difference between 1.1.0 and 1.1.1 and 1.1.2 Changing the last digit should only mean bug fixes and possibly code changes due to mysql/php function changes.

There are detailed change logs somewhere that show exactly what's changed between versions. Can't seem to find them though.

What versions of php/mysql is your server running TGTarheel?
Pages: [1] 2 3 ... 113

*
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
19 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search