texpage split and conversion script
texpage split and conversion script
this script has reached initial release quality -- it will take any old-style warzone terrain texpage and do as necessary to make it compatible with recent svn builds (creating a radar file, splitting texpages into individual pngs within resolution-specific directories). the attached zip contains the script, a configuration file, and a quick readme put together by coyote, which is slightly out of date, but will be remedied when i get more time. if anyone wants to stick this in svn, it's probably better that the zip contents are first unpacked.
- Attachments
-
- texpage2mipmap.zip
- (9.6 KiB) Downloaded 240 times
Re: texpage split and conversion script
Committed in r2383.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Re: texpage split and conversion script
Found the first "bug" in your script already. It doesn't name the first ten tiles like tile-01.png, tile-02.png, tile-03.png, etc. instead it leaves out the leading zero.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Re: texpage split and conversion script
i talked with per about that specifically as i was developing this -- since warzone uses sscanf to find the tiles, it won't make any difference in game, and it was easier for me not to have to mv the files (since, afaik, there's no way to control imagemagick output like that along a set format). if there's enough demand for this, though, i will put it in, but as the default for a disableable option, as it should make no difference in warzone (it would've been more code for per for it to have made a difference), and it would take more time to process, as well as having more disk-bound operations.Giel wrote: Found the first "bug" in your script already. It doesn't name the first ten tiles like tile-01.png, tile-02.png, tile-03.png, etc. instead it leaves out the leading zero.
Re: texpage split and conversion script
Ah, in that case the problem is with the sscanf code. Since it currently bails out complaining that it can't find tile-00.png when tile-0.png is available.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Re: texpage split and conversion script
That is because you are using an older version of the code... ::)Giel wrote: Ah, in that case the problem is with the sscanf code. Since it currently bails out complaining that it can't find tile-00.png when tile-0.png is available.
I realized I actually did check zero padding in the code, and fixed it a few hours ago.
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
Re: texpage split and conversion script
[me=Giel]does "svn update" and :-X's up[/me]
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Re: texpage split and conversion script
all ironic, because if i had known, i would've made zero-padded output. however, it's better that you don't check to make sure it's zero padded on load, because the only actual benefit to zero padding is that some directory listing sort algorithms won't sort numerically on that, meaning it's less human readable, and also makes per's original sh script work as well as it does. happily, sscanf works the way it does, though.

