Jump to content

Rig the lottery: Customizable lottery chances


o____0

Recommended Posts

Overview

Instead of matching digits of your pokemon's Original Trainer IDs to the lottery number, the modded lottery will evaluate how close the OT IDs are to the lottery number. The main advantage of this system is that the mod can use configurable weights to determine how close you need to be for each prize.

 

For example, say you had a pokemon with an OT ID of 12355 and the lottery number was 12345. Without the mod, the rightmost digit would match but the 4 and 5 wouldn't, so you'd get the lowest tier prize (Full Restore). With the mod, it would see that the numbers are only 10 off and award a prize based on the configured weights. By default that would be close enough to get the 2nd best prize (exp share). For the sake of "closeness" numbers can wrap around from 65535 to 0 so those numbers are only 1 off. This treats very low or very high OT ID's fairly.

 

As you can see in the chart below, the mod gives rates very similar to vanilla except that that it's significantly more likely to receive the top three prizes than it was before. Keep in mind these are the odds per OT ID and the lottery checks the OT ID of every pokemon in your party and PC boxes.

Tier | Vanilla | Mod   | Prize
-------------------------------------
0    | 90%     | 90%   | Nothing
1    | 9%      | 9%    | Full Restore
2    | 0.9%    | 0.8%  | Max Revive
3    | 0.09%   | 0.15% | PP Up
4    | 0.0085% | 0.03% | Exp. Share
5    | 0.0015% | 0.02% | Reborn Ball

 

The top tier prize in vanilla is so rare few players will ever see it during a single playthrough. With the mod defaults and 50 pokemon with random OT IDs, a simulation suggests you'd get a reborn ball on average once per 100 days (no guarantees though!). In vanilla, it takes you 3.6 years on average under the same conditions.

 

Installation

Just unzip the file in the directory where your executable is. The directory structure of the .zip file should already be correct.

 

Configuration

To set the chances just edit the array at the top of rypo_lottery_patch.rb. There's comments there to guide you. Make sure you use a plain text editor! For Windows Notepad works but you might consider installing Notepad++.

 

Compatibility

The script file only overwrites the lottery evaluation function so that should be fine unless another mod wants to change how the lottery works. I doubt any such mod exists but obviously that would be incompatible.

 

This mod also overwrites Map117.rxdata which is the Onyx Ward's Game Corner, "Onyx Arcade". I only made minor edits to lottery prize winning text to indicate that it's evaluating based on proximity rather than matching digits. If an overhaul mod adds new game corner prizes or something, it's safe to use the other mod's Map117.rxdata instead. The lottery will still function the same, though the speech text would mention matching digits instead of having a close number.

 

I suspect that Yang and Allgens mods will be softly-incompatible when they update. Again, just let their Map117 overwrite mine and both mods will function.

rypo_lottery_mod.zip

Edited by o____0
fix a minor mistake
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...