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

Pages: [1]   Go Down
  Print  
Author Topic: Story Module (PnP fans click)  (Read 2098 times)
0 Members and 1 Guest are viewing this topic.
GenmaC
Moderator
Codemeister
*****
Offline Offline

Posts: 430

Coder


View Profile WWW
« on: June 19, 2008, 03:42:37 PM »

Story Module is for roleplaying/game mastering purposes and lets your users chill out in their own little roleplaying modules.  A user can create a story, public or private, and then assign moderation and game master privileges within the story as he sees fit.

Features:
* No LoGD permissions required for users
* Public/Private Story system with passwords
* Game master tools including GM say and dice rolling
* Notes for both players & GMs in each story
* Highly configurable
* Light village footprint
* Easy to install, just the one file

You can configure colors, the name of the link, and the heading under which it appears.  You can also specify an account to be used as the game master/dice roller (I named mine "Story Master"), and specify the number of lines displayed.

Future Features:
* Story export in various formats

« Last Edit: June 24, 2008, 10:51:27 AM by GenmaC » Logged



Castle Siege - a work in progress
seekey
Codemeister
****
Offline Offline

Posts: 475


Demon to some but Angel to others


View Profile WWW
« Reply #1 on: June 19, 2008, 04:18:08 PM »

Hey wow. That sounds great, GenmaC.

I am thinking about such a module for several month's but I had to little time. If this works like I hope (not tested yet) you have done me a big favor *all thumbs up*
Logged
Diego6666
Guest
« Reply #2 on: June 20, 2008, 12:12:06 PM »

I'm not sure what version you coded this for sir,

but I am running version 1.1.1
the module uploads fine enough,
but when I click install in the module manager, it just refreshes the page.
it doesn't send my anywhere and the module is still in the uninstalled page of the manager.

I tried it multiple times, with the same out come.
Logged
GenmaC
Moderator
Codemeister
*****
Offline Offline

Posts: 430

Coder


View Profile WWW
« Reply #3 on: June 20, 2008, 01:26:14 PM »

I have tried installing it on 1.1.0 Dragonprime Edition and 1.1.1.2 Dragonprime Edition +nb with no problems - there is only one hook, so the install should be very simple.

However I did not use db_prefixes, perhaps that caused a problem?  I have added db_prefix to all the database calls and uploaded a new version to the original post.
Logged



Castle Siege - a work in progress
seekey
Codemeister
****
Offline Offline

Posts: 475


Demon to some but Angel to others


View Profile WWW
« Reply #4 on: June 20, 2008, 01:36:06 PM »

There is a ?> missing at the end of the code  Grin

But that is not the problem. I'll try to find out whats wrong with the script and it seems that only 1.1.1. DP has a problem with the install of this module.
« Last Edit: June 20, 2008, 01:37:52 PM by seekey » Logged
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1589


Yay for elephants!


View Profile WWW
« Reply #5 on: June 20, 2008, 01:38:19 PM »

There is a ?> missing at the end of the code  Grin

Not needed. I prefer not to have a closing tag so no whitespace at the end of the file is outputted.
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka
seekey
Codemeister
****
Offline Offline

Posts: 475


Demon to some but Angel to others


View Profile WWW
« Reply #6 on: June 20, 2008, 01:53:48 PM »

Okaey, thanks kickme.

But the installation functions seems to be the root of the problem. If you change

Code:
function stories_getmoduleinfo(){

  $settings = array(
  "Story Settings,title",
  "story_link"=>"Name of the link to the story area,|Pit of Despair",
  "c1"=>"Primary text color code,|`2",
  "c2"=>"Emphasis text color code,|`^",
  "lines"=>"Lines of commentary per story page,int|25",
  "roller"=>"Account ID of the dice roller/game master,int|1",
  "heading"=>"Under what heading does the story link appear,|tavernnav"
  );
 
  $prefs = array("Story Prefs,title",
  "viewing"=>"what was the user viewing last,|public"
  );

  $prefs_story = array(
  "creator"=>"creator acctid,|",
  "creation_time"=>"time story created,int|0",
  "name"=>"name of the story,|My Real Life Sucks",
  "public"=>"is this story open to the public,bool|0",
  "password"=>"if game is not public what is the password,|",
  "open"=>"is game currently open,bool|0",
  "tagline"=>"tagline for story,|There are others here:",
  "sayline"=>"sayline for story,|says"
  );

  $info = array(
  "name"=>"Story Module",
  "version"=>"1.0",
  "author"=>"`&GenmaC",
  "category"=>"Enorme Prdida de Tiempo",
  "prefs"=>$prefs,
  "settings"=>$settings,
  "prefs-story"=>$prefs_story
  );
 
  return $info;

}

to

Code:
function stories_getmoduleinfo(){

  $info = array(
  "name"=>"Story Module",
  "version"=>"1.0",
  "author"=>"`&GenmaC",
  "category"=>"Village",
  //"prefs"=>$prefs,
  //"settings"=>$settings,
  //"prefs-story"=>$prefs_story

  "settings" => array(
  "Story Settings,title",
  "story_link"=>"Name of the link to the story area,|Pit of Despair",
  "c1"=>"Primary text color code,|`2",
  "c2"=>"Emphasis text color code,|`^",
  "lines"=>"Lines of commentary per story page,int|25",
  "roller"=>"Account ID of the dice roller/game master,int|1",
  "heading"=>"Under what heading does the story link appear,|tavernnav"
  ),
 
  "prefs" => array("Story Prefs,title",
  "viewing"=>"what was the user viewing last,|public"
  ),

  "prefs_story" => array(
  "creator"=>"creator acctid,|",
  "creation_time"=>"time story created,int|0",
  "name"=>"name of the story,|My Real Life Sucks",
  "public"=>"is this story open to the public,bool|0",
  "password"=>"if game is not public what is the password,|",
  "open"=>"is game currently open,bool|0",
  "tagline"=>"tagline for story,|There are others here:",
  "sayline"=>"sayline for story,|says"
  ),

  );
  return $info;
}

it works to get installed. But I have not tested it inside the game.
Logged
GenmaC
Moderator
Codemeister
*****
Offline Offline

Posts: 430

Coder


View Profile WWW
« Reply #7 on: June 20, 2008, 03:04:32 PM »

I have changed the getmoduleinfo to what seekey posted and re-uploaded it - it doesn't look like there is much difference, except that you used inline arrays and no spanish so I'm not sure what is causing the problem

I have tested this on the two versions mentioned previously in-game, and it appears to work fine on both - its not doing anything version specific so it should work on pretty much anything.

edit: and yes, the ?> is missing on purpose, its just easier that way - never have to worry about a bogus syntax error or headers getting sent because of a space after the ending tag
« Last Edit: June 20, 2008, 03:08:51 PM by GenmaC » Logged



Castle Siege - a work in progress
GenmaC
Moderator
Codemeister
*****
Offline Offline

Posts: 430

Coder


View Profile WWW
« Reply #8 on: June 24, 2008, 10:52:49 AM »

Updated with new download location and a small bug fix (forgot a line before one of the queries)
Logged



Castle Siege - a work in progress
Pages: [1]   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
22 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search