Content Patcher

Content Patcher

463k Downloads

[Content Patcher] allow "Action": "EditData" to load "FromFile"

AndikaTanpaH opened this issue ยท 2 comments

commented

hi i want patch some data .json, can i use load FromFile like action:load?

content.json

{
    "Format": "1.6",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/Blueprints",
            "FromFile": "assets/Blueprints.json"
        },
        {
            "Action": "EditData",
            "Target": "Data/NPCGiftTastes",
            "FromFile": "assets/NPCGiftTastes.json"
        }
     ]
}

assets/Blueprints.json

{
    "Fields": {
        "Silo": {
            "9": "Saat kamu memotong rumput liar memungkinkan untuk menyimpannya sebagai pakan."
        },
        "Mill": {
            "8": "Penggilingan",
            "9": "Kamu bisa membuat tepung dari gandum dan gula dari bit."
        },
        "Earth Obelisk": {
            "8": "Monument Bumi",
            "9": "Memindahkan kamu ke gunung."
        }
   }
}

i know i can write them all on content.json but its to much line for 1 file :/
or with action:load. i was read will replace all data but i just need edit some part or row

my goal is make a translated for my country language.

ps: sorry for my bad language

commented

Yep, that's something I want to support in a future version. Thanks for the suggestion!

commented

Done in develop for the upcoming Content Patcher 1.10.