Class-based character image

A signature and avatar generator addon

Moderator: zanix

Class-based character image

Postby molkaan » Mon Dec 04, 2006 5:16 pm

I'm searching for an info... i don't know if it's possible but, i really love personalize the signature with a class-based image, not only race-based...
i.e. for a tauren male maybe i will use 4 images (one for class - druid, warrior, shaman and hunter)... it's possible?

i repeat... i'm sorry for my jupiterial english >_<
molkaan
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Nov 06, 2006 2:46 pm

Class-based character image

Postby PleegWat » Mon Dec 04, 2006 6:31 pm

It's probably possible, if you change its code. I could dive into it and point you at the right section, but zanix'd probably be faster at that.
If you don't have the php knowledge to mod siggen to do this, I'm afraid your only option is to hope zanix'll include it in Siggen 2.0
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Class-based character image

Postby molkaan » Mon Dec 04, 2006 10:20 pm

ok... i try...

i've found into siggen.php this code:

#--[ IMAGE CREATION ]------------------------------------------------------

// Choose the character image
if( $configData['charlogo_disp'] )
{
// Check for custom/uploaded image
$custom_user_img = $configData['image_dir'].$configData['user_dir'].$sig_name.'.png';

// Set custom character image, based on name in DB
if( file_exists($custom_user_img) )
{
$im_user_file = $custom_user_img;
}
// If custom image is not found, check for race and gender
elseif( !empty($sig_race) )
{
// Set race-gender based image
if( !empty($sig_gender) )
{
$im_user_file = $configData['image_dir'].$configData['char_dir'].$sig_race.'-'.$sig_gender.'.png';
}
// Set race only image
else
{
$im_user_file = $configData['image_dir'].$configData['char_dir'].$sig_race.'.png';
}

} // Set default character image
else
{
$im_user_file = $configData['image_dir'].$configData['charlogo_default_image'].'.png';
}
}

[...]

Ok ok ok... i think that it's only (:P) necessary a recursive IF cycle into this one... before the check for the race we need the check for the class...

In italian we say: "tra il dire e il fare c'è di mezzo il mare"... translated it looks like: "between ASK and DO there's the sea" (ok, in english does not play well :\)... i wanna just say that i don't know how i can do all this... some ideas? :D
molkaan
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Nov 06, 2006 2:46 pm

Class-based character image

Postby PleegWat » Mon Dec 04, 2006 10:41 pm

I'd say myself you want the class after the gender check, so it'll only show the class-specific one if race, class, and gender are known. This saves drawing work. Try this:

Add the images to the addons/siggen/img/char folder, naming the files like this:

RACE-GENDER-CLASS.png (EG tauren-male-druid.png)

Then, replace the code you quoted by this:

Code: Select all
#--[ IMAGE CREATION ]------------------------------------------------------

    // Choose the character image
    
if( $configData['charlogo_disp'] )
    {
        
// Check for custom/uploaded image
        
$custom_user_img $configData['image_dir'].$configData['user_dir'].$sig_name.'.png';

        
// Set custom character image, based on name in DB
        
if( file_exists($custom_user_img) )
        {
            
$im_user_file $custom_user_img;
        }
        
// If custom image is not found, check for race and gender
        
elseif( !empty($sig_race) )
        {
            
// Set race-gender based image
            
if( !empty($sig_gender) )
            {
                
// Set race-gender-class based image
                
if( !empty($sig_class) )
                {
                    
$im_user_file $configData['image_dir'].$configData['char_dir'].$sig_race.'-'.$sig_gender.'-'.$sig_class.'.png';
                }
                else
                {
                    
$im_user_file $configData['image_dir'].$configData['char_dir'].$sig_race.'-'.$sig_gender.'.png';
                }
            }
            
// Set race only image
            
else
            {
                
$im_user_file $configData['image_dir'].$configData['char_dir'].$sig_race.'.png';
            }

        }    
// Set default character image
        
else
        {
            
$im_user_file $configData['image_dir'].$configData['charlogo_default_image'].'.png';
        }
    }
 
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Class-based character image

