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 :(
 
I added this to my site but got a white screen after aging up the bred adopt, it appears the url isn't being added after breeding


it would be amazing to get this working for the new version. It was quite fun to be able to breed for a new look this way!

We also really, really need a way to do layers I think ... I have tried to study how to implement it, to no avail.



Does HoF come here at all anymore and help with things like this?
 
For anyone still interested in this, I had this code done for me professionally back in 2011/2012 .. and HoF graciously modded it for 1.3.4 and 1.3.5. It worked beautifully, and genuinely merged the two markings etc in breeding.

it works with the images being inserted into owned adoptables table, and then the baby gets a brand new image created - also inserted in the table when one is born.

So you have all the pets having their own unique generated images. It uses imagecreate and things like that to do the merge and creation of the new image .. I have no idea if that will even work at all for the latest version of Mysid. I wish it would, it was so much fun.

I have tried for years to understand and implement this here, but I didn't understand fully how it was made in the first place -- that's why I paid for that code :)
 
I hope to visit this at some point but I'm too swamped with work and a class I'm taking. I sporadically code every now and then when I have time and my brain isn't fried from my other obligations, but this one is a bit large for me to handle right now. I still need to get parents and offspring to insert in the database for lineages with simple breeding, which hasn't been a priority yet with other features I'm fighting with Mysidia to get working.

The layering image merging itself as you are describing for breeding is easy to do in straight PHP, but 1.3.6 is a beast to mod.
 
Last edited:
The layering image merging itself as you are describing for breeding is easy to do in straight PHP, but 1.3.6 is a beast to mod.


it is, its a nightmare, and a lot of us feel that way ... the good old days when I could make mods .. now I can barely navigate the concepts :D
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,299
Messages
33,231
Members
1,608
Latest member
qwerty
BETA

Latest Threads

Latest Posts

Top