Hi all,
I have refactored the Army Shop mod in a way that it does not require the KBMaster framework anymore.
Be sure to check the readme (included); there is a trade-off to getting rid of the KBMaster framework(!):
Code:
Army Shop Mod u5
================
A "mobile" shop. It allows you to hire unit into the existing army slots, up to their maximum count - however, you have to pay double price for the new recruits.
It is based on the mod_17_Master_103_army_shop.kfs, however this has been re-factored not to require the KBMaster (compatibility mod).
The trade-off by using this one instead of the KBMaster version is this: since some files have been directly modified, there may be conflict(s) with other mods.
These files are:
- items.txt
- itextures.dat
- logic_hero.lua
Credits are due to SayNt for the original mod.
Known issues
============
Issue #1.
Symptom: Sometimes the dialog options to purchase units do not show up properly.
Problem: It appears this happens when you increase your leadership (by picking the appropriate skill) and do not close the hero dialog before talking with the army camp merchant. I seems that it is not possible to fix this without modifying other scripts - I decided to leave it alone instead.
Solution: Leave the dialog and open it again.
Updates
=======
u0 - Improved the text in the dialog.
u1 - Earlier, if you did not have enough gold, you could not buy recruits at all. I implemented a check vs. the amount of gold you have - so you can still buy the amount of units you can afford.
u2 - Fixed a bug: now the "Use" option of the item is disabled properly (you must talk with the merchant before you can use it). Updated text on all dialogs (and, consequently the Russian language files have been completely removed). Re-factored the scripts a bit again and added additional checks.
u3 - Fixed a bug: now the proper dialog options will be shown right away.
u4 - Several changes:
- The amount of available gold is now shown in the dialog.
- It is no longer necessary to use the item anymore; the units are purchased right away as you make your choice.
- It is no longer necessary to open the dialog over and over again - after purchase, you are taken right back where you were.
- Merged the two script files into one.
- Refactored repeated code sections into re-usable functions.
- Moved code that is commonly usable (by other mods) into a separate script file (new_scripts.lua)
u5 - Very minor refactor again.
Usage
=====
1. Start a new game or load an existing game.
2. Wait for a short while (10 secs or so), and the army shop item will be added to your inventory.
3. Right-click on the item and select "talk". This allows you to review the offers and make a selection.
4. Once you make a selection, the appropriate amount of recruits will be added and the gold will be taken from you.
5. Enjoy not having to rush back to certain places periodically (vs. paying double price).
Installation
============
Put the mod_17_army_shop_refactor.kfs file in the <King's Bounty>\DATA\MODS directory (if the directory does not exist, you need to create it).
Uninstallation
==============
Delete the file(s) you added during the installation.
16th of January, 2009
Csimbi
***Edit:
This is for the 1.7 English version.
*** Edit2
Updated the package. See note about "u1".
*** Edit3
Updated the package yet again. See note about "u2".
*** Edit4
Updated the package yet again. See note about "u3".
*** Edit5
Updated the package yet again. See note about "u4".
*** Edit6
Updated the package yet again. See note about "u5".