Jump to content

Open Community  ·  1328 members

Stardew Valley

Best practice for modifying events using Content Patcher


LaBelleTinker

Recommended Posts

Hi all,

I'm working on a Content Patcher mod that unifies many of the various Pokemon mods (only the ones that allow it in their "Permissions and credits" section, of course) and that involves a lot of small edits to text. (I can see why most such mods don't bother.) Sometimes it's very simple snippets like changing a string that says "Duck" into "Delibird", but for longer ones, is it better to replace them entirely using EditData/Entries or should I use EditData/TextOperations to improve potential compatibility with other mods?

For example, I could do this:


        {
            "Action": "EditData",
            "Target": "Strings/Buildings",
            "Entries": {
                "BigCoop_Description": "Houses 8 coop-dwelling Pokemon. Comes with an incubator. Unlocks {{Duck}}s."
            }
        }

or this:


        {
            "Action": "EditData",
            "Target": "Strings/Buildings",
            "TextOperations": [
                {
                    "Operation": "ReplaceDelimited",
                    "Target": [
                        "BigCoop_Description"
                    ],
                    "Search": "ducks",
                    "Value": "{{Duck}}s",
                    "Delimiter": " "
                }
            ]
        }

 

Link to comment
Share on other sites

  • 3 weeks later...

I'm new to content patch mods and would have just taken the top approach, but do see value in only modifying needed text for better compatibilities. I guess my thoughts on this would be how much other content patch mods are actually taking the textoperations approach instead of the entries approach to make it worth taking the 2nd approach.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...