Skip to content

Feat: Add CustomMessage & CustomReward#79

Draft
Mangochicken13 wants to merge 11 commits intoAlchyr:developfrom
Mangochicken13:CustomReward
Draft

Feat: Add CustomMessage & CustomReward#79
Mangochicken13 wants to merge 11 commits intoAlchyr:developfrom
Mangochicken13:CustomReward

Conversation

@Mangochicken13
Copy link
Copy Markdown

@Mangochicken13 Mangochicken13 commented Mar 27, 2026

Messages

  • CustomMessage abstract class
    • Mainly here to build a hint system for newer modders, so they remember to register a handler method for their message too. This is done through new abstract Initialize and Dispose methods that are called through a bit of a hack (?) in patches on the RunManagerPatches class, which handles the synchronizer setup in the base game.
    • Stretch Goal - If given the chance, try to set up an optional message registration system, so that players with client side mods ("affects_gameplay" : false) can sync optional data without worrying about other client mods conflicting with the current workaround of prefixing the messages with ZZ
  • CustomRewardMessage abstract class
    • Additionally implement IRunLocationTargetedMessage,
    • Preset NetTransferMode Mode => NetTransferMode.Reliable and bool ShouldBroadcast => true

Rewards

  • Add abstract class CustomReward
    • Patch Reward.FromSerializable to check for custom rewards first
    • Patch RewardSynchronizer to handle custom rewards and associated messages
      • Add struct CustomBufferedMessage
    • Adds TransformCard reward
    • [/] Adds TransformAndUpgradeCard reward Moved functionality into base transform a card reward
  • Add ModId prefixing to localization keys for reward screens

@Mangochicken13 Mangochicken13 changed the base branch from master to develop March 31, 2026 06:59
@Mangochicken13
Copy link
Copy Markdown
Author

Rebased onto develop & changed merge target

@Alchyr Alchyr deleted the branch Alchyr:develop March 31, 2026 10:30
@Alchyr Alchyr closed this Mar 31, 2026
@Alchyr Alchyr reopened this Mar 31, 2026
@Mangochicken13 Mangochicken13 force-pushed the CustomReward branch 3 times, most recently from be4fd84 to 1589ba3 Compare April 4, 2026 09:51
@Mangochicken13 Mangochicken13 force-pushed the CustomReward branch 3 times, most recently from 85895e6 to f1c85ba Compare April 10, 2026 15:19
@Mangochicken13 Mangochicken13 changed the title Feat: Add CustomReward Feat: Add CustomMessage & CustomReward Apr 10, 2026
@Mangochicken13 Mangochicken13 force-pushed the CustomReward branch 2 times, most recently from 6f3438b to 1613b5c Compare April 16, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants