Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.3.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=42)
-   -   Mys v1.3.4 Updated! Merged Breeding Mod for 1.3.4 (http://www.mysidiaadoptables.com/forum/showthread.php?t=4370)

Missy Master 01-29-2014 03:46 PM

Updated! Merged Breeding Mod for 1.3.4
 
1 Attachment(s)
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

http://www.sim-life.com/Simantics/images/RSRa.png

Father

http://www.sim-life.com/Simantics/images/ESRa.png

Child

http://sim-life.com/Simantics/images/1391184488KS.png

squiggler 01-29-2014 04:33 PM

Would you be willing to upload examples? I'm not sure I understand how this would work or how the result would look.

Missy Master 01-31-2014 09:32 AM

I'll upload some later today, sure! :)

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

Missy Master 01-31-2014 10:21 AM

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.

Kyttias 01-31-2014 03:15 PM

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. ))

Hall of Famer 01-31-2014 03:17 PM

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

Missy Master 02-01-2014 03:49 PM

@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'.

AndromedaKerova 11-10-2014 02:42 PM

Sadly it seems the examples images no longer work. Could you possibly replace them with new ones?

Micolai 06-17-2020 12:09 AM

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()));
}
}

Hall of Famer 07-09-2020 02:22 PM

Actually you can try PMing Missy Master herself, have you tried that?


All times are GMT -5. The time now is 02:19 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.