PDA

View Full Version : HOMM3 Tomes for AP Mini-Expansion Alpha now Available for Download!


MattCaspermeyer
07-04-2012, 11:26 PM
I'm pleased to announce the first alpha release of the Heroes of Might and Magic 3 Tomes mod / micro / mini expansion for Armored Princess!

Note that this mod is in the first stage of its alpha development and as such there are no real changes to the game, yet. In fact, this first release is very meager, but does fix a couple of key game bugs / errors:


Fixed Ball of Lightning text description error.
The Paladin Prayer ability now heals plants and mechnical units per its description.

If you think golems (they are not mentioned explicitly, but Cyclopses are golems) should be healed as well let me know and I'll think about this change for the second stage of the alpha development cycle.


The following files were changed by this update:

mod_homm3_tomes_ap.kfs

TEMPLATES.LNG - fixed "shock" template for pet templates as it was misspelled and in a different language set
ADDON_SPECIAL_ATTACKS.LUA - removed "plant" and "mech" from act_feature test
mod_homm3_tomes_ap_en(g)_lng.kfs

EN(G)_PET.LNG - ensured that template name is "shock" and not some other character set that looks like it.

That's it! I know, it is very small, but this is the first seed, and plus this mod could actually serve as an official patch from the developers!

Installation:


If you do not have a mods folder under AP_DIR\sessions\addon\ then create a "mods" folder such that the path to the patch is AP_DIR\sessions\addon\mods. Note that AP_DIR is the Armored Princess folder, on my system it is: C:\Program Files (x86)\1C\King's Bounty. Armored Princess
Extract all *.KFS files specified below to the folder specified above:

mod_homm3_tomes_ap.kfs
Either ( depending on your localization file set ( note that * means mod_homm3_tomes_ap ) ):

*_eng_lng.kfs ***OR***
*_en_lng.kfs


As this is stage 1 of the alpha phase, there are only game bug fixes, no new content and therefore you should be able to continue your game as is without issue.

By the way, here is my plan regarding the development of this mod (all phases are open to anyone who wants to download the mod and try it):


Alpha Phase

Stage 1:

Fix bugs in the game before making any changes.
To the developers: the intent is that this could be incorporated into your official patch system.



Stage 2:

Add new game content.
Work with testers to fix any bugs.
Change game mechanics that will most likely require a restart.


Beta Phase:

Continue to add new game content as ideas germinate.
Try best not to affect game mechanics such that a restart is required.

Release Phase - all issues / ideas have been implemented with no plans of further updates save bug fixes.

To conduct the first part of it, I'm playing Crossworlds right now to fix issues with both Armored Princess and Crossworlds. This also refreshes my memory as towards game play, etc. since I've been playing The Legend for so long.

I'm still playing The Legend and any ideas that come from the AP / CW development may be rolled into my HOMM3 babies mod.

Feel free to post here with respect to bug fixes, etc. that you'd like me to fix, as this topic is going to be for the first stage of the alpha development process and as such, I want to fix bugs and errata in the game files before I start adding new content (and new bugs).

Also, since I'm going to try to release frequent updates, the files changed from update to update should be small and therefore if you are interested in learning how to mod, then this will be perfect for you since the file set will be small and you can ask questions about how the changes were made, etc..

Thanks for participating in the alpha development of this mod!

/C\/C\

P.S. By the way, click here for the forum topic for the CW alpha. (http://forum.1cpublishing.eu/showthread.php?t=33032)

MattCaspermeyer
07-11-2012, 05:47 AM
Just another minor update.

This has to do with the fact that Droids are golems and so the Paladin Prayer would not work on them because of this. Now it has been changed such that the Paladin Prayer works on golems as well and so now the description for the skill is accurate.

More details:

Files affected:

mod_homm3_tomes_ap.kfs

ADDON_SPECIAL_ATTACKS.LUA - removed "golem" from act_feature test

Please download this update below...

/C\/C\

MattCaspermeyer
10-07-2012, 05:21 PM
The mod has transitioned to the second stage of the alpha development phase.

I'm starting to add new features to my mod for the game.

I've been having a problem where I can't use the LUA debugger to debug the AP LUA files (I can debug the CW LUA files), so it has been slow going. I'm not sure why I can't, but if anyone has some insight, please let me know.

I've worked on making a common set of files between my AP and CW files to make modding both expansions easier. As it stands now, I'm working on two mods simultaneously and it is literally taking twice as long. I'm hoping with this change, that I'll be able to progress more rapidly between modding both games.

I've also included both the EN and ENG versions of the LNG files in the same archive to make the installation process easier as well as to make future different language variants easier to implement (if you'd like to volunteer to translate to a particular language in the future just let me know).