Postby molkaan » Mon Dec 04, 2006 11:27 pm

:cheers: i love you! :cheers:
molkaan
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Nov 06, 2006 2:46 pm

Class-based character image

Postby zanix » Tue Dec 05, 2006 8:47 am

If you got specific race-gender-class images made, I would sure like them

I would even insert this into SigGen as well
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Class-based character image

Postby Suirion » Tue Dec 05, 2006 12:11 pm

I tweaked the code and made the images last night, coincidentally...

I signified class by using the Tier 3 Armor... any other suggestions to signify Class in the Character Image?

Examples:
Image Image
Image Image
Image Image
Image Image
User avatar
Suirion
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Tue Dec 05, 2006 11:46 am

Class-based character image

Postby zanix » Tue Dec 05, 2006 1:38 pm

Wow, these are very nice, these images are perfect

Wanna design the graphics for my next version of SigGen?
Or make a theme for it at least?
I hope to have my next version done by the time Roster 1.8 comes out
It will have support for custom images that can be set to pull certain values from the database, so character image may be set like this

[race]-[gender]-[class].png
So for example if the character is a male Dwarf Hunter, using the define above, SigGen will try to find the image dwarf-male-hunter.png

Anything that can be pulled from the database can set as an image
[race].png - for backgrounds
Dwarf will try to find the image dwarf.png

I only have this on paper, so no code yet
The dev team and I are still working on Roster 1.8 so when that hits beta I should be able to start coding
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Class-based character image

Postby molkaan » Tue Dec 05, 2006 5:03 pm

suirion, your signatures are AWESOME!!! beautiful!!! these are mine, pretty cool but in a permanent beta status ;)

Image
Image
Image
Image
Last edited by molkaan on Tue Dec 05, 2006 5:10 pm, edited 1 time in total.
molkaan
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Nov 06, 2006 2:46 pm

Class-based character image

Postby Ulminia » Tue Dec 05, 2006 9:52 pm

i want the images and im too lazy to make my own lol
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Class-based character image

Postby Suirion » Wed Dec 06, 2006 4:41 am

Thanks for the compliments. =)

I'd be more than happy to toss some designs around.

How do we start this shindig?
User avatar
Suirion
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Tue Dec 05, 2006 11:46 am

Class-based character image

Postby Anaxent » Wed Dec 06, 2006 4:58 am

Yes these images are very nice and the ideas being tossed around in here are great.
User avatar
Anaxent
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 642
Joined: Tue Jul 04, 2006 6:27 am
Location: Phoenix, Az

Class-based character image

Postby Ulminia » Wed Dec 06, 2006 7:44 am

post them in a ziped file in a post here
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Class-based character image

Postby Suirion » Sat Dec 09, 2006 4:46 am

Here are the images of race-gender-class (40 in all). I left them over-sized and whole, so people can resize and crop them to suit their needs. Also, I left the helmets off of the armor sets, to better illustrate race and gender.

Please see this post for downloads.

Any suggestions or requests?

By the way, Molkaan, I forgot to mention... very nice sig work!
Last edited by Suirion on Mon Dec 25, 2006 7:30 am, edited 4 times in total.
User avatar
Suirion
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Tue Dec 05, 2006 11:46 am

Class-based character image

Postby zanix » Sun Dec 10, 2006 6:39 am

This line
Code: Select all
$im_user_file $configData['image_dir'].$configData['char_dir'].$sig_race.'-'.$sig_gender.'-'.$sig_class.'.png'


Should be this
Code: Select all
$im_user_file $configData['image_dir'].$configData['char_dir'].$sig_race.'-'.$sig_gender.'-'.strtolower(getEnglishValue($sig_class,$sig_char_locale)).'.png'

This is so the class will always look for the English version of the image, so we are not duplicating what is already a 40 image set (more with horde images...)
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Next

Return to SigGen

Who is online

Users browsing this forum: No registered users and 0 guests

cron