Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2014, 02:23 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,511
Missy Master is an unknown quantity at this point
Default Stat Inheritance Mod * thanks to Wallie! *

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 by Missy Master; 06-30-2014 at 02:26 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

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
Mys v1.3.x Stat/SKill System Hwona Mys v1.3.x Mods 92 01-15-2017 10:04 AM
Making v.1.3.3 Stat Mod Compatible with V.1.3.4 Hwona Questions and Supports 0 07-08-2014 01:37 PM
Anyone Want to Have a Stat System Hwona Feedback and Suggestions 12 06-30-2014 09:30 AM
Basic Stat System Hedgen Questions and Supports 3 03-10-2013 02:47 PM


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

Currently Active Users: 449 (0 members and 449 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