|
Thread: Is it possible ot add new Creatures? | |
|
LordBoogieBlue
Tavern Dweller
|
posted August 06, 2018 09:53 PM |
|
|
Is it possible to add new Creatures?
I'm just wondering if its in any way possible to add creatures to the game, even if its just a rename/recolour of existing creature with different stats.
____________
|
|
Karmakeld
Responsible
Supreme Hero
|
posted August 07, 2018 12:20 AM |
|
|
LordBoogieBlue said: I'm just wondering if its in any way possible to add creatures to the game, even if its just a rename/recolour of existing creature with different stats.
We can't add new creatures. That is hardcoded.
But we can rename, change stats, images, animations, skills and factions. Various posts and treads exsist about this subject. Just look through the first couple of pages in this forum, and you should find them (I would've posted links ifnI wasn't writing on my phone).
NimoStar did a lot of creature changes in his mod.
|
|
LordBoogieBlue
Tavern Dweller
|
posted August 07, 2018 12:24 AM |
|
|
Aww that's a shame, you think s1 would ever be able to figure out a way to do it? Even if you can't recruit the creature or anything and its just a map added creature.
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted August 07, 2018 12:36 AM |
|
|
The problem with adding new creatures is that there was - likely - an enum used for the creatures, which makes it appear hardcoded when looking at the .exe. We would have to go through the entire .exe to find every instance of the creature enum being referenced and update that table with the addition of our new creature numbers.
I think it would be possible using the dll method that Equilibris is using where we redirect calls to the creature table to our own code where we have our own list of creature numbers, though admittedly I haven't been anywhere near disassembly of the .exe code to play around with this stuff.
There are other places that would need to be updated outside of the .exe, but they would be trivial compared to disassembly of the .exe
It is on the list of things to get into one day, but there are many other things that are more presising.
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted August 08, 2018 02:24 AM |
|
|
|
radmutant69
Promising
Known Hero
|
posted August 08, 2018 02:55 PM |
|
|
iliveinabox05 said: The problem with adding new creatures is that there was - likely - an enum used for the creatures, which makes it appear hardcoded when looking at the .exe. We would have to go through the entire .exe to find every instance of the creature enum being referenced and update that table with the addition of our new creature numbers.
Well, I think this creature enum thing starts approximately here in the exe:
And ends here:
Too bad I can't use this information at all
|
|
iliveinabox05
Honorable
Famous Hero
|
posted August 13, 2018 10:06 PM |
|
|
Is that the only place in the exe where the creature numbers appear? It's definitely helpful either way and good to have it documented so we can come back to it later!
I guess what we also need, and is more difficult, is every place in the exe that references that table. Then the references could be redirected using the dll method.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted August 14, 2018 03:26 PM |
|
|
iliveinabox05 said: Is that the only place in the exe where the creature numbers appear? It's definitely helpful either way and good to have it documented so we can come back to it later!
I guess what we also need, and is more difficult, is every place in the exe that references that table. Then the references could be redirected using the dll method.
Perhaps kkfkkkfk knows how to check those references or could look into it? I recall he posted some other call references..
____________
|
|
radmutant69
Promising
Known Hero
|
posted August 14, 2018 06:08 PM |
|
|
I think the only other necessary stuff for new creatures would be an updated 'ability table' what starts about the 25481B address (or 0065481B if you use hiew or a disassembler or something...). But it is kinda messed up in the Equi exe because of the 'jumped' creatures about 31F (or so). So that probably won't be so easy.
They are also appear in the 'town dwellings table' right 'above' my first picture's content in my previous post.
But I'm not sure about that would be necessary so much because you can just replace the the creature numbers there with each other without problem.
Also they should have new dwelling keywords if we want to give them their own dwellings (6101D and so on). They can have dwelling without that though, because you can just add the creature's number after the object type (eg. creature_dwelling49 is the megadragon dwelling) and it will produce that creature for you, but it will have another dwelling's name or no name at all (depends on the object header).
|
|
Karmakeld
Responsible
Supreme Hero
|
posted August 14, 2018 08:56 PM |
|
|
radmutant69 said: Also they should have new dwelling keywords if we want to give them their own dwellings (6101D and so on). They can have dwelling without that though, because you can just add the creature's number after the object type (eg. creature_dwelling49 is the megadragon dwelling) and it will produce that creature for you, but it will have another dwelling's name or no name at all (depends on the object header).
Just looked at the Equi 3.55 added Creature Banks, and those were added the same way, by additional Creature Bank numbers. So in theory those could even be enabled/setup for original version...
____________
|
|
LordBoogieBlue
Tavern Dweller
|
posted August 14, 2018 10:11 PM |
|
|
I know it's not a priority for you guys right now, but If you ever did figure this out it would be awesome.
____________
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted August 15, 2018 01:53 AM |
|
|
As I said before, the problem is that we don't know how the numbers map with the codes such as "centaur". Is it table position? No, it cannot be since you can see in the tables there are some lines which aren't creatures but annotations, including the very first but then another one separating creatures from the base game from creatures from expansions.
So how do you get from "09" to "centaur"? I havent seen this explicitely anywhere in the code or in the files.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted August 15, 2018 08:53 AM |
|
|
Well the extra unused infos appears in a lot of the tables so obviously it somehow know which info to read. In the heroes name table I know it's not read by numbers but read the names regardless of placement, simply cause they're listed in the editor and exe file.
Creature Banks seems to be listed in numeric order.
Not sure anyone of us would neccesarily reach an answer, but we could all take a look at the exe and tables files. We never get any closer if no one ever digs deeper.
____________
|
|
radmutant69
Promising
Known Hero
|
posted August 15, 2018 10:18 AM |
|
|
NimoStar said: As I said before, the problem is that we don't know how the numbers map with the codes such as "centaur". Is it table position? No, it cannot be since you can see in the tables there are some lines which aren't creatures but annotations, including the very first but then another one separating creatures from the base game from creatures from expansions.
So how do you get from "09" to "centaur"? I havent seen this explicitely anywhere in the code or in the files.
It's just that, the mega dragon's code here is 49 00 00 00 4D 4C A6 00. The last 4 byte will 'redirect' to the keyword itself. I mean it points to the 00A64C4D address, but that is 664C4D in the exe in a hex editor, and on that address there is the keyword 'mega dragon'.
And the same with all the other creatures' numbers and keywords' address. This is how you get to the centaur. Just try it. There is BC 4F A6 00 so go to the address 664FBC and there must be the centaur keyword and this gives the 09 number to it's keyword.
So I do think that, nothing more is needed but this and the coded abilities for new creatures.
Karmakeld said: Well the extra unused infos appears in a lot of the tables so obviously it somehow know which info to read. In the heroes name table I know it's not read by numbers but read the names regardless of placement, simply cause they're listed in the editor and exe file.
Creature Banks seems to be listed in numeric order.
Things are not necessarily needed to listed in any order in the text tables because the game reads the names (keywords) from there. The heroes also have their keyword table and their number table in the exe, just as creatures and any other thing. Adding new heroes would be even easier because they need only new working keywords, and nothing more.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted August 15, 2018 11:42 AM |
|
|
radmutant69 said:
Things are not necessarily needed to listed in any order in the text tables because the game reads the names (keywords) from there. The heroes also have their keyword table and their number table in the exe, just as creatures and any other thing. Adding new heroes would be even easier because they need only new working keywords, and nothing more.
It was just an example I know the heroes are read in any order. Speaking of which, I did an attempt months ago, and I can add/edit hero portraits (they can be read by the FaceTool as it reads from the portraits.h4r) but replacing the 'empty' bytes broke the exe/editor. But it seems to be related to not adding the proper hero numbers. If you could help with that (I'm not familiar with reading in Hiev), we could test adding new portraits. That too has been requested for a loooong time.
____________
|
|
radmutant69
Promising
Known Hero
|
posted August 15, 2018 12:20 PM |
|
|
Well the hero 'number table' starts at 589AD8 and ends at 58A497 in the exe. I think. But I can't really help with using this info because I'm not a programmer and I can't edit the dll
radmutant69 said: This is how you get to the centaur. Just try it. There is BC 4F A6 00 so go to the address 664FBC and there must be the centaur keyword and this gives the 09 number to it's keyword.
Hm... actually the 09 creature is the cerberus. The centaur is the 08 and it's keyword is at 664FC8
|
|
Karmakeld
Responsible
Supreme Hero
|
posted August 15, 2018 12:24 PM |
|
|
radmutant69 said: Well the hero 'number table' starts at 589AD8 and ends at 58A497 in the exe. I think. But I can't really help with using this info because I'm not a programmer and I can't edit the dll
Well atleast it gives a point of where to start. Next I will call in iLiVeInAbOX05 or ask other programmers if they could be of assitance..
____________
|
|
|