Coding Help How does StingsFromCSFiles works?

Seon_0

Newcomer
I want to make new things in StingsFromCSFiles. But I don't know how does it works
If I make a new ID in StingsFromCSFiles, how do I apply it to the game?
StingsFromCSFiles is in Stings folder
Plz help me
 

mouse

Farmer
These are strings that are called from various parts of the game code. Can you explain what you are trying to do, exactly? You can add new lines (or make your own files, for that matter), but how you use them depends on what you're doing. If you're not making a SMAPI mod, I probably wouldn't use that particular file, but more out of convention than because it's impossible.
 

Seon_0

Newcomer
These are strings that are called from various parts of the game code. Can you explain what you are trying to do, exactly? You can add new lines (or make your own files, for that matter), but how you use them depends on what you're doing. If you're not making a SMAPI mod, I probably wouldn't use that particular file, but more out of convention than because it's impossible.
I want to make food reaction mod. Like a message pops up when i eat a stardrop. When i eat some food, message pops up "It taste ..."
And StingsFromCSFiles contains Stingsdrop message. So i asked about it
 

mouse

Farmer
That sounds like it would probably be a SMAPI mod, which is a mod written in C# (programming) rather than content packs made up of assets and text files for an existing framework. If you're already familiar with C# or a similar language, it doesn't sound difficult, but if not, there's a learning process.

That page has step-by-step instructions, with pictures, for how to set up your first project in Visual Studio and create a tutorial mod. The FAQ at the bottom also has information on how to decompile the game, and links to the very well-documented SMAPI APIs.

It doesn't teach you C#. In addition to the many tutorials and classes available on the internet, most SMAPI mods made for Stardew Valley are open source, so you can go see how someone else did something similar and learn from their work. The compatibility page has a "show advanced info" checkbox that, when checked, will link the source code for every open-source mod.

I'm not an expert, but it doesn't sound like the basic idea would be too hard to make. My guess would be you'd either check for eaten food on right-click to add in your message, or patch the game code somewhere for eating (*gestures vaguely* I am not looking at a decompile and don't know what that looks like off the top of my head, so I am guessing :P ). How you organized the messages themselves and decided which message to use depends on what you wanted (unique messages for every item? predetermined groups of items? context-tag dependent?) but you can figure that out once there is a message, hehe.

If you've never modded anything before and are not familiar with programming at all, be patient with yourself and consider making some basic content mods to get familiar with how the game uses files while learning just enough C# to get going. You definitely don't need to be a pro.
 

Seon_0

Newcomer
That sounds like it would probably be a SMAPI mod, which is a mod written in C# (programming) rather than content packs made up of assets and text files for an existing framework. If you're already familiar with C# or a similar language, it doesn't sound difficult, but if not, there's a learning process.

That page has step-by-step instructions, with pictures, for how to set up your first project in Visual Studio and create a tutorial mod. The FAQ at the bottom also has information on how to decompile the game, and links to the very well-documented SMAPI APIs.

It doesn't teach you C#. In addition to the many tutorials and classes available on the internet, most SMAPI mods made for Stardew Valley are open source, so you can go see how someone else did something similar and learn from their work. The compatibility page has a "show advanced info" checkbox that, when checked, will link the source code for every open-source mod.

I'm not an expert, but it doesn't sound like the basic idea would be too hard to make. My guess would be you'd either check for eaten food on right-click to add in your message, or patch the game code somewhere for eating (*gestures vaguely* I am not looking at a decompile and don't know what that looks like off the top of my head, so I am guessing :P ). How you organized the messages themselves and decided which message to use depends on what you wanted (unique messages for every item? predetermined groups of items? context-tag dependent?) but you can figure that out once there is a message, hehe.

If you've never modded anything before and are not familiar with programming at all, be patient with yourself and consider making some basic content mods to get familiar with how the game uses files while learning just enough C# to get going. You definitely don't need to be a pro.
Thank you!! :D
 
Top