Coding Help First Time Modder needs HELP!

gr8mrcy

Greenhorn
I have been dealing with this similar issue and similar error for two weeks now, and I am hopelessly lost and frustrated. I am a first-time modder attempting to create a dialogue expansion mod. I am a GREAT writer; but I am not a coder. I had never even played a PC (or otherwise) game before two months ago. But after reaching summer of year two, I was bored to death of the same dates, the same conversations, the same interactions and I thought, "Surely I can do better than this." So I started looking at mods and tearing them apart and broke my game four times had to start from zero 4 times, and now I have gotten to the point where I have written 18,000 words (110,481 Characters) of new dialogue, and created a pretty awesome mod, but I keep running into json errors and content patcher errors that I can BARELY understand, let alone fix. Somebody who is an experienced modder could probably take one look at this and tell me where I am going wrong, but I can't even figure out what the issue is. I almost don't even know how to ask questions. I am that new. A recurring issue has been curly or smart characters getting into my code. Today I finally learned how to run a regex on my code in Notepad++ which I believe will take care of that issue for good. I know how to validate json files, but this smapi error keeps happening even though the code has validated and I ran a clean regex on it. So finally I found you guys and I am hoping someone will be able to assist me.

UPDATE: I made some significant progress with this file, but I still am having persistent smapi errors.

latest smapi error: https://smapi.io/log/65a3b266334e4ccea6043a548f752707

What the log says: Can't apply data patch "Saucy_Lance > EditData Characters/Dialogue/Lance > entry #1" to Characters/Dialogue/Lance: failed converting entry to the expected type 'System.String': Can not convert Object to String..
Can't apply data patch "Saucy_Lance > EditData Characters/Dialogue/Lance > entry #2" to Characters/Dialogue/Lance: failed converting entry to the expected type 'System.String': Can not convert Object to String..

I just don't know what to do, don't know what to try, I have read and re-read this document until I am blue in the face......
Any help would be massively appreciated!
 
Last edited:
I haven't made a dialogue mod before, but maybe I can help a little.
You can try changing it like this and see if it will work. You might also find it helpful to take a look at the Content Patcher guide here.

"Mon": "{{Random: I do miss the tropical weather of Ginger Island and Fabel Reef. The weather there always feels happy.$0++Your another dialogue here++And another dialogue here|inputSeparator=++}}",
 

salmonsalmon

Cowpoke
Hiiii, mod author here who specializes in dialogue, if you upload the entire dialogue folder (such as regular dialogue and then marriage as well if you can marry them) I can help you. I am also a wiz at figuring how what specifically is wrong with files and I can give you amazing pointers on how to fix things.
 

gr8mrcy

Greenhorn
Hiiii, mod author here who specializes in dialogue, if you upload the entire dialogue folder (such as regular dialogue and then marriage as well if you can marry them) I can help you. I am also a wiz at figuring how what specifically is wrong with files and I can give you amazing pointers on how to fix things.
Oh my gosh!!! I just saw your reply and I am soooo happy to meet you! I am not a coder, and this process has been very challenging because half the time I just don't know how to even ask the questions I want answered. I would love your help because I am so stuck. I think I am close, but not there yet. I have an awesome dialogue expansion that is NSFW, but not vulgar either. No bad words, but lots of scintillating adult conversation. There is a lot that I want to do with my mod, but most of it I don't know how to do yet. I have had people from three different countries ask if they could translate my mod, so I think it id going to be good, but I can't get it to run properly. Here is my current issue, but probably not my last issue.

I am getting this smapi error: https://smapi.io/log/5a5ee7245a664650b417c8e51597c038. I know there is something wrong with my syntax ... but I can't figure it out. In my mod, there are times when I am trying to simulate longer than normal back & forth conversation between Farmer and Lance. The only way I have been able to make the conversations work is by placing them directly into the content.json file, rather than calling for them in the i18n folder, I think the proper way is the have the dialogue snippets in the default,json file, and have the entry in content.json read like so:

"Format": "2.3.0",

"Changes": [

{

"Action": "EditData",

"Target": "Characters/Dialogue/MarriageDialogueLance",

"Entries": {

"Rainy_Day_0": "{{i18n:STP.Rainy_Day_0}}",

"Rainy_Day_1": "{{i18n:STP.Rainy_Day_1}}",

....... and continuing .......

But in my file, I am trying to display a conversation that happens where Lance says hello or something, asks a question, Famer answers, Lance answers, Farmer answers, Lance answers, Farmer responds etc., where there might be an in-depth convo that also moves my story along (since I have never been able to make events work, or scheduling work, so I am trying to tell a story thru a convo but I get the above error. If I put the whole convo in content.json directly, that seems to work. However, I recently created a bunch of random daily dialogue snippets that are being rejected. They are just random; I don't care when they pop up, they are just filler conversation.

They look like this in the content.json file:

{

"Action": "EditData",

"Target": "Characters/Dialogue/Lance",

"Entries": {

"Mon": {

"Random": [

"{{i18n:Mon.Lance_0}}",

"{{i18n:Mon.Lance_1}}",

"{{i18n:Mon.Lance_2}}",

"{{i18n:Mon.Lance_3}}",

"{{i18n:Mon.Lance_4}}",

....... and continuing .......

Smapi does not like this. The files Validate in jsonLint, but I keep getting this error. Sorry, if this is too much info, but I was reading on the instructions for asking for help, and they said DON'T skip the details of the problem. Just can't get the file to load without errors.....

Also, let me just say, if you wanted to partner up on this and help me bring my mod into reality, I would gladly share credit and let everyone know you were the brilliant coder who helped to bring my mod into reality. Hope to hear back from you soon! Thank you!
 

gr8mrcy

Greenhorn
I haven't made a dialogue mod before, but maybe I can help a little.
You can try changing it like this and see if it will work. You might also find it helpful to take a look at the Content Patcher guide here.

"Mon": "{{Random: I do miss the tropical weather of Ginger Island and Fabel Reef. The weather there always feels happy.$0++Your another dialogue here++And another dialogue here|inputSeparator=++}}",
Thank you for this ... I think I have it correctly: Currently using this:

"Action": "EditData",
"Target": "Characters/Dialogue/Lance",
"Entries": {
"Mon": "{{i18n:Mon.Lance_{{Random:{{Range:0,13}}}}}}",
"Tue": "{{i18n:Tue.Lance_{{Random:{{Range:0,13}}}}}}",
"Wed": "{{i18n:Wed.Lance_{{Random:{{Range:0,13}}}}}}",
"Thu": "{{i18n:Thu.Lance_{{Random:{{Range:0,13}}}}}}",
"Fri": "{{i18n:Fri.Lance_{{Random:{{Range:0,13}}}}}}",
"Sat": "{{i18n:Sat.Lance_{{Random:{{Range:0,13}}}}}}",
"Sun": "{{i18n:Sun.Lance_{{Random:{{Range:0,13}}}}}}"

We'll see how this goes.....:)
 
Top