Nasuellia Mods

It's the call to InterfaceMode.switchTo("INTERFACEMODE_DEFAULT") that seems to do it. I could be the messages are unrelated, but it's only when I deselect a unit. I get lost trying to trace it from action handler down to focus manager.

Code:
NASULOG-NOSTICKY: This instance of handleInputFilters is now continuing with the vanilla code
 While executing JS :30:23
[41m[33mFM: DEPRECATED call to resetFocus. target:  name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto[0m
 While executing JS :30:23
FM: Attempt to set focus on element without tabindex. element:  name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto
 While executing JS :15:23
FM: Over 10 frames have been requested for element to receive focus:  name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto unit-actions--hidden
 While executing JS :30:23
FM: Forcing focus to body as a pending focus element has been waiting over 30 frames for focus: name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto unit-actions--hidden
 While executing JS :15:23
FM: Explicitly setting focus to the document.body (aka: 'the world').  Use worldFocused() instead!
 While executing JS :30:23
 
It's the call to InterfaceMode.switchTo("INTERFACEMODE_DEFAULT") that seems to do it. I could be the messages are unrelated, but it's only when I deselect a unit. I get lost trying to trace it from action handler down to focus manager.

Code:
NASULOG-NOSTICKY: This instance of handleInputFilters is now continuing with the vanilla code
 While executing JS :30:23
[41m[33mFM: DEPRECATED call to resetFocus. target:  name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto[0m
 While executing JS :30:23
FM: Attempt to set focus on element without tabindex. element:  name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto
 While executing JS :15:23
FM: Over 10 frames have been requested for element to receive focus:  name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto unit-actions--hidden
 While executing JS :30:23
FM: Forcing focus to body as a pending focus element has been waiting over 30 frames for focus: name=NaN, tagName=UNIT-ACTIONS, className=opacity-0 translate-x-full pointer-events-auto unit-actions--hidden
 While executing JS :15:23
FM: Explicitly setting focus to the document.body (aka: 'the world').  Use worldFocused() instead!
 While executing JS :30:23
I still don't understand what the actual problem is though. What are you experiencing that is not right? Console warnings, often even errors,.are meaningless, the game is full of it without any mod.
 
No, I'm just trying to learn my way around. There's no functional problem that I notice. It wasn't a this needs to be fixed type thing but more a cleanup type thing like removing debug messages. There's some messages to remove. I should make more of a distinction between as a user and as a curious newbie. This would fall in the curious newbie category.

Initially I assumed sloppy vanilla code. When I tried closing city view I didn't get the messages though. Digging in city view, as near as I can tell, is using basically the same function. It uses switchToDefault which just calls switchTo with a slightly different ID. I changed your code to use switchToDefault but still got the messages. It seems to be the context and not the call itself. I didn't know enough to trace it to the actual call to the focus manager. That should make it clear what causes it to call the depreciated function.

I downloaded the mod initially because it was my first annoyance, i.e. not being able to deselect the scout. I then started using as as a learning tool since it's about as basic as it gets, i.e. a mouse click. It certainly wasn't as simple as I imagined and I learned a bit about the architecture. I still have a ways to go. Like it seems like there ought to be onClick on interface elements.
 
Dear nasuellia, your redesigned unit flags look a lot more readable and appealing than the base game. An option for smaller sizes would be much appreciated.

Edit: grammar
 
Last edited:
Is it possible to adds a red border to suzerain units during wartime, similar to the hostile independent cities? It would also be great to add a green border for the units of your own suzerains.
Hey thanks for he feedback! That is most definitely on my todo-list, I was surprised as well to notice that city-states are treated like players in many respects and not as independents. Will work on it!
 
Hey, I love your alt-unit-flags mod! The design looks much better and the health bars are much more readable and in style with the rest. The little icons for actions (healing, on alert, fortifying) are a nice touch, as are the icons for units nested in a commander. And the horizontally splitting of stacked units helps a lot, that's really a big improvement of the UI! I was also pleasantly surprised by the "flag wiggling" for units that have movement points left. I didn't read that in your description, but it's such a nice feature.

The only thing I don't really like (yet) is the repositioning of the flag. I liked that the flag was above the unit, so I could still see the unit graphics in full. Now it's partially obscured by the flag. But I can imagine that the higher position wouldn't work with the horizontal splitting of stacked units. And I think I'll get used to it, but if the flag could go up at least a bit, I would be even more pleased :)

All in all, a really great mod. Well done!
 
Hey thanks for he feedback! That is most definitely on my todo-list, I was surprised as well to notice that city-states are treated like players in many respects and not as independents. Will work on it!
awesome, will be waiting :D
 
Hey, I love your alt-unit-flags mod! The design looks much better and the health bars are much more readable and in style with the rest. The little icons for actions (healing, on alert, fortifying) are a nice touch, as are the icons for units nested in a commander. And the horizontally splitting of stacked units helps a lot, that's really a big improvement of the UI! I was also pleasantly surprised by the "flag wiggling" for units that have movement points left. I didn't read that in your description, but it's such a nice feature.

The only thing I don't really like (yet) is the repositioning of the flag. I liked that the flag was above the unit, so I could still see the unit graphics in full. Now it's partially obscured by the flag. But I can imagine that the higher position wouldn't work with the horizontal splitting of stacked units. And I think I'll get used to it, but if the flag could go up at least a bit, I would be even more pleased :)

All in all, a really great mod. Well done!

Hey there! Yes the height of the unit-flags is quite tricky because you want them to be low-enough not to look detatched from the models and not to interfere with city-banners, but you also want them high-enough not to cover the models.
I will definitely experiment a bit more with that! It's been a point of contention in my mind as well, while developing the mod.

There's an even worse issue with the vertical bars for damaged districts: the vanilla ones are super-tiny and placed right on the district (which is insufferable because, being click-blocking, they interfere with unit-selection sometimes), so I moved them to the right of the district. Unfortunately the anchoring of such elements is different from the unit-flags (which are tied to an entity), and feel very floaty, change in final 2D-position a lot as the zoom-level changes, and often end up TOO much on the right of the district. I'll have to fight with that quite a bit too. They also don't disappear when they should (opening a diplomatic screen), but that's true for vanilla ones as well, and I hope to fix it.

Overall, there are a few quirks to iron out in this v0.1. Thanks a bunch for the feedback which is enormously appreciated!
 
Can I ask you why you went back to a traditional script-replacing technique on your non-sticky selection mod? Just curious, because this potentially could cause conflicts with other mods again.
I'm a bit battled over this. Full script replacement vs Monkey-Patching has advantages and disadvantages.

Monkey-patching is totally worth it for mods that add stuff stuff to functions/methods without needing to ever prevent vanilla code to run or change how it works directly, but my non-sticky mod does need to do so, therefore I suspect that any other mod touching those functions would still likely conflict.

So in that case, monkey-patching didn't bring much to the table, and I find it actually harder to maintain. Moreover there are no mods that I'm aware of touching that same script.

I'm perfectly open to change my mind and go back to the other method if given a reason. Would take very little time.
 
I'm a bit battled over this. Full script replacement vs Monkey-Patching has advantages and disadvantages.

Monkey-patching is totally worth it for mods that add stuff stuff to functions/methods without needing to ever prevent vanilla code to run or change how it works directly, but my non-sticky mod does need to do so, therefore I suspect that any other mod touching those functions would still likely conflict.

So in that case, monkey-patching didn't bring much to the table, and I find it actually harder to maintain. Moreover there are no mods that I'm aware of touching that same script.

I'm perfectly open to change my mind and go back to the other method if given a reason. Would take very little time.
Thanks for the explanation. My knowledge of coding is somewhat limited, so it's great to learn from exactly these kinds of considerations. And I can totally understand how this could still conflict even without script replacement.
 
Thanks for the explanation. My knowledge of coding is somewhat limited, so it's great to learn from exactly these kinds of considerations. And I can totally understand how this could still conflict even without script replacement.
I could be completely wrong on this one because, while I am a professional coder, I have near-zero previous experience with javascript, and absolute-zero experience with modding civilization games.
That's why I'm a bit uncertain on what to do. I guess we'll see how things evolve from here, especially after the modding framework gets released, as well as the steam workshop, at which point we'll see a plethora of more mods.
 
Unfortunately Sukritact's Simple UI Adjustments mod doesn't work correctly with nasuellia-alt-settlement-view mod. Thanks anyway for your helpful mods.
 
The health bar of the fortification seems to be slightly off in this situation? the top left one relates to the tile in the top left, unsure if it has anything to do with me being on a 32:9 monitor!

Also not sure if this is the mod or something else, but the health bars on the fortifications show through on the diplomacy screen!



1741723674901.png
1741723941454.png
 
Unfortunately Sukritact's Simple UI Adjustments mod doesn't work correctly with nasuellia-alt-settlement-view mod. Thanks anyway for your helpful mods.
Can you be more specific? Because I use Sukritact's Simple UI Adjustments and have no issues whatsoever, but I might be missing something. Thanks!
 
Can you be more specific? Because I use Sukritact's Simple UI Adjustments and have no issues whatsoever, but I might be missing something. Thanks!
With Sukritact's Simple UI Adjustments if you hover over a hex tile you can see what improvements can be built. With both mods this is no longer possible.
 
@Alexanzer: you're right! Didn't think of that because I actually use another mod for the tooltips, which is completely compatible with Sukritact's Simple UI Adjustments and overrides its behavior for tooltips alone.
The mod I'm speaking of is TCS-Improved-Plot-Tooltip. I strongly suggest you install it, those tooltips are much superior both aesthetically and functionally to Sukritact's. TCS-Improved-Plot-Tooltip is also completely compatible with my mod. So if you install all three (mine, Sukritact's and TCS's) you'll get my settlement-view, TCS's tooltips, and still have all the other Sukritact's features.

Alternatively to TCS's mod, there's also Map Trix by beezany which is also very very good and should be completely compatible with both, exactly the same way (although I can't confirm it because I don't use it myself).

PS: fidati connazionale, installa TCS che é una bomba.
 
Back
Top Bottom