Results 1 to 18 of 18

Thread: How to change generals' portraits and cards?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to change generals' portraits and cards?

    Here's my issue. I've been playing with RTW mods "Roma Surrectum" and "Terrae Expugnandae" and looking for a way to edit the roman generals portraits that lie in data .pak files. I've downloaded "pak extractor" here like everybody does - http://www.twcenter.net/forums/downl...?do=file&id=43 - and got all the hidden folders, the one with portraits and cards too. So I modified some generals cards but when I start the game my changes have no effect. The portraits are still the same. I've been reading around about that and now I guess that problem is, I have to re-pack the unpacked files with all the changements I made and then replace the older ui_1.pak file. But how do I do that? I can't create a new .pak file, I don't know how to re-pack the edited Data. May somebody help me? Thanks anyway.

  2. #2

    Default Re: How to change generals' portraits and cards?

    The unpacked files are contained inside a packs/data/ui/blablabla folder right?

    Put xpak.exe and the pack.bat files inside your packs folder.
    Create a text file (let's call it ui_1.txt) inside your packs folder.
    The first line should be the name of the pak file you want to create, which means ui_1.pak.
    Then, in each line below the first you list one by one all the files included in your pack, together with their respective paths relative to the packs/ folder.

    So your ui_1.txt should look like this:

    Code:
    ui_1.pak
    data\ui\roman\portraits\portraits\young\generals\000.tga
    data\ui\roman\portraits\portraits\young\generals\001.tga
    [etc etc]
    data\ui\roman\portraits\cards\old\generals\000.tga
    [and so on and so forth, until all files have been listed]
    Now edit pack.bat to read:
    Code:
    xpak.exe -v -pf ui_1.txt
    Then just run the xpak.exe and a new ui-1.pak should be created. Just to be safe, keep the old ui_1.pak somewhere safe until you make sure the new one works.

  3. #3

    Default Re: How to change generals' portraits and cards?

    Quote Originally Posted by Aradan View Post
    The unpacked files are contained inside a packs/data/ui/blablabla folder right?

    Put xpak.exe and the pack.bat files inside your packs folder.
    Create a text file (let's call it ui_1.txt) inside your packs folder.
    The first line should be the name of the pak file you want to create, which means ui_1.pak.
    Then, in each line below the first you list one by one all the files included in your pack, together with their respective paths relative to the packs/ folder.

    So your ui_1.txt should look like this:

    Code:
    ui_1.pak
    data\ui\roman\portraits\portraits\young\generals\000.tga
    data\ui\roman\portraits\portraits\young\generals\001.tga
    [etc etc]
    data\ui\roman\portraits\cards\old\generals\000.tga
    [and so on and so forth, until all files have been listed]
    Now edit pack.bat to read:
    Code:
    xpak.exe -v -pf ui_1.txt
    Then just run the xpak.exe and a new ui-1.pak should be created. Just to be safe, keep the old ui_1.pak somewhere safe until you make sure the new one works.
    Wait a second... should I have to write manually, one by one, little by little, in the .txt all the filenames that lie in the ui_0.pak (that's the pack which portraits and cards lie in, at least for my Terrae Expugnandae mod...)? You mean like this, as I started to:
    "
    ui_0.pak
    DATA\FONTS\FONT_10.CUF
    DATA\FONTS\FONT_14.CUF
    DATA\FONTS\FONT_18.CUF
    DATA\FONTS\SML_FONT_10.CUF
    DATA\FONTS\SML_FONT_14.CUF
    DATA\FONTS\SML_FONT_18.CUF
    DATA\FONTS\TEX_NO_MIP_LIST.txt
    DATA\FONTS\TEX_RAW_DIR

    "
    And so on, as my ui_0 unpacked folders are DATA\FONTS ; DATA\SHADERS ; DATA\UI (the one with cards and portraits).

    By hand it will take years, if I correctly figured out the method... isn't there any other way to get to it? Either can those files be listed without such a tiring effort?
    Last edited by Stella Artica; February 16, 2010 at 06:04 AM.

  4. #4

    Default Re: How to change generals' portraits and cards?

    You can always get a tool that lists all the files in a given directory (there are some around if you search the net), but there's no way RTW will provide that list for you.

  5. #5

    Default Re: How to change generals' portraits and cards?

    Quote Originally Posted by Aradan View Post
    You can always get a tool that lists all the files in a given directory (there are some around if you search the net), but there's no way RTW will provide that list for you.
    Such as "Directory Lister"?

  6. #6

    Default Re: How to change generals' portraits and cards?

    Judging by the name, then yes.

  7. #7

    Default Re: How to change generals' portraits and cards?

    All right, here I am. Done. Now I need to know if I have to get even the folders listed or not.

    For example:

    DATA\UI\EASTERN\
    DATA\UI\EASTERN\PORTRAITS
    DATA\UI\EASTERN\PORTRAITS\
    DATA\UI\EASTERN\PORTRAITS\CARDS
    DATA\UI\EASTERN\PORTRAITS\FAMILY
    DATA\UI\EASTERN\PORTRAITS\PORTRAITS
    DATA\UI\EASTERN\PORTRAITS\CARDS\
    DATA\UI\EASTERN\PORTRAITS\CARDS\DEAD
    DATA\UI\EASTERN\PORTRAITS\CARDS\OLD
    DATA\UI\EASTERN\PORTRAITS\CARDS\YOUNG
    DATA\UI\EASTERN\PORTRAITS\CARDS\DEAD\


    I have to leave them foldernames in the .txt or just the files?
    Last edited by Stella Artica; February 16, 2010 at 07:51 AM.

  8. #8

    Default Re: How to change generals' portraits and cards?

    Just the files.

  9. #9

    Default Re: How to change generals' portraits and cards?

    Quote Originally Posted by Aradan View Post
    Just the files.
    Let's see what I get.

    But can I unpack and repack just the ui_0 file or I have to pack/pack back ui_0 and ui_1 together? I'm asking because pak.extractor reported some "failed to extract" messages while unpacking ui_0. And those failure messages referred to folders and files (like building) out of the ui_1 pack.

  10. #10

    Default Re: How to change generals' portraits and cards?

    Only repack what you have unpacked.

  11. #11
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: How to change generals' portraits and cards?

    Easiest way to list files in a directory is to use the command dir /s /b path\*.* > ui_1.txt, this eliminates the need for any extra third party software. A simple search and replace all (ex. search for c:\temp\ and replace with nothing if your files are in c:\temp\data) will remove the drive/path information and you can add the pak file name as the first line.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  12. #12

    Default Re: How to change generals' portraits and cards?

    Why aren`t you using the fileparser for xpak?
    http://www.twcenter.net/forums/downl...do=file&id=908

  13. #13
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: How to change generals' portraits and cards?

    Because according to its instructions, you'd need to repeat the file selection with each directory, while my method takes a minute tops no matter how many files you have and as I said doesn't require any extra software.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  14. #14

    Default Re: How to change generals' portraits and cards?

    If you use the above, the "/A:-D" parameter will stop folders from being listed.

    Good idea Squid, completely forgot that the console is there to be used.

  15. #15
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: How to change generals' portraits and cards?

    You're right, I'd thought the /s did that, but it only makes it recursive. So the full command to use would be: dir /s /b /a:-d path\*.* > ui_1.txt.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  16. #16

    Default Re: How to change generals' portraits and cards?

    Got it! Now I'm successfully managing to replace portraits I don't like at all. By the way I got the files listed in the ui_0.txt with dirlister, I read just now Squid's advice. Actually it's much faster and easier, don't even need to deal with folders in text. I really owe you people, thanks a lot! I'm now able to edit things of RTW I didn't think I ever could.

    Just a try: is there around any archive of roman characters portraits and cards which I could draw on?

  17. #17

    Default Re: How to change generals' portraits and cards?

    Don't think so, but you could use this: http://www.twcenter.net/forums/showt...65#post3202765
    Last edited by Aradan; February 17, 2010 at 06:22 AM.

  18. #18

    Default Re: How to change generals' portraits and cards?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •