![]() |
#15
|
|||
|
|||
![]()
Hi all,
I have refactored the Training Camp 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:
Training Camp Mod u1 ==================== A "mobile" training camp. It allows you to upgrade certain troops you have in your army (leadership governs the number of the upgraded units you get) - naturally, you have to pay a sum for the upgrade. It is based on the mod_17_Master_104_Training_camp.kfs, however this has been re-factored not to require the KBMaster (compatibility mod). Read the update notes for additional changes. 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 or decreases leadership requirements for units (by picking a skill) and do not re-open the hero screen 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, close the hero screen and open them again. Updates ======= u0 - Improved the text in the dialog (and, consequently the Russian language files have been completely removed). Made minor tweaking to the code as well and totally changed the way you are charged for the upgrades (just talk to the trainer, he will tell you). u1 - 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 upgraded instantly once you made your choice. - It is no longer necessary to open the dialog over and over again - after upgrade, you are taken back to the dialog 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) - Made the upgrade more expensive: now you get 50% for the old stack (was 75%) and you need to pay 125% for the upgraded stack (was 110%). (training_camp.lua -> TRAINING_CAMP_LAYOFF_COEFF = 0.5 and TRAINING_CAMP_UPGRADE_COEFF = 1.25) Usage ===== 1. Start a new game or load an existing game. 2. Wait for a short while (10 secs or so), and the training camp 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 stack will be upgraded and the gold will be taken from you. 5. Enjoy. Installation ============ Put the mod_17_training_camp_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. ***Edit1: Updated the package. See note(s) on u1. Last edited by Csimbi; 01-16-2009 at 11:48 AM. |
|
|