Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#21
|
||||
|
||||
@ HoF
aaaaah, that's it. I've got it. Cool... thank you |
#22
|
||||
|
||||
Is it possible, to write this function for Mys 1.3.3 ?
This would be very, very nice :) I think, I have to study this new (cyrillic ) version Thanks a lot Last edited by draugluin; 06-18-2013 at 04:29 AM. |
#23
|
||||
|
||||
Is this modification compatible with 1.3.4?
__________________
Failing at being normal since 1990. |
#24
|
||||
|
||||
I had a go at this but there seems to be no doadopt.php in 1.3.4.
I found something similar to the code inside classes/class_adoptable.php PHP Code:
// Adoption complete, show the user a confirmation screen... I kept looking and finally found something close to that line in view/adoptview.php I'm not sure if the code should go here or in class_adoptable.
__________________
Failing at being normal since 1990. |
#25
|
||||
|
||||
Ok, I've given up after over a week of failing. If someone could get this working for 1.3.4, that would be awesome.
__________________
Failing at being normal since 1990. |
#26
|
||||
|
||||
Well looking for $genders = array('f', 'm'); was definitely key, still! It's also in classes/class_promocode.php and classes/class_stockadopt.php, of course, for adoptables acquired through promo codes and shops. Take note, where you found it in classes/class_adoptables.php has it inside a function. This function is being run in adopt.php - and this is where we'll have to implement the changes for this particular type of acquiring a pet (from the /adopts page, where available pets are shown).
So let's get started! Alternate Gender Mod for Mysidia v1.3.4 We're going to opening up adopt.php first. Inside the index function, after $gender = $adopt->getGender(); add: PHP Code:
Now in classes/class_stockadopt.php, inside function append($owner = ""), find $rand = rand(0,1), and afterward add in - PHP Code:
PHP Code:
Now go do exactly the same thing you just did above inside classes/class_promocode.php as well! This time you can find the $rand to add code after inside function execute(). All done. But please pay attention to two details, as seen here when creating an adoptable: Changing this number will not change the gender ratio, as the gender is determined at birth with a random generator. There is no 'chance' of alternates happening now, they will only happen based on gender at the pet's creation. If you make a gender changing potion, this will not change the pet's image. So if you plan on making a function for such an item, remember to change the alt image, not just the gender marker. Check out this mod for further instructions. Keep in mind that this gender alternate image mod cannot affect the EGG or LEVEL 0 image. My pets do not hatch from eggs, so I must keep this in mind and supply a neutral, gender-less image for tiny baby pets, that will last at least until their first click/visit. Lastly, the code is currently set for the "default" gender to be female. So, if female, use the base image. If male, use the alternate image. If you want this to be the other way around, change case "m": to case "f": in all three switch statements. This is universal for all pets! ALSO!!!! Hey HoF/IntoRain, if you stop by this thread -- what would have to be done to make these changes go through immediately at egg/0 level?
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 12-10-2014 at 12:38 AM. |
#27
|
||||
|
||||
Oh so Kyttias is giving a try on this idea, sounds intriguing. ^^ I replied to your message on AIM, it will be easy and possible to edit the alternate image system so it will start to work at lv.0. I think there is a method in class Adoptable that generates an owned adoptable's primary or alternate form, you can try applying this method when an owned adoptable is adopted at the first place, rather than when it hits lv.1.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Genders/More Alternate Images | Clessidra | Suggestions and Feature Requests | 3 | 02-27-2014 11:42 AM |
Multi Alternate Images | Taintedkitten | Questions and Supports | 3 | 01-10-2013 08:44 PM |
Adoptable genders | Silvercivet | Questions and Supports | 2 | 02-12-2012 11:35 AM |
How do I completely disable/delete Breeding and genders? | D.A.T.A. | Questions and Supports | 5 | 08-29-2011 02:34 AM |
Alternate images, how do they work? | Shikari | Questions and Supports | 4 | 08-06-2011 09:17 PM |
What's New? |
What's Hot? |
What's Popular? |