Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
Zone

.MAP
Manually Expanding Tables/Dataref's

1 post in this topic

Needed Items:

Drop your map in the folder with mapexpand.exe than shift right click and hit "open command window here" type in the code:

mapexpand.exe <.map file name>.map <number of 0x10000 byte pages to inject>

1 - 0x10000 bytes 
2 - 0x20000 bytes ect...
0x10000 bytes should be more than enough for filling out a dataref. 

So for me:

mapexpand.exe forge_world.map 1

Once it's done note the memory offset 
NOTE THAT THIS IMAGE IS OLD AND IS TO DEMONSTRATE WHAT YOU NEED TO LOOK FOR
Tutorialpart1_zpsdb3f8441.png
The memory offset is in red
As I stated above the memory offset in the image isnt my actual memory offset, I really have the memory offset 0xBE0A0000


Open the map in Assembly and navigate to the dataref you want expanded right click on function or anywhere next to it and click "View Value As" note it's file offset:

QoCu6im.png

fntLF0Z.jpg

For What I'm doing, I'll be giving flashlight_sg a brightness function of the data_core. But, you'll notice the flashlight_sg has a table length that is 32 bytes, and the data_core's is 52 bytes, and on top of that you can't edit length or offset in Assembly. Once you grabbed the file offset close the map and open the map in a hex editor, i'll be using hex workshop. 

Do a search for your file offset you noted eariler by hitting "ctrl-g", or whatever your goto shortcut is, make sure hex is ticked and search make sure to remove the 0x

Where ever it drops you off at the first 4 bytes are the length of the dataref, than it's 8 bytes of padding, than a 4 byte memory offset, than after that (not pictured) are 4 more padding bytes.
IXw4E1G.png

Look at the picture you'll see that for the length of this dataref is 32 (20 converted from base 16 to base 10) (Note that it's from right to left)

So what I want to do it make this dateref 52 bytes long, so what you do is convert the length you want from base 10 to base 16, so for me 52 will be 34 in base 16. 
How to convert:

First, open calculator. click view and pick Programmer.

28c599a0-f94c-4895-8e2c-63aaaabe5c00_zps

tick Dec, type in the length you want for me again it's 52. Than tick Hex, that is your base 16 number (mine is 34).

Now in your hex editor replace the old length with your new length (in base 16)

After:

h9QDoJ4.jpg

Now time to replace the offset. Using the memory offset you noted from mapexpand (in red). Replace the memory offset after the 8 bytes of padding:

mwPeSrZ.jpg

 

2hNCzaE.jpg

Save. 

 

Open Assembly navigate to you dataref you'll see it should be filled out now just add your new bytes.

 

Flashlight_sg with data_core brightness function:

https://www.youtube.com/watch?v=XO0fktNrVrU

Edited by Lehvak

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0