Graal Forums  

Go Back   Graal Forums > PlayerWorlds > PlayerWorlds Main Forum
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-24-2008, 12:19 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Gears Are Turning...

Guess What?
A new playerworld is coming to light! The elegant and complex age of steam is coming to a server near you...someday soon! A steampunk server is currently in the works, created by Stan himself. The server is planned out, and getting started. Idea's from Aeko, Draenin, and I, have been one by one making there way into the server.

And Just For The Record....
Within the game lies quite a few classes, each of them picking several professions and thus learn techniques from them over time. Maybe you could be a soldier able to sharpen his blade as he prepares potions for the battle? Or, one could be the craftor, building and improving on things with steam. Get your guns, swords, and dancing shoes ready, because you'll need them all when you visit this server!

The server of course is still being developed, and could use all the help it could get...

Of course, I myself have just been doing all scripting with very, very little to no graphical or level help at all. So, I more than likely won't have any graphics to prove what work I HAVE gotten done. All I can do is show you functioning code.

So of course, if you want to help with this project, contact Stan!

Stan could be found on Ardeo, or:
thekidstan (AIM) or
[email protected] (MSN).
Reply With Quote
  #2  
Old 07-24-2008, 12:19 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
So? Where is the functioning code?

Edit: Also what is the deal with the centered text that is irritating as ****
Reply With Quote
  #3  
Old 07-24-2008, 12:39 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
On the server. I'm not going to post all the code on the forums for anyone to grab at. I'd have to give you a temp rc and read rights, which I don't mind at all.

Btw, I like centered text for some reason.
Reply With Quote
  #4  
Old 07-24-2008, 12:45 AM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by TheStan View Post
On the server. I'm not going to post all the code on the forums for anyone to grab at. I'd have to give you a temp rc and read rights, which I don't mind at all.

Btw, I like centered text for some reason.
Then just post short snippets.
Reply With Quote
  #5  
Old 07-24-2008, 01:07 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Don't bother, if you are worried that people are going to steal your grandiose ideas and scripts, chances are they are worthless anyway.
Reply With Quote
  #6  
Old 07-24-2008, 01:21 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Quote:
Originally Posted by DrakilorP2P View Post
Then just post short snippets.
That I will do.

Quote:
Originally Posted by Loriel View Post
Don't bother, if you are worried that people are going to steal your grandiose ideas and scripts, chances are they are worthless anyway.
I wasn't trying to come off as arrogant, but I would rather not have everything I've worked toward stolen as used elsewhere. If you can understand that.
Reply With Quote
  #7  
Old 07-24-2008, 01:24 AM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by TheStan View Post
I wasn't trying to come off as arrogant, but I would rather not have everything I've worked toward stolen as used elsewhere. If you can understand that.
Anyone that think they can successfully make a popular server using that method is probably not a threat.
Also, you're still coming off as arrogant.
Reply With Quote
  #8  
Old 07-24-2008, 01:31 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Classes:

