ModernUO/Projects/UOContent/Misc
Kamron Batman 0f2870e94a
feat: Adds Stamina System to overhaul overweight. (#1465)
## Overhaul to Stamina (Overweight) System

### Added configurations

```json
{
  "settings": {
    "stamina.enableMountStamina": "True",
    "stamina.cannotMoveWhenFatigued": "True",
    "stamina.stonesPerOverweightLoss": "25",
    "stamina.stonesOverweightAllowance": "4",
    "stamina.baseOverweightLoss": "5",
    "stamina.additionalLossWhenBelow": "0.1",
    "stamina.mountLastMoveStepsReset": "01:00:00:00",
    "stamina.enableMountStamina": "True",
    "stamina.useMountStaminaOnlyWhenOverloaded": "False",
  },
}
```
- `stamina.cannotMoveWhenFatigued` - By default, Pre-AOS expansions will outright block a player if they are fatigued. A player is fatigued when they run out of stamina by any mechanism.
- `stamina.stonesPerOverweightLoss` - The amount of stamina lost for every X stones above overweight. Example, if a person is overweight 28 stones overweight, then there there is 1 additional stamina. 28 / 25 = 1 (no decimals, no rounding)
- `stamina.stonesOverweightAllowance` - The number of stones allowed before overweight penalties take affect. This _does not_ substract from the overweight stones calculation.
- `stamina.baseOverweightLoss` - The base amount of stamina loss for being overweight. While running, the final amount is multiplied by 2. If mount stamina is turned off, then the final amount is divided by 3 while mounted. 

### Mount stamina

Mounts have a new property `StepsMax` to determine the maximum steps they can take before being fatigued. To regain steps, the player _must stay on the mount and not move_ (per OSI). The gain rates are configurable. If a mount is dismounted, or the player logs off, the mount is considered inactive and mounts regain all of their steps after _24 hours_.

### Changes to player stamina

Players now have a proper inactivity time reset for their steps. If a player is idle for 16 seconds (including logging off, or the server being offline), then the steps counter is rest.

### Developer Notes

- `StepsTaken` - This field has been removed. It was not serialized and could not be used reliably. If a developer was using it, then the recommendation is to build a mechanism to track total steps another way.
- `IHasStamina` - This new interface was added and currently `IMount` and `PlayerMobile` are valid types.

Important: Entities that are sent to the StaminaSystem for tracking (mounts, players, or something else), must be an `ISerializable` to be serialized properly. If they are not, then the serialization system will record a null, and nothing will be deserialized upon world load. No errors will be given.
2023-09-16 17:52:54 -07:00
..
Gifts/Winter2004 fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
AccountPrompt.cs fix: Fixes structured logging (#1043) 2022-06-05 01:00:22 -07:00
Animations.cs Removes literal variables (#257) 2020-09-18 18:41:26 -07:00
AOS.cs feat: Adds ability groups, DOT abilities, and combat abilities (#1264) 2022-11-23 12:33:27 -08:00
AttackMessage.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
AutoRestart.cs feat: Adds auto archiving (#794) 2021-09-25 17:22:05 -07:00
Broadcasts.cs Fixes exiting/crash handling/ctrl+c (#237) 2020-09-12 00:05:38 -07:00
BuffIcons.cs fix: Fixes divine fury (#1290) 2022-12-04 12:39:30 -08:00
CharacterCreation.cs feat: Customize expansion and set maps on first boot (#1425) 2023-07-31 20:46:49 -07:00
Cleanup.cs fix: Fixes structured logging (#1043) 2022-06-05 01:00:22 -07:00
ClientVerification.cs feat: Customize expansion and set maps on first boot (#1425) 2023-07-31 20:46:49 -07:00
CrashGuard.cs fix: Makes logging more consistent (#1246) 2022-11-13 00:36:23 -08:00
DispellableAttribute.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
DispellableFieldAttribute.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
DoorGenerator.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
Email.cs fix(core): Caches DateTime.NowUtc (#548) 2021-03-13 01:32:04 -08:00
Emitter.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
FoodDecay.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
Geometry.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
Guild.cs fix: Overhauls champion titles & codegen champion system (#1430) 2023-07-27 21:44:06 -07:00
HardwareInfo.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
InhumanSpeech.cs feat: Customize expansion and set maps on first boot (#1425) 2023-07-31 20:46:49 -07:00
Keywords.cs fix: Overhauls murder system (#1419) 2023-07-15 22:42:49 -07:00
LanguageStatistics.cs fix: Fixes provocation for pre-pub 16 (#1335) 2023-02-07 23:33:45 -08:00
LightCycle.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
LoginStats.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
Loot.cs Cleanup & Fixes for .NET 5 (#309) 2020-11-15 10:03:50 -08:00
LootPack.cs fix: Cleans up string substring (#1018) 2022-05-14 16:56:03 -07:00
MessageHelper.cs fix: Codegens rares and solen items (#1371) 2023-03-11 19:25:48 -08:00
MondainsLegacy.cs Fixes dupe exception (#258) 2020-09-19 15:46:07 -07:00
NameList.cs fix: Cleans up murder system (#1428) 2023-07-16 00:04:30 -07:00
NameVerification.cs fix(core): Optimizes strings / .NET 5 compatibility changes (#354) 2020-12-20 23:21:55 -08:00
Notoriety.cs fix: Fixes young healing each other (#1345) 2023-02-21 18:15:57 -08:00
PacketThrottles.cs fix: Fixes speech throttle (#1387) 2023-04-05 09:21:44 -07:00
Paperdoll.cs fix(core): Converts remaining player packets (#374) 2020-12-30 16:09:51 -08:00
Poison.cs fix: Overhauls virtue system (#1376) 2023-07-19 21:43:47 -07:00
ProfanityProtection.cs fix(core): Tightens the network stack (#479) 2021-02-07 23:30:56 -08:00
ProfessionInfo.cs fix: Fixes missing ordinal string comparisons arguments. (#1431) 2023-07-23 20:12:38 -07:00
Profile.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
RaceDefinitions.cs fix: Updates races to properly support gargoyle equipment. (#744) 2021-08-29 00:43:55 -07:00
RegenRates.cs fix: Removes duplicate CheckTransform static method (#1384) 2023-04-03 23:03:40 -07:00
RenameRequests.cs fix(core): Optimizes strings / .NET 5 compatibility changes (#354) 2020-12-20 23:21:55 -08:00
ResourceInfo.cs fix: Codegens BOD rewards. (#1361) 2023-03-06 19:01:14 -08:00
ServerAccess.cs fix: Fixes structured logging (#1043) 2022-06-05 01:00:22 -07:00
ServerList.cs feat: Adds ping listener on port 12000 for server list (#1485) 2023-09-03 09:29:27 -07:00
ShardPoller.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
ShrinkTable.cs fix: Fixes provocation for pre-pub 16 (#1335) 2023-02-07 23:33:45 -08:00
StaminaSystem.cs feat: Adds Stamina System to overhaul overweight. (#1465) 2023-09-16 17:52:54 -07:00
Titles.cs feat: Customize expansion and set maps on first boot (#1425) 2023-07-31 20:46:49 -07:00
ToggleItem.cs Removes literal variables (#257) 2020-09-18 18:41:26 -07:00
TreasureMapProtection.cs cleanup: Fixes bugs and cleans up code (#660) 2021-07-19 20:49:59 -07:00
ValidationQueue.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Weather.cs feat: Adds tidy option for serialization. Codegens ballotbox. Fixes pooled timer leaking (#681) 2021-08-14 03:02:53 -07:00
WelcomeTimer.cs Removes UOAM vendors. (#241) 2020-09-12 11:56:52 -07:00