|
Post by seahorse09 on May 7, 2023 17:47:06 GMT
I want to create a mod for WC4. Nothing special, just some new countries. I know how to add new flags and edit .json files, but there are some problems with editing HEX. As far as i know there isn't any magic tool to use for mod creation, so please tell me everything in some detales. 1. I have been told that .btl file has different sections: First 80 bytes - main section with global parameters, and many 300 byte sections which describe countries. Is it truth? 2. The exact question, which this thread was created for - how to add countries to conquests (.btl files) via HEX and give them cities? I have been told to copy existing 300-byte country section and just edit it, but where do i paste it? 3. In WC4 the territory of country belongs to a city, right (every city has a territory, so you get this territory only if you capture the city)? So, if i give a city to my country, the territory that belongs to the city will also be owned by the country? 4. In some threads about this i heard about "ownership codes" and "hex calculators", but nobody tell exactly how to use it. Maybe you can help? I know countries' hex codes and i'm beggin' you to help me use this data. Threads i found: Country hex codes 1 - WC4 hex countrys codes | Easytech Fan Community european-war-4.boards.net/thread/9408/wc4-hex-countrys-codesCountry hex codes 2 - WC4 City ownership | Easytech Fan Community european-war-4.boards.net/thread/9487/wc4-city-ownershipAnd this guide, which didnt help me (maybe im dumb) - WC4 Adding Countries Guide | Easytech Fan Community european-war-4.boards.net/thread/18079/wc4-adding-countries-guidePlease, help me (If it can be helpful, i want to edit 1939 conquest) Also, i would be extremely glad if you could tell me the full list of cities' hex codes. The only ones i know: London - 3f05 Dublin - aa04 Manchester - 1104 Plymouth - d005
|
|
|
Post by CaptainStryker on May 7, 2023 23:59:50 GMT
I want to create a mod for WC4. Nothing special, just some new countries. I know how to add new flags and edit .json files, but there are some problems with editing HEX. As far as i know there isn't any magic tool to use for mod creation, so please tell me everything in some detales. 1. I have been told that .btl file has different sections: First 80 bytes - main section with global parameters, and many 300 byte sections which describe countries. Is it truth? 2. The exact question, which this thread was created for - how to add countries to conquests (.btl files) via HEX and give them cities? I have been told to copy existing 300-byte country section and just edit it, but where do i paste it? 3. In WC4 the territory of country belongs to a city, right (every city has a territory, so you get this territory only if you capture the city)? So, if i give a city to my country, the territory that belongs to the city will also be owned by the country? 4. In some threads about this i heard about "ownership codes" and "hex calculators", but nobody tell exactly how to use it. Maybe you can help? I know countries' hex codes and i'm beggin' you to help me use this data. Threads i found: Country hex codes 1 - WC4 hex countrys codes | Easytech Fan Community european-war-4.boards.net/thread/9408/wc4-hex-countrys-codesCountry hex codes 2 - WC4 City ownership | Easytech Fan Community european-war-4.boards.net/thread/9487/wc4-city-ownershipAnd this guide, which didnt help me (maybe im dumb) - WC4 Adding Countries Guide | Easytech Fan Community european-war-4.boards.net/thread/18079/wc4-adding-countries-guidePlease, help me (If it can be helpful, i want to edit 1939 conquest) Also, i would be extremely glad if you could tell me the full list of cities' hex codes. The only ones i know: London - 3f05 Dublin - aa04 Manchester - 1104 Plymouth - d005 Are you in possession of a computer? The hex method is very outdated for World Conqueror 4. We just use the Map Editor nowadays. However, I can understand your issues with hex editing as a beginner, it's difficult, the instructions are not clear and you will likely not find a detailed explanation of adding a country with hex. In my personal experience, I had to ask the modders specifically about adding countries since Canadian Modder's tutorial video was not reliable. It took me an entire month to finally get an answer. The hex method is inefficient, there are many steps to add a country: 1. Increasing the country total count +1 - There's a certain offset that needs to be changed. If you don't increase the total, your game will crash. (Note: the max limit of adding countries in a conquest is 128) 2. Look for the bloc that holds all countries' information - The trick is to search for the land color of the country in hexdecimal. And then you need to get used to the structure of a country bloc: it has a country code, a country id (refer to stringtables_en.ini), money, gear, atomic, alliance camps and etc. 3. Copy-paste the country structure, under the last country structure - You also need to make sure that the country code is the new value you put in the total count of countries offset. Then you need to make necessary changes to the structure. Important to remember: the country code and country id are not the same, this applies to the Map Editor tool. A country id is the id of the country you added in stringtables, the country code is sort of a separate id, that holds the country id and used for maps. 4. To place a country in your map, you need to look for the "city ownerships bloc" - This one is hard to find. This is where you have to learn about the "calculation code" or the "hex calculator", I myself still have no idea about how it works despite having using it a lot to find the city ownerships bloc and province bloc. The calculation code goes like this: a big number in hexdecimal representing the size of the btl file, it's used to find the exact location in the offset you need to change. For that, you also need a WC4 World Map with all the coordinates. And there's this rule I find very annoying: since the coordinates are in decimal, you need to convert them to hex. You will use them to add to the calculation code's current number. However, when you converted the number to hex, you have to switch the last 2 digits with the first 2 for some reasons. 5. Once you find the correct offset, add the country code's value. My explanation about adding countries in hex is not fully complete, as I mostly forgot about it 3 years ago. In my past experience, I went through hell with the hex method when I was working on Europe, Africa and parts of Asia in the WC4 Nuclear War Mod before discovering the map editor. To put it in perspective: creating provinces, adding cities, adding country ownerships for the whole continent of Europe took me approximately an entire week (tons of hours) to complete. The same amount also applied for Africa. The hex method was slow, time-wasting and brain-breaking during the development of NWM. With the release of the map editor in the middle of the pandemic in 2020, we managed to reduce our workload significantly. Europe took me 1 week to finish with hex. However, both North America and South America only took me under 1 day to complete with the map editor, including all the details: units, city levels, infrastructures, air defense, buildings, ports and etc. Inside the map editor, there's a tool modifying excel and it's like a more understandable version of hex editing. I made a guide explaining each blocs' properties and how to add interesting mechanics into your maps. Canadian Modder released a video with the map editor in 2020, you can look it up. At this point if you want to progress in WC4 Modding, avoiding hex editor is the best solution, but if you really don't have a computer, you're forced to take the long route.
|
|
|
Post by seahorse09 on May 8, 2023 0:13:12 GMT
Huge thanks for sharing your experience, CaptainStryker! Well, i have a computer, so i can install this map editor! But i still have a question: Of course, when adding a new country, i will be forced to deal with creating flags, editing .ini files, .json files, but these are kinda easy. As i understood, the work with .btl files is just placing country into the map, right? That means, that if i use the map editor, i can avoid this hell?
|
|
|
Post by seahorse09 on May 8, 2023 0:25:16 GMT
And one last question: Canadian Modder has 3 videos about map editors: 10min and 7min are about map editor with some chinese name and "2.0" in the end, and 28min where he shows a program named "MainGame". Which to use?
|
|
|
Post by CaptainStryker on May 8, 2023 1:26:12 GMT
Huge thanks for sharing your experience, CaptainStryker! Well, i have a computer, so i can install this map editor! But i still have a question: Of course, when adding a new country, i will be forced to deal with creating flags, editing .ini files, .json files, but these are kinda easy. As i understood, the work with .btl files is just placing country into the map, right? That means, that if i use the map editor, i can avoid this hell? Indeed, as you mentioned, .btl is everything map editing related. It does more than adding countries, you can add buildings, units, generals, objectives, events. Setting alliances, resources, land colors, technology is also possible through the map editor. It's the main foundation of WC4 modding.
|
|
|
Post by CaptainStryker on May 8, 2023 1:29:36 GMT
And one last question: Canadian Modder has 3 videos about map editors: 10min and 7min are about map editor with some chinese name and "2.0" in the end, and 28min where he shows a program named "MainGame". Which to use? The video titled "Map Editior" with an AMX tank mainscreen. Posted in April 2022.
|
|
|
Post by seahorse09 on May 8, 2023 8:11:54 GMT
Huge thanks to you! Your help is priceless)
|
|
|
Post by seahorse09 on May 8, 2023 15:16:01 GMT
Well, one question left. When i said that i have a computer i kinda lied because i havent built it yet (cuz i am living in big village named "belarus" and there isn't much computer parts especially ones that i need). The question is: in WC4 cities own its' territories, in the map editor i will toss cities to countries, or i can toss to them the specific hex of the map? Maybe this question is unclear, but ill explain: for example i created a Lybia. In the game the territory, that Lybian city has is more like a circle, but not a Lybia. I give the country Lybia this city and nearest territory Libya-alike shape (other territories are given to Algeria and other countries). If i capture the Lybian city, ill get only Lybian territory, or the full ownership of the city (parts of this ownership are owed by Algeria and other african countries)? Or i can change the territory, owned by city in the map editor? Why i am asking is as i already said, i dont have working computer so i cant try out map editor. (Well, i will have it in the nearest future)
|
|
|
Post by CaptainStryker on May 8, 2023 21:13:55 GMT
Well, one question left. When i said that i have a computer i kinda lied because i havent built it yet (cuz i am living in big village named "belarus" and there isn't much computer parts especially ones that i need). The question is: in WC4 cities own its' territories, in the map editor i will toss cities to countries, or i can toss to them the specific hex of the map? Maybe this question is unclear, but ill explain: for example i created a Lybia. In the game the territory, that Lybian city has is more like a circle, but not a Lybia. I give the country Lybia this city and nearest territory Libya-alike shape (other territories are given to Algeria and other countries). If i capture the Lybian city, ill get only Lybian territory, or the full ownership of the city (parts of this ownership are owed by Algeria and other african countries)? Or i can change the territory, owned by city in the map editor? Why i am asking is as i already said, i dont have working computer so i cant try out map editor. (Well, i will have it in the nearest future) Once you obtained the computer and have used the map editor, things will be more clearer and easy to follow. Here's how territory/ownership works: you place the country code (or the flag with id displayed on the map editor) on a city, which controls a province. When you place the ownership on the city, the whole province which the city controls gets annexed by your nation. In the map editor, you can add/remove cities. And you can also edit province territories and give them to a city or a building like a factory.
|
|
|
Post by seahorse09 on May 8, 2023 22:16:55 GMT
Big thanks, CaptainStryker for sharing your knowledge and experience! As soon as.i obtain a computer i will use this information to create a mod!
|
|
|
Post by bulgar on Jun 10, 2023 21:20:31 GMT
CaptainStryker , i recently checked canadian modder's video and the drive link doesn't work, is there anywhere else that i can find the map editor? i can't find it anywhere else.
|
|
|
Post by CaptainStryker on Jun 10, 2023 22:40:28 GMT
|
|
|
Post by ππ³π°π΅π΄π¬πΊ on Jun 11, 2023 15:24:21 GMT
Very nice explanation CaptainStryker, this needs to be in a how-to-mod library. On thing is verry irritating and I never understand: Why You call battle-modding map-modding ? .btl are battle or conquest files. Practical nobody is modifying the .map files in WorldConquerer. The big map mod has everything but not a big map! - the map is even not modified at all. [...] For that, you also need a WC4 World Map with all the coordinates. And there's this rule I find very annoying: since the coordinates are in decimal, you need to convert them to hex. You will use them to add to the calculation code's current number. However, when you converted the number to hex, you have to switch the last 2 digits with the first 2 for some reasons. Your '2 digits' are one Byte (8 bit) written in hexadecimal. When intel developed the first 16-bit cprocessors, they decided that the bytes are written to disk with tthe low byte first - with this trick a 16 bit machine can read 1 byte data without conversion: Decimal 111 Byte 8Bit 0110 1111 Hex Byte 6 F 4 digit hexadecimal 006F PS: On a PC you can switch in some binary editors between Hexadecimal and decimal display it just looks flumbsy but flipping helps a lot in the beginning.
|
|
|
Post by CaptainStryker on Jun 11, 2023 18:22:26 GMT
Very nice explanation CaptainStryker , this needs to be in a how-to-mod library. On thing is verry irritating and I never understand: Why You call battle-modding map-modding ? .btl are battle or conquest files. Practical nobody is modifying the .map files in WorldConquerer. The big map mod has everything but not a big map! - the map is even not modified at all. [...] For that, you also need a WC4 World Map with all the coordinates. And there's this rule I find very annoying: since the coordinates are in decimal, you need to convert them to hex. You will use them to add to the calculation code's current number. However, when you converted the number to hex, you have to switch the last 2 digits with the first 2 for some reasons. Your '2 digits' are one Byte (8 bit) written in hexadecimal. When intel developed the first 16-bit cprocessors, they decided that the bytes are written to disk with tthe low byte first - with this trick a 16 bit machine can read 1 byte data without conversion: Decimal 111 Byte 8Bit 0110 1111 Hex Byte 6 F 4 digit hexadecimal 006F PS: On a PC you can switch in some binary editors between Hexadecimal and decimal display it just looks flumbsy but flipping helps a lot in the beginning. I find it much simpler to call the .btl when you open them "maps".
|
|
|
Post by ππ³π°π΅π΄π¬πΊ on Jun 18, 2023 0:13:47 GMT
I find it much simpler to call the .btl when you open them "maps". Ok I cannot understand this argument, but it don't want to go in an discussion, I know it is quite common to call the battle - map. I want to ask you 2 things. 1) As you mod on PC, have you tried to make .btl {maps} out of the save-files ? I believe a hotseat mod must be perfect as battle editor - at least for finetuning. I just have android so I can't access the sav-files without root (I tried to write the save-files on a open place but it was not working), and the two most essential tools (pvr-tools and texturepacker) are not aviable. 2) Does the new WC-unlock.apk contain the 64-bit versions of the game lib.so ? Or let me better ask like this: do you know how to remove the, not really necessary, 64-bit versions: lib and folder arm64-v8a ?
|
|