ModernUO/Projects/Server
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
..
Buffers chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Client fix: Fixes crashing while trying to detect old clients (#1459) 2023-08-16 00:20:26 -07:00
Collections chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Comparers chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Configuration chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
ContextMenus fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Diagnostics fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Events chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Exceptions chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
GarbageCollection fix: Adds Gen2 callback for each STArrayPool (#971) 2022-03-26 13:57:42 -07:00
Geometry chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Gumps chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Items fix: Replaces FindItem(s)ByType(s) implementation with BFS strategy (#1454) 2023-08-18 22:05:28 -07:00
Json fix: Fixes JSON TypeConverter so that it can deserialize full name types (#1466) 2023-08-21 21:25:09 -07:00
Localization chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Logging chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Maps chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Menus fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Migrations fix: Adds name support for all mods (#1128) 2022-10-15 10:46:31 -07:00
Mobiles feat: Adds Stamina System to overhaul overweight. (#1465) 2023-09-16 17:52:54 -07:00
Network feat: Adds ping listener on port 12000 for server list (#1485) 2023-09-03 09:29:27 -07:00
PropertyList chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Random chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Regions chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Serialization chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Targeting Adds hue support to StaticTile (#1321) 2023-01-21 11:19:11 -08:00
Text chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
TileMatrix chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Timer chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
TimeZones chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Utilities fix: Fixes PlayerVendor customizations not working due to constructor issues (#1451) 2023-08-10 19:24:45 -07:00
World chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
AssemblyHandler.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Attributes.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
CityInfo.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Commands.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
Effects.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
EventLoopTasks.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
ExpansionInfo.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Guild.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
HuePicker.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
IAccount.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
IEntity.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Interfaces.cs fix: Fixes casting by sending ParalyzeFlag to client while animating (#1397) 2023-04-27 23:12:07 -07:00
KeywordList.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Main.cs feat: Adds ping listener on port 12000 for server list (#1485) 2023-09-03 09:29:27 -07:00
MessageType.cs fix: Moves the rest of the Incoming packets (#1338) 2023-02-10 22:59:36 -08:00
MultiData.cs fix: Fixes loading map and static files (#1177) 2022-09-29 16:02:41 -07:00
MUO.ico Adds MUO Logo (#52) 2019-09-12 13:13:13 -07:00
Party.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Poison.cs fix: Adds ISpanParsable and fixes command conditionals (#1241) 2022-11-12 00:26:02 -08:00
Prompt.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Race.cs fix: Fixes TryParse for Race (#1244) 2022-11-12 00:31:25 -08:00
Sector.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
SecureTrade.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
Serial.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Server.csproj fix: Updates PollGroup to use the refactored/fixed changes by stefanomerotta (#1499) 2023-09-13 23:58:28 -07:00
Skills.cs feat: Customize expansion and set maps on first boot (#1425) 2023-07-31 20:46:49 -07:00
TileData.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
TileList.cs Adds hue support to StaticTile (#1321) 2023-01-21 11:19:11 -08:00