Nadeo Merchandise

KK2 RESULTS

Winner of Kackiest Kacky 2: Plastorex

OTHER STATISTICS

Kackiest Kacky III: The Final Chapter

ABOUT THE COMPETITION

Team #mot & Team Sky joined forces for the third and very last edition of the "Kackiest Kacky" TMNF competition. As the previous two events, it will last for one month starting on the 21st November. The goal is basically to finish incredibly lucky challenges and exploit some bugs. Our team of roughly 25 builders gave their best to deliver the highest quality of creative luck maps. Every player has a chance to win since skill isn't really the main focus of this competition.

GENERAL INFORMATION

Server: tmtp://#join=sky_war

Duration: 21.11.2018 - 23.12.2018

Maps: Kackiest Kacky #151 - #200

Style: 99% Luck

Difficulty: Somewhere between Chuck Norris & Asian

RANKING

The rules are quite simple: The goal is to finish as many maps as possible. There's a total of 51 maps which will be played for 1 month and every finished map will grant 1 point. The server rank (or the time driven on the tracks) only matters in the case of same number of finishes between two or more players. At the end of the event, the results will be announced on TMX Forums, as well as #mot/sky discord servers and our homepage.

Use the /toprecs command on the server to check your current score !

PRIZEPOOL

This event is sponsored by Nadeo ! The luckiest 3 players will win exclusive Nadeo merchandise. The other copper prizes will get announced at the beginning of the event !

If you like our events and wish to support us, just donate some coppers directly on the server. Please tell Nicklander that you have donated so he can add you to the list. If you wish to contribute in an other way, just contact him as well. Thanks in advance for your support and participation guys, it means a lot !

Sadly this will be our last edition of Kackiest Kacky. We had a lot of fun organizing those contest for you. Aftermovie videos of all three contests are in the makings. Team Sky, Team #mot & friends wish you the most painful Christmastime Trackmania has ever seen !

ADDITIONAL INFORMATION

There are 17 unknown bytes on the 4th line (from 0x41 to 0x51). I think those values are used for advanced scripting (boot camp training ?).

The last 3 bytes are unknown/useless as well, they are probably a placeholder for last-minute additions when the developpers made the game.

If you find any other values for those bytes or if you discover a new meaning of a byte then please share it with us in this thread !!!HUGE THANKS to Valera & Mikhail who found out all those informations !

In this tutorial I will show you how to use the HoW Archive Editor to add new objects to the MAD/MTD files. I recommend everyone going thru this tutorial and try to reproduce my steps to learn how it works.

First of all, you can place all of the objects that are mentionned in the MAD/MTD files without any problems on the map. You simply need to modify the POG file a bit (check the POG tutorial for more info). But what if you want to add an object that is not initially used in that level ? If you try to place an object in your level that is not mentionned in the MAD/MTD files it will either simply not appear or have some weird textures or even no textures at all. Our goal is to add a heavy artillery in the DESVAL (Mission 18: I Spy). Of course in the original mission this map does not contain a heavy artillery, but we want to add it anyway.

Without editing the MAD/MTD

1.) First you need to modify the DESVAL.POG and add a heavy artillery on the map. You can also just download my DESVAL.POG (look my second post in this thread). Then go to your HogsOfWar\Maps folder and copy the GUNS.MAD, guns.mtd, DESVAL.MAD, desval.mtd files. Create a folder "extracted" somewhere, create two other folders inside "GUNS" and "DESVAL". Move the 2 guns files in the GUNS folder and the desval files in the DESVAL folder.

3.) Go in your GUNS folder, you will find a MAD and a mtd folder there containing all the extracted files. In the MAD folder, copy the 3 files BIG_GUN.FAC, BIG_GUN.NO2, BIG_GUN.VTX. Now go back to your DESVAL folder and paste the 3 files in the MAD folder there.

4.) Do the same thing with the mtd files. Go in the GUNS folder, go in the mtd folder, you will find 16 files called BIGN000.TIM to BIGN016.TIM. Copy them all and paste them into the DESVAL mtd folder.

5.) Now that you have moved all the files in their correct position you need to modify the log.ini files. Go to the GUNS folder and then in the MAD folder. Scroll thru the files and you will find a file called "log.ini". Open it with Notepad++. In this file you need to search the 3 BIG_GUN files you moved before. Select the 3 lines, now in Notepad++ go to Edit ==> Paste Special ==> Copy Binary Content.

Now switch to the DESVAL folder, in the MAD folder. You will find there a log.ini as well. Open it in Notepad++. Now you need to paste the binary content at the end of the file, directly after the last object "Grass2". After the "NUL" signs you will see 2 numbers. The first number is the offset, the second number is the size. You have to change to offset so that it fits in the archive correcty. The formula is: "last_object_offset + last_object_size = new_object_offset". 78732+600=79332, 79332+1280=80612, 80612+2560=83172. After you have modified the offsets correctly, save and close the log.ini file.

