Skip to content

Posts from Reverse Engeneering HoMM 3

No ratings yet — be the first to rate!
User Avatar
Auto-translated
The title seems to be written correctly. There are some very interesting questions regarding the "physics" of Heroes, and the answers can probably only be found by studying the executable file. I don't currently have sufficient knowledge in this area. If there is anyone who can clarify the question of how the Skilling Tree is constructed at the beginning of the game (what rules and probabilities are used), I would be grateful to that person. I think the esteemed AmberSoler would also be interested in this (perhaps with the inclusion of this information in FizMiG).
Auto-translated
Tests (not conducted by me) revealed that no tree is stored in memory, which is quite natural. I am almost certain that only the seed (initial value) for the random number generator is generated and memorized at the start of the game. And based on it, during level-ups, the suggested skills are generated in accordance with the probabilities specified in the text file (plus some nuances, such as the mandatory Wisdom skill). Reconstructing the algorithm based on the results is, in my opinion, impossible; it would be better to try disassembling the relevant part of the executable file.
User Avatar
Auto-translated
Perhaps the first post didn't intend to suggest a specific and clear algorithm? In my opinion, the idea was to obtain, in a convenient and understandable format for the player, the probabilities of obtaining a skill at a given level (not even specific values, but intervals, and perhaps not absolute, but relative values (coefficients) - for example, for the Knight Valesk). It's clear that the probabilities (their intervals) should be conditional, depending on the values of previous skills. It's not a simple task, but it doesn't seem to require absolute truths yet - let the probabilities also be generated with certain weights (reliability), or something like that...
Please correct me if I'm wrong....
P.S. And in general, let's create an expert system, even if it's based on a production model - what's wrong with that? We have plenty of experts...
disassemble the necessary part of the executable file.
- what does this give, please explain?
Стратегия - искусство возможного.

Первое правило форума :
"Хвалу и клевету приемли равнодушно
И не оспаривай глупца" (с)

Новичкам: ВНИМАТЕЛЬНО перечитайте ВЕСЬ первый пост по нижеприведенной ссылке и 90% ваших вопросов отпадут( на остальные 10% с удовольствием отвечу):
Правила онлайн игр
In reply to Loi
User Avatar
Auto-translated
The skill tree is generated when the map is loaded. That is, you start the game, and a specific skill tree is generated. This means that you can explore the tree on the first day, and it will remain constant throughout the game. An important point: if a skill is granted in a witch hut, seer's hut, university, or by a scholar, it completely breaks the skill tree and provides a new, permanent one that does not depend on level-ups! For example, if Valeska receives the choice of Advanced Archery or Basic Mysticism when she reaches level 2, reloading the autosave will not change it; she will always have that choice. If Valeska learns Basic Navigation in a witch hut at level 2, she will receive a different skill on the right at level 3, but it will always be the same one! This is how the right heroes are chosen when playing offline! Finally, there is, of course, a percentage chance of obtaining secondary and primary skills at each level for each of the 18 hero classes. Below, I will provide the probabilities for Valeska (and, therefore, for all knights). For example, the Navigation skill coefficient is 8. This means that the probability of Navigation appearing when leveling up is 8/112 = 0.0714 = 7.14%
Attachments 1
1 file attached • Total size: 73.7 KB
In reply to Loi
User Avatar
Auto-translated
loi;176871
Perhaps the first post didn't imply a specific and clear algorithm?

I meant the entire algorithm, down to the smallest detail.
loi;176871

- what does this give, please explain?

The algorithm. Getting statistics and speculating on them is a worse option.
IMHO :)

Added after 4 minutes
Dirty_Player;176890
The skill tree is generated when the map is launched. That is, you start the game, and a certain skill tree is generated. That is, you can study the tree on the first day, and it will remain constant throughout the game.

I agree with Horn. It's not exactly a tree that's created, but rather a random number (or several numbers) that is then used to generate everything.
Dirty_Player;176890

Important point. If you get a skill in the witch's hut, the seer's hut, the university, or from a scholar, it completely breaks the skill tree and gives a new one, but it's permanent and doesn't depend on level-ups!

Of course. In the sense that you're talking about, the tree is broken; in a mathematical sense, that number is changed.

If you store the entire tree, it will take up a lot of space, believe me. :)
In reply to Ben80
User Avatar
Auto-translated
Ben80;176892
Of course. In the sense you're talking about, the tree is broken; in a mathematical sense, the number itself changes.
I described a version that I understand and that practically anyone will understand.
Ben80;176892
I meant the entire algorithm, down to the smallest detail.
Not everyone will want to delve into such depths. IMHO, somehow, at the start, a tree=constant is generated, which corresponds to one specific hero, and I don't even want to think about how this is implemented from a programming point of view :D
Ben80;176892
If you store the entire tree, it will take up a lot of space, believe me.
I believe it. There are approximately 150 heroes, and each has its own tree, and the tree itself has a maximum of about 2 to the power of 24 variations....
In reply to Dirty_Player
User Avatar
Auto-translated
Dirty_Player;176899
I outlined a version that can be understood by the "average person," which I understand and practically anyone else will understand.