Here, I have two of the main functions of the Classes System. This system is interdependent with the Professions and Techniques Systems (which I haven't gotten around to starting today.)

setClass(object, class) sets the player's class if it hasn't been set already. This is pretty much the function which will be called when a player chooses his class through an interface in-game.

advanceClass(object) advances the player's class to the next possible tier from the prior class.

Also, there are quite a few echos there because I just finished the Class functions NOT TOO long ago, so those were there for debugging pretty much.

PHP Code:
public function setClass(object, class) {
  
temp.cdata null;
  
temp.cbasevars null;
  
temp.cbasevar null;
  
temp.cmods null;
  
temp.cwmods null;
  
temp.finaldata null;
  
  if (!(
object.type in {"player"}) || object.objecttype() != "TMudObject") {
    
error("Mud Object (#s) is not valid!"object.name);
    return;
  }
  if (class == 
null) {
    
error("No class given to set!");
    return;
  }
/*
  if (classIsSet(object)) {
    if (!(getClassTier(class) > object.class[2]) || ((getClassTier(class) - object.class[2]) != 1)) {
      error("The given class (#s) does not have a higher tier than the current class! Or is not the next tier!", class);
      return;
    }
  }*/
  //else {
    //echo("Class has not been set yet.");
  
if (!classIsSet(object)) {
    echo(
"Class is not set.");
    
cdata findNpc("DB_Classes").getClass(class);
    if (
cdata.size() > 0) {
      echo(
"Found class data.");
      
cbasevars = {"classid""classname""tier""description"};
      
//cmods = findNpc("DB_Classes").getClassVar(class, "statmods");
      // May or may not do weapon proficiencies here
      //cwmods = findNpc("DB_Classes").getClassVar(class, "weaponproficiencies");
      
echo("BASE VARS: " cbasevars);
      echo(
"MODS: " cmods);
      echo(
"Weapon Proficiencies: " cwmods);
      for (
cbasevarcbasevars) {
        echo(
"BASE VAR: " cbasevar);
        
finaldata.add(getClassVar(class, cbasevar));
      }
      echo(
"FINAL DATA: " finaldata);
      
object.class = finaldata;
    }
  } 
}
/*
public function unsetClass(object) {
}*/
public function advanceClass(objectnext) {
  
temp.currenttier null;
  
temp.nexttier null;
  
temp.choices null;
  
temp.choice null;
  
temp.cbasevars null;
  
temp.cbasevar null;
  
temp.finaldata null;
  
  if (!(
object.type in {"player"}) || object.objecttype() != "TMudObject") {
    
error("Mud Object (#s) is not valid!"object.name);
    return;
  }
  if (!
classIsSet(object)) {
    
error("Mud Object (#s)'s class has not yet been set!"object.name);
    return;
  }
  
currenttier getClassTier(object.class[0]);
  
nexttier currenttier 1;
  echo(
"CURRENT TIER: " currenttier);
  echo(
"NEXT TIER: " nexttier);
  if (
currenttier != && nexttier != && nexttier currenttier && (nexttier currenttier) == 1) {
    echo(
"Tier checks complete.");
    
choices getClassVar(object.class[0], "nextclasses");
    for (
choicechoices) {
      echo(
"NEXT CHOICE: " choice);
      if (
choice == next) {
        
cbasevars = {"classid""classname""tier""description"};
      
        for (
cbasevarcbasevars) {
          
finaldata.add(getClassVar(choicecbasevar));
        }
        echo(
"FINAL ADVANCE DATA: " finaldata);
        
object.class = finaldata;
        break;
      }
    }
  }

Some Class data storage.

PHP Code:
/*** Classes Database ***
Author: Stan
*** Function List ***
  LEGEND:
    + Public Function
    - Private Function
  
  SERVERSIDE:
    (-) onCreated()
    (+) getClass(cl)
    (+) getClassVar(cl, cvar)
    
  v1.0, 07/23/08, by Stan
  
  ToDo:
  * Map out the rest of the classes, (ugh!)
***/
function onCreated() {
  
/*
    Indices:
      0 Class Id
      1 Class Name
      2 Class Tier
      3 Description
      4 Next Classes
      5 Stat Mods
      6 Syngergy Bonus
      7 Allowed Professions
  */
  
this.class_rebel = {
    {
"classid""rebel"},
    {
"classname""Rebel"},
    {
"tier"1},
    {
"description""A rebel."},
    {
"nextclasses", {
      
"bandit",
      
"begger",
      
"blader"}},
    {
"statmods", {
      {
"health"0},
      {
"stamina"0}}},
    {
"syngergies", {
      {
"test"0}}},
    {
"allowedprofessions", {
      
""}}
  };
  
this.class_apprentice = {
    {
"classid""apprentice"},
    {
"classname""Apprentice"},
    {
"tier"1},
    {
"description""An apprentice."},
    {
"nextclasses", {
      
"crafter",
      
"mechanic"}},
    {
"statmods", {
      {
"health"0},
      {
"stamina"0}}},
    {
"synergies", {
      {
"test"0}}},
    {
"allowedprofessions", {
      
""}}
  };
  
this.class_believer = {
    {
"classid""believer"},
    {
"classname""Believer"},
    {
"tier"1},
    {
"description""A believer."},
    {
"nextclasses", {
      
"gypsy",
      
"nurse"}},
    {
"statmods", {
      {
"health"0},
      {
"stamina"0}}},
    {
"synergies", {
      {
"test"0}}},
    {
"allowedprofessions", {
      
""}}
  };
  
this.class_gypsy = {
    {
"classid""gypsy"},
    {
"classname""Gypsy"},
    {
"tier"1},
    {
"description""A gypsy."},
    {
"nextclasses", {
      
"test"}},
    {
"statmods", {
      {
"health"0},
      {
"stamina"0}}},
    {
"synergies", {
      {
"test"0}}},
    {
"allowedprofessions", {
      
""}}
  };
}
public function 
getClass(cl) {
  return 
this.(@ "class_" cl);
}
public function 
getClassVar(clcvar) {
  
temp.var = null;
  
  for (var: 
this.(@ "class_" cl)) {
    if (var[
0] == cvar) {
      return var[
1];
    }
  }

Here a short little function for item application (using items etc.), it's more so used to interpret two arrays.

The first array, "scripts" is a list of functions to call when the item is applied. The second array, "scriptsparams" is a multi-dimensional array of params with each index of the array a sub-array of params that is to be sent with the function of the matching index in the "scripts" array.

PHP Code:
public function applyItem(id) {
  
temp.item null;
  
temp.null;
  
temp.null;
  
temp.fparams null;
  
  
item findItemById(id);
  if (
item.type() != 2) {
    return;
  }
  if (
item.applyable) {
    if (
item.equippable) {
      
equipItem(item);
    }
    else {
      for (
0item.scripts.size(); i++) {
        
item.scripts[i];
        
fparams item.scriptsparams[i];
        
        if (
this.hasFunction(@ f)) {
          
this.(@ f)(fparams[0], fparams[1], fparams[2], fparams[3], fparams[4], fparams[5], fparams[6], fparams[7]); 
        }
      }
    }
  }

The next is pretty much basically data transfering, saving and loading for the player's mud object which contains most gameplay variables. These two functions are just the meat of the loading and saving of the player's game data. Or so you could say.

PHP Code:
public function loadObject() {
  
temp.file null;
  
temp.var = null;
  
temp.null;
  
temp.data null;
  
temp.item null;
  
// Create object to load ini file to.
  
file = new TStaticVar();
  
file.joinedclasses serverr.t.inifile;
  
file.load(getObjectPath());
  
// Checks if the loaded file has an object key
  
if ({"object""items"in file.keys) {
    
// Go through each var saved in the ini file's
    // object key.
    
for (var: file.object.getdynamicvarnames()) {
      
// Load the var to the object
      
this.(@ var) = file.object.(@ var);
    }
    
// Go through all file item vars
    
for (ifile.items.getdynamicvarnames()) {
      
// Create pointer to saved data
      
data file.items.(@ i);
      
// Create item object then create pointer to it
      
item createItem(i.substring(1), data[0], data[1]);
      
      if (
data[2] == true) { // Item was equipped
        
echo("was equipped.");
      }
    }
    return 
true;
  }
  return 
false;
}
public function 
saveObject() {
  
temp.file null;
  
temp.var = null;
  
temp.null;
  
temp.item null;
  
// Create object to load data to
  // to save to an ini file.
  
file = new TStaticVar();
  
file.joinedclasses serverr.t.inifile;
  
// Clear keys for object and items
  
file.clearkey("object");
  
file.clearkey("items");
  
// Go through all object vars
  
for (var: Mud.objectvars) {
    
// Checks if the var should not be saved
    // if so skips over.
    
if (var in Mud.nosavevars) {
      continue;
    }
    
// Load the var to the object to save
    
file.object.(@ var) = this.(@ var);
  }
  
// Go through all the items
  
for (0this.items.size(); i++) {
    
// Make pointer to item object
    
item this.items[i];
    
// Check for invalid item data
    
if (item.type() != || item.qty =< || item.id == || item.id == null) {
      continue;
    }
    
// Create file vars
    
file.items.(@ "i" item.id) = {item.archetypeitem.qtyitem.equipped};
  }
  
// Save data
  
file.save(getObjectPath(), 0);

Note: I replaced all "percent" signs with "#" signs.

Edit: Also,

Quote:
Originally Posted by DrakilorP2P View Post
Anyone that think they can successfully make a popular server using that method is probably not a threat.
Also, you're still coming off as arrogant.
Not really trying to, I apologize for that.
Reply With Quote
  #9  
Old 07-24-2008, 01:33 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You're not supposed to assume that anyone wants to steal your stuff.

And if someone actually did steal your stuff its not like they would go classic with it anyways.
__________________
Reply With Quote
  #10  
Old 07-24-2008, 01:35 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Stupid character limit...

I would also like to share with you the class tier list...

PHP Code:
(Best viewed Maximized.)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
Melee profressions    Crafting professions    Mage professions                   
---------------------------Teir 1------------------------------/
.    
Rebel                 Apprentice               Believer   

--------------------------Teir 2-------------------------------/
. (
1)Bandit            (1)Craftor                (1)Gypsy
. (1)Begger            (1)Mechanic               (1)Nurse
. (1)Blader                

--------------------------Teir 3-------------------------------/
. (
1&2)Thief         (1&2)Blacksmith           (1&2)Magician
. (2)Street Performer  (1)Surveyor               (1)Illusionist
. (3)Soldier           (2)Steam Mechanic         (2)Doctor

--------------------------Tier 4-------------------------------/

. (
1)Criminal          (1)Weapon Designer     (1&2)Jester 
. (1&2)Dancer          (1)Armor Designer        (1)Summoner
. (2)Noble             (2)Steam Designer        (3)Court Healer
. (3)Hero              (3)Machinist              
 
--------------------------Tier 5-------------------------------/

.   (
1)Psychopath      (1)AdvWeapon Designer  (1)Court Jester
.   (2)Acrobat         (2)AdvArmor Designer   (2)Caller
. (3&4)Lord            (3)Secret Keeper       (2&3)Prophet
.   (4)Legend          (4)Electrician    
--------------------------Tier 6-------------------------------/
. (
1)Murderor          (1&2)Cyborg              (1)Arch-mage
. (2)Distorionist      (1&2)Android             (2)God Caller
. (3)Ruler             (3)Classified            (3)Angel
. (4)Master            (4)Entity                 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/ 
If you don't understand the number ordering this is how it goes, The number in the parenthesis is the class in the prior row and column that can be advanced to the class the number is next to...if you can understand that. I have trouble explaining things without even confusing myself occasionally.

Quote:
Originally Posted by Inverness View Post
You're not supposed to assume that anyone wants to steal your stuff.

And if someone actually did steal your stuff its not like they would go classic with it anyways.
Right, right, I got it already Inver.
Reply With Quote
  #11  
Old 07-24-2008, 02:25 AM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by TheStan View Post
Classes:

Here, I have two of the main functions of the Classes System. This system is interdependent with the Professions and Techniques Systems (which I haven't gotten around to starting today.)

-Snip, too long-
The quality of this thread just increased dramatically.
Reply With Quote
  #12  
Old 07-24-2008, 03:20 PM
haro41 haro41 is offline
zenkou
haro41's Avatar
Join Date: Jul 2003
Location: Sol Grotto
Posts: 689
haro41 will become famous soon enough
Send a message via AIM to haro41
i think if a steampunk server is going to be designed, it should need alot of steam.
meaning sweet particle emitters. graphics are going to be the central focus of the server. so good luck with that my friend.

fyi i think the class name Murderor is spelt wrong
__________________

Zenkou for life
Reply With Quote
  #13  
Old 07-24-2008, 03:31 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
I like those classnames :o
hopefully you can pull them off.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #14  
Old 07-24-2008, 03:51 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
A Street Performer turning into a Noble? Holy ****!
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #15  
Old 07-24-2008, 05:48 PM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Quote:
Originally Posted by xXziroXx View Post
A Street Performer turning into a Noble? Holy ****!
Of course the schedule line ups etc, do need a bit of work.

Quote:
Originally Posted by haro41 View Post
i think if a steampunk server is going to be designed, it should need alot of steam.
meaning sweet particle emitters. graphics are going to be the central focus of the server. so good luck with that my friend.

fyi i think the class name Murderor is spelt wrong
Definitely about the graphics. Also, in a bit of a hurry to get some test data up so you know how that can go.

Quote:
Originally Posted by Switch View Post
I like those classnames :o
hopefully you can pull them off.
I'm trying.


Edit:

I just find this so cool...
http://hackedgadgets.com/2007/07/30/steam-punk-watch/

Last edited by TheStan; 07-24-2008 at 06:18 PM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.