Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.1.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=20)
-   -   Breeding System - Complete! (http://www.mysidiaadoptables.com/forum/showthread.php?t=1156)

Arianna 12-24-2009 01:50 AM

RE: Breeding System - Complete!
 
Thanks. :) I'm glad you got it working. The problem for me is I have so many columns in the database (dates, parents, lots of other stuff) that it's hard to make the code work for everyone on the first try.

Ashje 12-24-2009 02:06 AM

RE: Breeding System - Complete!
 
Lol. Well, thanks for all the help. +repped. :D

Arianna 12-24-2009 04:01 AM

RE: Breeding System - Complete!
 
Thanks. :)

SieghartZeke 12-24-2009 04:24 PM

RE: Breeding System - Complete!
 
Uhm...i have a question..is possible to make different character from the breeding?
Becuase in my site i want make a little difference...

For esample:
Elesis
http://www.gca.netai.net/picuploads/...eb263c7fac.gif
+
Ronan
http://www.gca.myadopts.com/picuploa...c7a07ebf8d.gif
=
http://www.gca.myadopts.com/picuploa...f72551de84.gif
???

Arianna 12-25-2009 03:15 AM

RE: Breeding System - Complete!
 
I don't think so, no. Sorry.

bokkun 12-26-2009 09:25 AM

RE: Breeding System - Complete!
 
Actually, it is possible, but requires quite a big code addition
probably it would be best to create a function which looks up the combination of the id's
like pet 2+7 gives back pet 9
but that means you have to save those combinations somewhere(preferable the database)
and when there is no combination it should say that the pets won't mate
I'll take a look at it, but it seems to be annoyingly time-taking

Arianna 12-26-2009 09:41 AM

RE: Breeding System - Complete!
 
The point is - if you have 20 pets, that's an additional 400 pets you need to make. And what about if those 400 kinds can breed?
I won't code something like it, it's simply to hard. I guess you could check for certain situations (if ($kind="Kind1")) and then determine it, but I'm not in the mood for that.

bokkun 12-26-2009 11:48 AM

RE: Breeding System - Complete!
 
Yes, it would be pretty hard
It's just an idea, maybe there's some sort of way...
I'll play with the code a bit, maybe I'll find some way
anyway nice script, seems to work flawless on my server.

mapleblade 12-26-2009 11:51 AM

RE: Breeding System - Complete!
 
maybe ill make in the future a nod on this mod to let the eggs breed once, im not sre if its gonna succeed but ill maybe gonna try :D

Roconza 01-22-2010 12:00 PM

RE: Breeding System - Complete!
 
Ok, here is a question that has to do with the above asked question:

Can I in theory make a "group" if you will as a new attribute like "gender" or "species" and tell the script instead of species the parents from this "group" can breed despite species and produce a egg that's a random choice of the one of the parents species?

I want to try this out it should work in theory but my php skill are very limited.

Arianna 01-22-2010 01:36 PM

RE: Breeding System - Complete!
 
Quote:

Originally Posted by mapleblade
maybe ill make in the future a nod on this mod to let the eggs breed once, im not sre if its gonna succeed but ill maybe gonna try :D

I have no idea what you mean.

Roconza, I guess you could. I don't have time to make it, maybe you can get someone else to try for you.

Seapyramid 01-23-2010 12:16 AM

RE: Breeding System - Complete!
 
Quote:

Originally Posted by Roconza
Ok, here is a question that has to do with the above asked question:

Can I in theory make a "group" if you will as a new attribute like "gender" or "species" and tell the script instead of species the parents from this "group" can breed despite species and produce a egg that's a random choice of the one of the parents species?

I want to try this out it should work in theory but my php skill are very limited.

basically you would have to make a new table with say 1-10 being possible for 1xb breeding ... 11-20 being possible for yxz breeding.. then set up limits on a random for each breeding pair possible... thne set those randoms to the ids in the table.. then when a randon is right have it insert into the owned_adoptables table...


Have Fun :)

Quillink 01-29-2010 12:26 PM

RE: Breeding System - Complete!
 
Quote:

Originally Posted by Seapyramid
Quote:

Originally Posted by Roconza
Ok, here is a question that has to do with the above asked question:

Can I in theory make a "group" if you will as a new attribute like "gender" or "species" and tell the script instead of species the parents from this "group" can breed despite species and produce a egg that's a random choice of the one of the parents species?

I want to try this out it should work in theory but my php skill are very limited.

basically you would have to make a new table with say 1-10 being possible for 1xb breeding ... 11-20 being possible for yxz breeding.. then set up limits on a random for each breeding pair possible... thne set those randoms to the ids in the table.. then when a randon is right have it insert into the owned_adoptables table...


