|
Thread: All creatures four+ abilities close & files (DLL help needed) | This thread is pages long: 1 2 · «PREV |
|
RoseKavalier
Admirable
Supreme Hero
|
posted February 18, 2020 05:09 PM |
|
|
RoseKavalier said: My time is limited lately so any direct information (addresses, formats, text lists, ...) you can link to will help contribute to new features for H4MS.
I will not spend time reverse engineering Heroes4 so you need to point me to existing information about the modifications you propose. Like how it's been hex edited and such, the same as creature abilities was well documented.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2
|
|
Baronus
Legendary Hero
|
posted February 18, 2020 10:43 PM |
|
|
If all 5 magic skills was codded by one value to faster work we cant make differences between.
But if all was codded 5 times it should be the same order like skille and its one by one. Easy to detect.
We can only make another values for skills or other unit to summonig or necromancing. 5 magic skills are practically no changeable. Only 4 other can be moded a little. And class probability for skill can be modded too. Biggest chages we can do for units only. But units its thing which is most failed in this game. AI of course too.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted February 19, 2020 09:00 PM |
|
|
Of the things we currently can't do, I'm sure other ppl. than me would like to look into:
Adding new creatures
Adding new heroes
Editing artifacts (requested elsewhere)
Add more splashscreens
I will try to help locate some of these, but don't have the time right now..
____________
|
|
vulcancolak
Famous Hero
|
posted February 20, 2020 05:52 AM |
|
|
Karmakeld said:
Editing artifacts (requested elsewhere)
me
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted March 26, 2020 07:47 AM |
|
|
Rosekavalier:
I think there is one thing that is easy to do and you could do, since it is just editing an existing list.
There is a section of the code in Equilibris which allows adding spells to creatures according to their number. However, in usual Equilibris style, this section is an Hex hack.
I have extended their code to use in multiple creatures, however there is the problem that only 16 (actually 15) creatures are usable, as well as the code is in a reserved memory part if you extend it like this (as I do in my mod). It is possible this brings problems, such as it has been reported that my mod can't open maps with lots and lots of custom scripted objects.
What could be done:
Extend the logic of this list to an extension like this. It is much like the creature ability hack, only even simpler.
I will help you by showing the original list code and what it means roughly hex by hex if you are willing to do this
Basically it is like this:
FIRST HEX: Number of total creatures. Only up to 16 (0 to F?) supported)
In the patch there is a small piece of needed game code that can't be altered, so you can only use 15.
Now a repeating pattern, as I remember it:
bytes listed: Creature hex number (normal reference list) , Creature hex number, Creature hex number, Creature hex number... etc.
Now these spells are added to the listed creatures, in order:
SPELL 1
byte 1: Number of creatures in stack at begin of combat to unlock
byte 2: Spell hex number (normal reference list)
SPELL 2
SPELL 3
SPELL 4
Note: Spell 4, if byte 1 is filled, makes this list bleed over to the next creature. So if the creature gets to the specified number, it gets all spells
Now again, SPELL 1 (for next creature listed at starting list)
and like this until numbers listed in FIRST HEX are exhausted
***
What is needed with DLL extension:
- More than 15 creatures
- More than 4 spells per creature (3 practically usable as it is)
- No bleeding if fourth spell is set
- No overwrite of reserved memory section?
____________
|
|
RoseKavalier
Admirable
Supreme Hero
|
posted March 26, 2020 04:27 PM |
|
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted March 28, 2020 07:56 AM |
|
Edited by NimoStar at 08:03, 28 Mar 2020.
|
Quote: If all 5 magic skills was codded by one value to faster work we cant make differences between.
But if all was codded 5 times it should be the same order like skille and its one by one. Easy to detect.
I am pretty sure all the "herbalism" and "meditation" (in nature) equivalents are coded separately, since they all have different images and different text strings. Wanting to save space in that code (add spell power or spell points) would amount to the same as saving space in a single line text string... (which are even listed separately at the exe for reference), so, it would be dumb. But there are a lot of dumb things in H4 code, so... who knows, really. Still, I find it most likely that it is a separate, repeating code. For example, the code about +20% power HAS to be separate, because it each appears to a different magic and separating the effect (+20% magic) from the recipient (nature, order, chaos, etc.) just so that a percentage is unified would be rather absurd. In any case, the HEX may look different because of pointing to magic alignement, so we should better search for the repeating +10 spell points, rather than about the spell power, for example.
__________________
Rosekavalier:
That's because I had to find it again myself and I wasn't going to trouble with it if you weren't around or weren't interested
Here:
https://i.postimg.cc/FHZx1gHj/2020-03-28-03-45-47-Hex-Editor-Neo.png
The offset is 0056f690 in my viewer, I guess that means 0096f690 for you?
In any case note that this is only for the Equilibris versions (and my mod) and there are other Equilibris functions around. Their original code is different and you can compare their list and mine, since I added many more creatures with their spells (up to the max)
In H4 original this portion is unused:
https://i.postimg.cc/fWS7Nhnn/2020-03-28-03-50-53-Hex-Editor-Neo.png
However, take heed:
https://i.postimg.cc/pX0fHVGZ/2020-03-28-03-49-02-Hex-Editor-Neo.png
The eight bytes marked there from 0056f700 are not part of the list (even if I made it read it to add more creatures and spells after it)... added by Equi team, changing it makes the game unworking AFAIK.
See;
https://i.postimg.cc/tgL31rWm/2020-03-28-03-54-08-Hex-Editor-Neo.png
Of course the actual code for making this list work must be somewhere else, as I understand it. Probably in the DLL?
However, combined with the first post, this is basically all I know about this.
I hope it is enough for either extending the list or finding the code structure that refers to it.
____________
|
|
RoseKavalier
Admirable
Supreme Hero
|
posted March 28, 2020 02:06 PM |
|
|
Inspecting with debugger didn't seem to yield anything here during launch of h4mod.exe, removing those bytes at 0056f700 also didn't impact game launch....
Maybe we're not necessary looking at the same executable... Can I get a link to the definitive version I should be looking at?
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted March 28, 2020 07:57 PM |
|
Edited by NimoStar at 20:00, 28 Mar 2020.
|
Not impact game launch per se; difference happens
Versions I have shown:
Equilibris 3.55 (that part should be the same as released 3.51 version)
NimoStar's Greatest Mod (unreleased version but this part should be the same as released v18 version)
And the original english one for comparing.
Not all EXE bugs affect game launch, most indeed don't. Most won't allow you to open certain maps, specially equilibris ones.
In fact, I wasn't able to reproduce the error, if indeed there was one, but those bytes seem far too specific to be put there just randomly. They also don't occur anywhere else in the exe.
Its proven the mass spell list works, though, as it is effective in both equi and my mod.
____________
|
|
bulya
Adventuring Hero
|
posted November 21, 2020 12:28 AM |
|
|
@RoseKavalier
Can you elaborate more of the dll usage you suggest?
I intend to add some functionality to the game, which will include writing logs, etc.
Running the game with a debugger does let me find the procedures where the actions for the stuff I want to log happen, but the next step is modifying it so that I get to do something with that info. I can extend the exe, but I don't think its a good practice if I'd like to add more functionality later. And I think it will also be way harder then other methods of modding.
Perhaps if you explain the way it can work you can save me some time finding the details, and fishing for this information as its not easy to find due to such actions reveal the way of how can viruses and malware stuff be made.
Being a senior software engineer I believe its just a matter of time for me, but perhaps you can save me some of this time. There is already small community waiting for the changes I do, and testing the little stuff I already did. So I'm a bit pressured as well with that.
|
|
RoseKavalier
Admirable
Supreme Hero
|
posted January 19, 2021 03:22 PM |
|
|
bulya said: @RoseKavalier
Can you elaborate more of the dll usage you suggest?
I intend to add some functionality to the game, which will include writing logs, etc.
Running the game with a debugger does let me find the procedures where the actions for the stuff I want to log happen, but the next step is modifying it so that I get to do something with that info. I can extend the exe, but I don't think its a good practice if I'd like to add more functionality later. And I think it will also be way harder then other methods of modding.
Perhaps if you explain the way it can work you can save me some time finding the details, and fishing for this information as its not easy to find due to such actions reveal the way of how can viruses and malware stuff be made.
Being a senior software engineer I believe its just a matter of time for me, but perhaps you can save me some of this time. There is already small community waiting for the changes I do, and testing the little stuff I already did. So I'm a bit pressured as well with that.
Sorry, I don't monitor the h4 forum that much, stumbled on this by complete accident. Essentially you want to reverse engineer enough classes and functions to be able to write complex code. There are tons of things to say and this forum is not very well suited for writing code, get a hold of me by PM or email.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted January 24, 2021 10:59 PM |
|
Edited by NimoStar at 23:00, 24 Jan 2021.
|
I think PM is even less suited for that. Plus we can all benefit from some more public info...
There's also the matter of Pms deleting themselves in little time. I lost important data because of that.
____________
|
|
RoseKavalier
Admirable
Supreme Hero
|
posted January 25, 2021 04:05 AM |
|
|
NimoStar said: I think PM is even less suited for that. Plus we can all benefit from some more public info...
There's also the matter of Pms deleting themselves in little time. I lost important data because of that.
I have zero intention of using PMs, just looking to get in touch to set up a better discussion environment where code can be posted.
Also, I did some work on H4MS recently, at some point I will complete it and post what's been done in its own topic since it has grown a bit.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2
|
|
Bulya
Adventuring Hero
|
posted January 25, 2021 06:57 PM |
|
|
I actually agree that the forum isn't the best platform to establish fine communication. I don't check here that often, and in a forum I can't really answer or ask questions as I am able to in a normal conversation.
I'm working on a feature for the game, which will probably be ready in a couple of weeks. Depending on how much time do I have, as work and family takes a lot of time as well. Once I have it done I will let share it here as well, and I don't mind answering questions if there are some here. But its way easier sharing data and asking questions in other platforms.
@Nimostar, if you have specific questions I can answer those. Though reading the several threads here it seems as we work on different aspects of the game, and have very different approaches to it.
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted April 01, 2021 10:48 AM |
|
Edited by NimoStar at 15:23, 01 Apr 2021.
|
Hey.
I have been trying to use RoseKavalier's extension with my mod lately (https://www.moddb.com/mods/greatest-mod/downloads/greatest-mod-alpha-019a-testable), but with no sucess.
There are at least two problems:
- The asking of the file name is pretty pointless, since if the file name has spaces and isn't "heroes4.exe", the command prompt will just shut down with "can't open file".
- Worked on default heroes4.exe, but when trying to use with my mod's exe, it says "the provided file is not valid for patching"
But why not?
The adress of creatures abilities is the exact same.
This doesn't just affect my mod however; the same happened when trying to patch the original Equilibris 355 exe.
As many H4 players use Equilibris too, and modders like me use it as a base to add features since they have more artifacts and add mass spells to creatures, this makes the patch quite limited in only working with base, unmodded H4.
I will also add a bug report on github.
Another bug:
In the default list, creature abilities are displaced by one.:
Quote: "Waspwort": [
"Undead",
"Tougness"
],
"Water Elemental": [
"Ranged",
"Weakness"
],
"White Tiger": [
"Elementals",
"Spellcaster",
"Cold Resistance",
"Cold Attack"
],
"Wolves": [
"First Strike"
],
"Zombie": [
"Strikes Twice"
]
Any H4 player can see what's wrong there, waspworts are ranged and weakness, water elementals are the elemental spellcasters, white tigers first strike and wolves strike twice. Zombies are the undead and toughness.
PS_: Created a special thread with fixes proposals and more:
http://heroescommunity.com/viewthread.php3?TID=46877
____________
|
|
|
|