Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
Issues with Alternate Outcome Rarity
Resolved
This is a little confusing. One of my artists brought to my attention that outcomes that are supposed to be less common are, in fact, more common. For example I have a pet that has an alternate outcome. I set the outcome chance to be 1 out of 10. However, it seems to have reversed it so that the alternate's chance of happening is 9/10, leaving the original adopt to have an outcome of 1/10. I don't really get where this is going wrong, so I'm afraid I cannot provide more information than this. Basically the "alternate outcome chance" is doing the opposite of what it should.
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 02-18-2016 at 02:48 PM. |
#2
|
||||
|
||||
Re
Quote:
Also, when you check the breed adopts in your database, does the probability in the probability column look normal? Edit: Here's what I suspect: Apparently, the ACP (at least for my version) uses an integer percent for probability. This percentage is based on 100, so 1/10 would be 10/100. If you just input "10", that's your 1/10 probability. The ACP might do something funny with fraction values? O.o Last edited by Hwona; 01-16-2016 at 04:01 AM. |
#3
|
||||
|
||||
I'm not putting in a fraction, I am putting "10" in the box. The table looks as it should...so I'm not sure what's going on.
__________________
My Mods Site (1.3.4, 2020 Mods) |
#4
|
||||
|
||||
Re
Quote:
PHP Code:
my class_probability code: PHP Code:
Does your probability work fine for other things... say, item consumption? Last edited by Hwona; 01-16-2016 at 07:07 PM. |
#5
|
||||
|
||||
The only difference between the codes is in the .../classes/class_probability.php file I have this at the top (where as yours does not);
PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) |
#6
|
||||
|
||||
Well the alternate outcome isnt generated from probability class, that one is used to generate one adoptable from several possible adoptable species(ie. when your two adoptables can produce offspring of multiple species).
The actual alternate status generation code is located at class_adoptable.php, in this method: PHP Code:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#7
|
||||
|
||||
Re
Quote:
|
#8
|
||||
|
||||
HoF, you mention that it should work for pets adopted through the adoption center...does this also apply to pets adopted via adopt shops (as the issue has only really been noticed with those purchased from stores)?
Edit: Fixed Apparently there were some discrepancies in how adoptables from shops were dealt with in regards to the alternate outcome, so I replaced the getAltStatus in the file .../classes/class_stockadopt.php with the one from .../classes/class_adoptable.php and now it seems to be functioning the way it's supposed to. Edit 2: Okay I *think* I fixed it...I'm not yet sure. I'm still testing it.
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 01-18-2016 at 06:09 PM. |
#9
|
||||
|
||||
http://www.mysidiaadoptables.com/for...20&postcount=6
This might interest you. I noticed the same problem when I first made my adopt shop. All pets were coming out with their alternate images. I think this fixed the issue but havent tested it completely. |
#10
|
||||
|
||||
Well adoptable shops surely dont work the same way as standard adoption, as it bypasses adoption conditions and the behaviors may be strange to you. Its possible to tweak adoptable shop to work the way you expect it to work though, and its not very difficult.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
What's New? |
What's Hot? |
What's Popular? |