Have Fun :)

Wouldn't adding a "group" column to the owned_adoptable table and a random number generator in the breeding script work just as well?

E.g.
  • if ($dadgroup == $momgroup){

    $pickspecies = rand(1,2);
    if $pickspecies = 1 { $babyspecies = $dadspecies }
    else { $babyspecies = $momspecies }

    }
    else{
    return die("What were you thinking?? A walrus and a DUCK??")
    }


Btw, do NOT copy/paste this. This is NOT real php, just an example. :P
Real php syntax would take me a lot longer to write - time I don't like to use at 2:30am. :S

Szymon 02-06-2010 02:22 PM

RE: Breeding System - Complete!
 
can anybody re-upload? please i've got problem with breeding.php and funstions.php :|

SieghartZeke 03-30-2010 06:42 AM

RE: Breeding System - Complete!
 
Why when i do the breeding,a nd i go to manage i dont show the new pet???

Missy Master 05-17-2010 10:02 AM

RE: Breeding System - Complete!
 
I'd like to do something where there is like a 2 day "pregnancy" that happens before the new egg goes to the hatchery.

I think its a matter of applying a timing to this, but I am not sure how to do it--- and everything I have read is making it more confusing for me.

So basically, the result would be the egg/baby still, but only after a certain time frame, and not instantly!

Possibly the pregnant pets would have a special designation too, or whatever, so you could mark them.

thanks for the help, I have an idea how to do it, just adding timing, but not sure at all how to do it.

PokePets 07-26-2010 09:57 AM

RE: Breeding System - Complete!
 
There is missing a part of the code.
Enter this;
PHP Code:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender')"); 

After this;
PHP Code:

// Now we actually process the adoption and add it to the database...
// We need a unique code for the adoptable so we can show it to the user when we're done here...

$code rand(120000); 

;)
So works it fine for me.

myadopts 08-06-2010 11:45 AM

RE: Breeding System - Complete!
 
sorry...i have a question.....How do you make a pet male or female...or do you just fake it..or not add it?

PokePets 08-06-2010 12:18 PM

RE: Breeding System - Complete!
 
It's. set automatic.
Look at the post of tommyk1210;
http://www.rusnakweb.com/forum/showthread.php?tid=1367&highlight=gender

or do you mean that some adoptable only can be male/female/ etc. ?

myadopts 08-07-2010 09:21 AM

RE: Breeding System - Complete!
 
oh..ill insert the code I get it know thanks:D ill give credit if i use it

redheadturkey 08-08-2010 02:33 PM

RE: Breeding System - Complete!
 
anyone have any ideas on how to do a delay of the actual birth? like how to write the timing for it?

thanks!

heyeeyhe 08-09-2010 09:49 AM

RE: Breeding System - Complete!
 
I think theres a part of the code that shows that... im trying to work on making a script with pet stats like on foopets:D

MikiHeart 08-09-2010 10:38 PM

RE: Breeding System - Complete!
 
redheadturkey:
To do that, you would have to look into timing.
It would depend on how you want it done.
But I would suggest a countdown on the breeding page.
Then after that time, the user can get the pet.

Just thinking on it a little, I think you would have to have the pet created instantly like the script does.
But then have it so the pet isn't given to them, but the system.
So you make a clone of the owned_adoptables. but called it something like bred_adoptables.
You would have to add some extra fields, like who it belongs to and stuff.
Then say, since it has a date on it. You'd need to have a script that checks that date, and compares it to today's date. Then if the right time has passed, it gives the adopable to right owner. Then updates the 'created date' to the date of the day you're getting it.

Sounds really hard XD but I'm just bad at explaining things. I don't understand php with dates too much. But I'm sure you can do it.
You'd need to set up a cron, and have it run like once a day. Which will do all this work for you XD

Or, you could just have a countdown on the page, then once the countdown is over, it displays a button in which the user clicks, and it gives them their pet XD No need for cron then o-o

Raikalynx 09-11-2010 09:00 AM

RE: Breeding System - Complete!
 
..I've tried several solutions suggested in this thread, and I just can't get the script to enter the new egg into the mysql database.

It works fine otherwise, and it's a really cool script!

..I'll go learn some PHP now, I hate not knowing anything about this XD

PokePets 09-11-2010 10:01 AM

RE: Breeding System - Complete!
 
Look;
Quote:

Originally Posted by PokePets
There is missing a part of the code.
Enter this;
PHP Code:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender')"); 

After this;
PHP Code:

// Now we actually process the adoption and add it to the database...
// We need a unique code for the adoptable so we can show it to the user when we're done here...

$code rand(120000); 

