Heroes of Might and Magic II Mod
i've run some tests.
the ones i noticed were signed were speed (not 100% sure because setting it to FF returned a (null) value and i couldn't move the unit at all), attack, defense, damage and growth. not sure if i missed anything.
as to the way those values are handled...the game engine, at its core, seems to be nothing more than a calculator. it'll calculate and return a result, period.
if the creature has negative growth, the game will substract even into negative values. and if you try to purchase a negative stack, you'll GAIN resources (so yeah, i wouldn't make dragons grow at -1...lol).
if defense skill starts at -6, it'll still add and substract whatever bonuses and penalties you have and use the result to decide whether or not you get your ass handed to you.
damage, however, will NEVER go below 1. even a stack with negative damage will deal 1. so i don't think an attack spell will revive hit points.
the ones i noticed were signed were speed (not 100% sure because setting it to FF returned a (null) value and i couldn't move the unit at all), attack, defense, damage and growth. not sure if i missed anything.
as to the way those values are handled...the game engine, at its core, seems to be nothing more than a calculator. it'll calculate and return a result, period.
if the creature has negative growth, the game will substract even into negative values. and if you try to purchase a negative stack, you'll GAIN resources (so yeah, i wouldn't make dragons grow at -1...lol).
if defense skill starts at -6, it'll still add and substract whatever bonuses and penalties you have and use the result to decide whether or not you get your ass handed to you.
damage, however, will NEVER go below 1. even a stack with negative damage will deal 1. so i don't think an attack spell will revive hit points.
- GreatEmerald
- CH Staff
- Posts: 3330
- Joined: 24 Jul 2009
- Location: Netherlands
if you purchase a negative quantity, it creates a separate negative stack.
if you apply that stack to an existing stack, you'll lose creatures, yes.
like i said, the game works like a calculator. if you give it data to calculate, it'll do so. no matter what the end result may be.
so far, the results of having a negative stack in combat means it'll only get one turn to do anything, can't deal damage and disappears after the fight is over.
if you apply that stack to an existing stack, you'll lose creatures, yes.
like i said, the game works like a calculator. if you give it data to calculate, it'll do so. no matter what the end result may be.
so far, the results of having a negative stack in combat means it'll only get one turn to do anything, can't deal damage and disappears after the fight is over.
- GreatEmerald
- CH Staff
- Posts: 3330
- Joined: 24 Jul 2009
- Location: Netherlands
Yep, and it sounds like you can still buy all the creatures. Given that we're just a calculator here, if we had -4 available... -4 - (-4) = 0.
More importantly, this means you can see what would happen if the Well didn't exist. Lower every creature's growth by 2 and promise yourself you'll never buy negative creatures. The first week would be a little messed up but long-term it should be ok. How would this affect game balance?
More importantly, this means you can see what would happen if the Well didn't exist. Lower every creature's growth by 2 and promise yourself you'll never buy negative creatures. The first week would be a little messed up but long-term it should be ok. How would this affect game balance?
Peace. Love. Penguin.
No, you bought -4 creatures, subtracting -4 from the -4 available, giving you 0. As far as the Well goes, you can safely assume the computer players will buy it. Some towns require it at some point, so it can't really be removed. It adds 2 to the growth of all creatures, so even those at -1 will still grow at 1.
I have this theory that the Well wasn't part of the original plan when they developed H2. The creature growth rates match H1 if you don't build it. Someone probably said, "Oh this sounds like a fun idea," and I'm convinced it threw off the game balance quite a bit.
I have this theory that the Well wasn't part of the original plan when they developed H2. The creature growth rates match H1 if you don't build it. Someone probably said, "Oh this sounds like a fun idea," and I'm convinced it threw off the game balance quite a bit.
Peace. Love. Penguin.
There's a whole world beyond hex editing.
I took a class last semester with an assignment where we were given a (unique) program which asked for 6 passwords, and we had to figure out the passwords, with points lost for every wrong guess. The solution was to run it inside the gdb debugger, disassemble some of the functions, step through, etc in order to figure out the expected passwords (the password checking became increasingly non-straightforward).
I'd be shocked if there isn't a debugger for Windows (maybe even a gdb port) with similar capabilities, though the Windows executable format is different from Linux ELF, and possibly last friendly to reverse-engineering (ELF has a "symbol table," containing plain-text names of all functions and their start locations). Either way, a lot of more sophisticated mods should become (relatively) easy with the proper tools. E.g.: cast a lightning bolt with the debugger running, and step through until you see something that looks like a damage calculation.
I'll probably try some of this in late August after I get Windows on my laptop. I'm mentioning this now in case anyone wants to get a head start on me.
I took a class last semester with an assignment where we were given a (unique) program which asked for 6 passwords, and we had to figure out the passwords, with points lost for every wrong guess. The solution was to run it inside the gdb debugger, disassemble some of the functions, step through, etc in order to figure out the expected passwords (the password checking became increasingly non-straightforward).
I'd be shocked if there isn't a debugger for Windows (maybe even a gdb port) with similar capabilities, though the Windows executable format is different from Linux ELF, and possibly last friendly to reverse-engineering (ELF has a "symbol table," containing plain-text names of all functions and their start locations). Either way, a lot of more sophisticated mods should become (relatively) easy with the proper tools. E.g.: cast a lightning bolt with the debugger running, and step through until you see something that looks like a damage calculation.
I'll probably try some of this in late August after I get Windows on my laptop. I'm mentioning this now in case anyone wants to get a head start on me.
There's a catch to that. The program has to be compiled with debugging symbols enabled. Most commercial software has them removed before release. It makes the executable smaller and makes it harder for a competitor to reverse engineer their work.
If we had access to the source code as you describe, we would have done this a LONG time ago.
If we had access to the source code as you describe, we would have done this a LONG time ago.
Peace. Love. Penguin.
I'm not sure what all debugging symbols contain in Linux. I know it contains a mapping between assembly instructions and the original C code, allowing the line of C to be printed in the debugger (not sure if it's just a reference to the lines of the file, or the source code itself). The class didn't make things that easy for us though -- since part of the aim was to teach us assembly, that would defeat the point. However, even without debugging symbols, ELF does contain a symbol table with all function names and locations. And you can always get and step through the assembly, which is really all you need.
Of course, that's because ELF is a format for both executables and for linkable libraries. Windows uses different formats for the two, and thus I doubt there's a symbol table analogue.
Actually, why don't I just go look this up: http://en.wikipedia.org/wiki/Portable_E ... port_Table
Hmm, if I'm reading that right, I think I'm wrong on both of what I just said.
Only way to actually find out what all is in that exe is to crack it open and peek inside. There really isn't much to talk about until one of us actually does this.
Of course, that's because ELF is a format for both executables and for linkable libraries. Windows uses different formats for the two, and thus I doubt there's a symbol table analogue.
Actually, why don't I just go look this up: http://en.wikipedia.org/wiki/Portable_E ... port_Table
Hmm, if I'm reading that right, I think I'm wrong on both of what I just said.
Only way to actually find out what all is in that exe is to crack it open and peek inside. There really isn't much to talk about until one of us actually does this.
- GreatEmerald
- CH Staff
- Posts: 3330
- Joined: 24 Jul 2009
- Location: Netherlands
According to my understanding, a DLL should be easier to attack than an EXE. You still have all the source code in there, except that you can't strip out the symbol table, else the dynamic linking won't work.
Of course, I know for a fact that the core of HoMM II is an EXE, and, among other things, it contains structs with data for all the creatures, which is how UHH has been making his mod.
I believe the other files are pretty much just art and the like. fheroes2 replaces the EXE of HoMM II, but requires other files from the original game.
Of course, I know for a fact that the core of HoMM II is an EXE, and, among other things, it contains structs with data for all the creatures, which is how UHH has been making his mod.
I believe the other files are pretty much just art and the like. fheroes2 replaces the EXE of HoMM II, but requires other files from the original game.
- UndeadHalfOrc
- Titan
- Posts: 1363
- Joined: 13 Mar 2007
I've been meaning to do exactly that for years, but I just cannot find a debugger that will do the job. I'm no stranger with playing with raw assembly, original source code is completely unnecessary.Darmani wrote:cast a lightning bolt with the debugger running, and step through until you see something that looks like a damage calculation.
With it, I'd also love to fix the bug in Heroes 3 where turrets inflict more damage if you have Armorer, or the Air Shield spell on.
What are the long term goals for this mod? Are you only tweaking balance or are you planning to add artifacts, units, new factions and/or new campaigns?
I must say I somewhat agree with gandam, I am not really interested in the new balanced factions. For one, I spend months learning their current stats, I do not look forward to learn everything from scratch and change my tactics completely to fit the new balance. For two, each factions can be good in a specific situation. For three, if a faction is better than another, just choose the better faction, HOMM2 is not like HOMM1, where the game forces factions onto players.
If you end up creating a full blown addon, with new stuff (which would be totally rad), I hope you'll keep an option to play without the balance tweak.
I must say I somewhat agree with gandam, I am not really interested in the new balanced factions. For one, I spend months learning their current stats, I do not look forward to learn everything from scratch and change my tactics completely to fit the new balance. For two, each factions can be good in a specific situation. For three, if a faction is better than another, just choose the better faction, HOMM2 is not like HOMM1, where the game forces factions onto players.
If you end up creating a full blown addon, with new stuff (which would be totally rad), I hope you'll keep an option to play without the balance tweak.
for the spells that i agree need a change :
for example, comparing Storm to Armageddon. there's a 5 MP difference between them but a 25x power difference. Armageddon is twice the power for 5 more MP. someone's gonna have to get a MP change.
also, Dimension Door lets you cover a ****load of terrain. especially with high MP reserves. moving around the map is a joke for 10 MP a shot. the slightest opening could be deadly.
then you have Chain Lightning. its average damage is almost twice as powerful as equivalent spells. granted, it's not an even distribution of damage but does it really matter when even ONE enemy stack eats 40x Spell Power damage?
then there's Holy Word that half the power but more than half the cost. yeah.
for example, comparing Storm to Armageddon. there's a 5 MP difference between them but a 25x power difference. Armageddon is twice the power for 5 more MP. someone's gonna have to get a MP change.
also, Dimension Door lets you cover a ****load of terrain. especially with high MP reserves. moving around the map is a joke for 10 MP a shot. the slightest opening could be deadly.
then you have Chain Lightning. its average damage is almost twice as powerful as equivalent spells. granted, it's not an even distribution of damage but does it really matter when even ONE enemy stack eats 40x Spell Power damage?
then there's Holy Word that half the power but more than half the cost. yeah.
I can't really say for damage spells as I rarely use them. From my experience, damage spells become less effective as the game progress. When both players have 3-4 castles, the number of soldiers added to both armies every weeks far exceed the increase in spell power. When both you and your enemy have big stacks of creatures, spells like mass bless, mass haste, mirror image, mass slow, paralyze and berserk are far more effective than damage spells.
What I'd love to see with spells is less randomness. I've seen Knight castle with animate dead and Necromancer castle with holy shout spells so often... Spells should be handled the same way secondary skills are handled for heroes: each heroes has different chances of acquiring specific skills, each castles should have different chances of acquiring specific spells. A Necromancer castle should have more chances to get death related spells and should never get holy spells, a warlock castle should be more likely to get Armageddon since it's such a big part of their tactic, etc.
What I'd love to see with spells is less randomness. I've seen Knight castle with animate dead and Necromancer castle with holy shout spells so often... Spells should be handled the same way secondary skills are handled for heroes: each heroes has different chances of acquiring specific skills, each castles should have different chances of acquiring specific spells. A Necromancer castle should have more chances to get death related spells and should never get holy spells, a warlock castle should be more likely to get Armageddon since it's such a big part of their tactic, etc.
I would very much like to ultimately be able to add new units and factions and the like. I'm not that optimistic, however. Assumptions about how many factions there are likely littered all over the compiled code, making such a project really, really time-consuming. Potentially even time-consuming enough that it would be easier to spend those man-hours doing paid work, and thereby raising enough money to buy the H2 code off Ubi.
Anyway, spell probabilities already differ by castle. Necro is way, way, way more likely to wind up with Death Ripple/Death Wave than any of the other castles. They're just not impossible to find for the others -- and for good reason. Too many times have I found myself with a hero with 5 stacks of 1 Boar against an enemy hero, thinking I could get off a Lightning bolt or two before retreating, only to be defeated by a single Death Ripple.
Anyway, spell probabilities already differ by castle. Necro is way, way, way more likely to wind up with Death Ripple/Death Wave than any of the other castles. They're just not impossible to find for the others -- and for good reason. Too many times have I found myself with a hero with 5 stacks of 1 Boar against an enemy hero, thinking I could get off a Lightning bolt or two before retreating, only to be defeated by a single Death Ripple.
I asked a systems-guru friend. He recommended IDA.I've been meaning to do exactly that for years, but I just cannot find a debugger that will do the job.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 3 guests