Mys 1.3.4 Updated! Merged Breeding Mod for 1.3.4

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
NOTE: you must use parents that mesh exactly in size and shape for this to work!

What happens here is the inserted image url created in breeding supersedes the 'standard' of the adopt.

This Mod will allow you to take a custom image for the parents, mother and father, and then blend them when they breed to create a blended/merged offspring or offsprings.

You can get some really fantastic results if you manually insert the image for each parent in imageurl in owned_adoptables.



**Important!:

You will need three folders in the main directory you likely don't have:


images
backup_images
deco_images

All your pet images will need to be in /images.

Also, they must be exactly the same shape and size.

The background must be white. Very important.


Okay so you will want to add these four files, just upload them to overwrite what you have.

I strongly suggest you clear the image around the actual adopt, in case you want to add something later, or just to not have anything but the pet image be carried over and merged in the child image.



the code:


1. The breeding script goes in the /adminacp section.

2. The class_breeding script goes in classes.

3. The class_ownedadoptable goes as well in classes!

4. Breedingview goes in View


Thanks to HOF for this really wonderful Mod!! :) This was based off one of my own Mods but it wasn't working here at all, and HOF graciously altered it for us!


Mother

RSRa.png


Father

ESRa.png


Child

1391184488KS.png
 

Attachments

  • Merge Breeding Mod v1.3.4.zip
    7.8 KB · Views: 52
Last edited:
Would you be willing to upload examples? I'm not sure I understand how this would work or how the result would look.
 
I'll upload some later today, sure! :)

That will make it easy to see what this great script can do!
 
Examples added!

Remember the image has to be something that will mesh exactly with all others of that breed/species whatever --- identical, for the mesh to work.

Keep levels and all that in mind, for me, I'm only allowing breeding at 4th level.
 
Last edited:
Wow, this is pretty fascinating. Just how did you stumble upon this?

What exactly is it doing? Multiplying? Overlaying? Xor? I can't even tell. I'll take a look, because I'm super curious as to how this was achieved.

Any idea what would happen if the species were the same dimensions but one had a glow around it? Would the baby keep the glow, or would it cause a glitching mess? I assume it would keep the glow, but I'm not necessarily sure what color it would be in (and I suppose it doesn't particularly matter).

Does this work with transparent pngs and gifs?

How hard would it be to limit it to a specific species, especially if all your species come at a variety of dimensions? Or is that already a feature in this mod (or do we have to rely on our visitors not to merge strange things and create glitches)? (Breeding groups should help with this, right? Because I don't mind babies of species A or species B, which is what breeding groups are meant to do, but this will only work with things on the same species. I guess I'll just have to make a species that only breeds like this?)

(( unrelated: I rather like the breeding system on Flight Rising, where the babies end up being one of range of colors between the two parents. Colors are come in sections (primary, secondary and tertiary accents) and are likely stored on the server as separate pieces and then merged with php. And they also merge down textures as genetics. At FR, the color is obviously determined by a set array of variables, and isn't merged using... whatever you are? Yours is very creative, however! I wouldn't want to completely imitate FR, anyway. ))
 
Last edited:
These are interesting examples Anna, I am sure people will understand what this mod does better. I dunno about the color part though, is the new color produced by mixing pink and green? XD
 
@HOF:

Thanks! And yes that was a horrible choice of mine for merged colors ughhh!! hahah!


@ Kyttias

Glad you like it! :)

1. It's overlaying, as I understand the mechanics of it. I coded it from a base script for image merging I had commissioned. It's imagemerge basically.

2. If the same shape and size is kept, and one has a glow or something else, anything else really, on one parent, that should transfer over. You can mess with the opacity too, in class-breeding!

3. I can't say if it will work with transparent, I'd say just experiment, really. Whatever is on the image for the parents is directly melded and merged, so you want a clear background around each pet image if you DON'T want that to carry over.

4. For my own site, right now I have it limited to one level and one breed that's onsite, but it's a really good question about limiting it --- I wouldn't trust the members to not try to mix and match, and while the results might be amusing, that can get really -- a little too interesting lol.

I am thinking that the limiting will have to come from controlling who breeds with who and what--- always the like-species that will 'match'.
 
Sadly it seems the examples images no longer work. Could you possibly replace them with new ones?
 
I'm getting this error. How can I fix it?

Warning: Missing argument 1 for Breeding::mergedBreed(), called in /home/wildhors/public_html/classes/class_breeding.php on line 52 and defined in /home/wildhors/public_html/classes/class_breeding.php on line 84

and my code in that area in that file is this:

private function mergedBreed($species){
if($this->female->getType() != $this->male->getType()) throw new BreedingException("class");
$name = "Child of {$this->female->getName()} & {$this->male->getName()}";
if(!$this->imageurl) $this->imageurl = $this->getImageurl($name);
$num = rand(1, $this->settings->number);
for($i = 0; $i < $num; $i++){
$this->offsprings->append(new Adoptable($this->female->getType()));
}
}
 
I did try to work out what was wrong, but I'm not finding it.

I know when we initially added this, years ago, you did the insert of it for me :)

I didn't write the code either, I had it coded for me ten years ago. Not really sure what's going wrong with it, it used to work just fine with the latest version of Mysid!
 
Yeah I'm not really sure either lol. I put the files in all the correct areas, but it still wants to give me this:

Warning: Missing argument 1 for Breeding::mergedBreed(), called in /home/wildhors/public_html/classes/class_breeding.php on line 52 and defined in /home/wildhors/public_html/classes/class_breeding.php on line 84
 
If you read on my Mod you will see it requires an imageurl in ownedadoptables in SQL.

I'm wondering if that might be the issue, it needs to merge two images, and if it doesn't have two in that field ....
 
I ended up going into the database and added the imageurl to the owned adoptables but I still had the same error code. I'm not really sure what's going on XD I'm sorry I'm being a pain :[

evQLsvE.png
 
You aren't being a pain at all :)

You have a right to get some help, I wish I could work this out ... I had hoped the error was due to it trying to call up a non existent imageurl.

Hmmmm... Gotta love the detail it gives 'An error has occurred.' haha.

Need more clues!
 
I did look at the two class_breeding errors too btw.

I don't see anything that should be throwing this ...
 
It might be, not sure.

I paid for the Mod to be coded years ago, and at one point it was a chooseable option in the CP.

I don't see it now.

HOF was the one who had to help with inserting it in the code and working :) I failed lol.

It does need an imageurl always supplied in imageurl field, for it to work.
 
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
 
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

Latest Posts

Top