Unit Management Mod

Senzani's Unit Management 1.2.1

latest version (1.2.1) still has excessive lag when selecting or moving packed commanders. the game actually stutters while the units are moving, like it does when it's about to crash. i suspect that your data model is handling multiple events for each packed unit, instead of consolidating them all into one update with an UpdateGate (or similar timing mechanism). i see that your data model does define an UpdateGate, but none of the update code seems to pass through it. (oh and your model class declares its constructor twice. consider using eslint to reduce that kind of error.)

there's also a new usability problem in this version: selecting a unit hides the Unit Management panel, which makes it very difficult to click through the list to find a specific unit. this wouldn't be so bad if the game had an easy way to deselect units, but it doesn't, and it's especially bad for garrison units.

couple of comments regarding the config option processing: first, it shouldn't require a full UI reset to switch between interfaces; it should be enough to just set a variable and toggle a CSS class somewhere. second, the interface doesn't update properly when switching the option off, so the mod gets stuck in an unusable state until the player reloads.

btw you can post in this thread to get your discussion thread linked to the mod resource page:
 
Last edited:
Thanks for creating this mod it's improved my Civ 7 experience immensely!

I have one minor request - would it be possible to display the total # of military units and commander slots somewhere on the panel? Would make planning for Age transitions a lot easier so I wouldn't have to manually add them up.
 
latest version (1.2.1) still has excessive lag when selecting or moving packed commanders. the game actually stutters while the units are moving, like it does when it's about to crash. i suspect that your data model is handling multiple events for each packed unit, instead of consolidating them all into one update with an UpdateGate (or similar timing mechanism). i see that your data model does define an UpdateGate, but none of the update code seems to pass through it. (oh and your model class declares its constructor twice. consider using eslint to reduce that kind of error.)

there's also a new usability problem in this version: selecting a unit hides the Unit Management panel, which makes it very difficult to click through the list to find a specific unit. this wouldn't be so bad if the game had an easy way to deselect units, but it doesn't, and it's especially bad for garrison units.

couple of comments regarding the config option processing: first, it shouldn't require a full UI reset to switch between interfaces; it should be enough to just set a variable and toggle a CSS class somewhere. second, the interface doesn't update properly when switching the option off, so the mod gets stuck in an unusable state until the player reloads.

btw you can post in this thread to get your discussion thread linked to the mod resource page:
Ah ha... updateGate, I tried applying it earlier, while doing V1, after looking at some of the other panels but I didn't realize what it did until I added a few console logs just now. As I said, first time mod builder. I didn't even know the inner workings of the game when I started. I'm getting a good understanding now. To be honest, I hardly even used mods, lol.

Thanks tremendously Beezany, you have been invaluable to my learning.
BTW, for the life of me, I can't find how to DM people here. How do you DM on this forum?
 
Thanks for creating this mod it's improved my Civ 7 experience immensely!

I have one minor request - would it be possible to display the total # of military units and commander slots somewhere on the panel? Would make planning for Age transitions a lot easier so I wouldn't have to manually add them up.
Great idea, I'll see what I can do in version 2
 
Ah ha... updateGate, I tried applying it earlier, while doing V1, after looking at some of the other panels but I didn't realize what it did until I added a few console logs just now. As I said, first time mod builder. I didn't even know the inner workings of the game when I started. I'm getting a good understanding now. To be honest, I hardly even used mods, lol.

Thanks tremendously Beezany, you have been invaluable to my learning.
BTW, for the life of me, I can't find how to DM people here. How do you DM on this forum?
yeah, UpdateGate is a great way to make sure you don't churn on data updates faster than the game can display them. if that doesn't solve all of the performance problems, you might also want to take a look at the Databind.for method and the data-bind attributes, which uses the rendering engine to flesh out your lists instead of building them in Javascript. you can find a good example in the resource allocation screen (base-standard/ui/resource-allocation).

and to DM somebody, go to their forum profile, there's a button
 
yeah, UpdateGate is a great way to make sure you don't churn on data updates faster than the game can display them. if that doesn't solve all of the performance problems, you might also want to take a look at the Databind.for method and the data-bind attributes, which uses the rendering engine to flesh out your lists instead of building them in Javascript. you can find a good example in the resource allocation screen (base-standard/ui/resource-allocation).

and to DM somebody, go to their forum profile, there's a button
Yeah, originally I started with databind but I ran into some issues early on so I bailed out on that but I might revisit it now that the smoke is settling. No button on others profiles, must be an issue with my account.
 
Yeah, originally I started with databind but I ran into some issues early on so I bailed out on that but I might revisit it now that the smoke is settling. No button on others profiles, must be an issue with my account.
Go figure the button mysteriously appeared all of a sudden
 
This is VERY useful! It is currently the only mod I am still installing via CivMods, since the other mods I use have all become available on the Workshop. I did notice a slight issue when an Army Commander was killed (and would be ressurected sometime in the future). Your interface showed the Army Commander in the list of units, but when I clicked on the item I was pointed to a different living Army Commander. It is possible that there was some indication that the killed Army Commander was temporarily dead; if so, I didn't notice. If not, you might consider providing some such indication.
 
Thanks so much for making this! Any chance this will be posted to the Steam Workshop?
 
Being a first timer, I'm not overly familiar with Steam Workshop but I'll see if I can make it happen sometime this week for you guys. I do have some updates I want to push out re: performance anyways.

Thank you for using my mod, and I'll take a look into the resurrection issue as well.
 
Hi folks,
The mod has been posted to Steam Workshop, version 1.2.1 which is the current version here. I do have quite a few changes in the works however they are not quite ready yet.

Thanks for downloading!
 
I changed the icon to a sword just for fun because I prefer it over a helmet :)
 

Attachments

  • WhatsApp Image 2025-07-06 at 09.38.10.jpeg
    WhatsApp Image 2025-07-06 at 09.38.10.jpeg
    239.7 KB · Views: 31
I changed the icon to a sword just for fun because I prefer it over a helmet :)
Looks much nicer, I just threw a helmut up because I needed something. I didn't expect so many people would use the mod. Thanks for downloading Pale7!
 
Back
Top Bottom