Revamp UI a whole lot
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Gacha Implementation Guide
|
||||
|
||||
This project currently has a working beginner banner and scaffolding for standard and limited banners.
|
||||
This project has working beginner, standard and NixOS feature banners. All three use Commits or Entropy, keep independent pity state, resolve through the gambling reveal scene, and persist their completed transactions in the separate `git log --pulls` history pop-up.
|
||||
The main files are:
|
||||
|
||||
- `Assets/Scripts/Meta/GachaService.cs`: pull costs, odds, pity, currency accounting, reward rolls.
|
||||
- `Assets/Scripts/Meta/GachaBannerState.cs`: persistent per-banner counters.
|
||||
- `Assets/Scripts/Meta/GachaBannerState.cs`: persistent per-banner counters and pull-receipt data.
|
||||
- `Assets/Scripts/Meta/GachaCurrencyType.cs`: pull-token currency enum.
|
||||
- `Assets/Scripts/Meta/SaveService.cs`: saved currency and banner progress fields.
|
||||
- `Assets/Scripts/UI/GachaScreenController.cs`: banner list, banner names, pull buttons, pull prompts, result text.
|
||||
@@ -53,9 +53,8 @@ The main files are:
|
||||
## Currency Rules
|
||||
|
||||
- `GachaCurrencyType.StandardPull` formats as `stable-pull-token`.
|
||||
- `GachaCurrencyType.LimitedPull` formats as `feature-pull-token`.
|
||||
- Beginner and standard banners should spend `StandardPull`.
|
||||
- Limited and event banners should usually spend `LimitedPull`, unless the design says otherwise.
|
||||
- The current feature banner also spends `StandardPull`; Root Credits remain the premium route through Entropy.
|
||||
- `EntropyPerPullToken` controls the entropy fallback cost for each missing pull token.
|
||||
- Root-credits convert to entropy through `GachaService.ConvertRootCreditsToEntropy()`.
|
||||
|
||||
@@ -99,8 +98,8 @@ The current base roll order is:
|
||||
The base non-pity tier rates are:
|
||||
|
||||
- 5-star item: `0.8%`
|
||||
- 4-star item: `11.904%`
|
||||
- 3-star equipment: `87.296%`
|
||||
- 4-star item: `6.944%`
|
||||
- 3-star equipment: `92.256%`
|
||||
|
||||
After a 4-star or 5-star item is rolled, the game then does a 50/50 split:
|
||||
|
||||
@@ -111,16 +110,16 @@ The effective split rates are still useful for sanity checks, but they are not s
|
||||
|
||||
- `5-star equipment = 0.8% 5-star item * 50% equipment = 0.4%`
|
||||
- `5-star distro = 0.8% 5-star item * 50% distro = 0.4%`
|
||||
- `4-star item = 99.2% no 5-star * 12% 4-star item = 11.904%`
|
||||
- `4-star equipment = 11.904% 4-star item * 50% equipment = 5.952%`
|
||||
- `4-star distro = 11.904% 4-star item * 50% distro = 5.952%`
|
||||
- `3-star equipment = 99.2% no 5-star * 88% no 4-star hit = 87.296%`
|
||||
- `4-star item = 99.2% no 5-star * 7% 4-star item = 6.944%`
|
||||
- `4-star equipment = 6.944% 4-star item * 50% equipment = 3.472%`
|
||||
- `4-star distro = 6.944% 4-star item * 50% distro = 3.472%`
|
||||
- `3-star equipment = 99.2% no 5-star * 93% no 4-star hit = 92.256%`
|
||||
|
||||
The current odds constants are in `GachaService.cs`:
|
||||
|
||||
```csharp
|
||||
private const double FiveStarBaseChance = 0.008d;
|
||||
private const double FourStarBaseChance = 0.12d;
|
||||
private const double FourStarBaseChance = 0.07d;
|
||||
private const double DistroChanceOnFeaturedTier = 0.5d;
|
||||
```
|
||||
|
||||
@@ -168,7 +167,7 @@ A random 5-star resets both:
|
||||
- `fiveStarPityCounter`
|
||||
- the 4-star `pityCounter`
|
||||
|
||||
The beginner banner's pull-50 capstone guarantee awards the placeholder 5-star but intentionally does not reset `fiveStarPityCounter`.
|
||||
The beginner banner's pull-50 capstone guarantee awards a standard 5-star and resets `fiveStarPityCounter`.
|
||||
|
||||
## Adjusting Pity
|
||||
|
||||
@@ -231,7 +230,7 @@ Beginner special cases currently live in `RollBeginnerReward()`:
|
||||
|
||||
- pull 20: guaranteed first unpicked starter distro
|
||||
- pull 40: guaranteed second unpicked starter distro
|
||||
- pull 50: placeholder future standard 5-star distro, without resetting 5-star pity
|
||||
- pull 50: guaranteed standard 5-star distro, resetting both pity counters
|
||||
|
||||
The guaranteed distro ids are stored in:
|
||||
|
||||
@@ -293,40 +292,13 @@ Keep these in sync:
|
||||
4. `GetBannerStatus()`.
|
||||
5. Any result text in `PullSelectedBanner()`.
|
||||
|
||||
## Standard Banner Checklist
|
||||
## Current Standard And Feature Banners
|
||||
|
||||
1. Add `standardState` in `GachaService`.
|
||||
2. Save/load `standardBannerState` in `SaveData`.
|
||||
3. Add `StandardSinglePullCost` and `StandardTenPullCost`.
|
||||
4. Implement `GetStandardPullCost()`.
|
||||
5. Implement `CanPullStandard()`.
|
||||
6. Implement `PerformStandardPull()`.
|
||||
7. Implement `RollStandardReward()`.
|
||||
8. Use `GachaCurrencyType.StandardPull`.
|
||||
9. On a 4-star or 5-star hit, call `ResolveFeaturedTierIsDistro()`.
|
||||
10. If it returns `true`, pick from the matching standard distro pool.
|
||||
11. If it returns `false`, award matching-rarity equipment.
|
||||
12. Render real standard controls in `GachaScreenController` instead of `RenderFutureBanner()`.
|
||||
13. Add result handling for standard rewards.
|
||||
The standard banner uses `standardState`, shared Commits/Entropy payment, the generic rarity roll, and the complete standard distro pool. Every 200 standard pulls unlocks the existing character-plus-package selector.
|
||||
|
||||
## Limited Banner Checklist
|
||||
The feature banner uses `limitedState`, the same payment choices, and independent pity. It currently features NixOS at 5 stars and Fedora/Ubuntu at 4 stars. `RollLimitedReward()` performs the package/distro split and calls `ResolveLimitedFiveStarUsesStandardPool()` only for a 5-star distro result. Its saved featured guarantee therefore survives package hits and sessions without leaking into the standard banner.
|
||||
|
||||
1. Add `limitedState` in `GachaService`.
|
||||
2. Save/load `limitedBannerState` in `SaveData`.
|
||||
3. Add `LimitedSinglePullCost` and `LimitedTenPullCost`.
|
||||
4. Implement `GetLimitedPullCost()`.
|
||||
5. Implement `CanPullLimited()`.
|
||||
6. Implement `PerformLimitedPull()`.
|
||||
7. Implement `RollLimitedReward()`.
|
||||
8. Use `GachaCurrencyType.LimitedPull`.
|
||||
9. On a 4-star or 5-star hit, call `ResolveFeaturedTierIsDistro()`.
|
||||
10. If it returns `false`, award matching-rarity equipment.
|
||||
11. If it returns `true` on a 4-star, pick from the limited 4-star distro pool.
|
||||
12. If it returns `true` on a 5-star, call `ResolveLimitedFiveStarUsesStandardPool(limitedState)`.
|
||||
13. If that returns `true`, pick from the standard 5-star pool.
|
||||
14. If that returns `false`, pick from the featured limited pool.
|
||||
15. Add featured-unit or rate-up pool configuration.
|
||||
16. Render real limited controls in `GachaScreenController`.
|
||||
Both states and the latest 100 completed pull receipts are written by `GachaService.WriteProgress()`. The reveal scene records a receipt only after exact package/distro resolution and immediately before the same atomic save as the awarded collection state.
|
||||
|
||||
## Testing Changes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user