;)
So works it fine for me.



;)

Raikalynx 09-11-2010 10:05 AM

RE: Breeding System - Complete!
 
Thanks, but that's one of the solutions I tried..
the breeding now works correctly, the egg is being transferred into my adopts, but it keeps displaying the query on the new egg page and I can't get rid of it..

..just a minor nuisance me and future users will just have to live with, I guess..

Wrim 09-23-2010 11:21 PM

RE: Breeding System - Complete!
 
Awesome script!

2 questions though.

The first inquiry is just a small bug, but I thought I'd ask. If I try to mate without having a second gender I get error-messages. Is there some way to block this by adding a "No male/female co-breeder available" message or something like that in the textbox?

Secondly, the new-born are born without names. It's really not a problem, I was just wondering if there's a way to put a placeholder name like 'Newborn' or something so it doesn't just say "Get stats for" and "Get BBCodes / HTML Codes for" in the pet management section.

That's all. Thanks for all the walkthroughs and all the help.

vexel 09-24-2010 12:46 PM

RE: Breeding System - Complete!
 
The born name is - "Daughter of (mpther name) & (father name).
But if you haven't got gender system it doesn't work ;D

Wrim 09-24-2010 12:58 PM

RE: Breeding System - Complete!
 
My mistake, used an old pet to breed, hence the no-name error. I did install the gender-system but I didn't change the old pets genders.

myadopts 09-28-2010 05:52 PM

RE: Breeding System - Complete!
 
Link to one I made.. It has some problems but, a look of how it looks. file:///C:/Users/admin/documents/my%20web%20sites/breeding%20test.php

Teshia 09-28-2010 06:43 PM

RE: Breeding System - Complete!
 
Sorry ma, but we can't actually view code that has been made on your home computer. You can try attaching the file or uploading it to a host so we can see it there.

Eloise519 10-01-2010 04:53 AM

RE: Breeding System - Complete!
 
I wasn't impling anything on you Arianna.. ---------------

Hall of Famer 10-01-2010 11:47 AM

RE: Breeding System - Complete!
 
umm is this a spammer?

Anyway, Arianna you are absolutely amazing for making such a script. I'm giving you the karma you should've gotten a long long time ago, thank you. ^^

Hall of Famer 10-14-2010 11:49 PM

RE: Breeding System - Complete!
 
Oh btw, it would be nicer if there is a way to specify gender ratio for different species of adoptables. I will see what I can do with this. I've already made it possible for adoptables to evolve based on gender difference(for instance, Kirlia evolves into Gardevoir if its female, and Gallade if its male), and this is worth trying too. XD

Brim 11-11-2010 04:03 PM

RE: Breeding System - Complete!
 
Great mod, thank you! ^^


Maybe I will try to change it a bit to get different eggs (like suggested here before)...we'll see XD

Plague 12-05-2010 03:44 AM

RE: Breeding System - Complete!
 
Excellent work Arianna! Had some issues with it messing up pre-existing code, but with a few minor edits, it works flawlessly.

P.S. You're ridiculously patient dealing with so many requests of troubleshooting. Know that there are some of us who legitimately try to learn and resolve issues on our own rather than abusing your time. Some of us also understand that troubleshooting for varying code, is not an easy task.

Plague 12-06-2010 04:26 PM

RE: Breeding System - Complete!
 
@ Arianna: Is there a simple way to modify this code so there is a waiting period after a certain creature breeds? That way users can't just breed the same ones over and over again?

Kaeliah 12-08-2010 06:23 PM

RE: Breeding System - Complete!
 
Arianna is no longer active, Plague. There are ways of doing limits but none that I can think of are simple. :/

redheadturkey 12-08-2010 06:31 PM

RE: Breeding System - Complete!
 
You'd want it to be pet ID specific, as opposed to just letting all female rest, etc ------------- there would be a way, I might try to code it later ^^

Plague 12-08-2010 10:26 PM

RE: Breeding System - Complete!
 
@ Kaeliah: Sorry about that. Didn't realize she wasn't here anymore. It's sad to hear she's not active.

@ redheadturkey: Pet ID specific. Hmm. Some ideas come to mind, but I don't exactly trust the accuracy of my coding at this point. I still might dink around. If nothing else it might give others ideas and get wheels turning in a good direction.[hr]
Maybe somehow doing a modified version of the sick code, but working in time variables. Sick status seems to work the same way only instead of a happy default, the default would be an ability to breed. Instead of sick until a condition is met, unable to breed until condition is met, the condition being time span rather than click from owner. Time variable replaces owner ID and information to return to default status. I dunno. Most likely I'm on the entirely wrong track. Just throwing it out there.


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

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