PDA

View Full Version : How to create new units in base game? (addon)


Burut
10-18-2020, 02:48 PM
I've been banging my head around for quite some time trying to create new units, and I've not been successful yet. I managed to solve the problem with the error message of the game not being able to read .bma files because of opening them with a notepad, so to solve it I downloaded a hex editor. Now I do exactly the same thing and I get a regular crash message when I get into a battle with the unit I "created". I am able to change it's name, stats, its interface image but I am not able to enter the battle with them, because the game crashes the moment the game loads the fight. The process that I do is: create a new session using the editor. I create a atom folder where I copy the ATOM file of the unit that I wan't to retexture, or create a new unit if you wish (you can't create new models). After that I create a models and textures. In the models folder I copy the .bma file of the unit, and into textures I copy the .dds files, which are the textures (I downloaded a photoshop extension with enables me to open these files, I think it's compatible only with the latest Photoshop, which is the 2020 version). So I edit the .dds file as I wish, meaning I change the color of the file. I save the .dds then rename it into nameofunit_diff (example name of unit is twilightexec). I enter the unit's .bma file with the hex editor, finding the nameofunit_diff and then renaming it with my nameofunit_diff (example I was trying to make a twilight color version of the executioner, so I changed the executioner_diff into the twilightexec_diff). I never changed the mask of the unit I was trying to create, I kept it the same as the regular executioner mask (Is that important?). Now I have the ATOM file named twilightexec, texture file named twilightexec_diff and .bma file named twilightexec. I changed in the ATOM folder from executioner.bma to twilightexec.bma. I changed in the loc_ses (or ses, I can't remember), adding the cpn_twilightexec=Twilight Executioner and the other one for plural (cpsn_nameofunit=Name of Unit). I use the editor to place the unit for purchase in the Ragman shop on Debir, I purchase the unit, the name is different, the interface texture is different, I never changed stats cause I was just testing but I think they would be different also. Everything seems normal, until I enter a battle, where the game crashes, showing me the "King's Bounty Crossworlds has stopped working" and showing me the options "Close the game" and "Look for a solution online". Please I would be very thankful if I could get an answer.

Space Knight
10-18-2020, 10:06 PM
Do the animations correspond with the unit shape? Is the texture name the same length as the old texture name?

Burut
10-19-2020, 05:52 PM
Don't understand the animations question? Am i supposed to do something with animations? I only edit .bma files, I thought that animations were in the bma file. The name of the new texture isn't as long as the old texutre name (eg. old name is archer_diff.dds I copy it and change the name too archerr_diff.dds. I go to the bma file, find the archer_diff.dds I always just copy it in automatically over the archer_diff.dds because when I try to type it it can't fit, I assume I need to add bytes. Do you have an idea for a solution now? Maybe something about the animations??

Space Knight
10-19-2020, 10:42 PM
The texture name is the problem here I think. Animations shouldn't be a problem if they are still the normal archer animations. You need the new texture name to be just as long as the old one for it to work.

Burut
10-21-2020, 03:53 PM
You are right, as always. Thanks!