OSP Kit QoL Lav's Companions Overseer OSP v.1.20

Users who are viewing this thread

Lav

Sergeant Knight at Arms
Companions Overseer v1.20
http://mountandblade.nexusmods.com/mods/3159
http://www.mbrepository.com/file.php?id=3159

23u6aeg.png

Companions Overseer is a completely new, thoroughly designed interface for management of your party inventory and equipment, as well as for monitoring the current attributes, skills and proficiencies of your companions and troops (and eventually, lords of your own kingdom as well).

Feature list for Companions Overseer (current version 1.20).
  • Browse all attributes, skills and proficiencies for your companions, regular troops and, once you become a king, your kingdom lords. You can control who will be displayed and who will not.
  • Open companion's character window directly from Overseer. You can also open character screens for your regular troops and lords.
  • Manage your own equipment and inventory, duplicating the functionality of game standard Inventory screen, but with many extra options. All item prerequisites are tracked and respected.
  • Overseer's interface closely imitates that of standard game inventory screens, player does not have to adapt to the new interface and can use it intuitively from the very first moments.
  • Browse and manage equipment for all your companions in a single window. You no longer need to switch between dozen different windows just to pass a sword from one companion to another.
  • Automatically equip your companions with the best armors, shields and horses from player's inventory. You can auto-equip one companion or all of them with a single mouse click.
  • Offer equipment to your companions. If it's better than what they currently have, they will switch their equipment. You can offer equipment to one companion or to all of them with a single mouse click.
  • Give books to your companions! Even if the mod does not support companions reading books, they will still use reference books successfully without any additional coding. Or turn off this feature during mod compilation if you don't want it.
  • Quickly discard items from equipment or inventory of both your own character and your companions'. Now you can dispose of your companion's items without putting them in your inventory first. Also you are no longer restricted with the number of items you can dispose of in a single go.
  • Sort player's inventory by price (same as merchants do).
  • Freeze and unfreeze player's inventory slots. Frozen slots won't be affected by any operations which deal with player's entire inventory. So you can safely keep those 3 smoked fish and 3 pack horses in the last 6 slots without them being affected by inventory sorting or party auto-equipment.
  • All item stats are displayed in popup box (same as in game inventory windows).
  • Replace standard post-battle loot window with Overseer equipment presentation. Looted items will appear in garbage/loot area.
  • Equip your companions directly from battle loot. You no longer need to go through dozens mouse clicks and interface windows to equip your party with freshly looted stuff.
  • Retrieve everything (up to player's inventory capacity) from garbage/loot area with a single click. Looting has never been easier.
  • Retrieve the best stuff from garbage/loot area. Most valuable items from garbage/loot and player's inventory will be placed in inventory, and only the most worthless junk will be left in garbage/loot area. Have you ever won a fight when your inventory was full and was then forced to compare items from both windows one by one, replacing cheaper items in your inventory with more valuable ones from loot? Now you can do this in a single mouse click.
  • Browse equipment of your regular troops and kingdom lords (you cannot change it though).
  • 100% ready for translation, all strings are exported to module_strings.py.
  • Expanded header_operations.py file (from another project of mine) is included in the download, containing the fix for Warband Module System bug which prevents Overseer from compiling successfully.

Distributed as an OSP pack. Can be used and modified without any restrictions. Make sure to read the readme file included in the download though.

Party equipment management interface:


Party attributes/skills overview interface, first page:


Party attributes/skills overview interface, second page:


Presentation running in 1024*768 resolution:

For the attribute overview part of the functionality credits go to Jedediah Q, whose "Companions Overseer" project inspired me to start with this presentation scripting in general and this project in particular.

Special credits go to cmpxchg8b for digging out the actual xp-to-level table used by the game (though it's no longer used as of 1.20).

Special credits go to Ikaguia for his help with debugging the first version of presentation.

Special credits go to soulmata for bringing my attention that Warband does, in fact, check prerequisites for shields.
 
Changelog.

Implemented a workaround for apparent Warband bug with store_skill_level operation.

Introduced a new configuration variable to enable/disable companion book slots. May be useful for mods where book slots for companions are undesired.

Introduced "freezing" of player's slots. Freezing and unfreezing is done by right-clicking on player's inventory slots when nothing is dragged. Frozen slots can only be changed manually, by picking and dropping items one by one. Auto-equip functionality will not take items from frozen slots, they will not be filled when retrieving loot, and they will not be affected when player sorts his inventory.

Bugfix. When Companions Overseer was used as a loot screen, for the first time it would be called in any game, nothing would be available to loot.

Bugfix. Fixed the price multiplier for popup boxes displaying item stats and prices. Prices are now displayed correctly for all items.

Bugfix. Shields were previously exempt from skill checks, so it was possible to equip a shield which the character did not meet prerequisites for. This has been fixed and all checks are now implemented properly.

Implemented Ctrl-click on "Retrieve Items" button. The player will take the most valuable items from both his inventory and garbage/loot area, to the limit of his inventory capacity. Less valuable items are dropped to garbage/loot area. Frozen slots are unaffected by this operation.

Code to integrate the Overseer as game loot screen has been included into the package.

New global variable: $g_lco_main_menu. It can be set to determine presentation behavior when player quits the presentation. Normally the player will be returned to world map. If this variable is set to some game menu, however, then the referenced menu will be started instead.

Hardcoded xp-to-level table has been removed from the code, there's a standard Warband operation for that.

Fixed file header_operations.py has been replaced with a much better version from another project.

Bugfix. If player was dragging an item and Alt-clicked on hero panel (shortcut for character window), the dragged item would be lost. Implemented proper checks, should no longer happen.

Bugfix. String for amount of player's money was generated using custom string. Now fixed, standard game script is used to generate the amount of money player has. Hence any changes made to the game currency system are automatically supported.

I'll keep them here. I'm not planning any updates unless some bugs are found, but once there are bugs to fix, these ideas might be implemented too.

1. Feature, low priority. Stack merging: when dropping a stackable item (i.e. food) on top of the same item type, and sum of their current amounts is less than max amount, stacks should be merged (instead of them swapping places).
2. Feature, low priority. Add flag to disable switching between stats and equip windows (might be useful when you want only this or that part of functionality available).
3. Feature, for consideration. Sorting by attr/skill value on statistics screen. Convergence with equip screen might be a problem though (auto-equip was done in assumption that companions are listed in the same order as in the party, so the best stuff goes to those who are the first to join the battle).
4. Optimization, average priority. Refactor the scripts, making a small script library (minor sub-project).
5. Feature, high priority. Context-dependent hints, describing what happens if player clicks left mouse button in current situation. Buttons changing their title when modifier keys affecting their behavior are pressed (AKA ctrl, shift, alt).
6. Feature, average priority. Troop portraits in their current equipment.
 
Not sure how it looks on 1024*768, I already forgot this thing exists. :smile:

Uploaded another screenshot in 1024*768 resolution. Presentation looks surprisingly fine.

Captions are text, so they are translatable.
 
Each of your post is good news. I'll try to implement it. Hope it will work without complications since I'm running Diplomacy and thus have to be very careful. It's a shame the Module System only works one way.
 
Mmh... Sometimes it is possible to copy some lines from a "MS'd folder" and paste them into Diplo files but that doesn't work everytime. I'm afraid I can't implement it to my game unless you release a TXT version. :cry: But I'm not like asking this kind of things, so do as you like. I can still get it on Native and give you feedback if you're interested, but I don't have any save up there, so I'm not sure if it's worth it. :neutral:

By the way, I'm checking some of your OSP codes. Such simple edits can be very nice sometimes. :grin: Thanks for your time.
 
Did you copy all lines though? In some files there's more than one block of code that has to be copied. Namely:

1. In module_dialogs, one dialog line is at the very top and two lines are at the very bottom of the file.
2. In module_presentations, there's one extra "import" line at the beginning of the file and the main code block at the bottom.
3. In module_scripts, there's one extra "import" line at the beginning of the file and the main code block at the bottom.

All other files have only one code block to copy-paste so shouldn't be a problem.

For ease of use I have also annotated all modified blocks with "# LAV MODIFICATIONS START".."# LAV MODIFICATIONS END" comments.

So unless Diplomacy code already intercepts "O" key for some function of it's own (in which case you'll have to fix the simple_trigger code a to assign a different key) I don't think there should be any problems if everything is done properly.

Also: try to compile the code twice. Sometimes the first run of the compiler will produce tons of errors just because new element ID's are not yet referenced, but the second pass will work smoothly.
 
Well, I mean I can't get it on Diplomacy because I would need to build the module on a dedicated folder, then find the lines that I'm interested in from the TXT files, then paste them into Diplomacy TXT files. :neutral: Works for troops, items, all that kind of stuff, but not for module_constants for example, since there's no dedicated TXT file for this one.
 
Ah. If you are trying to integrate it with TXT files alone, then it probably won't work, I'm afraid. :sad:

In this case your best bet is either to download the Diplomacy source and compile it yourself, or /shameless promo mode on/ ask Diplomacy team to integrate the Overseer /shameless promo mode off/.
 
What ?! I've searched for Diplomacy source, didn't know there was a release. Should be far more easier then.

Edit : Mmh well, in fact there's no Diplomacy source. Bad luck. :neutral:
 
Ahem. As far as I know, all Diplomacy downloads have always included the source codes. How else do you think all other modders would be able to integrate Diplomacy into their mods otherwise? :smile:

http://www.mbrepository.com/file.php?id=2687
Source code is provided as well as .txt files, for others to modify or include in their own projects.
 
It's an .EXE now and it doesn't seem to include the source codes. I think the modders rather integrate their mods into Diplomacy than Diplomacy into their mods. :wink:

Looking to it and giving you feedback in a minute. :wink:
 
Okay, you definitely made my day. I'd gladly send you some denars via CalradianExpress... if it existed.

I'll have to tweak some stuff before starting a new game, and then I'll have to play a little time before giving you feedback about the Overseer, but I promise I won't forget. I owe you one. A big big "thank you". :grin:
 
Ikaguia said:
Thank you lav, it looks awesome... just add an "Press tab for second page" info anywhere :razz:
I think about adding a full help page for the full version of the presentation, there's too much functionality to be described in just a few words. :smile:

As for this version, I'll leave it as it is, no need to spawn another version for just a single hint. Insert it yourself if you wish, that shouldn't be a problem. Just keep in mind that output area includes most of the screen space down to the buttons, so use either the empty space between the buttons, or the empty area in the top left corner.
 
Full version released!

And much sooner than I expected, I assumed I'd be screwing with the code for a week more at least.

Link is the same, first post changed appropriately.

And here's the screenshot of the final product:



Enjoy!

P. S. Could mods please move this to OSP section?
 
Back
Top Bottom