Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Location of code containing 'alternate' adopts (http://www.mysidiaadoptables.com/forum/showthread.php?t=5159)

Pear 08-01-2016 06:29 PM

Location of code containing 'alternate' adopts
 
Yo c: I am interested in trying to figure out if I can make multiple outcomes for a single adopt. (So it's kind of like a puppy litter...lol)

Does anyone know where this piece of code would be located? Or if modifying the file could even be a lead to multiple outcomes?

Thanks broskies c;


Edit:
Whoops. I meant to post this in the script help forum. o-o'

Hall of Famer 08-01-2016 10:00 PM

I see, I moved your thread. It seems that the two subforums are quite confusing to some users, perhaps I should rename the one in community board category as 'Forum Feedback and Suggestions'.

Well the code that generates an adoptable's form(primary or alternate form) is inside file /classes/class_adoptables.php. It is simple enough:

PHP Code:

public function getAltStatus(){        
    if(
$this->alternates == "enabled" and $this->altoutlevel == 0){  
          
$rand mt_rand(1$this->altchance);         
          if(
$rand == 1) return "yes";                    
    }       
    return 
"no";    


As you can see, it checks whether alt form is enabled. If so it will generate a random number to determine whether your adoptable will get primary or alt form. This is where you will need to edit in order to change the mechanism of alt form creation. But keep in mind that multiple alt-forms can be very complex, depending on your need.

Missy Master 08-04-2016 07:55 AM

This is something I have been very interested in as well...

where would we edit adding additional alt forms such as adding in images and then having it show on the various pages correctly?

Thanks HOF!!


All times are GMT -5. The time now is 07:24 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.