spice_cabinet
Greenhorn
Hello! I'm new to coding, and have had luck with finding help here in the past, so I figured I'd give it another shot.
I'm interested in giving seasonal portraits to some custom NPCs that I've made. From what I understand, my code matches what is needed, but I think I may be missing something somewhere.
I am editing the content.json directly, and adding the following code:
{
"LogName": "Seasonal Portraits - Spring",
"Action": "EditImage",
"Target": "Portraits/AndyKatsuhito",
"FromFile": "{{TargetPathOnly}}/andySpringPortraits",
"Update": "OnLocationChange",
"When": {
"HasFile:{{FromFile}}": true,
"Season": "Spring"
}
}
I have also attempted:
{
"LogName": "Seasonal Portraits - Spring",
"Action": "EditImage",
"Target": "assets/img/Portraits/andyFallPortraits",
"FromFile": "assets/img/Portraits/andySpringPortraits",
"Update": "OnLocationChange",
"When": {
"HasFile:{{FromFile}}": true,
"Season": "Spring"
}
}
Here is the code for the default portraits:
{
"LogName": "NPC Portrait",
"Action": "Load",
"Target": "Portraits/Andy",
"FromFile": "assets/img/Portraits/andyFallPortraits.PNG"
}
The NPC's default portraits are what I would like to be his Fall portraits, so in the second example, the code is meant to edit his Fall portraits and turn them into Spring ones, during Spring.
What stumps me is that SMAPI does not generate an error message for either attempt, so I have no clue where to try looking.
What happens is this: I load the world, go talk to the NPC, and the portraits are still his default ones: the Fall ones. SMAPI appears to be reading the new code, since there are no error messages about faulty coding or being unable to load the NPC, but it's still not working.
If it helps, I am using Miss Coriel's NPC Creator as a base, and adding code to the content.json it generates.
Any insight you can provide would be a great help!!
I'm interested in giving seasonal portraits to some custom NPCs that I've made. From what I understand, my code matches what is needed, but I think I may be missing something somewhere.
I am editing the content.json directly, and adding the following code:
{
"LogName": "Seasonal Portraits - Spring",
"Action": "EditImage",
"Target": "Portraits/AndyKatsuhito",
"FromFile": "{{TargetPathOnly}}/andySpringPortraits",
"Update": "OnLocationChange",
"When": {
"HasFile:{{FromFile}}": true,
"Season": "Spring"
}
}
I have also attempted:
{
"LogName": "Seasonal Portraits - Spring",
"Action": "EditImage",
"Target": "assets/img/Portraits/andyFallPortraits",
"FromFile": "assets/img/Portraits/andySpringPortraits",
"Update": "OnLocationChange",
"When": {
"HasFile:{{FromFile}}": true,
"Season": "Spring"
}
}
Here is the code for the default portraits:
{
"LogName": "NPC Portrait",
"Action": "Load",
"Target": "Portraits/Andy",
"FromFile": "assets/img/Portraits/andyFallPortraits.PNG"
}
The NPC's default portraits are what I would like to be his Fall portraits, so in the second example, the code is meant to edit his Fall portraits and turn them into Spring ones, during Spring.
What stumps me is that SMAPI does not generate an error message for either attempt, so I have no clue where to try looking.
What happens is this: I load the world, go talk to the NPC, and the portraits are still his default ones: the Fall ones. SMAPI appears to be reading the new code, since there are no error messages about faulty coding or being unable to load the NPC, but it's still not working.
If it helps, I am using Miss Coriel's NPC Creator as a base, and adding code to the content.json it generates.
Any insight you can provide would be a great help!!