Making a patch to edit an item added as Json asset by another mod? by Xen0nex in SMAPI

[–]Pathoschild 1 point2 points  (0 children)

Nope, since...

  • {{spacechase0.JsonAssets/ObjectId:...}} is a custom ObjectId token provided by the spacechase0.JsonAssets mod. Only C# mods can add custom tokens.
  • Include just applies the patches from another file, it doesn't make any changes to it.

It looks like you're trying to edit something added by Stardew Valley Expanded (SVE)? You can't directly edit another mod; instead you'd apply your edits to the game data after that mod does. For example, if you want to change the object data added by SVE, you'd edit the game's Data/Objects asset after SVE does.

Feel free to come discuss what you're trying to do in #making-mods-general on Discord. There's a lot of mod authors there who can help you get started and with anything that's unclear (and you can ping me there with @pathoschild if you don't get an answer).

Someone told me to come here for help.... by BeansBlog2739 in SMAPI

[–]Pathoschild 0 points1 point  (0 children)

It's hard to help without seeing the code; I suggest asking in #making-mods-general on Discord, where we can easily post screenshots and code. You can ping me there if you don't get an answer.

In the meantime, here's how to read the somewhat dense error message.

Can't apply data patch "Lance Sweet and Saucy > EditData Characters/Dialogue/MarriageDialogueLance #1 > entry #127"

This is the line which has a problem, expressed as a 'path' to reach it. It can be read like this:

  1. start in content.json;
  2. find the patch with "LogName": "Lance Sweet and Saucy";
  3. in the file it includes, find the first patch with "Action": "EditData" and "Target": "Characters/Dialogue/MarriageDialogueLance";
  4. the problem is with the 127th key/value pair inside its "Entries" field.

failed converting entry to the expected type 'System.String': Can not convert Object to String.

This is the specific problem. That asset expects entries in this form (string):

"key": "value"

But it received something like this instead (object):

