I also force adjusted the value of 7 (the number of pets available at tier 4 treat) to a value of 1Saul wrote: ↑Thu Jun 22, 2023 2:18 pmif you changeclaraS wrote: ↑Thu Jun 22, 2023 2:42 amSo I was looking through the code and I'm pretty sure I found the area where the pets are rolled.
[152] is the length of the list of pets to iterate through. 0 = doot, 10 = frog.Code: Select all
if (1 == this._UIinventory13On[86]) { if (0 < c.asNumber(this._GenINFO[135])) { if (.01 == this._GenINFO[135]) this._DL2 = w.getCompanionInfoMe(), null == this._DL2 && (this._DL2 = []), null == this._GenINFO[149] && (this._GenINFO[149] = []), this._GenINFO[149].length != this._DL2.length && (m._customBlock_PlaySound("Comp_Beep1"), this._GenINFO[164] = 1, this._GenINFO[150] = [], this._GenINFO[150] = ("" + h.string(this._DL2[Math.round(this._DL2.length - 1)])).split(","), this._GenINFO[135] = .98, this._GenINFO[152] = 11, 4 == this._GenINFO[160] && (this._GenINFO[152] = 7), 666 > c.asNumber(this._GenINFO[150][3]) ? this._GenINFO[157] = 38 : 900 > c.asNumber(this._GenINFO[150][3]) ? this._GenINFO[157] = 84 : 980 > c.asNumber(this._GenINFO[150][3]) ? this._GenINFO[157] = 33 : this._GenINFO[157] = 42); else if (99 > c.asNumber(this._GenINFO[135]) && (1 > c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135])) && (this._GenINFO[135] = c.asNumber(this._GenINFO[135]) + .0025, .0049 > c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135])) && (this._GenINFO[135] = Math.floor(c.asNumber(this._GenINFO[135])))), 0 == c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135])))) if (this._GenINFO[152] == c.asNumber(this._GenINFO[150][0])) 2 > c.asNumber(this._GenINFO[152]) ? m._customBlock_PlaySound("Comp_PetWin3") : 4 > c.asNumber(this._GenINFO[152]) ? m._customBlock_PlaySound("Comp_PetWin2") : 7 > c.asNumber(this._GenINFO[152]) ? m._customBlock_PlaySound("Comp_PetWin1b") : m._customBlock_PlaySound("Comp_PetWin1"), this._GenINFO[135] = 100, k._customBlock_GrowImgInstREAL(this._UIinventory13[88], 0, 0, .7, "Bounce_Out"), this._GenINFO[138][37].setX(348 + c.asNumber(a.engine.getGameAttribute("CustomLists").h.CompanionDB[0 | c.asNumber(this._GenINFO[152])][5])), c.runLater(2e3, (function (e) { 100 == n._GenINFO[135] && c.runLater(2e3, (function (e) { 100 == n._GenINFO[135] && (n._GenINFO[135] = 101) }), n.actor) }), this.actor);
[160] is your tier of petfood. 4 is the max tier, and it reduces the pool for [152] to 7. Otherwise [152] is the standard 11.
[150] is the server-side companion information, and I suspect that [150][0] is the roll for which pet you're going to receive. the code loops......until [152] == [150][0]. Theoretically, changing [152] to 0 will guarantee a doot, but doing so will brick your game unless you have a way to reroll the server-side information. I suspect that calling w.getCompanionInfoMe() will also do a roll in the server(?) and you might be able to abuse that to roll it enough times to land on your desired number. But I haven't been able to test it.Code: Select all
this._GenINFO[152] = Math.round(c.asNumber(this._GenINFO[152]) - 1)
Anyway, that's about as far as I've got with analyzing it. Random note, changing the values of COMP_foodTypeOdds is purely cosmetic as far as I can tell. I did roll a doot and then a riftwalker back to back after raising the odds to >100, but I have a feeling that it might have been just a miraculous stroke of luck as the effects aren't repeatable.
tl;dr I think there might be a way to spoof the GenINFO[150][0] roll. Maybe this is an avenue for experiments for having permanent unlocks on a non-cheat client.
toCode: Select all
else if (99 > c.asNumber(this._GenINFO[135]) && (1 > c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135])) && (this._GenINFO[135] = c.asNumber(this._GenINFO[135]) + .0025, .0049 > c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135])) && (this._GenINFO[135] = Math.floor(c.asNumber(this._GenINFO[135])))), 0 == c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135]))))
last line of code "&& (this._GenINFO[150][0] = 2)"Code: Select all
else if (99 > c.asNumber(this._GenINFO[135]) && (1 > c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135])) && (this._GenINFO[135] = c.asNumber(this._GenINFO[135]) + .0025, .0049 > c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135])) && (this._GenINFO[135] = Math.floor(c.asNumber(this._GenINFO[135])))), 0 == c.asNumber(this._GenINFO[135]) - Math.floor(c.asNumber(this._GenINFO[135]))) && (this._GenINFO[150][0] = 2))
visually I have got ram (in the fact because of this change I can only get ram, rift slug or doot) but when I visually got ram and I was happy in the fact I have got sandy pot... idea was nice :>
probably GenINFO[135] or GenINFO[153] its for companion roll (I don't know!) when GenINFO[150][0] its for visual roll... but I'm not sure anyway I'm only sure that GenINFO[150][0] its for visual roll <-- tested :< on 2 acc (free rolls)
GenINFO[150][3] <-- ???
Visually it showed I got king doot, but in reality I seemed to have lost the crystals entirely and gotten nothing. It bricked the game client side.