6.) Now you need to do the same thing with the mtd files. Go in the GUNS>mtd folder, open log.ini. It can be a bit tricky to find all the texture files, you can open them with the TIMViewer and take a look at them. You can also figure out all the textures of an object with the .FAC file (explained later in this tutorial).

There are a lot of files. All the files called BIGNxxx.TIM are the textures of the heavy artillery. The files surrounded by yellow are already inside the DESVAL mtd so you don't need to copy them. The files surrounded by red are missing, you need to copy them: Edit ==> Paste Special ==> Copy Binary Content.

Now go in DESVAL>mtd, open log.ini and paste the binary content at the end of the file again. Now you need to edit the offset values again with the same formula: "last_object_offset + last_object_size = new_object_offset". After that, save and close the file.

7.) Now there is one last thing to do that is a bit time consuming, you need to remap the textures to the object. If you try to open the game at the moment, the heavy artillery will be there, but the textures will be completely messed up. So now you need to fix the textures. Open GUNS>mtd>log.ini again, and scroll down to find the NEW textures that were missing. You need to take note of the line-numbers of those textures.

Now you need to replace all the values like you have written it in your conversion table. 1 Byte is represented by 2 digits in HEX-Editor MX. The .FAC format will help you to count the bytes, but don't worry, you will figure out a pattern after a while so you don't need to count them all.

Replace the values by that pattern, the first 4 values are the triangle textures, they are right under each other and very easy to find. To find the next quadrilateral-byte, move 4 bytes to the left and 2 bytes down every time. On the picture, the value 2C (in blue) isnt replaced yet, in that case you would need to write 91 instead. It can take a while until you have replaced all the values of the file...

There is also an easier way to modify all the values. You could use the "Search & Replace" feature by Hex-Editor MX. However there is some danger, it could potentially replace wrong values ! For example, maybe there is another value "2A 00 00 00" in the file that is NOT a texture ID ? In that case, it would screw up your whole file. So be careful !

Oh and by the way, if you find a value that is not part of your conversion table (not between 2A and 35 in this example) then it means that you forgot a texture ! You can also do it the other way around, first open the .FAC file and search all the texture IDs, this way you won't forget any textures !

When you have edited all the values, safe your file and close the Hex-Editor.

9.) Finally you can repack the files again ! Open the Hogs of War Archive Editor. This time choose "Open Ini" and then click on "Pack". Don't change the path when you repack the files, otherwise the tool crashes !

Now check the DESVAL>MAD and DESVAL>mtd folder. You will find there a packed DESVAL.MAD and desval.mtd file. Copy those files and paste them in your HogsofWar > maps folder (replace or backup the old MAD/mtd files).

10.) You can start your game, launch the mission and see the result !

I placed the heavy artillery a bit too low in this picture btw. You can repeat this method to add all the objects to a level you want. If you have any questions, write them down in this thread.

POG FORMAT STRUCTURE EXPLAINED

The first two bytes of the POG files contains the number of objects in the mission. Then in all the following bytes these objects are described.

In this example I show the object HV_ME (it's a pig), but my findings will work on any object. The data size of all the objects is exactly the same (94 bytes) you can edit each of them and manipulate how the objects behave in the game in some way.

Images

How to modify POG files

You need the PC version, do NOT install your game it in C:/Programm Files, I recommand C:/Hogs of War

You need to download 2 programms (search it on google)

Hex-Editor MX

Notepad++

Backup the whole map folder in your hogs of war directory (and also any other files you want to modify)

In the map folder you will find all the maps you can edit, the first mission is called "ESTU.POG" (here is a complete list)

Open ESTU.POG in Notepad++

If you want to remove one object on a map, you need to erase the WHOLE block from the object name until the next object name ! (see screenshot)

You can add an object in the exact same way, you need to copy & paste the WHOLE object block. It doesn't really matter where you paste it, but it shouldn't be at the very beginning, nor at the very end, just paste it right infront of another object block. In Notepad++ there are special
functions to copy the binary content, if you use regular copy/paste it won't work, you need to use: Edit --> Paste
Special --> Copy/Paste Binary Content

You must not add spaces/return or any additional charakters to the file, otherwise it will crash. You litterally can only copy & paste
content from various map files.

Once you have pasted the desired objects into your POG file you can edit the objects themself. To do
this, you have to open the file in the Hex-Editor MX.

The file is now shown in hexadecimal format, each pair represents one value that has a meaning in the game. Now the struggle starts, you basically need to find out what the meaning of all those pairs is and what other values the pairs can accept. You can do that by manipulating the values and check if it changes something ingame or you could also check the other mission files and see if other values are used there (or if similar values are used in the same spots).

You don't have to do all of the work, you will find a nearly complete list below. However, in case you figure out new values, please share them with me !

LEVEL SELECTION

If you want to switch between the levels quickly and test them out without hex-editing the savegames everytime, you can download my savegame.

The savegame contains 1 Hero and 99 promotion points, on top of that you can choose the level freely "NAUGHTY PIGS" cheat.

There is a restriction on this forum about files you can add as attachments. After you downloaded the file, you need to completely remove the ".xyz" extension and move the file in your Hogs Of War directory then you can open it ingame.