Mys 1.3.4 Updated! Merged Breeding Mod for 1.3.4

Forum
Last Post
Threads / Messages
URL can't be hard coded in. The URL is called up in the model using a method (class function) from the URL supplied in the database. Since ownedadoptableviewmodel has functions for this already built in, use those, and make sure that file is in the namespace of the controller. I did also modify getting the base image to write to ownedadoptable DB instead of linking to the adopts image file. If you notice in domainmodel-ownedadoptable, updating the level of any adopt calls a function for updating alternates which will update images.

Code:
    public function setCurrentLevel($level, $assignMode = ""){
        $this->currentlevel = $level;
        if($assignMode == Model::UPDATE){
            $this->save("currentlevel", $this->currentlevel);
            $this->updateAlternate($assignMode);
        }

To get non alts to also write to the ownedadoptables table in the DB, I modified that function with this

Code:
    public function updateAlternate($assignMode = "")
    {
        $alternate = $this->generateAlternate();
        if ($alternate) {
            $this->imageurl = $alternate->getImage();
            $this->alternate = $alternate->getALID();
        } else if(!$this->alternate) {
            $this->imageurl = $this->getImage();
            $this->alternate = 0;
        }
   
        if ($assignMode == Model::UPDATE) {
            $this->save("imageurl", $this->imageurl);
            $this->save("alternate", $this->alternate);
        }
    }

I plan to work on this mod when I get over my carpal tunnel issues, which may be awhile. I will help as I can when that time comes.
 
URL can't be hard coded in. The URL is called up in the model using a method (class function) from the URL supplied in the database. Since ownedadoptableviewmodel has functions for this already built in, use those, and make sure that file is in the namespace of the controller. I did also modify getting the base image to write to ownedadoptable DB instead of linking to the adopts image file. If you notice in domainmodel-ownedadoptable, updating the level of any adopt calls a function for updating alternates which will update images.

Code:
    public function setCurrentLevel($level, $assignMode = ""){
        $this->currentlevel = $level;
        if($assignMode == Model::UPDATE){
            $this->save("currentlevel", $this->currentlevel);
            $this->updateAlternate($assignMode);
        }

To get non alts to also write to the ownedadoptables table in the DB, I modified that function with this

Code:
    public function updateAlternate($assignMode = "")
    {
        $alternate = $this->generateAlternate();
        if ($alternate) {
            $this->imageurl = $alternate->getImage();
            $this->alternate = $alternate->getALID();
        } else if(!$this->alternate) {
            $this->imageurl = $this->getImage();
            $this->alternate = 0;
        }
 
        if ($assignMode == Model::UPDATE) {
            $this->save("imageurl", $this->imageurl);
            $this->save("alternate", $this->alternate);
        }
    }

I plan to work on this mod when I get over my carpal tunnel issues, which may be awhile. I will help as I can when that time comes.
So do I add that code in ownedadoptableviewmodel? Sorry I'm not good at coding lol. Thanks for the help!

Also how do I get it to merge the image then? Because it isn't merging them it just leads to the white screen after breeding. I can't find the viewmodel or or domainmodel files. I'm using it in 1.3.4. so idk why it isn't working out of the box?
 
Last edited:
So do I add that code in ownedadoptableviewmodel? Sorry I'm not good at coding lol. Thanks for the help!

Also how do I get it to merge the image then? Because it isn't merging them it just leads to the white screen after breeding. I can't find the viewmodel or or domainmodel files. I'm using it in 1.3.4. so idk why it isn't working out of the box?
Sorry, I didn't know you were on an older version. Without downloading and testing the version you are on, I don't think I can help. Also, Mysidia doesn't natively merge images. This is something you would have to write and implement yourself. As far as I know, pets inherit either the mother's or the father's image and species, depending on if you have allowed interspecies breeding.

That code I posted is for model/domainmodel/ownedadoptable.php and not the model/viewmodel/ownedadoptableviewmodel.php which your version doesn't have. You can compare my code with the ownedadoptable.php code you have and see if your version has a similar function. I use 1.3.6
 
Last edited:
Sorry, I didn't know you were on an older version. Without downloading and testing the version you are on, I don't think I can help. Also, Mysidia doesn't natively merge images. This is something you would have to write and implement yourself. As far as I know, pets inherit either the mother's or the father's image and species, depending on if you have allowed interspecies breeding.

That code I posted is for model/domainmodel/ownedadoptable.php and not the model/viewmodel/ownedadoptableviewmodel.php which your version doesn't have. You can compare my code with the ownedadoptable.php code you have and see if your version has a similar function. I use 1.3.6
So I found the problem, fopen isn't on in mysidia host.
 
Sorry, I didn't know you were on an older version. Without downloading and testing the version you are on, I don't think I can help. Also, Mysidia doesn't natively merge images. This is something you would have to write and implement yourself. As far as I know, pets inherit either the mother's or the father's image and species, depending on if you have allowed interspecies breeding.

That code I posted is for model/domainmodel/ownedadoptable.php and not the model/viewmodel/ownedadoptableviewmodel.php which your version doesn't have. You can compare my code with the ownedadoptable.php code you have and see if your version has a similar function. I use 1.3.6
Were you able to get this working on 1.3.6?
 
I'm sorry I wasnt around to help with this! I have been swamped at work for a while.

I too would love to get this working in 1.3.6 !!!

I have tried and consistently failed to do so.

I have to admit defeat :(
 

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

Latest Posts

Top