Thread: Blank pages
View Single Post
  #4  
Old 10-16-2017, 06:28 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,639
Dinocanid is on a distinguished road
Default

It shouldn't be too difficult. In class_breeding.php, there is a section called "public function breeding()" where this would go. Inside could be something like:
PHP Code:
$mother_base =  $this->female->base
$father_base =  $this->male->base
$mother_eyes =  $this->female->eyes
$father_eyes =  $this->male->eyes
//so on and so forth for the variables...

$choose rand(1,2); //50% chance of inheriting from mother or father
if($choose == 1){$base $mother_base}
else{
$base $father_base
After that, you would modify the "mysidia->db->insert" to include the markings and such. So inside the array you would put:
PHP Code:
"base" => $base"eyes" => $eyes
And keep going for however many things you want to pass down through breeding.

Once you do that, you have to go into class_ownedadoptable.php and add things like this:
PHP Code:
public $base;
    public 
$eyes;
    public 
$marking1;
//etc...

public function getBase(){
        return 
$this->base;
    }
//do this for every variable you added 
I can help more if you get stuck anywhere.
__________________
Reply With Quote