Stardew Valley
0 of 0

File information

Last updated

Original upload

Created by

Platonymous

Uploaded by

Platonymous

Virus scan

Safe to use

Tags for this mod

About this mod

Allows adding higher resolution textures/animations via ContentPatcher, Json Assets, and possibly other mods that load images.

Requirements
Permissions and credits
Donations
Allows adding higher resolution textures/animations via ContentPatcher, Json Assets, and possibly other mods that load images.

1.4.4: Important
Sorry, for changing up this mod once again, but this will be the last time, because
ScaleUp is now incorporated into PyTK 1.13+ , 1.4.4 is only for loading the old ScaleUp pre 1.4 content and this mod will be removed in time.

To use the ScaleUp feature with pytk, put a .pytk.json file next to your image file,
for example object.pytk.json next to object.png with content like this:

{
"Scale": 4,
"Animation": 
{
"FrameWidth":64,
"FrameHeight":64,
"FPS":20
}
}

"Scale" is obviously the scale of the image, you can leave it out or set it to 1 if the image is not scaled, "Animation" is only needed if it is an image that should be animated, where "FrameWith" and "FrameHeight" are the size of each Frame in the animation (if scaled, the actual scaled size) and "FPS" determins the speed. You can have multiple rows in a spritesheet for animations but no empty frames.
Images can be loaded via Content Patcher, Json Assets and possibly others.
If you are making a CP/JA pack that relies on this feature and use the .pytk.json format, your pack does NOT need ScaleUp to work, only PyTK Version 1.13.0 or newer.





1.4.1: 
To let ScaleUp handle an image file that is loaded via JA or CP add a "originalName.su.json" file in the same folder.
So if the image is named "object.png" there should be a "object.su.json" next to it.

The file contains the Scale and the Animation-Data (if animated):

{
"Scale": 4,
"Animation": 
{
"FrameWidth":64,
"FrameHeight":64,
"FPS":20
}
}


(The old pre 1.4 Format is still supported, but the new one should be used going forward)


Have the filename you load contain [email protected] like [email protected]
(with 4 being the scale, so use whatever is the right scale of your file)
If you use this method you should not also add "ScaleUp":true or "OriginalWidth"
This method unlike the prior one works with all tokens, but not yet for EditImage

Only works for "Load" Actions.
Copy this mod into the Mods folder and simply add two (three for edits) parameters to the 
changes in the content.json file of your ContentPack for ContentPatcher:

"ScaleUp": true,
"OriginalWidth": [Width of the original texture]
"FromFileScaled": "[scaled file]" (only edits)

The png should be scaled by a factor of 2, 3, or 4 for best results, but any 
scale should work. Does not work for Map-Tilesheets yet.

Does not currently support tokens in the target!

Example:
{
  "Format": "1.6",
  "Changes": [
 {
"Action": "Load",
"Target": "Animals/Horse",
"FromFile": "horse.png",
    "ScaleUp": true,
    "OriginalWidth": 224
 },
 {
"Action": "EditImage",
"Target": "Maps/springobjects",
"FromFile": "object.png",
"FromFileScaled": "objectScaled.png",
"FromArea": { "X": 0, "Y": 0, "Width": 16, "Height": 16 },
"ToArea": { "X": 32, "Y": 48, "Width": 16, "Height": 16 },
    "ScaleUp": true,
    "OriginalWidth": 16
 }
]
}