#1
|
||||
|
||||
1.3.5 Alternates
I see that when a new adoptable is inserted into the database the field "alternate" is filled in with 0. So how/when/where is the alternate form defined?
(Asking because my 1.3.4 site is heavily modified so I am upgrading in bits and pieces.) EDIT: Also it looks like class_breeding isn't updated for the new alternates function.
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 12-29-2020 at 10:42 AM. |
#2
|
||||
|
||||
There is a new table called {$prefix}_alternates, which defines a list of adoptables alternate form. I will look into the breeding system and see if theres a bug I need to fix.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
||||
|
||||
I see that the alternates table stores the alternate forms for each adoptable type, but how is the chosen alternate form selected for each individual owned adoptable? I just see in the owned_adoptables table the section for alternate, but the default for when a pet is adopted is simply 0. So where/how does the script determine which alternate form is used?
And for breeding it's just in class_breeding.php the insert function is still the old version (with the "use_alternates" column for ownedadoptables.)
__________________
My Mods Site (1.3.4, 2020 Mods) |
#4
|
||||
|
||||
I've fixed the issue with alternate status in breeding. If you are using Mys v1.3.5 already, download the attachment to fix the bug. Otherwise, I will update the download links later today so this issue will go away for new users.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
||||
|
||||
I also have the same question as Abronsyth where do one set an individual adopt to be alt or not and witch one to use. Im trying to upgrade my site and most of my adopts have an alternate version, but the alt image is not showing, now all of my alternates have the default image.
edit: never mind, found where to add the alt image. my new problem is that the last alt form don't work. my site uses 7 levels 4 for the eggs and 3 for the rest. so I have an alternate adopt at level 6 and then level the adopt to level 7 and the image reverts to the primary image... Last edited by kristhasirah; 01-04-2021 at 05:49 PM. |
#6
|
||||
|
||||
Where did you find that the individual pet's alt form is stored?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#7
|
||||
|
||||
when an alt is chosen the url will be written in the imageurl column and the 0 in the alternate column will be replaced with the number of the alt.
so to make an owned adoptable an alt you need to add the image url to the imageurl and add the number to the alternates column |
#8
|
||||
|
||||
Quote:
I'm also having the last-alt error, puts it in as 0 even when I put a different number in. However when I got back and edit it, it updates just fine. Edit: Nevermind, it appears to be working upon adding more. Weird.
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 01-10-2021 at 02:59 PM. |
#9
|
||||
|
||||
Last alt works similarly as other conditions as the chance will apply. If you set the last alt field with 50 chance, then it will only be selected 1 out of 2.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#10
|
||||
|
||||
I've been having an issue with the alts too, and on a brand new 1.3.5 website set up on mysidiahost. I'd been having an issue with it on my wamp site too, even with a fresh install to check if I'd done something wrong. It throws this error:
Fatal error: Call to undefined method Adoptable::getAltStatus() in /home/beanpets/public_html/adopt.php on line 32 So I checked adopt.php and there is this line on line 32: $alts = $adopt->getAltStatus(); But from what I can see this is never defined in class_adoptable so I think the error is because it doesn't know what it means? If I delete that line the error goes away and allows me to adopt things, but any alt form I set in adminCP doesn't get applied so that's not a proper fix lol This is my class_adoptable if anyone can help: PHP Code:
Update: I tried using the 1.3.4 files adopt.php and class_adoptable.php and they both work (with a slight change to make usealternates say alternates in adopt.php). It seems the 1.3.5 class_adoptable doesn't have this section that the 1.3.4 version does. PHP Code:
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.
|
|
|
What's New? |
What's Hot? |
What's Popular? |