BannerlordCoop icon indicating copy to clipboard operation
BannerlordCoop copied to clipboard

Sync MobileParty Fields

Open garrettluskey opened this issue 11 months ago • 0 comments

Description

  1. Sync the values in the Synced list below.
  2. Create an integration test for all values (1 for server changing the value and 1 for client changing the value if applicable)
  3. Create a command to test changing the value in game see similar command

Also see additional information at the bottom for more information and templates

Key Server side only (only allow the running of the function on the server side) Client side only (only allow the running of the function on the client side) Client side sync (request the server to change the value, server then changes the value and replies to the client allowing the change) Server side sync (only server allows running of the function and send to all clients the value changed and clients update the value/call original function)

Synced

Method/Field Name Sync Type Remaks
_attachedTo Server side only
Public HasUnpaidWages Server side only
_lastCalculatedSpeed Server side only maybe too many messages
_disorganizedUntilTime Server side only
_partyPureSpeedLastCheckVersion Server side only maybe too many messages
_partyLastCheckIsPrisoner Server side only maybe too many messages
_lastCalculatedBaseSpeedExplained Server side only maybe too many messages
_partyLastCheckAtNight Server side only maybe too many messages
_itemRosterVersionNo Server side only maybe too many messages
_partySizeRatioLastCheckVersion Server side only maybe too many messages
_latestUsedPaymentRatio Server side only maybe too many messages
_cachedPartySizeRatio Server side only maybe too many messages
_cachedPartySizeLimit Server side only maybe too many messages
_doNotAttackMainParty Server side only
_customHomeSettlement Server side only
_isDisorganized Server side only
_isCurrentlyUsedByAQuest Server side only
_partyTradeGold Server side only
_ignoredUntilTime Server side only
Public AverageFleeTargetDirection Server side only
_besiegerCampResetStarted Server side only
_lastWeatherTerrainEffect Server side only maybe too many messages
_partyComponent Server side only

Deferred

None

Externally Deferred

None

Non-Synced None

Intended Design

For the patch itself please refer to https://github.com/Bannerlord-Coop-Team/BannerlordCoop/wiki/Patching-Basics#field-patching

Message networking image Integration Testing image

Location

Create a branch based from development

Related Issues

N/A

Requirements

N/A

Additional information

Using the GameInterface Service Tempale create commands to test the synced values.

For network communication use Server Service Template and Client Service Template

It is recommended to start with an integration test, you can create one using the test template.

Definition of Done

  • [ ] Class level comments exist for all new classes.
  • [ ] XUnit tests exist for every method that does not require the game to be ran.

garrettluskey avatar Mar 12 '24 01:03 garrettluskey