img



img

Custom Renovations


By: Erinthe
Addon | img 153




Description

___________________________________________________________________________________________________________________________

This mod is a framework that allows modders to create renovations to any GameLocation outside of the FarmHouse using a single Content Patcher mod.

Renovations will be included in the renovations menu at Robin's store.

Here's a test using debug renovate:

 

You can download the above renovation mod as a template here.


Creating Renovations

A CP renovation mod needs at least a content.json file and a map file with the renovation tiles.

Here's a sample content.json file:

 

{
    "Format": "1.23.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Strings/Locations",
            "Entries": {
                "Greenhouse_Renovation_Plots": "Greenhouse Tree Plots/Gives the greenhouse some tree plots./Select an area for the renovation.",
                "Greenhouse_Renovation_Plots_Remove": "Remove Greenhouse Plots/Remove extra tree plots from the greenhouse./Select an area for the renovation."
            }
        },
        {
            "Action": "Load",
            "Target": "Maps/Greenhouse_Renovation",
            "FromFile": "assets/Greenhouse_Renovation.tmx"
        },
        {
            "Action": "EditData",
            "Target": "CustomRenovations",
            "Entries": {
                "greenhouse_renovation": {
                    "gameLocation": "Greenhouse",
                    "mapPath": "Greenhouse_Renovation"
                }
            }
        },
        {
            "Action": "EditData",
            "Target": "Data/HomeRenovations",
            "Entries": {
                "greenhouse_renovation": {
                    "TextStrings": "Strings\Locations:Greenhouse_Renovation_Plots",
                    "AnimationType": "destroy",
                    "CheckForObstructions": true,
                    "Requirements": [
                        {
                            "Type": "Mod",
                            "Key": "GameLocation",
                            "Value": "Greenhouse"
                        },
                        {
                            "Type": "Mail",
                            "Key": "greenhouse_renovation",
                            "Value": "0"
                        }
                    ],
                    "RenovateActions": [
                        {
                            "Type": "Mail",
                            "Key": "greenhouse_renovation",
                            "Value": "1"
                        }
                    ],
                    "RectGroups": [
                        {
                            "Rects": [
                                {
                                    "X": 4,
                                    "Y": 7,
                                    "Width": 12,
                                    "Height": 3
                                },
                                {
                                    "X": 4,
                                    "Y": 20,
                                    "Width": 12,
                                    "Height": 3
                                },
                                {
                                    "X": 1,
                                    "Y": 9,
                                    "Width": 3,
                                    "Height": 12
                                },
                                {
                                    "X": 16,
                                    "Y": 9,
                                    "Width": 3,
                                    "Height": 12
                                }
                            ]
                        }
                    ],
                    "SpecialRect": null
                },
                "greenhouse_unrenovation": {
                    "TextStrings": "Strings\Locations:Greenhouse_Renovation_Plots_Remove",
                    "AnimationType": "destroy",
                    "CheckForObstructions": true,
                    "Requirements": [
                        {
                            "Type": "Mod",
                            "Key": "GameLocation",
                            "Value": "Greenhouse"
                        },
                        {
                            "Type": "Mail",
                            "Key": "greenhouse_renovation",
                            "Value": "1"
                        }
                    ],
                    "RenovateActions": [
                        {
                            "Type": "Mail",
                            "Key": "greenhouse_renovation",
                            "Value": "0"
                        }
                    ],
                    "RectGroups": [
                        {
                            "Rects": [
                                {
                                    "X": 4,
                                    "Y": 7,
                                    "Width": 12,
                                    "Height": 3
                                },
                                {
                                    "X": 4,
                                    "Y": 20,
                                    "Width": 12,
                                    "Height": 3
                                },
                                {
                                    "X": 1,
                                    "Y": 9,
                                    "Width": 3,
                                    "Height": 12
                                },
                                {
                                    "X": 16,
                                    "Y": 9,
                                    "Width": 3,
                                    "Height": 12
                                }
                            ]
                        }
                    ],
                    "SpecialRect": null
                }
            }
        }
    ]
}

 

 

The above example adds two renovations, one that adds tree plots around the greenhouse and another that removes them.

Strings/Locations entries add the UI text; keys should match the value in the "TextStrings" key of the entry in Data/HomeRenovations

CustomRenovations is the path used by all CP renovation packs to tell this mod about their renovations. "mapPath" is the name of the map under the Maps folder (usually provided by the mod using a Load entry like the one above). "gameLocation" is the case-sensitive name of the game location to apply the renovation to. You can also provide sourceRect and destRect rectangles in this object, but I'm not quite sure what those do if anything.

Data/HomeRenovations entries follow the syntax for that file, with the exception of adding a new requirement (ignored by the vanilla game) as above. The type should be "Mod", the key should be "GameLocation" and the value is the case-sensitive name of the game location to apply the renovation to.




About Project

Created: September 6th 2023

Updated: September 6th 2023

Project ID: 99789

License: All Rights Reserved

__________________________________________

Game Versions:

1.01.03

1.01.03

1.01.03

1.01.03

1.01.03

__________________________________________

Flavors:

WoW Retail

__________________________________________

Categories

Companions

Battle

__________________________________________

Main File

Erinthe_Custom Renovations.zip
  • Release
  • September 6th 2023

    __________________________________________

    Recent File

    Erinthe_Custom Renovations.zip
  • Release
  • September 6th 2023

    __________________________________________

    Members

    img
    Erinthe
    Owner

    __________________________________________

    Report