Duke4.net Forums: Merging Maphacks with Map? - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Merging Maphacks with Map?

#1

This may be a dumb question, but is it possible to merge the changes of a maphack file directly into a map? I only wish to do this, because if I understand correctly, maphacks will check the checksum of a mapfile and make sure the version is the same. This means if I edit a map, then the maphack won't work. However, If I were to first merge the maphack with the .map file, then I could edit it freely...
0

User is offline   NightFright 

  • The Truth is in here

#2

I have never seen this before, so I doubt it can be done. What you can do is to pack the map and hack file into the same archive, I guess.
0

#3

View PostNightFright, on 07 September 2020 - 11:04 AM, said:

I have never seen this before, so I doubt it can be done. What you can do is to pack the map and hack file into the same archive, I guess.


But if I modify the map and save it, will the maphack still work?
0

User is offline   NightFright 

  • The Truth is in here

#4

That depends on what you change. If you add or remove sprites for which maphacks are written, for example. If you bind a maphack to a certain map checksum, it will always need to be updated to include the most recent md5 checksum of the map. At least that's how I understand the system.
0

#5

View PostNightFright, on 07 September 2020 - 12:47 PM, said:

That depends on what you change. If you add or remove sprites for which maphacks are written, for example. If you bind a maphack to a certain map checksum, it will always need to be updated to include the most recent md5 checksum of the map. At least that's how I understand the system.


To be more specific, I was merely going to add pig cop tanks to 'Duke it out in DC', because I really feel they fit with that episode more than they do in 'The Birth'. I guess I can accomplish this through the map hacks themselves, right? If I edit the map by adding those sprites, it will probably break maphack compatibility unless I am mistaken...
0

User is offline   LeoD 

  • Duke4.net topic/3513

#6

View PostLightning_Hunter, on 07 September 2020 - 10:21 AM, said:

This may be a dumb question, but is it possible to merge the changes of a maphack file directly into a map?
No. This would require some m32 scripting for Mapster32 or a dedicated program. Furthermore, pitch and roll commands can't be saved at all in the current map format AFAIK. From a maphacker's view this isn't desirable anyway because it would be harder to keep track... 'Officially' updated maps, e.g. those from a Steam game like Iron Fury, probably are a different cup of tea in this regard.

View PostLightning_Hunter, on 07 September 2020 - 02:34 PM, said:

To be more specific, I was merely going to add pig cop tanks to 'Duke it out in DC', because I really feel they fit with that episode more than they do in 'The Birth'. I guess I can accomplish this through the map hacks themselves, right?
No, you can't. Maphacks will only affect the visual representation of the sprites by the renderer. They can not be added or deleted, nor have their actual properties altered.

View PostLightning_Hunter, on 07 September 2020 - 02:34 PM, said:

If I edit the map by adding those sprites, it will probably break maphack compatibility unless I am mistaken...
If all you do is add new sprites and leave the others unchanged, the new ones will have higher sprite numbers, and a pre-existing maphack file will still work. The MD5 sum will change, of course.
If a maphack file is located at the same place as the map file, and has the same basename, it will be used and thereby override any maphack file defined elsewhere -> no MD5 needed -> good for private use or development purposes.
If you want to publish your modified map, you could of course add a working mhk file to the ZIP. But then it would be cut off from any further improvements (some voxel stuff going on these days, for example...).
Better: leave a note from which map version (MD5 hash) you started editing (1997 or Megaton), then your map's MD5 can be added to the official DEF hierarchy, and it will be recognised from the next UserMapHack release on.

This post has been edited by LeoD: 08 September 2020 - 02:14 PM

1

#7

View PostLeoD, on 08 September 2020 - 02:12 PM, said:

No. This would require some m32 scripting for Mapster32 or a dedicated program. Furthermore, pitch and roll commands can't be saved at all in the current map format AFAIK. From a maphacker's view this isn't desirable anyway because it would be harder to keep track... 'Officially' updated maps, e.g. those from a Steam game like Iron Fury, probably are a different cup of tea in this regard.

No, you can't. Maphacks will only affect the visual representation of the sprites by the renderer. They can not be added or deleted, nor have their actual properties altered.

If all you do is add new sprites and leave the others unchanged, the new ones will have higher sprite numbers, and a pre-existing maphack file will still work. The MD5 sum will change, of course.
If a maphack file is located at the same place as the map file, and has the same basename, it will be used and thereby override any maphack file defined elsewhere -> no MD5 needed -> good for private use or development purposes.
If you want to publish your modified map, you could of course add a working mhk file to the ZIP. But then it would be cut off from any further improvements (some voxel stuff going on these days, for example...).
Better: leave a note from which map version (MD5 hash) you started editing (1997 or Megaton), then your map's MD5 can be added to the official DEF hierarchy, and it will be recognised from the next UserMapHack release on.


Thanks, LeoD. Much of what you said I managed to figure out on my own, such as sprite numbers staying the same if I simply add new sprites without modifying the old ones. However, I did not even realize I could just remove the need for an MD5 check altogether for my own purposes. Of course, releasing it would not be practical if someone out there also wanted pig cop tanks in Duke it out in DC; I would probably need to include the modded maps with updated maphack files with an md5 check. I personally always felt those pig cop tanks are too cramped in many of the episode 4 maps, but Duke it out in DC has massive open spaces perfect for these tanks...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options