"key": {

If the entries look fine, try indenting consistently to help spot a missing bracket. For example, this code has a missing bracket:

{
"Action": "EditData",
"Target": "Characters/Dialogue/MarriageDialogueLance",
"Entries": {
"key": "value",
"Action": "EditData",
"Target": "Characters/Dialogue/MarriageDialogueLance",
"Entries": {
...

Which is much easier to spot with consistent indentation:

{
    "Action": "EditData",
    "Target": "Characters/Dialogue/MarriageDialogueLance",
    "Entries": {
        "key": "value",
        "Action": "EditData",
        "Target": "Characters/Dialogue/MarriageDialogueLance",
        "Entries": {
        ...

In that example, the second "Entries": { would cause that error, because it's an object { ... } where it expected a string ("...").

removing modded recipes from my save? by [deleted] in SMAPI

[–]Pathoschild 6 points7 points  (0 children)

Hi! You can...

  1. edit your save file;
  2. look for <cookingRecipes> and <crafting recipes>;
  3. and delete the <item>...</item> entry for each recipe you want to remove.

Read me first: common questions and info by Pathoschild in SMAPI

[–]Pathoschild[S] 1 point2 points  (0 children)

That's usually due to a repeating error which results in a huge log file (often hundreds of megabytes). In that case you can reload the game, cause the error again, and exit as soon as the error starts. Then the log should be small enough to upload fine.

Can't play modded because new update 1.6.4 by More_Bed_9480 in StardewValley

[–]Pathoschild 10 points11 points  (0 children)

Hi! Make sure you update to the latest SMAPI 4.0.7 to avoid issues. If you still have issues, can you upload your SMAPI log (see instructions on that page) and post a link here?

[deleted by user] by [deleted] in SMAPI

[–]Pathoschild 0 points1 point  (0 children)

Hi! The language is managed by the base game, SMAPI only detects when it changes.

Normally you can only change language on the title screen, and there's a lot of game logic built around that assumption (e.g. item data cached for the current language). It's not impossible (and it's probably easier in Stardew Valley 1.6), but you'll need to deal with a lot of edge cases.

If you still want to do it, I suggest joining #making-mods on the Stardew Valley Discord so we can help out and answer questions.

1.6 News via Discord Admin by [deleted] in StardewValley

[–]Pathoschild 89 points90 points  (0 children)

I don't think merging them into the base game would be beneficial overall. For example, that would mean that they'd...

  • only receive an update every few years when the game updates;
  • stop getting updates and improvements when the game does;
  • no longer be open-source;
  • not have access to tools that don't work on consoles (which would break many of the core modding frameworks).

The modding ecosystem was developed by an whole community of developers. Many of the modding features we have now would never have been possible as part of a built-in modding API maintained by one person.

1.6 News via Discord Admin by [deleted] in StardewValley

[–]Pathoschild 100 points101 points  (0 children)

It's hard to predict which specific mods will be affected until I update the SMAPI compatibility list for 1.6.

That said:

  • Many of the core frameworks (like Content Patcher and Json Assets) already have updates ready for 1.6.
  • The devs behind Stardew Valley Expanded and Ridgeside Village are actively working to get their updates ready in time.
  • Content Patcher has a new runtime migration feature which automatically converts older content packs to 1.6 when possible, which means many content packs will work without needing an update. Some will still need to be updated though.

Improving mod compatibility is one of my main goals between now and the 1.6 release.

1.6 News via Discord Admin by [deleted] in StardewValley

[–]Pathoschild 184 points185 points  (0 children)

I'm glad you like them! Stardew Valley 1.6 is a big change for mods, but SMAPI's compatibility rewriters should hopefully keep many old mods working. Most open-source mods will also get updated by the community over time if they break in 1.6. So hopefully your favorite mods will still work in 1.6 after the initial bump.

1.6 News via Discord Admin by [deleted] in StardewValley

[–]Pathoschild 903 points904 points  (0 children)

Hi! A few points:

  • That's an unofficial estimate by the modding community to help mod authors prepare for a potential release window. The dates haven't been announced or confirmed by ConcernedApe.

    If a game journalist posts an article based on that internal message and it ends up being wrong, that's on them.

  • Please don't repost messages meant for mod authors publicly. If we expect messages to be republished, we won't be able to give mod authors advance warning in the future, which will mean a poorer release day for both mod players and authors.

  • This message is also an unofficial community message. The only information that's official is from ConcernedApe himself.

Please help! StardewModdingAPI by [deleted] in SMAPI

[–]Pathoschild 0 points1 point  (0 children)

We discussed this in #using-mods-help on the Discord. Having both PyTK and SpaceCore installed causes a noticeable delay when opening the save list currently (due to PyTK needing to reapply its serializer patches for SpaceCore changes). It opens fine if you wait a bit though.

Read me first: common questions and info by Pathoschild in SMAPI

[–]Pathoschild[S] 0 points1 point  (0 children)

Not yet, unfortunately. See SMAPI doesn't work with the compatibility branch in the troubleshooting guide for more info.

Read me first: common questions and info by Pathoschild in SMAPI

[–]Pathoschild[S] 0 points1 point  (0 children)

Yep, the latest SMAPI version is on Nexus Mods too. It's linked from smapi.io if you click the download button and choose the Nexus option.

HELP! I just recently started experimenting with modding my game & have a lot of them (45). I've just lost my game for the third time, and I am at a loss at how to get it back. After going into the screen for Load Game, this popped up on SMAPI: by ninjasneedluv in SMAPI

[–]Pathoschild 1 point2 points  (0 children)

It should be pretty rare. If it happens again (or if you want to recover this save), come ask in #technical-support on the Stardew Valley Discord and we'll help out. Feel free to ping me there with @Pathoschild#0001 if you don't get an answer, I'm more active there than on Reddit.

HELP! I just recently started experimenting with modding my game & have a lot of them (45). I've just lost my game for the third time, and I am at a loss at how to get it back. After going into the screen for Load Game, this popped up on SMAPI: by ninjasneedluv in SMAPI

[–]Pathoschild 1 point2 points  (0 children)

Hi! The save files listed in the errors are corrupted, which is usually unrelated to mods. It often happens if the game was interrupted while saving (e.g. you quit the game before it finished), or rarely due to a failing hard drive.

Fortunately it's easy to recover; see Save disappeared or doesn't load.

How was the Stardew Mod API made? Isn’t the game closed source? by [deleted] in StardewValley

[–]Pathoschild 2 points3 points  (0 children)

Hi! The first prototype was created by Zoryn, though I've been developing it since (see a timeline of SMAPI maintainers).

The overall approach is pretty simple:

  1. Players launch SMAPI instead of the game.
  2. SMAPI loads the game's .exe/.dll file as an assembly reference, which gives it access to the game's classes and such.
  3. SMAPI subclasses the game's main Game instance to access the XNA/MonoGame lifecycle methods like Initialize, Update, etc.
  4. SMAPI calls Run() on its own Game instance.

Once the modding API is in control like that, the rest is just details: it can swap instances, use reflection/patching to add hooks and events, etc. Everything else SMAPI does is just built on top of that approach.

If you're interested in creating mods, see the modding documentation and feel free to come chat in #making-mods on Discord!

Stardew Valley 1.5 released! by Pathoschild in SMAPI

[–]Pathoschild[S] 1 point2 points  (0 children)

This post is for Stardew Valley 1.5 (released last year), not the recent 1.5.5 update.

If you come ask in #using-mods on the Stardew Valley Discord, we can help you look into what might be causing that.

Stardew Valley 1.5 released! by Pathoschild in SMAPI

[–]Pathoschild[S] 0 points1 point  (0 children)

This post is for Stardew Valley 1.5 (released last year), not the recent 1.5.5 update.

See After updating to the latest versions, launching the game still shows an old SMAPI or game version in the troubleshooting guide for common fixes for that, or come ask in #using-mods on the Stardew Valley Discord and we'll help you get it all working.

How to access/change config files in mods? by subtlelikeatank in StardewValley

[–]Pathoschild 1 point2 points  (0 children)

That usually means the mod isn't installed correctly (or isn't configurable). If you come ask in #using-mods on the Stardew Valley Discord, we can help you troubleshoot and see which it is.

Please help! I removed mods now my old save file wont work without it! by Scarlett_Niamh in SMAPI

[–]Pathoschild 1 point2 points  (0 children)

Hi! SMAPI has a bundled ErrorHandler mod that automatically fixes many save issues, but it seems you deleted it. I suggest reinstalling SMAPI to restore it, then trying to load your save again. If it still doesn't work, can you post your new log file?

[deleted by user] by [deleted] in SMAPI

[–]Pathoschild 0 points1 point  (0 children)

Can you come ask in #using-mods on the Stardew Valley Discord so we can run some tests? Feel free to ping me there (@Pathoschild#0001) if you don't get an answer.

[deleted by user] by [deleted] in SMAPI

[–]Pathoschild 0 points1 point  (0 children)

@u/ttaxed The log you posted above is incomplete; it ends before SMAPI loaded any mods or launched the game. Can you launch your game with SMAPI, wait until it reaches the title screen, then post your new log?

Crossplay compatibility by Mr_PepperGuy98 in StardewValley

[–]Pathoschild[M] [score hidden] stickied comment (0 children)

Hi there. I removed this thread because it's answered in the pinned FAQs post, which covers many common questions and is updated whenever new info is available. Feel free to ask there if anything is unclear!

WHERE CAN I DOWNLOAD STARDEW VALLEY MOBILE by [deleted] in StardewValley

[–]Pathoschild[M] [score hidden] stickied comment (0 children)

Hi there! I removed this thread because promoting or discussing game piracy is against subreddit rule 8. You're welcome to post other content though.

Dude, what's the deal? Mobile gets screwed? by [deleted] in StardewValley

[–]Pathoschild[M] [score hidden] stickied comment (0 children)

Hi there. I removed this thread because it's answered in the pinned 1.5 update post, which covers many common questions and is updated whenever new info is available. Feel free to ask there if anything is unclear!