Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Suggestions and Feature Requests

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2011, 07:08 AM
Con's Avatar
Con Con is offline
Member
 
Join Date: Aug 2011
Posts: 6
Gender: Female
Credits: 2,616
Con is on a distinguished road
Default Alternate Images for Genders

Instead of the alternates being set by a random factor, being set by the gender of the pet.

I'm new so please don't kick me for something that already exists.
Reply With Quote
  #2  
Old 08-20-2011, 04:30 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,878
Hall of Famer is on a distinguished road
Default

I am sorry that I havent gotten back to you regarding your request yet. And yes, this is definitely doable. You will need to manually edit the line that generates alternative forms of adoptables. I can show you an example of how to do that later if I have time.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 08-23-2011, 04:56 AM
Con's Avatar
Con Con is offline
Member
 
Join Date: Aug 2011
Posts: 6
Gender: Female
Credits: 2,616
Con is on a distinguished road
Default

That would be awesome thanks :)
Reply With Quote
  #4  
Old 08-24-2011, 01:57 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,878
Hall of Famer is on a distinguished road
Default

Here is a possible way to have alternates set by gender:

Find these lines in doadopt.php:

PHP Code:
                        $alts getaltstatus($id00);

                        
// We need a unique code for the adoptable so we can show it to the user when we're done here...

                        
$code rand(120000);
                        
$genders = array('f''m');
                        
$rand rand(0,1);
                        
                        
runquery("INSERT INTO {$prefix}owned_adoptables VALUES ('', '{$row['type']}', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no', '$genders[$rand]','0')");

                        
// Adoption complete, show the user a confirmation screen... 
Replace with something like this(the code may be different depending on the structure of your table prefix_owned_adoptables):

PHP Code:
                        // We need a unique code for the adoptable so we can show it to the user when we're done here...

                        
$code rand(120000);
                        
$genders = array('f''m');
                        
$rand rand(0,1);
                        
$petgender $genders[$rand];
                        switch(
$petgender){
                          case 
"m"
                          
$alts "yes";
                          break;
                          default: 
                          
$alts "no";
                        }                        

                        
runquery("INSERT INTO {$prefix}owned_adoptables  VALUES ('', '{$row['type']}', '$name','$loggedinname','0','0', '$code',  '','$alts','fortrade','no', '$petgender','0')");

                        
// Adoption complete, show the user a confirmation screen... 
This will set female sprite to be primary and male sprite to be alternate. Lemme know if this code wont work for you, and take a screenshot of your prefix_owned_adoptables so I can assist you further.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 08-24-2011, 01:25 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,443
SilverDragonTears is on a distinguished road
Default

So if it's male it will show the male image and female vice versa?
__________________

Check out SilvaTales
Reply With Quote
  #6  
Old 08-24-2011, 01:41 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,878
Hall of Famer is on a distinguished road
Default

Yes, it should. It will generate a pet gender first and then decide which image to use based on whether its male or female. In my script above the female image is primary, while male image is alternate.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #7  
Old 08-24-2011, 01:48 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,443
SilverDragonTears is on a distinguished road
Default

ooo very nice! I'm going to try this out today!
__________________

Check out SilvaTales
Reply With Quote
  #8  
Old 08-24-2011, 02:46 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,443
SilverDragonTears is on a distinguished road
Default

do i delete

Code:
$alts = getaltstatus($id, 0, 0);
I'm guessing no b/c it worked =) Cool! I switched it to "f" instead of "m" though so my male image will be primary. Very cool!
__________________

Check out SilvaTales

Last edited by SilverDragonTears; 08-24-2011 at 02:52 PM.
Reply With Quote
  #9  
Old 08-24-2011, 09:15 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,878
Hall of Famer is on a distinguished road
Default

Well its better to delete that line since it wont do anything after you've changed the method alternate form of adoptables is defined.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #10  
Old 08-24-2011, 09:50 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,443
SilverDragonTears is on a distinguished road
Default

Oh ok I'll delete it then! I'm loving this so much I'm going back and making male and female images of all of the adopts. Sucks though that the ones already adopted won't have that feature implemented with them though.
__________________

Check out SilvaTales
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Genders/More Alternate Images Clessidra Suggestions and Feature Requests 3 02-27-2014 10:42 AM
Multi Alternate Images Taintedkitten Questions and Supports 3 01-10-2013 07:44 PM
Adoptable genders Silvercivet Questions and Supports 2 02-12-2012 10:35 AM
How do I completely disable/delete Breeding and genders? D.A.T.A. Questions and Supports 5 08-29-2011 01:34 AM
Alternate images, how do they work? Shikari Questions and Supports 4 08-06-2011 08:17 PM


All times are GMT -5. The time now is 04:24 PM.

Currently Active Users: 9803 (0 members and 9803 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636