Not everyone will want to delve into such complexities.

Once you understand this algorithm, you can present it to the public in an easily digestible form. Those who have tried to understand the algorithms of God have presented them in the form of Newton's laws, or something similar:p
In reply to Ben80
Auto-translated
Ben80;176892
I meant the entire algorithm, down to the smallest detail.
But what is it for? Players only need a probability table and knowledge of those very specific details, such as the guaranteed appearance of Wisdom. The specific implementation is only needed by someone who is going to edit it. :)

ERM has an operator that allows you to find out what will be offered on the next level. This means that Slava has found the entry point to the desired function in the Heroes of Might and Magic code. Perhaps (in ERM, you can't be sure of anything in advance - everything needs to be tested :rolleyes:), this operator will allow you to write a script that generates a tree for a specific hero. The only question is, in what form should this tree be presented? At most, a script can create a text file. This means that another program is also needed to convert these text files into a visual format, for example, a graph. This would undoubtedly be useful for offline play, but it would require a lot of work... However, if someone takes on the second part of the work (interpreting the text file), I could try to handle the first part. But it will only work in WoG and add-ons based on it; unfortunately, it won't work for the classic SoD.
Of course. In the sense that you are talking about, the tree is broken; in a mathematical sense, that number is changed.

Most likely, it is not the number that changes, but its interpretation by the algorithm. After all, if a hero acquires a skill from a witch, instead of the chance of getting it as a new skill, there is a chance to improve it. That is, the skill from the right slot "moves" to the left.
In reply to Horn
User Avatar
Auto-translated
Horn;176942
Why is it needed? Players have enough with the probability table and knowledge of those specific details, like the guaranteed appearance of Wisdom. The specific implementation is only needed by someone who is going to modify it. :)

Has it been proven that the values from the probability table for classes are not subject to adjustments by the algorithm in the event of certain events (for example, in the case of already existing skills)?
If there is no correlation between the probabilities of skill drops, then it's a bit sad.
And who can say for sure what other rules there are besides Wisdom at level 6 and some magic school at level 4?
Horn;176942

ERM has an operator that allows you to find out what will be offered at the next level. This means that Slava found the entry point to the desired function in the Heroes of Might and Magic code. Perhaps (in ERM, you can't be sure of anything in advance - everything needs to be tested :rolleyes:), this operator will allow you to write a script that generates a tree for a specific hero. The only question is, in what form should this tree be presented? At most, a script can create a text file. This means that another program is also needed to convert these text files into a visual format, for example, into a graph. This would undoubtedly be useful for offline play, but it would require a lot of work... However, if someone takes on the second part of the work (interpreting the text file), I could try to handle the first part. But it will only work in WoG and add-ons based on it; for classic SoD, unfortunately, it won't.

If this is an offer to everyone who is interested, then I will definitely think about it for a couple of days and write to you in a private message.
In reply to Horn
User Avatar
Auto-translated
Horn;176942
It's likely that the number itself isn't changing, but rather its interpretation by the algorithm. After all, if a hero acquires a skill from a Sorceress, instead of having a chance to obtain it as a new skill, they have a chance to upgrade it. In other words, the skill from the right slot "moves" to the left.
I disagree with this.
Yesterday, I was playing as Inferno. The Scholar gives Octavia the basic Necromancy skill. After a few levels, I was offered to upgrade it, even though Earth and Logistics were not at the expert level. That is, if the chance to upgrade was equal to the chance to obtain it (which is 0%), then I would only be able to upgrade it when all the skills were at the expert level and there were no free slots. But that's not the case. From the above, it follows that one of two things is true:
1. There are specific probabilities for obtaining a particular upgradeable skill.
2. The skill in the left slot is chosen randomly from the non-expert skills.

I think that option 2 is correct. If anyone knows for sure, please share!
User Avatar
Auto-translated
Are you coming up with new features for online play?
В. Уэйтс©
Но поскольку я нищий,
у меня лишь есть мечты.
Я разостлал свои мечты пред вашими ногами.
Ступайте бережно, ибо вы ступаете по моим мечтам.

временно ушел с форума, переодически заглядываю. кому нужен пишите в скайп ewgeniy1985. в аське 384385000 очень редко.

Statistics

Welcome our newest member: Emil