Results 1 to 4 of 4

Thread: How do Weapon Graphics Work??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Second-hand chariot salesman Senior Member macsen rufus's Avatar
    Join Date
    Dec 2004
    Location
    Ratae Corieltauvorum
    Posts
    2,481

    Default Re: How do Weapon Graphics Work??

    I'm back with the next installment

    First off, to get the weapon and shield editing to actually work, you need ReadBIF 23c which is available on Mediafire

    I'll run you through the basics, because it's not very intuitive until you know....

    Sticking with our example of MuwahidFoot I'll take you as far as changing a weapon setting. First off, use ReadBIF 23c to open up Textures/Men/Burnous.BIF (remember NOT the _H version).

    This is where the ActionPage comes in - on the top of the ReadBIF control panel select 'Special' >> 'Load anime rect' then navigate to /Textures/Men/ActionPages/MuwahidFoot.txt, which is the file that tells the game where to get the images from within the BIF. If you get this right, you should see this:

    Click image for larger version. 

Name:	ReadBIF_tut01.jpg 
Views:	213 
Size:	156.3 KB 
ID:	25416

    The rectangles highlight all the images used by the unit. Don't worry if some seem unused, they will be for other units with different actions (eg swordsmen instead of spearmen). Note that various numbers are posted on each rectangle, they identify each sequence and run through all 12 frames. The little red spot in each seq is the unit origin I referred to above.

    Next click on 'Sort anime seq into actions'; a box will open with the relevant actions shown. As we've been using 'Stand' for our example, I'll stick with that for now, so left click on Stand in the list. This will show four views of Frame 1 of standing still.

    Click image for larger version. 

Name:	ReadBIF_tut02.jpg 
Views:	203 
Size:	152.2 KB 
ID:	25417

    Click on the 'Seq 8' thumbnail, and increase the zoom: once you reach 1:7 then the pixel grid comes up. This can be useful later, and you really need the zoom to see what's what. You should now have this image:

    Click image for larger version. 

Name:	ReadBIF_tut03.jpg 
Views:	199 
Size:	312.7 KB 
ID:	25418

    You are now able to load weapon and shield data from the existing files. Next right click on 'stand' and see the drop down menu which comes up:

    Click image for larger version. 

Name:	ReadBIF_tut04.jpg 
Views:	189 
Size:	181.6 KB 
ID:	25419

    You can either load ALL the data for every action and seq, or just the one you're on. For now we'll just load the one - click on 'Load weapon' and then navigate to Textures/Men/Items/Weapon6/MuwahidFoot/Stand.txt

    Click image for larger version. 

Name:	ReadBIF_tut05.jpg 
Views:	202 
Size:	237.1 KB 
ID:	25420

    You need to look carefully at this, but I have selected 'extend weapon' so the whole spear is shown. Note the red and yellow dots in the spear - these are the coordinates which define its position in the seq. From the post above you might recognize that the first entry -3 -25 -3 -5 0 has been reflected in the boxes beside the image, with the zero being translated as 'Draw item first', ie on the far side of the man.

    However this isn't an ideal image, so we are going to turn the chap around a bit to look at him from the front. To do this, left click on the Seq 11 thumbnail, and he'll now look like this:

    Click image for larger version. 

Name:	ReadBIF_tut06.jpg 
Views:	200 
Size:	231.9 KB 
ID:	25421

    Notice the data in the boxes on the right has changed, matching the coordinates of the last section of the Stand.txt file: 9 -21 10 0 1 with the 1 at the end signifying that the item is now drawn after the man.

    The next thing to explain is the coordinates. As I mentioned above, these give the relative positions of the 'back' of the weapon (the yellow spot) and the 'front' of the weapon (the red spot) in pixels away from the origin. If you untick the 'extend weapon' box, the length between the two spots is all that will show - which is fine for swords, but spears are better visualized when they are extended for obvious reasons. The x coordinates are straightforward in that negative values are to the left of the origin, and positive values to the right. The y coordinates are a little confusing in that negative values are above the origin, and positive values below.

    So now we can have a bit of fun, and waggle the spear a bit. I've changed the figure 10 in the third box to a 7. As this reduces the value the bottom of the spear will move to the left by three pixels.

    Click image for larger version. 

Name:	ReadBIF_tut07.jpg 
Views:	192 
Size:	231.4 KB 
ID:	25422

    And of course the top moves to the right because the other point is unmoved and the whole thing will pivot. All that remains is to save the changes, and we do that by right clicking on 'stand' again and selecting 'Save weapon' from the drop down menu. This will replace the previous ..Weapon6/MuwahidFoot/Stand.txt file. If we open this with Notepad we can see the change:

    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    -3 -25 -3 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    4 -25 4 -5 0
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -23 9 -3 1
    9 -21 7 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    9 -21 10 0 1
    With that we have successfully altered ONE frame of twelve, for one sequence out of four, for ONE action. You can run the ReadBIF timer whilst you're in this editing view so you can check for smoothness of movement. If we were to do this now, the result would show the spear twitching once every twelve frames though only in that one angle of view.

    BUT it does give you all you really need to know to do more, though it can get tedious doing a whole unit. The shields are fundamentally the same except that you have four corners to fix for each frame/seq/action combination. Of course, you will remember to back up any files you intend to alter
    Last edited by macsen rufus; 04-27-2022 at 22:30.
    ANCIENT: TW

    A mod for Medieval:TW (with VI)

    Discussion forum thread

    Download A Game of Thrones Mod v1.4

    Member thankful for this post:

    Ludens 


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO