Page 1 of 4 1234 LastLast
Results 1 to 20 of 68

Thread: Stupid (supertexture tool)

  1. #1

    Default Stupid (supertexture tool)

    (Reposted from http://www.twcenter.net/forums/showt...08#post8747908)

    Attached is a zip file containing stupid.exe. Stupid is a windows console application for editing total war supertextures. It supports the formats used in Empire: Total War, Napoleon: Total War and Total War: Shogun 2.

    Usage:

    stupid preview <path to supertexture> <path to extracted preview bitmaps>
    (i.e. stupid preview "C:\Program Files\Steam\SteamApps\common\empire total war\data\supertexture.pack\world_" empire_preview)
    Empire & Napoleon: Writes two bitmaps - a colour map (filename.bmp) and an alpha map (filename.alpha.bmp) which provide a minified view of the supertexture. Also writes some basic information about the supertexture to the console. The alpha map defines where water is.
    Shogun 2: Writes two bitmaps - a colour map (filename.bmp) and a normal map (filename.normal.bmp) which provide a minified view of the supertexture. Also writes some basic information about the supertexture to the console.

    stupid extract <path to supertexture> <path to extracted bitmaps> <x position of first tile to extract> <y position of first tile to extract> <width in tiles of the extracted section> <height in tiles of the extracted section>
    (i.e. stupid extract "C:\Program Files\Steam\SteamApps\common\napoleon total war\data\campaign_maps\nap_europe\display\Supertexture\supertexture" nap_europe_tile 8 8 16 16)
    Empire & Napoleon: Writes two bitmaps - a colour bitmap (filename.bmp) and an alpha map (filename.alpha.bmp) which contain a subsection of the full resolution supertexture. The alpha map defines where water is. You could use this to extract the entire supertexture at once, but be aware that for the Empire supertexture this would be a 6GB colour map and 2GB alpha map!
    Shogun 2: Writes two bitmaps - a colour bitmap (filename.bmp) and a normal map (filename.normal.bmp) which contain a subsection of the full resolution supertexture.

    stupid pack <path to source supertexture> <path to replacement section bitmaps> <path to destination supertexture> <x position of first tile to replace> <y position of first tile to replace>
    (i.e. stupid pack "C:\Program Files\Steam\SteamApps\common\empire total war\data\supertexture.pack\world_" empire_tile new_supertexture.pack/world_ 58 8)
    All: Creates a new supertexture (either in a packfile or as a .stpi plus a .stpd file) by combining the source supertexture with the replacment bitmaps. This can take a long time (during testing I packed with a 8k by 8k replacement block and packing took 20-30 minutes)! Do not assume the tool has failed unless the progress bar has not ticked for at least ten minutes.

    stupid create-empire <width> <height> <path to destination supertexture>
    (i.e. stupid create-empire 32768 16384 "C:\Program Files\Steam\SteamApps\common\empire total war\data\world_")
    Creates a new blank supertexture of the specified size in the Empire: Total War format. Width and height must be powers of 2 no less than 512. This functionality is completely untested.

    stupid create-napoleon <width> <height> <path to destination supertexture>
    (i.e. stupid create-napoleon 32768 16384 "C:\Program Files\Steam\SteamApps\common\napoleon total war\data\new_supertexture.pack\campaign_maps\nap_europe\display\Supertexture\supertexture")
    Creates a new blank supertexture of the specified size in the Napoleon: Total War format. Width and height must be powers of 2 no less than 512. This functionality is completely untested.

    stupid create-shogun-2 <width> <height> <path to source palette bitmap> <path to destination supertexture>
    (i.e. stupid create-shogun-2 32768 16384 palette.bmp "C:\Program Files\Steam\SteamApps\common\total war shogun 2\data\new_supertexture.pack\campaign_maps\sho_japan\display\supertexture\supertexture")
    Creates a new blank supertexture of the specified size in the Total War: Shogun 2 format. Width and height must be powers of 2 no less than 512. The palette bitmap must be a 24-bit bitmap with width of 1 pixel and height of 256 pixels containing the palette of colours to be used for the parchment map. Due to the nature of the compression used in the supertexture the palette should form as smooth a gradient as possible.

    Empire & Napoleon: All extracted and replaced bitmaps must have length and width which is a multiple of 512. All colour maps must be 24 bit bmp files. All alpha maps must be uncompressed 8 bit bmp files. Alpha maps use the palette index as the opacity value, not the palette colour, so the palette must not be reordered.
    Shogun 2: All extracted and replaced bitmaps must have length and width which is a multiple of 512. All colour maps must be 8 bit bmp files with palette sorted so similar colours are adjacent.

    This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/; or, (b) send a letter to Creative Commons, 171 2nd Street, Suite 300, San Francisco, California, 94105, USA.

    Uses Boost.Array, Copyright (C) 2001-2004 Nicolai M. Josuttis
    Uses Boost.LexicalCast, Copyright Kevlin Henney, 2000-2005. Copyright Alexander Nasonov, 2006-2007.
    Uses Boost.Filesystem, (C) Copyright Beman Dawes, 2002-2005
    Uses Boost.Integer, Copyright (C) 2001 -2009 Beman Dawes, Daryle Walker, Gennaro Prota, John Maddock
    Uses Boost.Ref, Copyright (C) 1999, 2000 Jaakko Järvi, Copyright (C) 2001, 2002 Peter Dimov, Copyright (C) 2002 David Abrahams
    Uses Boost.SmartPointers, Copyright 1999 Greg Colvin and Beman Dawes. Copyright 2002 Darin Adler.
    Uses Boost.Thread, Copyright (C) 2007 -8 Anthony Williams
    Uses Boost.Noncopyable, (C) Copyright Beman Dawes 1999-2003.
    Uses Boost.Unordered, Copyright (C) 2003, 2004 Jeremy B. Maitin-Shepard Copyright (C) 2005-2008 Daniel James
    (all http://www.boost.org/)
    Uses libsquish, Copyright (C) 2006 Simon Brown
    (http://code.google.com/p/libsquish/)
    Uses zlib, Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
    (http://www.zlib.net/)

    Attached are the colour map and alpha map produced by previewing the empire supertexture, plus an example of a modifed supertexture in-game. Excuse the poor quality of the example - I am not an artist!
    Attached Files Attached Files
    Last edited by crux3D; August 07, 2015 at 06:49 PM. Reason: Re-uploaded stupid.

  2. #2

    Default Re: Stupid (supertexture tool)

    (From original thread)
    Quote Originally Posted by husserlTW View Post
    Only stupid preview seems to work for me, neither stupid extract, nor stupid pack...
    Quote Originally Posted by Fortes View Post
    I'm having the same problem.
    Can you post the full command you're using, plus a description of what happens please?

  3. #3
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Stupid (supertexture tool)

    I said it before and ill say it again! Awesome.

  4. #4

    Default Re: Stupid (supertexture tool)

    I've tried all possible combinations (I've tried only Empire) and I received either a CTD or the help text with commands and parameters. It is not so clear for me the extract procedure:

    stupid extract <path to supertexture> <path to extracted bitmaps> <x position of first tile to extract> <y position of first tile to extract> <width in tiles of the extracted section> <height in tiles of the extracted section>
    (i.e. stupid extract "C:\Program Files\Steam\SteamApps\common\napoleon total war\data\campaign_maps\nap_europe\display\Supertexture\supertexture" nap_europe_tile 8 8 16 16)
    but in your example I cannot see the <path to extracted bitmaps> (unless if it is nap_europe_tile). Anyway as I said I tried all combinations with or without path, etc. with no lack, I even copied your example. Can you post a certain example for Empire please?

    Also wouldn't it be easier to have the files in a certain folder and open a cmd there entering only the file names instead of these big line paths? Stupid preview works fine in this way at least.




  5. #5

    Default Re: Stupid (supertexture tool)

    Here is the result of 'stupid extract' and 'stupid pack'.

    As you can see in the second image the 'stupid extract' is extracting only 256MB and not 8GB.
    Last edited by ForteS; January 08, 2011 at 11:19 AM.

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  6. #6
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Stupid (supertexture tool)

    try this.
    put stupid and the converting files into a folder, right cntrl, shift + right click open cmd window here

    then the usage

    stupid extact supertexture map 0 0 32 32

  7. #7

    Default Re: Stupid (supertexture tool)

    Quote Originally Posted by husserlTW View Post
    I've tried all possible combinations (I've tried only Empire) and I received either a CTD or the help text with commands and parameters. It is not so clear for me the extract procedure:

    but in your example I cannot see the <path to extracted bitmaps> (unless if it is nap_europe_tile). Anyway as I said I tried all combinations with or without path, etc. with no lack, I even copied your example. Can you post a certain example for Empire please?

    Also wouldn't it be easier to have the files in a certain folder and open a cmd there entering only the file names instead of these big line paths? Stupid preview works fine in this way at least.
    nap_europe_tile is indeed the path in that example (creating files nap_europe_tile.bmp and nap_europe_tile.alpha.bmp). And of course, you can copy the supertexture files into the local folder if you wish. I posted examples with full paths to try to be clearer about which files were expected as input.

    For empire, try:
    stupid extract "C:\Program Files\Steam\SteamApps\common\empire total war\data\supertexture.pack\world_" empire_tile 56 8 16 16
    This will extract an 8k by 8k chunk of europe into empire_tile.bmp and empire_tile.alpha.bmp.
    Alternatively copy the supertexture pack into the local directory and use:
    stupid extract supertexture.pack/world_ empire_tile 56 8 16 16

    Quote Originally Posted by Fortes View Post
    Here is the result of 'stupid extract' and 'stupid pack'.

    As you can see in the second image the 'stupid extract' is extracting only 256MB and not 8GB.
    You're specifying to extract a 16 by 16 tile chunk (8k by 8k pixels), not the whole supertexture. To extract the whole supertexture (for empire) you would pass the last four parameters as 0 0 128 64 (start at tile 0 on x and y and extract a chunk 128 tiles wide and 64 tiles high).

    Unfortunately, while for the Napoleon europe map chunk 8 8 16 16 contains lots of colour data for the Empire map it's an empty chunk to the left of America, hence the empty images. Try the commands specified above in my reply to husserlTW.

  8. #8

    Default Re: Stupid (supertexture tool)

    Quote Originally Posted by crux3D View Post
    You're specifying to extract a 16 by 16 tile chunk (8k by 8k pixels), not the whole supertexture. To extract the whole supertexture (for empire) you would pass the last four parameters as 0 0 128 64 (start at tile 0 on x and y and extract a chunk 128 tiles wide and 64 tiles high).

    Unfortunately, while for the Napoleon europe map chunk 8 8 16 16 contains lots of colour data for the Empire map it's an empty chunk to the left of America, hence the empty images. Try the commands specified above in my reply to husserlTW.
    Thanks, it works.
    What about 'stupid pack'?

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  9. #9

    Default Re: Stupid (supertexture tool)

    More than clear, it works fine. Very good job, +rep from too!




  10. #10

    Default Re: Stupid (supertexture tool)

    Quote Originally Posted by Fortes View Post
    Thanks, it works.
    What about 'stupid pack'?
    The pack command takes the original supertexture path, the extracted (and probably edited) bitmaps path, the path to write the result to and the start x and y tile coordinates that the bitmaps were extracted with (to control where in the supertexture the edited bitmaps are placed). So, if your extract command is:
    stupid extract <foo> <bar> <baz> <qux> <quux> <quuux>
    (where for the examples given above
    <foo> is "C:\Program Files\Steam\SteamApps\common\empire total war\data\supertexture.pack\world_" or supertexture.pack/world_
    <bar> is empire_tile
    <baz> is 56
    <qux> is 8
    <quux> is 16
    <quuux> is 16)
    Then the equivalent pack command is:
    stupid pack <foo> <bar> <path to output file> <baz> <qux>.
    The width and height are not needed at point of packing because they can be calculated from the width and height of the provided bitmaps.

  11. #11
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Stupid (supertexture tool)

    So how long have you been workign on this (if i can ask )

  12. #12

    Default Re: Stupid (supertexture tool)

    Quote Originally Posted by crux3D View Post
    The pack command takes the original supertexture path, the extracted (and probably edited) bitmaps path, the path to write the result to and the start x and y tile coordinates that the bitmaps were extracted with (to control where in the supertexture the edited bitmaps are placed). So, if your extract command is:
    stupid extract <foo> <bar> <baz> <qux> <quux> <quuux>
    (where for the examples given above
    <foo> is "C:\Program Files\Steam\SteamApps\common\empire total war\data\supertexture.pack\world_" or supertexture.pack/world_
    <bar> is empire_tile
    <baz> is 56
    <qux> is 8
    <quux> is 16
    <quuux> is 16)
    Then the equivalent pack command is:
    stupid pack <foo> <bar> <path to output file> <baz> <qux>.
    The width and height are not needed at point of packing because they can be calculated from the width and height of the provided bitmaps.
    I've done what you told, but now i can't find any file in 'Jogos' folder
    I think that my problem is here:
    stupid pack <foo> <bar> <path to output file> <baz> <qux>.
    What do you mean with 'path to output file'?
    Last edited by ForteS; January 08, 2011 at 01:05 PM.

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  13. #13
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Stupid (supertexture tool)

    For anyone wanting to carve up europe from ntw with the tool i made this for myself so may as well share it.
    I now know that 56 0 8 8 is pretty useless .
    Last edited by The Hedge Knight; January 08, 2011 at 12:54 PM.

  14. #14

    Default Re: Stupid (supertexture tool)

    Quote Originally Posted by 'The Hedge Knight View Post
    So how long have you been workign on this (if i can ask )
    I started pretty much exactly a week ago.

    I may have misunderstood what your image is for, but you don't appear to have any empty black space around your map? The original Napoleon nap_europe map supertexture contains unused black space, but this is still part of the supertexture. In fact it's simple to split the maps into tiles. For Empire each 8 pixel by 8 pixel square of the preview is one tile. For Napoleon each 16 pixel by 16 pixel square of the preview is one tile.

    Quote Originally Posted by Fortes View Post
    I've done what you told, but now i can't find any file in 'Jogos' folder
    I think that my problem is here:


    What do you mean with 'path to output file'?
    the 'path to output file' is the same format as the supertexture input file. If the path is recognised as a pack file (e.g. "supertexture.pack/world_") it will create a pack file in the working directory (e.g. a pack file named "supertexture.pack" containing "world_.stpi" and "world.stpd"). If the path is not recognised as a pack file (e.g. "new_supertexture") it will create two files with that name and extensions .stpi and .stpd (e.g. "new_supertexture.stpi" and "new_supertexture.stpd").

    In your case it will have created "C:\Jogos.stpi" and "C:\Jogos.stpd". You probably want to specify the path to output file as "C:\Jogos\supertexture.pack\world_" (for Empire) or "C:\Jogos\supertexture" (for Napoleon).

  15. #15

    Default Re: Stupid (supertexture tool)

    So I've replace the vanilla files with the ones I've modified but now the game crash at start
    Any ideas?

    Edit: SOLVED, IT WORKS!!!

    Spoiler Alert, click show to read: 


    Spoiler Alert, click show to read: 


    Spoiler Alert, click show to read: 


    Just a question, for example if i want to edit the area where China is, how do i know the number to put in the converter?
    Last edited by ForteS; January 08, 2011 at 04:28 PM.

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  16. #16
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Stupid (supertexture tool)

    [QUOTE=crux3D;8750459]I started pretty much exactly a week ago.

    I may have misunderstood what your image is for, but you don't appear to have any empty black space around your map? The original Napoleon nap_europe map supertexture contains unused black space, but this is still part of the supertexture. In fact it's simple to split the maps into tiles. For Empire each 8 pixel by 8 pixel square of the preview is one tile. For Napoleon each 16 pixel by 16 pixel square of the preview is one tile.

    Damn i presumed that was a generation error :/

  17. #17
    fightermedic's Avatar Ordinarius
    Join Date
    Feb 2008
    Location
    Bavaria
    Posts
    756

    Default Re: Stupid (supertexture tool)

    have to say i don't understand one single word said in this thread..
    but what i do sense is that there is something which is shining VERY brightly evolving here
    guys you are heroes of modding indeed

  18. #18

    Default Re: Stupid (supertexture tool)

    Quote Originally Posted by fightermedic View Post
    have to say i don't understand one single word said in this thread..
    but what i do sense is that there is something which is shining VERY brightly evolving here
    guys you are heroes of modding indeed
    Basically, this thread means that we will have a world campaign map, very soon. Though we still not able to send armies there neither add regions/cities.
    Last edited by ForteS; January 08, 2011 at 05:10 PM.

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  19. #19

    Default Re: Stupid (supertexture tool)

    Hey guys we must split it in very small pieces, my Quad 9550 /6 giga RAM, is cowling...




  20. #20

    Default Re: Stupid (supertexture tool)

    Quote Originally Posted by husserlTW View Post
    Hey guys we must split it in very small pieces, my Quad 9550 /6 giga RAM, is cowling...
    What do you mean with that? we can edit it in small parts

    Edit: Now that we have this tool i would suggest a world map project basically it would be a world map to be shared with all the community. What do you think?
    Last edited by ForteS; January 08, 2011 at 05:29 PM.

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

Page 1 of 4 1234 LastLast

Posting Permissions

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