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

  Show Posts
Pages: [1] 2 3 ... 5
1  Coding Support / Coding Support Desk / Re: Racial Hitpoints on: August 04, 2019, 06:12:08 PM
TGTarheel, I've been trying to work out what was generating the base HP, so that I can find what I'd need to tie into, and determine whether or not I'd also need to add extra fields to the database to pull it off. Since I haven't done this type of coding in a few years, and I'm a bit rusty, I also figured that if it seemed easier to just update the base HP than to create a new module system, I could simply update that and drop the other races for the time being.

That said, thank you Nightborn; what you've provided will definitely help me sort this out alot faster. Smiley
2  Coding Support / Coding Support Desk / Re: Racial Hitpoints on: July 24, 2019, 10:20:53 PM
TGTarheel, I'm with you on this one. The method you described is also exactly what I'm hoping to accomplish. However, I can't seem to pin down where the base HP is being generated, and the base is far too low for what I'm working on. I've also dug through the whole system several times using content searching. lol

The only thing I can think of, is that maybe the lib/all_tables.php is the right place to make the change, but that I have to get the game to update it once it's been uploaded, because it's been hardcoded into the database during installation, somehow. (Also, FYI, granting a new day doesn't seem to fix it for me; neither does creating a new character.)
3  Coding Support / Coding Support Desk / Re: Racial Hitpoints on: July 24, 2019, 02:56:28 AM
Sorry for the lag in responding. Let's try this another way...

Where are the base hitpoints actually set for new characters? I've dug through everything, and can't seem to find anything that would seem to be it, aside from lib/all_tables.php, and it's driving me nuts. lol
4  Coding Support / Coding Support Desk / Racial Hitpoints on: June 13, 2019, 11:44:40 PM
Hello all,

I've been dusting off an old project (v.1.1.2 based), and wondered if there was a way to make it so that each race can have its own base hitpoints. After all, it seems odd that a human, a dwarf, and a troll should have the same maxhitpoints, even though they're drastically different creatures. It appears that the maxhitpoints and maxhitpointsperlevel are defined in lib/all_tables.php, but I'm not sure how to go about making work on a race-by-race basis.

So far, I've considered trying to create a form of permanent buff/debuff in each race's module, so the core would simply be the standard Human hitpoints, but figured someone might already know of a better way to accomplish this. Thank you in advance. Smiley
5  Coding Support / Coding Support Desk / Re: New Template Issues on: February 24, 2017, 10:24:44 AM
Ahhh... Yes, I found the {content} tag in all of the templates for 1.1.1. It shows up at the end of the page, though, between {petitioncount} and {username}, which doesn't make much sense. That's why I tried putting it where I wanted it to go.

yarbrough:
{title}
{text}
{text}
{petitioncount}
{content}
{username}:    {password}:

classic:
{title} {text}
{text}
{petitioncount}
{content}
{username}:    {password}:
6  Coding Support / Coding Support Desk / Re: New Template Issues on: February 24, 2017, 02:45:38 AM
I included the {content} tag in the <div class="content"> section, however, it still shows up at the end of everything, after the footer. That's why I was thinking there was something else I had missed.

As for the whole HTML5 thing, though, thank you for pointing that out. (Seriously.) I had no idea it had been recommended since 2014, until I looked it up, just now. I stopped being a developer in 2009, and I was using this project to dust off my coding skills, before trying to work as a developer, again. So, it looks like I have to learn a language, now. lol
7  Coding Support / Coding Support Desk / Re: New Template Issues on: February 24, 2017, 12:03:33 AM
Just to add to the explanation, here, in the example shown, I know that the following areas have something to do with it.

The village description comes from a races module that appears to use this hook:
Code:
case "villagetext":

Following that to the village.php, we find:
Code:
$texts = modulehook("villagetext",$origtexts);
//and now a special hook for the village
$texts = modulehook("villagetext-{$session['user']['location']}",$texts);
$schemas = $texts['schemas'];

tlschema($schemas['title']);
page_header($texts['title']);
tlschema();

addcommentary();
$skipvillagedesc = handle_event("village");
checkday();

It also shows the following, at the end:
Code:
if (!$skipvillagedesc) {
modulehook("collapse{", array("name"=>"villagedesc-".$session['user']['location']));
tlschema($schemas['text']);
output($texts['text']);
tlschema();
modulehook("}collapse");
modulehook("collapse{", array("name"=>"villageclock-".$session['user']['location']));
tlschema($schemas['clock']);
output($texts['clock'],getgametime());
tlschema();
modulehook("}collapse");
modulehook("village-desc",$texts);
//support for a special village-only hook
modulehook("village-desc-{$session['user']['location']}",$texts);
if ($texts['newestplayer'] > "" && $texts['newest']) {
modulehook("collapse{", array("name"=>"villagenewest-".$session['user']['location']));
tlschema($schemas['newest']);
output($texts['newest'], $texts['newestplayer']);
tlschema();
$id = $texts['newestid'];
if ($session['user']['superuser'] & SU_EDIT_USERS && $id) {
$edit = translate_inline("Edit");
rawoutput(" [<a href='user.php?op=edit&userid=$id'>$edit</a>]");
addnav("","user.php?op=edit&userid=$id");
}
output_notl("`n");
modulehook("}collapse");
}
}
modulehook("village",$texts);
//special hook for all villages... saves queries...
modulehook("village-{$session['user']['location']}",$texts);

if ($skipvillagedesc) output("`n");

$args = modulehook("blockcommentarea", array("section"=>$texts['section']));
if (!isset($args['block']) || $args['block'] != 'yes') {
tlschema($schemas['talk']);
output($texts['talk']);
tlschema();
commentdisplay("",$texts['section'],"Speak",25,$texts['sayline'], $schemas['sayline']);
}

module_display_events("village", "village.php");
page_footer();
?>

I also know that "village" and "villagehook" show up in cities.php, but they seem to only be there in order to add new instances to the navigation options. Commentary.php also seems to be useless, aside from passing along the name of the village. And, home.php seems to be of no use, aside from using "villagename" in conjunction with telling what time it is.
8  Coding Support / Coding Support Desk / New Template Issues on: February 23, 2017, 04:53:38 PM
Hello all,

I haven't posted here in years, but I've recently started working with version 1.1.1 of the system again. As such, I've been building a new, more modern template, using XHTML, and everything works great except for one nagging issue. Namely, all of the content areas, like the login section, village descriptions, and comment section, are being passed onto the page without getting placed into the content section. I've gone over all of the hooks that should be in the template, and none of them seem to be pulling from where the content actually is (for instance, there is no village* or race* hook pulling the descriptions). I've gone through everything I can think of, like pageparts, commentary, source, etc., etc., but can't seem to figure out how the info is being served. I've also tried moving the commented sections, like the login area, into the main page code, but it breaks the template, if you do.

So, can anyone tell me how to contain the text (descriptions/commentary) properly, and get it to where it needs to go? Also, can anyone think of a way to make it work so that I don't need to have two sets of header info? I've tried to get it to work off of the usual single header, but the system seems to require two full sets.

Thank you in advance.

Here's a screenshot, showing what the problem looks like:


And, here's the template I've created, so far: (Edited to match current version, with no change in the issues faced.)
Code:
<!--!popuphead-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<!--
Copyright: Me
License: All Rights Reserved>
-->
<!-- Meta Data -->
<title>{title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="language" content="en" />
<link rel="stylesheet" type="text/css" href="templates/v2.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
<link rel="icon" type="image/png" href="images/logindragon.gif" />
{headscript}{script}
</head>
<body dir="ltr" lang="en-US" ontouchstart="" xml:lang="en-US">
<div class="sidenav center small hide-small card-2">
<ul style="list-style-type: none;">
<li><span class='pagetitle'>{title}</span></li>
<li>{copyright} Designed by Me</li>
</ul>
</body>
</html>
<!--!header-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>{title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="language" content="en" />
<link rel="stylesheet" type="text/css" href="templates/v2.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
<link rel="icon" type="image/png" href="images/logindragon.gif" />
{headscript}{script}
</head>
<body dir="ltr" lang="en-US" ontouchstart="" xml:lang="en-US">

<div class="sidenav center card-2">
<ul style="list-style-type: none;margin-left:-40px;">
<li><strong>{title}</strong></li>
<li>{nav}</li>
<li><div class="amber card-2">{stats}</div></li>
<li>{navad}</li>
<li>{motd}</li>
<li>{mail}</li>
<li>{petition}</li>
<li>{paypal}</li>
<li>{verticalad}</li>
<li><div class="amber card-2" style="margin-left:-40px;">{petitiondisplay}</div></li>
</ul>
</div>

<div class="padding-large">

  <!-- Header -->
<div class="container padding-24 center">
<h1 class="jumbo">{headerad}</h1>
<h2>{title}</h2>
<p>THIS IS WHERE THE HEADER ENDS</p>
</div>

  <!-- Content -->
<div class="content justify padding-64">
{content}
{bodyad}
{source}
{version}
<p>THIS IS WHERE THE CONTENT ENDS</p>
</div>

<div class="footer justify">
<ul style="list-style-type: none;">
<li>{copyright} Designed by Me ({pagegen})</li>
<li>THIS IS WHERE THE FOOTER ENDS</li>
</ul>
</div>
</div>
</body>
</html>

<!--!statstart--><div class="center card-2"><ul style="list-style-type:none;margin-left:-40px;">
<!--!stathead--><li><strong>{title}</strong></li>
<!--!statrow--><li><strong>{title}</strong> {value}</li>
<!--!statbuff--><li><strong>{title}</strong> {value}</li>
<!--!statend--></ul></div>
<!--!navhead--><div class="amber center card-2"><strong>{title}</strong></div>
<!--!navhelp--><strong>{text}</strong>
<!--!navitem--><a href="{link}"{accesskey}class="nav" {popup}>{text}</a>
<!--!petitioncount--><ul style="list-style-type: none;"><li>{petitioncount}</li></ul>
<!--!login-->
<div class="content justify padding-64">
<ul style="list-style-type: none;">
<li><img src="images/logindragon.gif" class="noborder"></li>
<li>{username}:<br /><input name='name' id="name" accesskey="u" size="10"></li>
<li>{password}:<br /><input name="password" id="password" accesskey="p" type="password" size="10"></li>
<li><input type="submit" value="{button}" class="button"></li>
</ul>
</div>
<!--!loginfull-->
<div class="content justify padding-64">
<ul style="list-style-type: none;">
<li><img src="images/logindragon.gif" class="noborder"></li>
<li>Server Full!</li>
</ul>
</div>


9  Village Square / General Discussion Area / Re: Help With Tables on: September 13, 2009, 12:31:14 AM
Thank you for your reply. I will play around with it, and see if I can make it work. For right now though, I managed to figure out two "down and dirty" ways to do what I needed; one using php, and the other using normal html in slightly more creative ways.

In case anyone else needs a quick fix for their projects in the future, here's my code:

Code:
<div style="border:1px solid; width:440px; height:300px; overflow:scroll;">
<table class="sortable">
<thead>
  <tr>
  <th>Name</th>
  <th>Location</th>
  <th class="sorttable_nosort">Phone</th>
  <th class="sorttable_nosort">Email &amp; Website</th>
  <th class="sorttable_nosort">Services</th>
  <th class="sorttable_nosort">Biography</th>
  </tr>
</thead>
  <tr><td>Bonkers, Burt</td><td>USA, Colorado</td><td>xxx-xxx-xxxx</td><td>bbonkers@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td><td><?php $text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac elit in velit adipiscing ornare. Fusce aliquam blandit ipsum, vel consequat ipsum fermentum eget. Duis posuere, augue sed aliquam interdum, urna massa dignissim odio, a fringilla lacus erat vel libero. Ut in libero vitae justo tristique vehicula quis sed sapien. Ut rhoncus mi et libero congue vulputate. Sed velit elit, mattis ac ullamcorper ac, porta et dui. Suspendisse potenti. Suspendisse potenti. Duis lobortis, felis a sodales sodales, sem erat faucibus ipsum, at tristique enim arcu nec mi. Donec ut tortor orci. Nulla tristique dui in mi aliquet ac ultricies magna rhoncus. Phasellus volutpat, dui bibendum blandit imperdiet, massa nisl elementum felis, id fringilla turpis diam vel dui. In auctor posuere lacus vitae pellentesque. Quisque sapien nulla, porta id lobortis nec, porttitor non ipsum."$newtext wordwrap($text65"<br />\n"1); echo $newtext?></td></tr>
  <tr height="100px"><td>Cassidy, Karen</td><td>USA, Michigan</td><td>xxx-xxx-xxxx</td><td>kcassidy@yahoo.com</td><td><textarea rows="3" style="width: 100px">Weddings, Civil Unions, Baptisms</textarea></td><td><textarea rows="3" style="width: 370px">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac elit in velit adipiscing ornare. Fusce aliquam blandit ipsum, vel consequat ipsum fermentum eget. Duis posuere, augue sed aliquam interdum, urna massa dignissim odio, a fringilla lacus erat vel libero. Ut in libero vitae justo tristique vehicula quis sed sapien. Ut rhoncus mi et libero congue vulputate. Sed velit elit, mattis ac ullamcorper ac, porta et dui. Suspendisse potenti. Suspendisse potenti. Duis lobortis, felis a sodales sodales, sem erat faucibus ipsum, at tristique enim arcu nec mi. Donec ut tortor orci. Nulla tristique dui in mi aliquet ac ultricies magna rhoncus. Phasellus volutpat, dui bibendum blandit imperdiet, massa nisl elementum felis, id fringilla turpis diam vel dui. In auctor posuere lacus vitae pellentesque. Quisque sapien nulla, porta id lobortis nec, porttitor non ipsum.</textarea></td></tr>
</table></div>
</div>

Keep the ideas coming though, on how to either keep the rows joined, or mimic a row with CSS, etc., as visually, that's what I would prefer.  Wink
10  Village Square / General Discussion Area / Re: Help With Tables on: September 11, 2009, 11:32:46 PM
I actually did contact the author about what I was trying to do, earlier. He said, "I'm afraid that having sorttable treat two rows as being one row for the purposes of sorting requires changes to sorttable. If you're
interested in that sort of custom enhancement, let me know, and we can talk about rates and so on..." I was just hoping that I could find another way, that wouldn't actually require changes to the javascript itself, as I could swear I remembered doing something similar in CSS years ago.... possibly dealing with floats...? Huh

To put it simply, working with tables again has been interesting enough, but going back to picking through js is downright scary to think about for me; it might as well be Visual Basic at this point, since I haven't really used any of them much in the past 5-6 years. One of the oddest parts of being an ex web developer, is discovering how much you've actually forgotten with time. The easiest way to explain it, would probably be to imagine what life would be like for Bruce Wayne if he ever decided to become Amish. Wink
11  Village Square / General Discussion Area / Re: Help With Tables on: September 11, 2009, 09:41:04 PM
Hello...

Basically, all that really needs to be paid attention to is this:

Code:
<tr><td>Adams, Aaron</td><td>USA, Utah</td><td>xxx-xxx-xxxx</td><td>aadams@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td><tr>
    </tr><td colspan=5>Bio information goes here.</td></tr>

What I'm trying to do, is to make sure that each member listing has two rows that stay together when I use the sort function. The problem, is that because I need to use colspan for the bio section, I have to start a new row, so I need to get the bio row to keep it's relative position to the name/location/etc. row.

In the end, it should look something like this when sorted by name... :

Jane Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services
Bio: aaa
John Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services
Bio: bbb


Instead of this, which is what I currently get when I sort by name... :

Bio: aaa
Bio: bbb
Jane Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services
John Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services


I have been racking my brains trying to figure out a way to maybe even make it all coded as one row, and then make the bio section simply "spill over" to where the next row would show up, but I haven't been able to come up with anything that works.

Does that make a little more sense?  Huh
12  Village Square / General Discussion Area / Help With Tables on: September 11, 2009, 01:51:54 PM
Hello all...

I have a question on creating tables that I figured somebody in here might be able to help me solve. I am trying to help put a site together for a seminary that includes a sortable table for member information. I am currently using sorttable.js (which can be found at http://www.kryogenix.org/code/browser/sorttable/ ) to do this, which does exactly what it's supposed to.

The problem, however, is this: I need the "Bio information" row to follow the main info row when it gets sorted. While I know there has to be some quick, easy way to make the rows related, I'm at a complete loss as to how to make it happen.

Background: The site is designed in XHTML 1.0 Strict, with CSS 2.1, and uses PHP includes. I also don't want to have to resort to creating databases to do this, as the people running the site would have no idea how to maintain them if I did. And, as I am doing the work for free, I can't offer much in the way of payment for help, despite being more than willing to make a donation for someone's time.

Below, you will find the table as I have it now:

Code:
<table class="sortable">
<thead>
  <tr>
  <th>Name</th>
  <th>Location</th>
  <th class="sorttable_nosort" >Phone</th>
  <th class="sorttable_nosort" >Email &amp; Website</th>
  <th class="sorttable_nosort" >Services</th>
  </tr>
</thead>
  <tr><td>Adams, Aaron</td><td>USA, Utah</td><td>xxx-xxx-xxxx</td><td>aadams@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td><tr>
    </tr><td colspan=5>Bio information goes here.</td></tr>
  <tr><td>Bonkers, Burt</td><td>USA, Colorado</td><td>xxx-xxx-xxxx</td><td>bbonkers@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td></tr>
  <tr><td>Cassidy, Karen</td><td>USA, Michigan</td><td>xxx-xxx-xxxx</td><td>kcassidy@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td></tr>
  <tr><td>Hynes, Duncan</td><td>UK, England, London</td><td>xxx-xxx-xxxx</td><td>dhynes@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td></tr>
</table>

Thank you all in advance for any help you can provide, as this project has been killing me... lol
13  Village Square / General Discussion Area / Re: AI NPC's on: January 21, 2009, 09:58:01 PM
Sounds like a plan. Now that I'm finally back on DSL, I'll be doing alot more on my site as well... So, with all due luck, I can help shortly.  Grin
14  Game Administration, Installation and Configuration / Installation and Configuration Assistance / Re: Creature not saved! on: December 29, 2008, 11:10:07 AM
That would explain it....lol
15  Coding Support / Coding Support Desk / Re: Village News on: December 28, 2008, 06:29:20 PM
http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=963

Is that what you're looking for? Only it's written by Lonny and not Nightborn..

That one was supposed to not work correctly with 1.0+, and Nightborn supposedly made an updated version.
Pages: [1] 2 3 ... 5

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