Map Hacking?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Map Hacking?

Post by Jagged »

How easy is it to hack a map?

I am currently working on a campaign map (of Gardmore Abbey as it happens) and I have gone quite a way in its production. But for some reason when I started I gave the background a grass texture. Don't know why I did that, because I really don't like "endless" maps. I usually make the background black and apply a base text square.

So how easy would it be to change the background to black, draw a big textured rectangle, then hack the map to move the rectangle to the back?

I've been thinking for a while, it would be nice to have a drawing window that allowed you to examine, move and delete drawn map elements. Possibly something for 1.4.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Map Hacking?

Post by aliasmask »

Changing the background is easy. Drawing on the background a textured square when you have other drawings on the background is what I'm assuming your problem is.

You probably can hack the map depending on how the drawn images stack. It could be the order in which they are drawn and appear in the xml file or the xml could have a z-order for the drawing. Changing the number of the z-order would do the trick or changing the order in which the drawings appear. I would experiment with a new campaign to find out.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Map Hacking?

Post by Jagged »

It took a couple of goes but I managed to do it. In case anyone else is interested the steps were:
  • I changed the background colour to black, exported a "Before" map
  • Drew the background square and exported an "After" map
  • Opened both rpmap files using 7-Zip and extracted the context.xml files
  • Opened both context.xml files in Notepad++ with synchronized scrolling (so useful that feature ;) )
  • Found the backgroundDrawables linked list section.
  • Found the DrawnElement entry that was in the "After" but not in the "Before" and moved it to be the first entry in the backgroundDrawables linked list
  • At the end of the context.xml there is an "assetMap" section with a list of MD5Key references. In each line that referenced backgroundDrawables I increased the array reference by 1 i.e. changed "[3]" to "[4]"
  • Then replaced the context.xml in the "After" map with the new one. Job Done!
Very pleased :)

Post Reply

Return to “MapTool”