I have a very simple css file that just adds an icon to the loading bar. My intention was to replace that image I got for the loading screen of an archipelago map with something more subtle. (That image looks really out of place…)
It works perfectly when I added the css in my main manifest, using:
But then it will show for every map, which I want to avoid. When I try to add it through the hot loaded manifest (the one that only loads after the biome is picked) it does not work.
I wonder if this is possible to do? Hopefully without requiring overwrites.
Somehow the hotloaded manifests have some issues (for example, I tried terrain colors mod but hotloading the colors and the engine swaps the hex of the colors in a weird way, and complains about it).
So I would believe that css might be broken for them too. Maybe we can ask this on this week’s livestream. Do you get any errors in the log? Have you debugged it with CEF? Are there errors in the js console?
No errors, it just ignores. I never tried CEF though.
I believe the game already had a copy of the css when the second manifest loads, so any changes to it has no effects. At least from what I tested, as not even overriding worked.
In the end isn’t it the same thing?
In Rayya client, it calls the function to load their second manifest. Looking at the world generation code, it is the same thing for the biome manifest.
The difference is that the kingdom manifest is loaded as soon as you pick your kingdom, while the biome manifest is only loaded when the game starts drawing the minimap for the first time.
Oh, and the Rayya manifest mostly overrides images. That worked for me, that was what I did with the background image. All their css stuff is for after the game world loads. The game actually refreshs the UI when the game world loads, I guess that is why their css works.
One thing I did in the minimap screen to minimize overrides was to, in the js file I couldn’t avoid the override, make it add a html class to that screen named “archipelago_biome”.
So later, all the css I needed for that screen was added by targeting that class. This way, I didn’t had to override the css file and it will also only be target when the biome is selected.
I could do this again for the loading screen, but then it would be another js to override… And I just found that my js overrides were outdated, there were some changes in the originals that I had to apply to match them again.
I wonder if you could extend the js instead of overriding it (although no idea about the hotloading, if it doesn’t work then the problem is in our end). The UI is one of those hard to mod things, I wish we had a better way of handling it.