SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Request for SaveEvents.BeforeLoad

spacechase0 opened this issue ยท 3 comments

commented
commented

@spacechase0 What's the intended use case?

commented

Custom Crops/Json Assets has to register items dynamically, so the IDs for items may change depending on the order the items were installed. Right now I have to save these in the mod folder. Ideally, these would be in the save folder, so that it is synced with the save. This allows you send the save to another person with the IDs intact, and also prevents this scenario from messing up:

Computer 1:

  • Installing crop mod Watermelon
  • Play a few days
  • Installing crop mod Cocoa
  • Play a few days
  • Installing crop mod Turnips
  • Play a few days
  • etc....

Computer 2:

  • Installing all crop mods used before
  • Play

In this case, IDs may not match since in the first computer, Watermelon is registered/assigned, and then Cocoa is registered/assigned, etc. However, on the second computer, all crop mods will be registered at once, and so IDs will be assigned in the order it sees them (so probably alphabetically) on a crop-by-crop basis.

Computer 1 would use IDs like this:

  • 101: Watermelon
  • 102: Cocoa
  • 103: Turnip

While computer 2 would use them like this:

  • 101: Cocoa
  • 102: Turnip
  • 103: Watermelon
commented

Merged into #310.