UI list of lords - How to increase the maximum cap ? [game menu "Characters"]

Users who are viewing this thread

Douw

Recruit
Hello,
I am working on a Warband mod which intend to add a large amount of factions and lords. But the User Interface seems to have reached a maximum capacity on the number heroes (ladies, lords, kings, NPC) : the list on the right don't show everyone, and stops in the middle of the ladies.

Is there a way to show everyone in this menu ? (the pages of the missing lords exist : when you talk to them and then go in their own menu from the discussion with them, they are showed on the menu, but not listed on the right)
I have already made some researches in the forum and the module system, the UI seems to be partially hardcoded. the menu is ui_troops2 (characters) , and then the list of heroes is listed but I don't know if the module system properly permit to adjust it.

Thank you, if anyone can help me on this precise point.
 
Solution
Not entirely sure if it's hardcoded, but pretty convinced that it is.

To be honest, even in vanilla Warband the list is so long that it's difficult to use. So if you doubled the number of entries, it would become a hell to browse anyway.
As a workaround you could limit who gets the note and who doesn't - there is a command for that (see how pretenders are initially hidden, and only unlocked later - this process can work both ways).
This would give you control on who is really skipped.
And then just merge the pages, for example disable pages for all wives and include info about them on the husband's page - they aren't independent anyway. Same for daughters, same for sisters without fathers.
I'm aware that's not a very satisfying...
Not entirely sure if it's hardcoded, but pretty convinced that it is.

To be honest, even in vanilla Warband the list is so long that it's difficult to use. So if you doubled the number of entries, it would become a hell to browse anyway.
As a workaround you could limit who gets the note and who doesn't - there is a command for that (see how pretenders are initially hidden, and only unlocked later - this process can work both ways).
This would give you control on who is really skipped.
And then just merge the pages, for example disable pages for all wives and include info about them on the husband's page - they aren't independent anyway. Same for daughters, same for sisters without fathers.
I'm aware that's not a very satisfying solution, but I'd say it's better than nothing.
 
Upvote 0
Solution
Indeed, the function " (troop_set_note_available, ":troop_no", 1) " , with 0 for not showing and 1 for showing works this way, and everyone is initialized in the Game_start script, it's easy to deactivate the ladies.
Thank you for pointing it, I think I'll use this workaround !

For information, my first version of my mod more than doubled the number of lords and it worked without problem. The update try to triple the original number, and this is where the problem starts. (so the limit is somewhere between)
 
Upvote 0
Btw (just because this seems like a logical place to put it) I went and tested the exact limits of Notes. How many entries can be displayed.
Turns out the limits are very fluid and depend on how long the names of entries are.
The shorter the entry names, the more entries you can have. With longer names you can have less entries.
However, the sum of characters in all entry names isn't constant. Each entry name probably comes with some sort of overhead.
For example, for info pages, if page names are all 4-character long, then it will display 1029 entries normally, and 1030th with its name truncated to just "1" (sum of names is 4117 chars), but with 5-character names it will display 971 entries (sum of names is 6079 chars) which means that each entry comes with some pretty big overhead (around 12-13 characters-worth) and each type of entries (info pages, troops, parties etc.) might have different overhead.

There are however some other engine limitations which are easier to find out:
factions: the game won't accept more than 128 factions total, including the hardcoded ones, whether they have a note or not. This means ids can only range between 0 and 127. Notes window should have no problem listing all factions.
quests: the game will crash if you have more than 169 active quests. More can be declared in module_quests, but they can't be active. Also, the Notes window seems very limited here, and will only show 124 quest notes, even with 3-character names (probably less if names are longer.

For the rest of them consider the following:
info pages: will show 1029 entries with 4-character names, but only 590 if character names are 16-chars long
parties: will show 785 parties when names are 3-character long
troops: similar to parties, might show even less

In general remember to hide objects that don't necessarily have to be on the list by disabling their notes (for quests: just don't start them if there would be too many)
 
Last edited:
Upvote 0
Back
Top Bottom