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.

Lord Zedd

.MAP
Fixing Injected Animations

5 posts in this topic

So when you inject a biped, you may wonder why they cannot use vehicles despite having the animations for it. Turns out the modes block should be sorted by stringids in order for the game to "search" for it properly. It is basically the same idea as the Simulation Definition Table.

 

Unfortunately to automate this during injection would be a bit tricky right now, so here is a manual tutorial in the meantime to set you up. There may be other applications to sorting that we don't know about yet besides bipeds using vehicles, so try it out anyway if you are having issues.

 

I don't know about other Hex Editors but Hex Workshop is used for this tutorial. Notepad++ is also used along with its TextFX plugins

1. Inject your tag

 

2. Open up the tag's jmad and scroll down to the Modes block. It looks like this:

pUDK6UT.png

 

3. Right click the first label control (left or right of the stringid textbox itself) and View Value As.

 

4. Copy the file offset at the top to a notepad or something, you'll need it.

 

5. Close the View As popup and click the button to the right of the chunk dropdown to display the block's info.

7s419qr.png

 

6. Copy the Count and Entry Size values to notepad and open up Windows Calculator

 

7. Press Alt+3 to switch the calculator to "Programmer" make sure Dec is checked on the left and multiply the Count by the Entry Size. Check Hex to the left to convert the result to a hex value and copy that down. This is your length. Afterward switch back to Dec and enter the Entry Size value and convert that to hex.

 

8. Close Assembly and open your map in a hex editor. Jump to the file offset from before and from there select the length you just got a second ago via Edit>Select Block (Hex Checked)

8dyoj7L.png

 

9. Copy and paste the selection to a new document and scale the columns via the center divider so the number of columns is the same as the hex converted entry size (minus 1 more because it is counting from 0). It doesn't matter if it goes off the screen. The data should align quite nicely with the correct number of columns (see below)

 

10. Go to File>Export and save as a Hex String .txt like this

5pa4WvB.png

 

11. Open the resulting text file in Notepad++, and it should be formatted properly with the right number of columns.

SjPHpIP.png

 

12. Hold Alt and select the first 4 bytes in each row, like this:

ynHiyOm.png

 

13. Go to the following option in the menu bar: (Sort Lines Case Insensitive) and select it. This will sort the rows by stringid

Oen9Qu9.png

 

14. Select everything and go back in the hex editor and Edit>Paste Special with this setup: (Make sure that bottom option is checked)

igrWtj7.png

 

15. After pasting select everything and verify all the bytes copied over and the length is the same, then copy the selection and paste it right over your selection in the map tab. Save and you are all set!

 

 

EDIT: Repeat this tutorial for any sub-blocks like "Weapon Class" and "Weapon Type" if you are having issues with weapons or anything else. Weapon animations would be under "combat".

It turns out everything *should* be sorted :(, but unless you are having issues don't worry too much.

Share this post


Link to post
Share on other sites

Clarified some things that I wasn't aware weren't default things in Notepad++ and Hex Workshop.

Share this post


Link to post
Share on other sites