Stat Inheritance Mod * thanks to Wallie! *

Forum
Last Post
Threads / Messages

Milly Money

Pet-Sim.Online
Staff member
Dev Staff
Joined
Jan 27, 2010
Messages
538
Points
18
Mysidian Dollar
28,331
Backup files AND database before you apply this Mod. Leave all files open so you can simply 'undo' if you need to!

This Mod will take the stats from Wallie's Mod, and give your bred young a total of both. It can be easily tweaked to give half of their total, etc.



class_breeding.php:

Add this just above the insert statement.


Code:
       $mother_stat=  $this->female->getAdoptstatname();
                             $father_stat=  $this->male->getAdoptstatname();
      
                             $newstatname = $mother_stat + $father_stat;


Change the insert statement

"statname" => $statname

To

"statname" => $newstatname



In breeding.php:

Change -
Code:
                $mysidia->db->update("owned_adoptables",array("statname" => 'statname'),"aid = $offspringID");  
                foreach($offsprings as $offspring){
                    $image = $offspring->getEggImage("gui");
                    $links->add(new Link("myadopts/manage/{$offspringID}", $image));
                    $offspringID++;

To:

Code:
                $mysidia->db->update("owned_adoptables",array("statname" => ''),"aid = $offspringID");  
                foreach($offsprings as $offspring){
                    $image = $offspring->getEggImage("gui");
                    $links->add(new Link("myadopts/manage/{$offspringID}", $image));
                    $offspringID++;


As always back up files and databases before you try ANY new code!
 
Last edited:

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top