Custom WorldDataEditorObjectData Appedices

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
PRAEst76
Posts: 27
Joined: Fri May 27, 2022 7:19 pm
Location: Suomi
Contact:

Custom WorldDataEditorObjectData Appedices

Post by PRAEst76 »

I'm not really a coder, but I'm dabbling in modding and I've found the need to create new models and flats. Currently I have the modelIds on a post-it stuck next to my monitor so I know what to use when I add them manually, however is there a way to create appendices for the WorldDataEditorObjectData.cs that modders creating new assets, such as DET, can distribute with their mods to have the new assets appear in the menu with the vanilla assets? I think this would make things easier for people using world data.

I'm sure it's doable, but with my extremely limited knowledge of C# I've no idea how. Is this something modders could do on their own or would WorldDataEditorObjectData.cs have to be edited to check for appendices in dfmods?

User avatar
PRAEst76
Posts: 27
Joined: Fri May 27, 2022 7:19 pm
Location: Suomi
Contact:

Re: Custom WorldDataEditorObjectData Appedices

Post by PRAEst76 »

I thought there might be more interest in this. Anyway, what I've done for my own use was to add my assets to WorldDataEditorObjectData.cs This is fine for personal use, but being able to add a script as an include to this database with the mod would be beneficial to anyone who plans to use it, or any mod that adds new assets.

Code: Select all

	public static Dictionary<string, string[]> flatGroups = new Dictionary<string, string[]>() {
            // PRAEst76's Houses2Homes
            { "mugs", new string[] { "56790.1", "56790.2" } },
            { "morebottles", new string[] { "56790.3" } },
            { "hangingmeat", new string[] { "56790.4", "56790.5" } },
            { "cabbages", new string[] { "56790.6" } },
            { "firewood", new string[] { "56790.15" } },
            { "turnips", new string[] { "56790.16" } },
            { "herbs", new string[] { "56790.11", "56790.12", "56790.13", "56790.14" } },
            { "tub", new string[] { "56790.17" } },
            { "mushrooms", new string[] { "56790.7" } },
            { "garlic", new string[] { "56790.8" } },
            { "onions", new string[] { "56790.9" } },
            { "sausages", new string[] { "56790.10" } },
            // End
	};    

Code: Select all

	public static Dictionary<string, string> billboards_interior = new Dictionary<string, string>() {
            // PRAEst76's Houses2Homes
            {"56790.1", "* Kitchen - Mugs [2]"},
            {"56790.3", "* Kitchen - Bottles"},
            {"56790.4", "* Kitchen - Hanging Meat [2]"},
            {"56790.6", "* Kitchen - Cabbages"},
            {"56790.7", "* Kitchen - Mushrooms"},
            {"56790.8", "* Kitchen - String of Garlic"},
            {"56790.9", "* Kitchen - String of Onions"},
            {"56790.10", "* Kitchen - Hanging Sausages"},
            {"56790.11", "* Kitchen - Hanging Herbs [4]"},
            {"56790.15", "* Kitchen - Firewood"},
            {"56790.16", "* Kitchen - Turnips"},
            {"56790.17", "* Kitchen - Wash Tub"},
            // End
	 };
Wordldata.jpg
Wordldata.jpg (35.41 KiB) Viewed 4825 times

Post Reply