There are now just 2 KFS files to extract to your mods folder and so it should be easier to install / uninstall the mod now.

Here is the list of changes:

Alpha Stage 2 Changes:

Version: Alpha 2012-10-07
-------------------------

Improvement:

Added starting hero class variability to armies, spells, and items
Where possible, I've combined identical files between the AP and CW versions into a common KFS
Both the EN and ENG LNG files are now in the same archive (this supports future additional localizations)
Where possible, instead of changing the original function, I've added a new function with h3_ as a prefix to indicate that this is a modified (instead of new function) from the base files
With the above change, h3_ functions now go into a new LUA file with h3_ prefixed to its file name

Files affected:

mod_homm3_tomes_common.kfs - this contains files that are the same between the AP and CW versions of this mod

*.ATOM

BRONTOR.ATOM - commented out the posthitslave for the above ground Brontor (ref: http://forum.1cpublishing.eu/showpost.php?p=455629&postcount=10)

*.LNG

EN(G)_H3_HERO.LNG

Added combined slot - Shield / Regalia
Added combined slot - Belt / Artifact
Added combined slot - Artifact / Gloves

EN(G)_!!!EXP_PET_HINT.LNG - using the modded CW pet hints

Ensured that template name is "shock" and not some other character set that looks like it
Pet experience is now listed for each ability (just like in CW)


*.LUA

H3_LOGIC_HERO.LUA

Added new hero_random_army function that randomly generates the hero's starting army per their army= list to their max supporting leadership
Created h3_add_hero_spell function to include the random generation of spells and scrolls if a spell in the hero class spell section is set to 0.
Created h3_add_hero_item function to include random generation of items if they are set to a negative integer

H3_ADDON_SPECIAL_ATTACKS.LUA - moved the paladin changes to special_prayer to here

*.PNG

INVENTORY_SLOT_ARTEFACT_BELT.PNG - new combined artifact / belt picture
INVENTORY_SLOT_ARTEFACT_GLOVES.PNG - new combined artifact / gloves picture
INVENTORY_SLOT_SHIELD_REGALIA.PNG - new combined shield / regalia picture


mod_homm3_tomes_ap.kfs

*.ATOM

PALADIN.ATOM - prayer ability script attack is now h3_special prayer to implement the inclusion of plant, mech, and golem for units it affects

*.LNG

TEMPLATES.LNG - fixed "shock" template for pet templates as it was misspelled and in a different language set

*.LUA

EXP_PET_HINT.LUA - this CW file allows the display of the ability experience in descriptions
LOGIC_HERO.LUA

Updated generation_hero function to call hero_random_army function to randomly generate starting armies
Updated generation_hero function to call h3_ replacement functions for spell and item generation
Updated hero_rebirth function to either regenerate the hero's army per their army= list or to return their starting army if they die in the Debir Training Center


*.TXT

HERO.TXT

Added new combination item slots
Updated hero class army= unit list so that units listed are selected randomly and those selected populated to max hero leadership
Updated hero class spell section to include spells with possibility to start game with them
Updated hero class item section to include possibility of starting the game with items in the list
Updated hero class slot section to include new combination slots
Added new spell_chance and scroll_chance variables to determine chance of random spells and scrolls

LOGIC.TXT - added H3B difficulty level variables to the difficulty section

New variables with implemented features:

releadmax: maximum leadership for rebirth of hero's army after loss

New variables whose features haven't been implemented yet (these features will be implemented in a future update):

eunit: enemy unit statistic scaler based on difficulty level
maplocden: enemy unit statistic scaler divisor based on map difficulty location
minstatinc: the minimum a stat will increase (or decrease) if eunit's scaling causes no change
emamaregen: enemy hero mana regen (percent of max mana)
ehlvldbc: enemy hero level at which they can cast an extra spell per turn
ehmanadbc: enemy hero mana (limit) at which they can cast an extra spell per turn
roundmrgk1: round at which mana_rage_gain_k goes to 1/2 and morale is -1
roundmrgk2: round at which mana_rage_gain_k goes to 1/4 and morale and initiative is -1
roundmrgk3: round at which mana_rage_gain_k goes to 0 and morale, initiative, and speed is -1
roundehero: rounds to add to mana_rage_gain_k when fighting an enemy hero
roundtower: rounds to add to mana_rage_gain_k when fighting towers
roundboss: rounds to add to mana_rage_gain_k when fighting a boss





If you want to try this mod out, install it per the instructions in the *readme.txt file included in the archive and you can just start a new game with any of the classes and note the variability in starting army, items, and spells.

Note that the maximum rebirth leadership of your hero (when you lose a battle) is specified by the "releadmax" parameter in the "difficulty_k" section of LOGIX.TXT.

Thanks for trying out my mod and providing feedback!

Here are some screenshot examples of possible starting Hero screens for the Warrior, Paladin, and Mage as well as the Mage's starting spellbook. The download link for the mod is below the pictures.

/C\/C\

Sir Whiskers
10-07-2012, 10:27 PM
Just some quick feedback:

I started five different games of each character. Only two games received an equippable item (hiking dress, shield). No characters started with powerful seeds/eggs, but all started with some lower-level such items.

Roughly 1/3 to 1/2 of the games started with powerful creatures - vampires, ent, knights, royal griffin, etc.

Spells varied widely - one paladin started with three spells and no scrolls, the other four each had four to six spells, plus a number of scrolls.

I really like the random armies. Starting with some level 4 units can give a player a faster start on Debir, without using the standard strategies of going for a Call Colossus scroll or picking up the Emerald Dragon in Rusty Anchor.

I also like the random spells and items. Based on my limited tests, the items are useful, but no overpowering - a good balance for a random element.

Thanks for your work on this - definitely looking forward to the next iteration.

Sir Whiskers
11-03-2012, 01:19 AM
FYI, I stumbled across an interesting situation with your mod. If your hero is defeated, the game restarts her in Debir with her starting army. Because your mod randomizes the starting troops, she restarts with a random selection equal to her current leadership, with all five slots filled.

Not sure if this is really a problem or not. One could theoretically lose dozens of battles to recruit a large number of troops, keeping the best three in the castle. But the large number of options makes it difficult to spawn the same type of troop. Still, it was quite a surprise when I accidentally bumped into a stack I couldn't defeat and respawned with a much larger army.

MattCaspermeyer
11-05-2012, 07:06 AM
Very good point, but I don't think it'll be a problem.

I have a parameter in LOGIC.TXT (releadmax in the difficulty_k section) that specifies the max leadership allowed for rebirth based on difficulty level.

Here are the current values per difficulty level:

1. Easy = 10,000
2. Normal = 5,000
3. Hard = 2,000
4. Impossible = 1,000

These values are easily changeable, but I think those are good first cut values (I could also (roughly) halve them, which I've heavily considered).

By the way, as an aside when it comes to my modding (if you haven't realized this already) I do my best to put limits on a feature that I implement, if it's possible, and add knobs to turn to adjust that feature accordingly.

The deal is, though, that even though the maximum Leadership is higher than it was originally, there was nothing preventing you from doing this in the original game and since you always got the same army, it was in fact much easier to do even though you got fewer troops.

You could easily set up a place where you can travel to rapidly, die, pop your rebirth troops into the Debir castle and then run to any enemy stack and die again to repeat and build your forces.

The only thing negatively affected is your score if you do this, but if you don't care about that then you can use this strategy.

Now, with all the variability that you've mentioned, it will take much more effort to garner an army with a consistent set of units. Just take the unit list and the number of slots and you can get a good idea of what the probability of getting a certain unit type is.

Here are the number of units available for each class:

1. Warrior: 73 (66 if playing on impossible due to all the level 5's (except Ogres) being over 1000 Leadership)
2. Paladin: 42 (36)
3. Mage: 48 (41)

The Warrior has the most unit choices and the Paladin the least so the Paladin would be easiest. Here is the chance of getting a particular unit for the Paladin: 1/42 + 1/41 + 1/40 + 1/39 + 1/38 = 100/799 ~ 1/8 (1/36 + 1/35 + 1/34 + 1/33 + 1/32 = 85/577 ~ 1/7 on impossible). So playing with the Paladin, you have about a 1 in 8 chance of getting 1 of the armies you'd like to grow (or 1 in 7 chance on impossible) with each successive death. However, if you'd like to get the same 5 units to grow, your chances now are (note that probabilities are now products instead of sums): 5/42 * 4/41 * 3/40 * 2/39 * 1/38 = 120/102,080,160 = 1/850,668 ~ 0 (5/36 * 4/35 * 3/34 * 2/33 * 1/32 = 120/452,339,040 = 1/376,992 ~ 0 on impossible) with each successive death.

These are very low odds for getting all 5 troops (and they drop even more for Mages and Warriors). While I think it may be possible to grow 1 or maybe even 2 troops with successive deaths if you have a lot of patience I think trying to build an army of the same 3, 4, or 5 this way is going to be a lesson in futility.

So I'm pretty sure this is going to be okay, but thanks for pointing this out!

:)

/C\/C\

Sir Whiskers
11-05-2012, 08:13 PM
Very good point, but I don't think it'll be a problem.

I have a parameter in LOGIC.TXT (releadmax in the difficulty_k section) that specifies the max leadership allowed for rebirth based on difficulty level.

Here are the current values per difficulty level:

1. Easy = 10,000
2. Normal = 5,000
3. Hard = 2,000
4. Impossible = 1,000

These values are easily changeable, but I think those are good first cut values (I could also (roughly) halve them, which I've heavily considered).

By the way, as an aside when it comes to my modding (if you haven't realized this already) I do my best to put limits on a feature that I implement, if it's possible, and add knobs to turn to adjust that feature accordingly.


Interesting. I didn't know you had put in a cap. And I agree - even without a cap, the sheer variety of potential troops makes this a sub-par strategy. As a test, I quickly lost a half dozen fights. Keeping the best of each respawn, I ended up with 11 griffins, 7 druids, and two ents - not exactly a dominant army to restart with.

Besides, if someone really wants to use certain troops, there's already a mod allowing all troops on Debir.

MattCaspermeyer
11-06-2012, 01:45 AM
Yah, I guess I didn't do a good enough job describing the changes - I've updated the original post to include mention of the leadership cap variable in LOGIC.TXT.

I'll try to mention things like this that are "under the hood" in the future so that people know about them.

Thanks for your comments!

/C\/C\

Interesting. I didn't know you had put in a cap. And I agree - even without a cap, the sheer variety of potential troops makes this a sub-par strategy. As a test, I quickly lost a half dozen fights. Keeping the best of each respawn, I ended up with 11 griffins, 7 druids, and two ents - not exactly a dominant army to restart with.

Besides, if someone really wants to use certain troops, there's already a mod allowing all troops on Debir.

MattCaspermeyer
06-30-2013, 11:17 AM
Please find attached the next alpha release of the Heroes of Might and Magic 3 Tomes mod!

There is still a lot of work to do, but this mod is playable (in Armored Princess at least) and gives out tomes so that you can at least see this part of the implementation. Unfortunately, I'm not sure why, but the mod crashes Crossworlds when starting a new game. I'm investigating this problem, but have no idea why it works in AP, but not CW. It may be related to having fewer resources in CW (possibly ITEMS.TXT or SPECIAL_PARAMS.TXT). I'll work on getting it working in CW down the road, but if you figure it out, then let me know how you got it to work!

I've implemented about 75% of the spell stuff, but a lot of the Tome bonuses for spells currently don't work because I have not implemented the LUA code as yet.

I also have not implemented any of my H3B TL functions (for the most part) and so most of the game should behave the same as it has before.

Here is what has been implemented, and it has been a tremendous effort to get to this stage!


180 New Tomes!
New Tome item that is a combined Artifact / Regalia
Each Tome has 4 upgrades, but you have to do some manual file editing to get it to work. This means there are technically 900 new items! See below...
Detailed Descriptions for each Tome
New item labels
New item label icons for certain stat boosts
Variable egg containers
New Bill Gilbert portrait that gives you a new Tome after a certain number of battles. The portrait just needs to stay in your backpack for it to work. The current tome victory progression is: 1, 3, 6, 10, 15, 21, ... battles to give a new tome. The tome groups are listed in H3_CONFIG.TXT. This progression allows you to get a lot of tomes early in the game to try them out. The actual tome progression will be every 15 to 20 victories after I finish this alpha stage of development and move into the beta phase (which probably won't be for a long while).
Unification of the spell power and description functions. Not all spells have been unified as yet (like most of the new AP / CW spells), but the plan is for all of the spells to use a common function for their power and descriptions. This makes this part of the coding much easier than coding each spell individually since it minimizes code duplication and errors.
H3B spell bonus system - this system worked really well in TL. There will most likely need to be some tweaks to it for AP/CW.
Most of the stuff from the previous alpha releases should be there as well, including the variable starting army and items.

There are a lot of other changes here and there that I just have not had a chance to list. Note that if you want to upgrade your tomes, you need to first get a tome (or some tomes) and then copy their level upgrades from H3_TOMES_UPGRADE.TXT to H3_TOMES.TXT. Note that you can't add all the tomes because the game will crash when trying to load too many items so you have to only add the ones that you'll use in your game. Also you'll need to remove some of the Level 1 tomes towards the end if you want to level up all your tomes, since there is only about room for 53 or so items beyond the 180 (I think that was in CW, there may be more available in AP). This is an experiment, I prefer not to do this, but I see no other alternative right now. To make it easier to do this, you'll need to extract H3_TOMES.TXT and H3_TOMES_UPGRADE.TXT from MOD_H3T.KFS (7Zip can extract from KFS without renaming to ZIP) so that you can readily edit them after you save and exit. Once you've made the changes you can go back into the game and continue from your save.

There are probably going to be a lot of bugs, since I've only played it a tiny bit, but as far as I can tell you should be able to start a new AP game and start playing. You can also just start a new game and use the cheat code "item TOME_NAME" to add a new tome to your inventory to check out the bonuses. To find the TOME_NAME just look in H3_TOMES.TXT, for example if you want to add Fafner, then issue "item tome_fafner" (without the quotes) from the cheat command line and then go check your inventory. If you don't have a new item, then check your spelling! Also, you'll see that some Tomes have CW only content and you'll see NF after the label name (this is with units and spells that aren't in AP). I think I'll at least add the CW spells to AP in the future, but I'm not sure about the units - we'll see how it goes...

There are a few tomes that are meant to be transformed into another (i.e. Feanora <-> Frog Feanora), but I have not implemented this yet (don't really know how to currently implement it, actually, but I think i'll be able to figure it out in the future) so certain tomes are technically not available.

Also if you see a Tome with a bonus of "gives your hero ... after x victories", note that I have not tested this at all yet. So it may or may not work. The good news is that if it doesn't work it is an LUA fix. As far as the tome bonuses are concerned, they are all implemented and so you should not have to start a new game with successive updates, although I wouldn't get too attached to the game you're playing right now as there may be changes down the road that will require you to restart.

Also note that the Tome Level 1 to Tome Level 2 upgrade battles are probably way too easy right now (I think you might be able to beat them with Amelie's starting army)! I'll look into making them tougher down the road...

I'm going to keep working on AP for now (technically it should work with CW, since I'm actually using the CW file for those files that are common between the two games, but I'm apparently exceeding CW's resources).

I also may have broken some bonuses on the normal items, since I commented some of them out and have not updated ITEMS.TXT - I'll fix those in the near future...

Note that I auto-generate quite a few files from my design spreasheet. This helps keep me sane, and also provides a lot of flexibility with respect to bonus implementation. The following files are autogenerated: H3_TOMES.TXT, ENG_H3_TOMES.LNG, ENG_H3_ITEM_LABELS.LNG, H3_SP_EFFECT.TXT, H3_SP_LEAD_GROUP.TXT, H3_SP_LEAD_RACE.TXT, H3_SP_LEAD_UNIT.TXT. I then manually comment out resources I'm not currently using since they are very precious as well as cut the Level 2-5 tomes out of H3_TOMES.TXT and paste them into H3_TOMES_UPGRADES.TXT!

At this stage nothing is set in stone with respect to bonuses, and so if you think a bonus seems too high or too low or there are too many or too few victories to get a gift from certain tomes we can change it for the most part. To keep resources low, I have a spell counter for each spell, but intend to set the actually bonus based on the level of the counter. So for example, sp_spell_lightning is set between 1 to 5 to indicate its level. I'll then scale damage, shock, etc. based on the level identified by the bonus. This is a lot different than what I did in TL where I had many different counters for each spell. Since I simply don't have the counter resources available in AP/CW I had to be a lot more judicious with their usage. So if you look at the various H3_SP... files you'll see that I have commented out all counter resources I'm currently not using.

Note that the forum is still messed up with respect to posting files and so once again I've split the download into 4 parts. After downloading, remove the trailing .zip from the end of each file and use 7Zip (or equivalent) to extract MOD_H3T.KFS and place it in either:


<DRIVE>:\Users\<USERNAME>\AppData\Local\VirtualStore\Program Files (x86)\1C Company\King's Bounty. Armored Princess\sessions\addon

<DRIVE> is your drive letter for your Windows install
<USERNAME> is your Windows login account name
AP_DIR\data\mods
AP_DIR\sessions\addon\mods

I'm not sure which location is better, but I had to place it in 1 above for it to work since I have been messing with the Editor - it would not work properly in 2 or 3 for me. I'm thinking because the folder in 1 above was added and is now being used by AP? Not sure.

As always, please provide any comments and thanks for trying out my mod!

:grin:

Here are the files to download: