|
Thread: chance of hero appearing on tavern? | |
|
orc
Famous Hero
|
posted July 12, 2015 10:24 AM |
|
|
chance of hero appearing on tavern?
Hello guys,
I think I have read somewhere that chances of each hero appearing in tavern differs. is there somewhere we can find list or something? I want to know how likely those strong heroes appear on tavern (tazar, hack, gunnar, $$ specialists, etc)
I know it should be in some file that I can open with some program, but im too lazy to get that program (want something like the lazy wiki lol)
|
|
Warmonger
Promising
Legendary Hero
fallen artist
|
posted July 12, 2015 11:10 AM |
|
|
Chance for hero spawning in tavern depends on town type and hero class. Exact values are defined in HCTRAITS.txt.
____________
The future of Heroes 3 is here!
|
|
Kicferk
Known Hero
|
posted July 12, 2015 12:42 PM |
|
|
Also, you can't normally have 2 heroes of the same type in tavern. Exception is when you retreat hero or there are no more heroes of other types.
So you have Shakti in slot 1, buy hero from slot 2. You can't get an overlord there, unless there are only overlords left to get on this map.
|
|
batoonike
Known Hero
|
posted October 21, 2016 08:16 AM |
|
|
Can anyone elaborate on this? I would also very much like to know what are the odds of getting mephala, tazard, grag hack, neela, rayland, gundula etc with specific towns.
Or how do I read it out from HCTRAITS.txt. ?
|
|
bloodsucker
Legendary Hero
|
posted October 21, 2016 08:57 AM |
|
|
batoonike said: Can anyone elaborate on this?
Btw, can someone specify what was made different in Hota? I say this cause in the manual it says you will never find two heroes of the same class (unless...) and I'm pretty sure I already started random maps with two captians in tavern.
|
|
AlHazin
Promising
Supreme Hero
النور
|
posted October 21, 2016 11:44 AM |
|
|
Kicferk said: Also, you can't normally have 2 heroes of the same type in tavern. Exception is when you retreat hero or there are no more heroes of other types.
So you have Shakti in slot 1, buy hero from slot 2. You can't get an overlord there, unless there are only overlords left to get on this map.
Actually, you can. I happened to start a game with a town, and when I entered the tavern to recruit my second hero on day 1 week 1 month 1, find two of the same town I started with, making hiring both. And without having list my first.
|
|
bloodsucker
Legendary Hero
|
posted October 21, 2016 02:58 PM |
|
|
AlHazin said: Actually, you can. I happened to start a game with a town, and when I entered the tavern to recruit my second hero on day 1 week 1 month 1, find two of the same town I started with, making hiring both. And without having list my first.
Nope, in regular Heroes III you can have two heroes of the same race but not of the same class (i.e. you can have a barbarian and a battle mage but not two barbarians).
|
|
Maurice
Hero of Order
Part of the furniture
|
posted October 21, 2016 08:02 PM |
|
Edited by Maurice at 20:16, 21 Oct 2016.
|
I've checked the game's code that handles the Hero generation in Taverns and it does the following:
- It checks to see if any Hero may be hired at all by the player;
- If so, it checks to see if any Hero Types are excluded (based on meta-information, from included/excluded Heroes as well as Heroes already in play - note that this includes Heroes presented for hire in other players' taverns!);
- Then it checks to see the map type; for ROE maps, it proceeds to exclude the Conflux Heroes (and any that came with the AB expansion);
- If it is considering the second Tavern slot (the first one already determined), it will proceed to unflag the Hero Type from the first Tavern slot as viable (but only if there's at least another Type still available);
- It then performs a random(1, NumHeroTypes) where NumHeroTypes is the sum of the weights of available Types that may appear in the Tavern for that player (it uses the information stored in the HCTRAITS.TXT file for this);
- Once the Hero Type is determined, it performs a random(1, HeroesAvailable) for that Hero Type, where the HeroesAvailable is the number of Heroes that are available for hiring for that Hero Type;
- If this was the first Tavern slot that was determined, it loops through these steps again, this time for the second slot;
When a Hero is chosen, it calls the Hero build-up routine with respect to its army. If the Hero appears as a result of a retreat/defeat, the Hero gets exactly 1 unit of the first stack type specified in the Hero statistics table within the .exe file.
Indepth details:
The Hero table within the .exe file starts at address 0x279DD0h. Each Hero entry is 92 bytes in size, with the following meaning per 4 bytes (values of FF FF FF FF mean the entry isn't used; you can see it appear for the second Skill entry when the first Skill starts at Advanced, or for the starting Spell when no Spellbook is present):
1-4 = Gender
5-8 = Race
9-12 = Class
13-16 = First Skill
17-20 = Skill level of first Skill
21-24 = Second Skill
25-28 = Skill level of second Skill
29-32 = Whether a Spellbook is present on the Hero
33-36 = Starting Spell
37-40 = Creature ID of the first stack on the Hero
41-44 = Creature ID of the second stack on the Hero
45-48 = Creature ID of the thirds stack on the Hero
49-52 = Address reference to the small Hero portrait
53-56 = Address reference to the large Hero portrait
57 = Recruitable in ROE
58 = Recruitable in AB & SOD
59 = Campaign Hero
60-92 = Filled in dynamically during runtime, no initial values
Part of the values filled in during runtime are the minimum and maximum number of creatures for each creature type, that can appear on the Hero.
If the Hero didn't end up in the Tavern after a retreat/defeat, the game provides it with Creature stacks.
- The Hero gets random(minStack1, maxStack1) of the Creature type of the first stack to get the number of creatures for it;
- It then performs a random(1, 100) to see if a second stack is present, which is the case if this random number is 88 or lower (so, 88% chance on a second stack);
- The game checks to see if it's a Ballista or First Aid Tent and provides that type if so;
- Otherwise, it proceeds to perform a random(minStack1, maxStack1) of the Creature type of the second stack to get the number of creatures for it;
- Finally, it performs a random(1, 100) and checks to see if this is 25 or lower (so 25% chance) on a third stack;
- If so, it proceeds to perform a random(minStack1, maxStack1) of the Creature type of the third stack to get the number of creatures for it;
Then it finishes up and returns the result.
But when determining odds for a Hero to appear, keep in mind that the game excludes any and all Heroes that are:
- Forbidden by the map at large;
- Already controlled by another player;
- Already available as hiring offer in another players' tavern;
- Already under your control;
- Imprisoned in a prison somewhere on the map;
- Whatever I am forgetting that would take a Hero off the "available for hiring" list;
These effects affect the resulting chances for a specific Hero to appear in a Tavern. When assigning Heroes to Tavern slots, it loops through player numbers from 1 to 8 in that order.
|
|
batoonike
Known Hero
|
posted October 21, 2016 08:49 PM |
|
|
Thanks!
Overall it seems the differences are neglectable
|
|
AlHazin
Promising
Supreme Hero
النور
|
posted October 22, 2016 11:59 AM |
|
|
bloodsucker said:
AlHazin said: Actually, you can. I happened to start a game with a town, and when I entered the tavern to recruit my second hero on day 1 week 1 month 1, find two of the same town I started with, making hiring both. And without having list my first.
Nope, in regular Heroes III you can have two heroes of the same race but not of the same class (i.e. you can have a barbarian and a battle mage but not two barbarians).
Yep it is, mate. I began with a knight (Edric), and found two knights to be recruited in the tavern (Sorcha and Lord Haart). It was on the v 1.00 by the way. It happened more than once too.
|
|
Maurice
Hero of Order
Part of the furniture
|
posted October 22, 2016 05:36 PM |
|
|
AlHazin said: Yep it is, mate. I began with a knight (Edric), and found two knights to be recruited in the tavern (Sorcha and Lord Haart). It was on the v 1.00 by the way. It happened more than once too.
I suspect they fixed that in later versions, then, because the code as it exists for SoD doesn't support your claim. It explicitely ticks off the Hero Type it has selected in the first slot, unless there aren't any other Hero Types from which it can find a Hero for hiring.
|
|
AlHazin
Promising
Supreme Hero
النور
|
posted October 22, 2016 05:57 PM |
|
|
That must be that yes, cause in my version, the fleeing heroes had a full army when rehired. SoD changed a lot of features in H3.
Thanks for your hard work.
|
|
Otuken
Famous Hero
|
posted August 25, 2018 04:13 PM |
|
|
Every hero groups have aggression numbers in hctraits. What are these?
____________
|
|
heymlich
Famous Hero
|
posted May 03, 2019 05:13 PM |
|
Edited by heymlich at 17:22, 03 May 2019.
|
Maurice said: If the Hero didn't end up in the Tavern after a retreat/defeat, the game provides it with Creature stacks.
In my version (H3 complete) this is not the case. Any hero comes with 1 lvl1 unit, regardless of retreats, except for the heroes that appear on day1 of each week.
This always annoyed me, I liked running around with these mixed low level armies in week 1, as it was in RoE (without patch). Am I missing a patch or something?
|
|
Maurice
Hero of Order
Part of the furniture
|
posted May 03, 2019 07:08 PM |
|
|
It's been a while since I checked the subroutine in question, but yes, I can confirm that the only 2 Heroes that come with a full creature complement are the two that start in the Tavern at the first day of the week.
____________
The last Reasonable Steward of Good Game Design and a Responsible Hero of HC. - Verriker
|
|
|
|