[DEV] Age of Conan Character List

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
Locked
User avatar
drumgirl67
Registered User
Posts: 145
Joined: Fri Sep 22, 2006 8:08 pm
Location: Dallas, TX
Contact:

[DEV] Age of Conan Character List

Post by drumgirl67 » Wed Jun 25, 2008 4:03 pm

Modification Name: Age of Conan Character List
Author:drumgirl67

Modification Description:: This mod will allow users to add Age of Conan characters to their forum account, displaying both as a list page and by their forum avatar on posts. This mod is a continuation of the nearly identical World of Warcraft version found at http://www.phpbb.com/community/viewtopi ... 0&t=985675
Modification Version:: 0.1.0

Features: (hopefully) :mrgreen:
  • List page containing necessary character info done
  • Links from list page to forum profiles done
  • Ability for users to manually add characters done
  • Ability to differentiate between main and alt characters done
  • Main character information displayed near forum avatars done
Features that I will eventually get around to (no promises):
  • Data pulling from the armory not possible yet (waiting on armory functionality)
  • Expansion to Warhammer Online character list
  • Main character information shown in user profile
Demo URL: http://www.5thhorizon.com/char_test
Demo Username: test
Demo Password: test123

Modification Download: http://startrekguide.com/community/down ... hp?id=4285

This mod is nearly identical to a World of Warcraft mod also being developed by myself.

Note: This mod is based off of one I found for phpbb2 for my guild's forums. The mod was not listed here on this site, and I am not sure who the author was, but I would be more than willing to give credit where it's due if anyone happens to know.

Screenshots:
Character list:
http://www.5thhorizon.com/img/aoc_roster.JPG

Change log:
6/25/08 initial post
Last edited by drumgirl67 on Mon Jun 30, 2008 8:59 pm, edited 1 time in total.

User avatar
drumgirl67
Registered User
Posts: 145
Joined: Fri Sep 22, 2006 8:08 pm
Location: Dallas, TX
Contact:

Re: [DEV] Age of Conan Character List

Post by drumgirl67 » Wed Jun 25, 2008 4:05 pm

I am still very new to AoC, so if there are any recommended changes from someone more experienced in the game, they are certainly welcome :geek:

Also if you would like to see how I integrated the mods together, you can see on my site: http://www.5thhorizon.com

Largo84
Registered User
Posts: 36
Joined: Tue Jun 24, 2008 1:31 pm

Re: [DEV] Age of Conan Character List

Post by Largo84 » Wed Jun 25, 2008 6:09 pm

Very cool.

Here's a suggestion I tried to impliment on your WoW Roster when I converted it to AoC.

The Conan Armoury uses a Unique number trailing the url in order to fetch what feats someone selects, as I'm sure you know. I tried to put a new input box in the character add and edit where people can put their unique code in for their build, so my build is: http://www.conanarmory.com/feat.aspx?id ... 2ef2efef17

So the code entered would be: 3#::e4f2efefe4f2e2f7efefefefe4f2e2f2ef2efef17

If a code is entered, the Build text entered (32/41/5) would become a link to the build on conan armoury, otherwise it just stays as plain text.

What I also tried to impliment was if someone put's in their feat code but not their build. In this case there would just be text saying "Click Here" which would link on to the feat build.

I'm not very good at explaining things, but hopefully you will understand what I mean and see it as a good idea.

Thanks for the great plugin :D

EDIT:

I still have the same problem that my attempt at a conversion had.
When clicking Set Main, I get the following error:
General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1 [1064]

SQL

UPDATE phpbb_aoc_characters SET main = 1 WHERE ID = LIMIT 1

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: aoc_characters.php
LINE: 415
CALL: dbal_mysqli->sql_query()
When trying to delete a character, I get the message "Your are not allowed to delete characters that do not belong to you."

User avatar
drumgirl67
Registered User
Posts: 145
Joined: Fri Sep 22, 2006 8:08 pm
Location: Dallas, TX
Contact:

Re: [DEV] Age of Conan Character List

Post by drumgirl67 » Wed Jun 25, 2008 6:41 pm

Largo84 wrote:EDIT:

I still have the same problem that my attempt at a conversion had.
When clicking Set Main, I get the following error:
General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1 [1064]

SQL

UPDATE phpbb_aoc_characters SET main = 1 WHERE ID = LIMIT 1

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: aoc_characters.php
LINE: 415
CALL: dbal_mysqli->sql_query()
When trying to delete a character, I get the message "Your are not allowed to delete characters that do not belong to you."
Thanks for the heads up on the builds, I will look into adding that.

As far as your error goes, open up your aoc_characters.php (or whatever you named that file) and make sure this line is there before the switch statement (around line 36):

Code: Select all

$user_id = $user->data['user_id'];
The code I have on the fresh install on the demo site is working, so I think there might be a discrepancy between what you're using and what I've got.

Next question, when you click the change main button, does the URL you're directed to contain a number after "ID="?

It should be something like:
yourdomain.com/forums/aoc_characters.php?mode=changemain&ID=2&sid=<some long number>

If the number after ID is missing then it's a problem with the edit character list page, else it's a problem with the changemain part of the code.

Largo84
Registered User
Posts: 36
Joined: Tue Jun 24, 2008 1:31 pm

Re: [DEV] Age of Conan Character List

Post by Largo84 » Wed Jun 25, 2008 7:01 pm

Thanks for the quick reply.

That line is there before the switch statement.

Also, the ID= is there.

I have a test account set up and the same happens for that. The test account's ID is 6, my main account is 1 according to the url.

User avatar
drumgirl67
Registered User
Posts: 145
Joined: Fri Sep 22, 2006 8:08 pm
Location: Dallas, TX
Contact:

Re: [DEV] Age of Conan Character List

Post by drumgirl67 » Wed Jun 25, 2008 7:20 pm

Largo84 wrote:Thanks for the quick reply.

That line is there before the switch statement.

Also, the ID= is there.

I have a test account set up and the same happens for that. The test account's ID is 6, my main account is 1 according to the url.
Try commenting out the line around 413

Code: Select all

$ID = $HTTP_GET_VARS['ID'];
I think I left it in there inadvertently when I copied over from the phpbb2 version, never gave me issues.

Largo84
Registered User
Posts: 36
Joined: Tue Jun 24, 2008 1:31 pm

Re: [DEV] Age of Conan Character List

Post by Largo84 » Wed Jun 25, 2008 7:25 pm

That's solved the deleting characters problem! Thanks!

Not the Set Main problem though. :(

User avatar
drumgirl67
Registered User
Posts: 145
Joined: Fri Sep 22, 2006 8:08 pm
Location: Dallas, TX
Contact:

Re: [DEV] Age of Conan Character List

Post by drumgirl67 » Wed Jun 25, 2008 7:54 pm

Largo84 wrote:That's solved the deleting characters problem! Thanks!

Not the Set Main problem though. :(
There should be two instances of that line, try commenting out both of them.

Largo84
Registered User
Posts: 36
Joined: Tue Jun 24, 2008 1:31 pm

Re: [DEV] Age of Conan Character List

Post by Largo84 » Wed Jun 25, 2008 8:13 pm

Ah yeah.

Awesome, works now. Very nice mod. Thanks alot.

EDIT: My alterations are working perfectly now! I've also edited the display and if statements for $profs12 so it works much better now and counters in for every possibility.

Code: Select all

				if ( $prof1lvl == 0 )
				{
					if ( $prof2lvl == 0 )
					{
						$profs12 = " ";
					}
					else
					{
						$profs12 = "Tier $prof2lvl $prof2";
					}
				}
				else
				{
					if ( $prof2lvl == 0 )
					{
						$profs12 = "Tier $prof1lvl $prof1";
					}
					else
					{
						$profs12 = "Tier $prof1lvl $prof1, Tier $prof2lvl $prof2";
					}
				}
My way of coding is very spaced out and I use {, }'s in if statements even know I know I don't need to (It helps me easily keep track of what's going on where).

The Conan Armoury feats addition also works, I just need to edit a bit more now so that I don't have to directly edit the SQL :P

newlin
Registered User
Posts: 3
Joined: Tue Jun 24, 2008 8:12 am

Re: [DEV] Age of Conan Character List

Post by newlin » Thu Jun 26, 2008 8:28 am

Hi,

When i add a character, then i had an error.
what cann i do?

and can you get an fuktion to edit the admin all the characters?
Allgemeiner Fehler
SQL ERROR [ mysqli ]

Incorrect integer value: '' for column 'prof1lvl' at row 1 [1366]

SQL

INSERT INTO phpbb_aoc_characters (userid, name, lvl, clss, race, gender, prof1, prof1lvl, prof2, prof2lvl, tree1, tree2, tree3, main, realm) VALUES ( '2', 'simon', '7', 'Assassin', 'Aquilonian', 'Female', '', '', '', '', '4', '2', '2', '1', 'ler')

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: aoc_characters.php
LINE: 337
CALL: dbal_mysqli->sql_query()

User avatar
drumgirl67
Registered User
Posts: 145
Joined: Fri Sep 22, 2006 8:08 pm
Location: Dallas, TX
Contact:

Re: [DEV] Age of Conan Character List

Post by drumgirl67 » Thu Jun 26, 2008 2:31 pm

When i add a character, then i had an error.
what cann i do?
Try running this SQL statement:

Code: Select all

ALTER TABLE phpbb_aoc_characters
 MODIFY prof1lvl   char(5)     null;
ALTER TABLE phpbb_aoc_characters
 MODIFY prof2lvl   char(5)     null;
If that doesn't fix your problem, you can run this to set it back to what it was:

Code: Select all

 ALTER TABLE phpbb_aoc_characters
 MODIFY prof1lvl   smallint    null;
ALTER TABLE phpbb_aoc_characters
 MODIFY prof2lvl   smallint     null;
Largo84 wrote:Ah yeah.

Awesome, works now. Very nice mod. Thanks alot.

EDIT: My alterations are working perfectly now! I've also edited the display and if statements for $profs12 so it works much better now and counters in for every possibility.

Code: Select all

				if ( $prof1lvl == 0 )
				{
					if ( $prof2lvl == 0 )
					{
						$profs12 = " ";
					}
					else
					{
						$profs12 = "Tier $prof2lvl $prof2";
					}
				}
				else
				{
					if ( $prof2lvl == 0 )
					{
						$profs12 = "Tier $prof1lvl $prof1";
					}
					else
					{
						$profs12 = "Tier $prof1lvl $prof1, Tier $prof2lvl $prof2";
					}
				}
My way of coding is very spaced out and I use {, }'s in if statements even know I know I don't need to (It helps me easily keep track of what's going on where).

The Conan Armoury feats addition also works, I just need to edit a bit more now so that I don't have to directly edit the SQL :P
Ah, so it is in tiers. I will fix that in my code as well. I had no idea how it worked. I am only level 16 thus far :lol:

intristin
Registered User
Posts: 12
Joined: Sun Mar 20, 2005 3:31 am

Re: [DEV] Age of Conan Character List

Post by intristin » Wed Aug 27, 2008 11:31 am

I compared your wow mod to this aoc mod and noticed one thing right off the bat.. Alts don't display in the list with the AoC, but they do with the WoW mod. Is there is reason for this or is it a bug?

User avatar
drumgirl67
Registered User
Posts: 145
Joined: Fri Sep 22, 2006 8:08 pm
Location: Dallas, TX
Contact:

Re: [DEV] Age of Conan Character List

Post by drumgirl67 » Wed Aug 27, 2008 2:51 pm

intristin wrote:I compared your wow mod to this aoc mod and noticed one thing right off the bat.. Alts don't display in the list with the AoC, but they do with the WoW mod. Is there is reason for this or is it a bug?
The AoC list hasn't been updated. I don't use it anymore and I haven't had any requests for it to be updated, etc.

So this mod is essentially a much older version than the WoW counterpart.

TrueMOD
Registered User
Posts: 2
Joined: Sat Sep 06, 2008 12:57 am
Contact:

Re: [DEV] Age of Conan Character List

Post by TrueMOD » Sat Sep 06, 2008 1:08 am

no requests? cant believe it >_< well am using at our guild site at www.kataklysm-guild.de and it does an awesome job.
Theres just 3 things I'd like to see changed but Im not a coder so I cant do that myself.

1. When you leave fields blank the site gives you an error or white blank page. So you have to type in "none" or something for the professions when your alts are below lvl 20. A drop down menu would be nice cuz there is just 5 jobs so you could chose one from there and default one would be "none yet" or something. Also having this for the tiers would be nice so you can just chose between tier 1 and 5. This would avoid the empty field problem and also make it more fast to add new characters.

2. Would it be possible to have an additional class image displayed under the avatar? I mean the text is ok but a class image would make it look more fancy ;-P

3. The character list seems to be ordered by entry like
First entered user/first character added/second character added/and so on
Second entered user/first character added/second character added/and so on

Could it be done so the list goes first for level...so at the top would be the highest level? If 2 characters or more have same level than go for the date of entry?

Well I know am asking a lot but I really like this mod and would like to keep using it.

Thank in advance for every help

Khamul85
Registered User
Posts: 6
Joined: Sun Dec 23, 2007 6:00 pm

Re: [DEV] Age of Conan Character List

Post by Khamul85 » Thu Oct 23, 2008 12:56 pm

Just what I've been looking for! installing it on my forums now.

Locked

Return to “[3.0.x] MODs in Development”