Location of code containing 'alternate' adopts

Forum
Last Post
Threads / Messages

Pear

Woah man.
Member
Joined
Dec 14, 2013
Messages
169
Points
16
Age
27
Location
The Underworld
Mysidian Dollar
40,823
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'
 
Last edited:
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:
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.
 
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!!
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,130
Members
1,603
Latest member
Monako
BETA

Latest Threads

Latest Posts

Top