Jump to content

Help with building database


johndoe12345

Recommended Posts

Hello

    I am asking something for someone else as the project they are doing is for me and they are fairly new to all this.

so here is the post they asked in another forum. (below)

 

Anywho, getting back to this skill builder thing...

 

I'm trying, in vain I now realize, to create a MySQL database for the mountain of data this thing will require.

 

Basically, I'm needing a db like that employed at the following link: http://archlord.drwx.eu/skills.php

 

My thinking was something like this: (MySQL Workbench pic in case anyone was wondering)

db_mockup1.png

But I now realize that it's going to be far more complicated than that.

Looks like we'll need sub-classes for skills and such too.

 

Anyone with MySQL experience willing to help create a useable database and get a skills table, like that found at the above link, up and running?

 

Also, I'd love to know how they're returning the detailed table data in real time via PHP.

 

 

FWIW, I know just enough PHP to be dangerous.

Me and MySQL don't play nice together right now.

I originally thought this would be nothing but arrays and whatnot done completely in PHP.

This is looking more and more like it's outside my current scope of knowledge

Link to comment
Share on other sites

Your DB design is off.

 

1 race has * classes.

1 class has 1 race (at least I didn't find any shared classes).

 

1 class has * skill types

1 skill type has * classes

 

There are skill types and sub skill types (eg Scion).

 

1 skill type has * skills.

1 skill type has 0..* sub skill types.

1 skill has 1 skill type.

 

This should be closer to the design you wanted to create.

 

CREATE TABLE races (
  race_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
  race_name VARCHAR(11) NOT NULL
);

CREATE TABLE classes (
  class_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
  class_name VARCHAR(6) NOT NULL,
  
  race_id TINYINT UNSIGNED NOT NULL,
  
  KEY (race_id)
);

CREATE TABLE class_has_skill_type (
  class_id TINYINT UNSIGNED NOT NULL,
  skill_type_id TINYINT UNSIGNED NOT NULL,
  
  PRIMARY KEY (class_id, skill_type_id)
);

CREATE TABLE skill_types (
  skill_type_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
  skill_type_name VARCHAR(7) NOT NULL,
  
  skill_type_parent_id TINYINT UNSIGNED NOT NULL,
  
  KEY (skill_type_parent_id)
);

CREATE TABLE skills (
  skill_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
  skill_name VARCHAR(7) NOT NULL,
  
  class_id TINYINT UNSIGNED NOT NULL,
  skill_type_id TINYINT UNSIGNED NOT NULL,
  
  FOREIGN KEY (class_id, skill_type_id) REFERENCES class_has_skill_type (class_id, skill_type_id)
) ENGINE=INNODB;

Link to comment
Share on other sites

Hey thanks for the reply.

 

 

some classes like the knight and berserk and the sorcerer and mage and archer and hunter share some skills these are the combat , some buff and some passives.

 

the drwx site now has a skill builder of all classes and races but nothing like the design I was looking for , their builder only allows for lvl 5 skills which is the max at the trainers, Mine I would like to go to lvl 20 because the option of +1 or 2 unique accessories and yellow stats on armor or weapons that give an extra lvl on a certain skill.

 

I am not the one doing the coding or anything I am the one that has the knowledge of the game to make sure things work right. I wish I knew about this stuff so I could help him more. I will try and get him to come in and post maybe that way we could all communicate a bit better. I will send him what you suggested and see what happens.

Link to comment
Share on other sites

I have another few questions.

 

I hope this can be understood correctly. Ok I play a MMO and I am trying to make an information webpage  , I have decoded the ini files from the game and put them into a spread sheet in open office.

 

what I want to know is how do I pull certain info from the spread sheet to show on my website.

 

EG in this spreadsheet http://www.mediafire.com/?y75ue9ei4c6mb0t is a list of items in the game , I want to make a query to pull the weapons , armor etc  into their own categories  on my web page.

EG  Knights have weapons in several classes an axe a blunt a sword a 2 hand sword and a 2 hand halberd so I would like to pull those into there respected sections in order of lvl.

 

so the menu on the website would look kinda like this.

 

+Weapons

+Normal

+Rare

+Unique

-elite

+Knight

+sword

-bastard sword lvl 8

-cruel sword lvl 15

-helsonic lvl 24

+axe

+blunt

+2 hand sword

+2 hand halbred

+sorcerer

-staff

-wand

+mage

+staff

+wand

 

this is how the person at http://archlord.drwx.eu/skills.php did theirs but not organized to this extent , but I know they pulled the info straight from the decoded ini files so if there are any updates to the game all they have to do is decode the new ini copy to a spread sheet and the website is updated automatically.

 

also I am wondering

 

I made this map http://www3.picturepush.com/photo/a/6990271/img/6990271.jpg 

 

I want to use google maps like this site did http://www.aldb.info/map.html but I also want to be able to have small tables on a mouse over/mouse click showing where the portals take you and how much gold they cost , as well as when you mouse over the towns and caves the mouse over/mouse click will show the maps of the towns and caves and I want a mouse click option in a legend on the map that will show all the mobs lvls in every area like this map http://h3.abload.de/img/al_moblevel_mapiccy.jpg I want all this on one map preferably though.

 

 

But I have no idea how the google maps thing works and I think I wont be able to integrate everything I want into the 1 map on google maps I may have to use 2 separate maps.

 

I thought I would have been able to just upload my map into google maps then use the markers like the aldb site to show the mobs ect  but it does not look like I can do this.

 

I also want to do this http://www.labnol.org/software/tutorials/extract-data-from-web-pages-into-excel/1979/ but the opposite way, I want to pull info from my spread sheets to show on my web page.

Link to comment
Share on other sites

In what format did you save the spreadsheet? http://devzone.zend.com/27/reading-and-writing-spreadsheets-with-php/ is a good tutorial on how to read data from an Excel file for example.

 

Buy Beginning Google Maps Applications with PHP and Ajax as it will teach you everything you need to know to create your complete custom map in Google Maps.

Link to comment
Share on other sites

In what format did you save the spreadsheet? http://devzone.zend.com/27/reading-and-writing-spreadsheets-with-php/ is a good tutorial on how to read data from an Excel file for example.

 

Buy Beginning Google Maps Applications with PHP and Ajax as it will teach you everything you need to know to create your complete custom map in Google Maps.

 

 

I save my spreadsheets in the default format from open office .ods , I don't have excel is this going to be a problem ? I think open office allows you to save in xml format or somehting.

 

@ your second link. Is there no where to get this info for free , as I do not exactly want to spend money for something I am doing for free for a community. This map thing is seeming to be a little to difficult for me the only thing I know is basic html and a few java scripts, which is why I usually get others to help me do things.

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.