Jump to content

[PHP] how to make, character info for RPG play?


Guest xnxx10

Recommended Posts

Hi, since this forum is for learn purpose i go here with my ask. I learn step by step PHP and i know some command but olways something go wrong. I wanna make website for RPG where user can login with: user/password and go to some panel where put info and foto and then generate new page with table like this:

http://filebeam.com/1e21b2d89d27ae7a69586768f7ddd91f.jpg

and on global page (like index.php) are generate link with first foto and info from "Name:" part. So when some1 go to index.php see list of all users and can click on it and go to special page with more info:)

So please some help, from my side i know how to make login to panel xD but with other stuff i need help, and maybe when we finish this this some1 can use our job to RPG use :)

EDIT:

panel should have editing and delete option. and we dont need register page coz acces should have only admin and can put log/pass in DB :) when i finish authetication page i will post result.

Link to comment
Share on other sites

I think few people on these forums will be able to offer as much help as you want, since MaNGOS is a C/C++ project not PHP.

Somethings you should plan out (we call this the outline or brainstorming stage where I'm from)

Even a small RPG game is going to have a somewhat complex database for keep track of everything

If you look at the MaNGOS database structure (data is not important, but will show examples of what i'm referring to) you can see anything that is used in the server players,items,creatures,guild,etc has an id,entry,guid some tables are simply linking tables for example a player inventory would have two fields that link it to the player's id and the item's id

The reason for having all this linking is so that instead of creating duplicate/identical records of an item template, you use only one template for each unique item and then make a link to that template

The same is true for everything else, if players are part of a guild, there is only one guild template but the players belonging to it are linked in another table

If you already know all of this, I apologize, but these are a few of the minimal basics you would need to have fully thought out before even attempting to make an RPG, or any type of game

Hope this helps you get started with your project

Link to comment
Share on other sites

Oh yes I misunderstood, I thought you were trying to make your own game

Your wanting to make it so users could make up stories and personalities about their character in MaNGOS and display this for others to read on a webpage.

If I understand correctly, that sounds like a neat idea

I think I would use features from the MaNGOS database, so a user can see the stories of other users in their friendlist/guild. Maybe even have it so guild leaders can make up a story for their guild as well

Link to comment
Share on other sites

well I think you will need a new table to hold all this extra custom information since there is no spot for it in MaNOGS

I would create a new database to hold this new table, this way its isolated and unrelated to the MaNGOS databases/tables

In the new database table have a field that links to the characters.characters table using the guid field

This would allow you to put any data you want into your new table while being linked to the MaNGOS characters table but also keeping it isolated from the core tables since this new characters_rpg_stories table would be unrelated to the mangos project databases

Edit: that sounds like what you posted, but there is a slight language barrier here and i'm only clarifying it

Link to comment
Share on other sites

For a form like you posted in the picture, there are 2 possible approaches. In both of them you need to make an extra table (or columns, but table is preffered) in your database. Any tool you use for MySQL is able to create new table.

1) The players list will be auto-generated from characters table. That will solve the issue with class and race, as you need only read them from the same table. The new table will contain guid,info,image and store the picture in filesystem (u can store it in database as binary data but it's not recommended). If you linked the auth phase with the account database, then the player can only edit his chars, which is ok.

2) Let ppl choose a character name, and after hitting a button it will read the class/race from database (and validate its existance of course). If you let them fill all fields by themselves, it will be full of rubbish imo. in this case the table will contain id, name, class, race, info, image

if you managed to get through the auth, u can do this too easily. If you need more help, just ask specifically what do u have problem with.

Link to comment
Share on other sites

  • 1 month later...

If I remember correctly there is a character note field in game that should be stored in the DB created by upper level guild members. Why not use his form to create a template for adding info to that field within the db.

There is two useable fields for this. db `characters` table `guild_member` field 1: `offnote` is meant for an officer note and not seen or writable by all guild members by default. And field 2: `pnote` This is visible and writable by the owner of the character by default, and is the field I would use.

as mentioned before it would be best to have them log into your site with the game log in, provide them with a list of currently owned characters by their account and only accept their back story. then have your script append this info with all other data you wish to add for their note.

Link to comment
Share on other sites

×
×
  • 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. Privacy Policy Terms of Use