Private
Public Access
1
0

reinit branch

This commit is contained in:
2026-03-11 01:46:34 +01:00
commit bff9251737
129 changed files with 16115 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
# Config Scenarios
## 1) ClientSide mode
- Server: `InformationVerbosityServerSideType=ClientSide`, `InformationVerbosityServer=4`
- Client: `InformationVerbosity=1`
- Expected: client uses `1`
## 2) ServerRecommended mode (override OFF)
- Server: `InformationVerbosityServerSideType=ServerRecommended`, `InformationVerbosityServer=4`
- Client: `InformationVerbosity=1`, `DisableServerRecommended=false`
- Expected: client uses `4`
## 3) ServerRecommended mode (override ON)
- Same as above, but `DisableServerRecommended=true`
- Expected: client uses `1`
## 4) ServerForced mode
- Server: `InformationVerbosityServerSideType=ServerForced`, `InformationVerbosityServer=4`
- Client: `InformationVerbosity=1`, `DisableServerRecommended=true`
- Expected: client uses `4`
## 5) Client-side settings stay client-side
- Client: set `BeehiveAmbientVolume=0.2`, `DisableServerRecommended=true`
- Join server with different values
- Expected: client keeps `0.2` and `true`
## 6) MP -> SP check
- Join server in `ServerForced` with `InformationVerbosityServer=4`
- Leave, open singleplayer
- Expected: singleplayer uses local config value
## 7) ConfigLib UI check
- Client-side section has: `InformationVerbosity`, `DisableServerRecommended`, `BeehiveAmbientVolume`
- Server-side section has: `InformationVerbosityServerSideType` with `ClientSide|ServerRecommended|ServerForced`, and `InformationVerbosityServer`
## 8) Client command saves only client-side values to disk
- Manually edit config file: set `BeehiveRadius=50`, `YieldMultiplier=2.5`
- Join server (server broadcasts its own values, e.g. `BeehiveRadius=35`, `YieldMultiplier=1.2`)
- Run `/beehives BeehiveAmbientVolume 0.3`
- Open config file on disk
- Expected: `BeehiveAmbientVolume=0.3`, but `BeehiveRadius=50` and `YieldMultiplier=2.5` remain unchanged in the file (not overwritten with the server's in-memory values)
## 9) Client command does not overwrite server values received via broadcast
- Server has `MaxBeePopulation=100000`
- Client config file has `MaxBeePopulation=50000` (default)
- Client joins, receives server broadcast (`MaxBeePopulation=100000` in memory)
- Run `/beehives InformationVerbosity 3`
- Open config file on disk
- Expected: `MaxBeePopulation=50000` still in file (not `100000`)
## 10) Server command saves and broadcasts
- Run `/beehives BeehiveRadius 40` on server
- Expected: server config file has `BeehiveRadius=40`
- Expected: all connected clients have `BeehiveRadius=40` in memory

View File

@@ -0,0 +1,223 @@
# Crop Boost Scenarios
## Shared setup
- Use one beehive in range of a crop/farmland.
- Keep distance fixed inside full-distance zone (`PlantsFullBoostDistanceToHive`) unless the scenario says otherwise.
- Enable both boosts when validating both paths: `SpeedBoost=true`, `YieldBoost=true`.
- Use non-zero bonuses to make differences visible: `GrowthSpeedBonus=0.2`, `YieldMultiplier=1.2`.
### Shared config commands (copy/paste)
```text
/beehives YieldBoost true
/beehives SpeedBoost true
/beehives GrowthSpeedBonus 0.2
/beehives YieldMultiplier 1.2
/beehives BeehiveRadius 35
/beehives PlantsFullBoostDistanceToHive 20
/beehives MinBeesForPlantBoost 1000
/beehives MaxBeePopulation 50000
/beehives PopulationPercentForMaxBoost 100
/beehives MultipleBeehivesBoostCombination Max
```
## 1) Full mode keeps legacy behavior
- Config: `BoostCalculation=Full`
- Set hive population below `MinBeesForPlantBoost`
- Expected: no crop boost from that hive.
- Raise population to `MinBeesForPlantBoost`
- Expected: hive contributes full population factor (`100%`) immediately (same as old behavior).
### Commands
```text
/beehives BoostCalculation Full
```
## 2) LinearPopulation starts at 0% at min
- Config: `BoostCalculation=LinearPopulation`, `PopulationPercentForMaxBoost=100`, `MaxBeePopulation=50000`, `MinBeesForPlantBoost=1000`
- Set hive population to `1000`
- Expected: population factor is `0%`.
### Commands
```text
/beehives BoostCalculation LinearPopulation
/beehives PopulationPercentForMaxBoost 100
/beehives MaxBeePopulation 50000
/beehives MinBeesForPlantBoost 1000
```
## 3) LinearPopulation reaches 100% at configured max percent
- Same config as scenario 2
- Set hive population to `50000` (`100%` of `MaxBeePopulation`)
- Expected: population factor is `100%`.
### Commands
```text
/beehives BoostCalculation LinearPopulation
/beehives PopulationPercentForMaxBoost 100
/beehives MaxBeePopulation 50000
/beehives MinBeesForPlantBoost 1000
```
## 4) LinearPopulation midpoint check
- Same config as scenario 2
- Set hive population to midpoint between min and target max (`25500`)
- Expected: population factor is about `50%`.
### Commands
```text
/beehives BoostCalculation LinearPopulation
/beehives PopulationPercentForMaxBoost 100
/beehives MaxBeePopulation 50000
/beehives MinBeesForPlantBoost 1000
```
## 5) NormalizedLogk10Population starts at 0% and ends at 100%
- Config: `BoostCalculation=NormalizedLogk10Population`, same thresholds as scenario 2
- At `MinBeesForPlantBoost`, expected `0%`.
- At configured target max, expected `100%`.
### Commands
```text
/beehives BoostCalculation NormalizedLogk10Population
/beehives PopulationPercentForMaxBoost 100
/beehives MaxBeePopulation 50000
/beehives MinBeesForPlantBoost 1000
```
## 6) NormalizedLogk10Population is front-loaded vs linear
- Compare `LinearPopulation` vs `NormalizedLogk10Population` at same midpoint population
- Expected: log mode gives a higher factor than linear at midpoint.
- Formula reference: `f(x)=ln(1+10x)/ln(11)` where `x` is normalized `[0..1]` between min and configured max.
### Commands
```text
/beehives PopulationPercentForMaxBoost 100
/beehives MaxBeePopulation 50000
/beehives MinBeesForPlantBoost 1000
```
## 7) PopulationPercentForMaxBoost lower than 100
- Config: `PopulationPercentForMaxBoost=50`, `MaxBeePopulation=50000`
- Target max population for full factor becomes `25000`.
- Expected: factor reaches `100%` at `25000` and stays clamped at `100%` above it.
### Commands
```text
/beehives BoostCalculation LinearPopulation
/beehives PopulationPercentForMaxBoost 50
/beehives MaxBeePopulation 50000
/beehives MinBeesForPlantBoost 1000
```
## 8) PopulationPercentForMaxBoost = 0 boundary
- Config: `PopulationPercentForMaxBoost=0`, non-Full mode
- Expected: implementation falls back to immediate full factor once min threshold is met (avoids divide-by-zero / inverted range).
### Commands
```text
/beehives BoostCalculation LinearPopulation
/beehives PopulationPercentForMaxBoost 0
```
## 9) Distance and population multiply together
- Use non-Full mode with population factor around `50%`.
- Move crop just outside full-distance zone so distance effectiveness is also around `50%`.
- Expected: per-hive contribution is about `25%` (`0.5 * 0.5`).
### Commands
```text
/beehives BoostCalculation LinearPopulation
/beehives PopulationPercentForMaxBoost 100
/beehives MaxBeePopulation 50000
/beehives MinBeesForPlantBoost 1000
/beehives PlantsFullBoostDistanceToHive 20
/beehives BeehiveRadius 35
```
## 10) Multi-hive accumulation still clamps at 100%
- Place multiple valid hives in range.
- Expected: summed effectiveness does not exceed `100%` total.
### Commands
```text
/beehives BoostCalculation Full
/beehives YieldBoost true
/beehives SpeedBoost true
/beehives MultipleBeehivesBoostCombination Additive
```
## 10b) Multi-hive combination: Max mode
- Place multiple valid hives in range with noticeably different effectiveness.
- Expected: final effectiveness equals the highest single-hive effectiveness (no additive stacking).
### Commands
```text
/beehives MultipleBeehivesBoostCombination Max
```
## 10c) Multi-hive combination: Additive mode
- Place multiple valid hives in range with partial effectiveness.
- Expected: effectiveness is additive across hives and capped at `100%`.
### Commands
```text
/beehives MultipleBeehivesBoostCombination Additive
```
## 11) Yield and speed consumers are consistent
- Verify beehive info text and actual growth/drop behavior under same setup.
- Expected: displayed boost trend matches runtime trend for growth speed and yield bonus when population changes.
### Commands
```text
/beehives YieldBoost true
/beehives SpeedBoost true
/beehives GrowthSpeedBonus 0.2
/beehives YieldMultiplier 1.2
```
## 12) Verbosity 1 uses level words (no percentages, no parentheses)
- Config: effective InformationVerbosity = `1`
- Expected beehive block info line: `Crop boost effectiveness: Low|Medium|High`
- Expected: no `%` and no `(...)` details.
### Commands
```text
/beehives InformationVerbosityServerSideType ServerForced
/beehives InformationVerbosityServer 1
/beehives YieldBoost true
/beehives SpeedBoost true
```
## 13) Verbosity > 1 shows detailed percentages and details
- Config: effective InformationVerbosity = `2` (or higher)
- Expected beehive block info line format: `Crop boost effectiveness: X% (+Y% yield, +Z% speed)`.
### Commands
```text
/beehives InformationVerbosityServerSideType ServerForced
/beehives InformationVerbosityServer 2
/beehives YieldBoost true
/beehives SpeedBoost true
```
## 14) Crop boost line hidden when boost is disabled
- Config: `YieldBoost=false`, `SpeedBoost=false`
- Expected on beehive block info: no `Crop boost effectiveness` line and no `Population too low for a crop boost` warning.
### Commands
```text
/beehives YieldBoost false
/beehives SpeedBoost false
```
## 15) Low-population warning appears in yellow when boost is enabled
- Config: boost enabled, nearby hive population below `MinBeesForPlantBoost`
- Expected on beehive block info: yellow line `Population too low for a crop boost`.
### Commands
```text
/beehives YieldBoost true
/beehives SpeedBoost true
/beehives MinBeesForPlantBoost 1000
```

View File

@@ -0,0 +1,190 @@
# Swarm Scenarios
## Shared setup
- Use at least 2 reusable beehives within `BeehiveRadius` of each other.
- Ensure one target hive can stay below `BeehiveConsideredEmptyBelowPopulation`.
- Keep at least one source hive well above swarm threshold.
- Use warm biome/daytime for temperature-gated scenarios.
### Shared config commands (copy/paste)
```text
/beehives BeehiveRadius 35
/beehives MaxBeePopulation 50000
/beehives BeehiveConsideredEmptyBelowPopulation 500
/beehives PopulationPercentRequirementForSwarm 80
/beehives SwarmPopulationPercentage 0.2
/beehives MaxTemperatureGrowth 10
```
## 1) Open-for-incoming is always below-threshold
- Set hive A population to `499` while threshold is `500`.
- Expected: hive A is eligible as an incoming swarm target.
- Raise hive A to `500` or higher.
- Expected: hive A is no longer eligible.
### Commands
```text
/beehives BeehiveConsideredEmptyBelowPopulation 500
/beehives setPopulation 499
```
## 2) Swarm trigger gates: population, dayhour, pre-swarm progress
- Source hive above required percent (`> 80%` of max by default).
- Test outside 8-12 dayhours.
- Expected: no swarm starts even if pre-swarm is at 100%.
- Test in 8-12 dayhours with pre-swarm at 100% (requires sustained optimal temperature over `PreSwarmDurationHours`).
- Expected: swarm starts.
### Commands
```text
/beehives PopulationPercentRequirementForSwarm 80
/beehives MaxBeePopulation 50000
/beehives setPopulation 45000
```
## 2b) Pre-swarm progress builds at optimal temperature
- Source hive above required percent, cooldown expired.
- Ensure temperature is at or above `MaxTemperatureGrowth`.
- Expected: block info shows "Bees are preparing to swarm" (v1) or progress % (v2+).
- Expected: progress increases from 0 to 100% over `PreSwarmDurationHours` hours.
## 2c) Pre-swarm progress decreases in cold
- Start with some pre-swarm progress built up.
- Drop temperature below `MaxTemperatureGrowth`.
- Expected: pre-swarm progress decreases back toward 0.
- Expected: swarm does not trigger until progress reaches 100% again.
## 2d) Wrench disables swarming
- Right-click a beehive with a wrench.
- Expected: block info shows "Swarming is disabled on this beehive."
- Expected: swarm does not trigger even if all conditions are met.
- Right-click again with wrench.
- Expected: swarming re-enabled and normal swarm behavior resumes.
## 3) BuildingSwarm phase is gradual over 3h
- Trigger swarm from source hive.
- During first ~3 in-game hours, observe source population decreasing and swarm population increasing progressively.
- Expected: transition is gradual, not instant.
## 4) HangingOut phase duration
- After BuildingSwarm finishes, swarm enters `HangingOut`.
- Expected: swarm remains in place for ~5 in-game hours.
## 5) MigratingToNewHive phase is gradual over MigrationPhaseDurationHours
- After target pick, swarm enters `MigratingToNewHive`.
- Expected: population transfers gradually for the full migration duration.
- Expected: swarm block disappears at end of migration.
## 6) Target ranking prefers distance * flowers * frame-factor
- Prepare two eligible target hives:
- B: closer, fewer flowers, no filled/feed frame.
- C: slightly farther, more flowers, has filled/feed frame.
- Expected: chosen target matches highest multiplicative score.
- Frame factor for any filled/feed frame should act as `2.0` multiplier.
## 7) Vanilla skep target conversion path
- Place empty vanilla skep (`game:skep-reed-empty-*` or `game:skep-papyrus-empty-*`) in radius.
- Ensure it is registered as valid target by behavior patch.
- Expected: at migration start, empty skep is exchanged to populated skep.
## 8) No-target retry behavior
- Let swarm finish hanging with zero eligible targets.
- Expected: no immediate disperse; retry occurs in next day swarm window (8-12).
- If still no valid target after retry, expected: swarm disperses.
## 9) Spawn placement preference
- Trigger multiple swarm spawns with varied nearby geometry.
- Expected priority:
1. side-attached on solid-faced wood blocks,
2. side-attached on other solid-faced blocks,
3. floor-attached fallback.
## 10) Info text validation
- Beehive info: when source is ready, expected `Ready to swarm` line.
- Swarm block info: expected state + population + eligible target count + hours-until-pick lines.
## 11) Command-assisted deterministic setup
- Use command to quickly shape scenario state.
- Expected: `/beehives setPopulation {int}` updates targeted reusable beehive population immediately.
### Commands
```text
/beehives setPopulation 200
/beehives setPopulation 45000
```
## 12) Unload before swarm window (no missed swarm)
- Make source hive swarm-ready but unload area before 8:00.
- Re-enter area after 8:00 same day.
- Expected: catch-up applies population/honey/feed updates.
- Expected: swarm only starts if simulated timeline crosses valid window while ready.
## 13) Unload during BuildingSwarm phase
- Trigger swarm and unload area while swarm is in `BuildingSwarm`.
- Stay away long enough to skip part or all of the 3h building phase.
- Re-enter area.
- Expected: swarm population is already advanced to the correct catch-up value.
- Expected: source hive population has already lost corresponding bees.
## 14) Unload during HangingOut phase
- Trigger swarm and unload area after `BuildingSwarm` finishes.
- Stay away through part or all of `HangingOut`.
- Re-enter area.
- Expected: swarm resumes in correct post-catch-up state.
- Expected: if hanging duration elapsed and a target exists, migration may already have started or completed.
## 15) Unload during MigratingToNewHive phase
- Trigger migration, then unload area before migration completes.
- Re-enter area after enough time has passed.
- Expected: transferred bee count reflects elapsed offline time.
- Expected: swarm block is gone if migration fully completed.
- Expected: target hive population increased according to migrated amount.
## 16) Full lifecycle while unloaded (start -> finish)
- Make source hive swarm-ready in morning window.
- Unload immediately before/at expected swarm start and stay away for longer than full lifecycle.
- Re-enter area.
- Expected: catch-up simulation spawns swarm at historical time and fast-forwards it.
- Expected: resulting world state matches completed lifecycle outcome (target populated or swarm dispersed).
- Expected: source cooldown is based on simulated swarm start time.
## 17) Retry path while unloaded (no targets first day)
- Ensure no eligible targets when hanging phase ends.
- Unload through first retry day window and re-enter later.
- Expected: retry-day behavior is honored by catch-up.
- Expected: swarm disperses if no valid target remains after retry.
## 18) Debug chat output for unload catch-up
- Enable debug output before running unload scenarios.
- Expected: chat shows catch-up start/end summaries, population deltas, and swarm lifecycle catch-up events.
### Commands
```text
/beehives debugUnload true
/beehives debugUnload false
```
## 19) SwarmPopulationPercentageWhenNoBeehivesAvailable: zero value skips spawn
- Ensure there are no eligible swarm targets in range (no empty beehives or skeps).
- Set `SwarmPopulationPercentageWhenNoBeehivesAvailable` to `0`.
- Trigger swarm conditions on source hive.
- Expected: no swarm block is spawned.
- Expected: cooldown is applied as if the swarm had occurred (`NextSwarmAllowedTotalDays` advances).
### Commands
```text
/beehives SwarmPopulationPercentageWhenNoBeehivesAvailable 0
```
## 20) SwarmPopulationPercentageWhenNoBeehivesAvailable: non-zero value spawns smaller swarm
- Ensure there are no eligible swarm targets in range.
- Set `SwarmPopulationPercentageWhenNoBeehivesAvailable` to a value greater than `0` (e.g., `5`).
- Trigger swarm conditions on source hive.
- Expected: a swarm block is spawned with a planned population equal to `5%` of the source hive population.
- Expected: swarm eventually disperses (no target found).
### Commands
```text
/beehives SwarmPopulationPercentageWhenNoBeehivesAvailable 5
```

1
TestScenarios/readme.md Normal file
View File

@@ -0,0 +1 @@
used AI to generate these scenarios but so far I've been too lazy to read and test them, will probably make a project for automated mod scenarios testing later.