Is it not possible anymore to add building templates through mixintos?

In older versions, I had a few building templates in the archipelago, that were accessible through a third tab. So players would have “archipelago”, “ascendancy/rayya”, “custom” tabs.

In the new builder though there is no tabs, and also no sub categories (splitting tier 1 from tier 2)

How do I add new buildings in the new system? Keeping the same code from last version is not working, even if I try to include it in the ascendancy list.

Do the building templates not show up in the building templates list or are they not categorized?

They do not show. I tried updating them to the new builder (cause maybe it was the old models causing problem) but it also not worked.

We’ll look into this and update you when it’s fixed!

3 Likes

Would it make sense to have the building mixin (and building templates) in the archipelago mod itself, rather than the biome mod? The biome mod is hotloaded only when world generation occurs, and so only runs after the building client service has cached all the mods (and therefore applied mixins)…

If that is the case then I will do that.
What about a biome condition in the json like what we have for kingdoms? I found the new builder too cluttered when we have many templates, the old tab categories (kingdoms/custom) and the tier subsections helped a lot.

@not_owen_wilson After I moved it all to the main mod, only 3 templates are showing. The building list in the mod consists of a some templates made in the old builder, a few from the old but edited and saved in the new builder, and one made from scratch in the new builder.

When I moved them all to the stonehearth/saved_objects/stonehearth/building_templates/ they all appeared. (Though with wrong file paths from lazyness)

My current folder (from the mod) saved_objects.zip (353.0 KB)

I tested on this just launched version

I moved your saved_objects into data in the main mod, and updated the manifest to mixin the building index. I now see all new templates, but no old templates, because we filter ignore old templates from the building index, because right now we have new and old templates living alongside one-another.

The right answer might be to just delete the old templates from stonehearth and remove the filtering code. Off the top of my head, I don’t think there’s any reason not to do this. But in the meantime, if you just convert your old templates to the new style, they should appear.

But the one I did entirely in the new builder, a simple tent with a hammock inside, is not showing. That is what I found strange. I will try removing the old ones to see if they are somehow also affecting the new builds.

@not_owen_wilson
If I use this:

{
	"template_tabs": {
		"archipelago": {
			"display_name": "i18n(archipelago_biome:data.saved_objects.building_templates_index.template_tabs.display_name)",
			"categories": {
				"camp": {
					"display_name": "i18n(archipelago_biome:data.saved_objects.building_templates_index.template_tabs.categories.camp)",
					"ordinal": 2,
					"templates": {
						"shaded_hammock": "file(building_templates/shaded_hammock.json)"
					}
				},
				"boats": {
					"display_name": "i18n(archipelago_biome:data.saved_objects.building_templates_index.template_tabs.categories.boats)",
					"ordinal": 1,
					"templates": {
						"trader_ship": "file(building_templates/trader_ship.json)"
					}
				}
			}
		}
	}
} 

The shaded_hammock does not show up. While if I move it to the other category it works, like this:

{
	"template_tabs": {
		"archipelago": {
			"display_name": "i18n(archipelago_biome:data.saved_objects.building_templates_index.template_tabs.display_name)",
			"categories": {
				"boats": {
					"display_name": "i18n(archipelago_biome:data.saved_objects.building_templates_index.template_tabs.categories.boats)",
					"ordinal": 1,
					"templates": {
						"shaded_hammock": "file(building_templates/shaded_hammock.json)",
						"trader_ship": "file(building_templates/trader_ship.json)"
					}
				}
			}
		}
	}
}

Both templates from the new builder.
So I guess the template list is only loading one category.
With the new builder where everything is in a single list, I can move them all into one single category in the json. But the asc/rayya templates have two and those work…

I don’t see this behaviour; if you rename ‘camp’ to ‘foo’, does it still not show up? What I see is the ‘camp’ field clobbering all other ‘camp’ templates.

Yes, it worked when renaming the camp key to foo (or anything else). I didn’t imagined it would affect other camp keys as it is nested inside its own archipelago “tab”.

I’m adding a couple of templates to one of my mods and have been through this as well, as far as I understand from experimenting the issue is that the categories (camp, outpost, town, etc…) are all unique and the tabs serve only as an “ordering” priority; so if you have “camp” under different tabs it is actually the same category and it messes up. I suppose that is why Rayya’s and Ascendancy actually use different names for the same town levels. (outpost/camp, settlement/town, etc)