Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   1.3.5 Alternates (http://www.mysidiaadoptables.com/forum/showthread.php?t=5704)

Micolai 02-05-2021 12:43 AM

I'm having the exact same problem as parayna.

Hall of Famer 02-06-2021 10:18 AM

Quote:

Originally Posted by parayna (Post 37813)
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


Actually the fix is indeed to delete the line 32. I tested it on my demo site and it worked for me when generating alternate forms when leveling up. If you see that it never gets alt form at level 0, this is because alt form no longer exists for level 0(egg stage). When an adoptable levels up, it will check the available alt forms and selects one according to the criteria. Since theres no level-up at level 0, the level 0 can only have a primary form. I hope this explains things, your adoptables will have proper alt forms if you set them for level 1 and beyond.

parayna 02-06-2021 10:34 AM

Thank you! Worked perfectly!

Another thing I just found though (but I'm not sure if it's by design or not lol) is that using an item that raises clicks (and that levels the adopt up) won't use the alt form even if the chance is set to 100%. I wanted to test the fix so I adopted some adopts, and bought some items from the shop to raise their clicks. They levelled up but didn't use the alt form for level 1, even though chance is set to 100%. It worked perfectly when I manually clicked to raise their level though! (For testing purposes I set the clicks required to 1)

I know there is an item that raises the level so I'm not sure if it's by design or not, ignore me if so lol. Thanks again! :meow:

Hall of Famer 02-06-2021 10:38 AM

Quote:

Originally Posted by parayna (Post 37821)
Thank you! Worked perfectly!

Another thing I just found though (but I'm not sure if it's by design or not lol) is that using an item that raises clicks (and that levels the adopt up) won't use the alt form even if the chance is set to 100%. I wanted to test the fix so I adopted some adopts, and bought some items from the shop to raise their clicks. They levelled up but didn't use the alt form for level 1, even though chance is set to 100%. It worked perfectly when I manually clicked to raise their level though! (For testing purposes I set the clicks required to 1)

I know there is an item that raises the level so I'm not sure if it's by design or not, ignore me if so lol. Thanks again! :meow:


I think this is a bug, items that raise clicks should trigger the alternate form selection code. Lemme take a look into it.

parayna 02-06-2021 10:41 AM

Okay, thanks :happyc:

Hall of Famer 02-06-2021 11:02 AM

1 Attachment(s)
Try this file and see if the alternate forms are generated similarly to when you level up by clicking. You will need to upload it to /functions directory, or just edit /functions/functions_items.php and replace the entire code.

parayna 02-06-2021 11:16 AM

That worked perfectly, thank you!! ^_^

Hall of Famer 02-06-2021 12:39 PM

1 Attachment(s)
You are welcome. Btw can you try the new functions_items.php file? I've updated the item functions for alternate images. There are two item functions for alternate forms, the first one 'Alts1' will set the adoptable to the specified alternate form ID(the item 'value' is the new alternate form ID), while the second one 'Alts2' will simply select one alternate form randomly(the item 'value' is the target adoptable type ID). Give a try and see if it works as expected?

parayna 02-06-2021 01:03 PM

I've just done some testing and Alts1 doesn't seem to work. I set multiple alt images for level 1 on an adopt (3 alt forms, all set at 33% chance to be applied). When I levelled them up they took on 1 of the alt forms so I made Alt1 use the ID of 5 (which was an alt that the adopt did not take)

When I use the item it says Action Completed! at the top but the actual text either says 'It appears that your adoptable does not have an alternate image at its given level...' or 'The item can only be used for adoptable Luna at level 1 or above...'

I adopted 2 to test on just in case and they are both level 1, the text seems to swap between saying both those things

Also Alts2 doesn't show in the list for me so I haven't been able to test that one yet

Hopefully that helps a little :)

SilverDragonTears 03-02-2021 02:30 PM

i'm trying to figure out why it doesn't do this automatically?>???? do we have to manually put this in for all of our adopts? that seems like a lot of work!


All times are GMT -5. The time now is 10:29 AM.

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