Re: Cracking the .sd files
Well I'm currently working on a python utility that'll work with a simple description file that contains all instructions that should go into the sd file and looks like this:
Code:
tga=stratpage_01.tga
entry=FACTION_LOGO_PAPAL_STATES
topleft=205,1
bottomright=16,76
You will specify the tga you want to use, then all the entries that should be linked to that page file.
It also contains some other possible commands that you can use but don't have to (i.e. advanced options like disabling alpha info for an entry, using a different image for mouse-over information, etc.)
Re: Cracking the .sd files
hmmm..... maybe better then what I have right now... though I bet I could make a format like that work without too much problem, that seems alot easier then what I'm trying to do now, could I create a c++ utility that dumps to that format? because I already have a reader, so maybe just change the dumpContents function.
Tell me what you think, Roy.
Re: Cracking the .sd files
Quote:
Originally Posted by roy_d_merkel
hmmm..... maybe better then what I have right now... though I bet I could make a format like that work without too much problem, that seems alot easier then what I'm trying to do now, could I create a c++ utility that dumps to that format? because I already have a reader, so maybe just change the dumpContents function.
Tell me what you think, Roy.
Well I actually planned to write a dumper function into that script, too, because I kinda feel it belongs in there (and because I need it for testing :P) - I use OOP and already have a class reader for the sd files anyways.
I'm using python because it's extremely productive for such small command-line utilities and people who want to can easily edit the code a bit and redistribute their version.
Anyways, I may get this thing finished today, so your time may be better invested towards figuring out what this mystery value and the mystery coordinate do.
Oh, and rest assured you will get due mention in the readme and the release thread, roy :2thumbsup:
Re: Cracking the .sd files
Well, finally got apparently everything working - I'll test adding a new symbol tomorrow and make a release, but I'm pretty confident that it works (well the dumped and re-interpreted sd files look pretty close to the originals and they seem to work in-game)
Re: Cracking the .sd files
Quote:
./addFileToSd shared.sd walesCoa.tga
./addFileToSd strategy.sd walesCoa.tga
./addVariableToSd shared.sd SMALL_FACTION_LOGO_WALES 3 96 119 89 127
./addVariableToSd.exe strategy.sd FACTION_LOGO_WALES 5 31 93 28 98
What do these numbers mean?
Re: Cracking the .sd files
In order: Index of the page you can find this element in, then left, right, top, bottom borders of the image
You won't have to bother with the index with the tool I'm working on but you'll need to specify the coordinates.
Re: Cracking the .sd files
Well stuff looks good. Here's a screen of a new faction logo I created (the Yorkshire rose).
I also moved the cycle arrow a bit around for testing purposes but that didn't work too well :dizzy2:
https://img64.imageshack.us/img64/85...ose1pb6.th.jpg
Mouse-over info works fine, although the highlight state is still the shield (can't see it too well but it's there) because it'll be the same for all factions, but that's something for you 2d artists to worry about and not my problem:laugh4:
https://img263.imageshack.us/img263/...ose2yk7.th.jpg
A release should be ready in an hour or so. Not sure about a tutorial, might take me a bit longer - or maybe I'll take a short break before I start on it :juggle2:
Re: Cracking the .sd files
Actually I get a nonshield roll-over for mine, the reason is that the roll over for the faction symbol isn't read from the .sd file, but instead another file...
I think the file is in menu/symbols/faction.tga
So you need the .sd to make the COA for everything except for the faction choose screen, and the roll over effect, because these come from the file system.
Re: Cracking the .sd files
Quote:
Originally Posted by roy_d_merkel
Actually I get a nonshield roll-over for mine, the reason is that the roll over for the faction symbol isn't read from the .sd file, but instead another file...
I think the file is in menu/symbols/faction.tga
So you need the .sd to make the COA for everything except for the faction choose screen, and the roll over effect, because these come from the file system.
Mega thanks to you guys! Really impressive work! But I wonder what "roll over effect" means? Would you please specify that with image or something? Thanks a lot!
BTW, I changed the last 4 bytes in mysterious-6 bytes you guys think as coords of something, to some other reasonable values, for testing their effect. Unfortunately no obvious effect shows up. Although it seems only the four have non-zero coord values, making it no big deal:beam: , still we'd better figure it out.
I've been tracking the thread from the very beginning:2thumbsup: , thanks for excellent work again!
Re: Cracking the .sd files
Quote:
Originally Posted by roy_d_merkel
Actually I get a nonshield roll-over for mine, the reason is that the roll over for the faction symbol isn't read from the .sd file, but instead another file...
I think the file is in menu/symbols/faction.tga
So you need the .sd to make the COA for everything except for the faction choose screen, and the roll over effect, because these come from the file system.
I'm pretty sure the roll-over effect for the strategy button is in stratpage_04.tga near the middle.
The menu folder is only for the main menu methinks. I should probably mention it in the tutorial nonetheless...
Re: Cracking the .sd files
OK, the "roll over effect". I resized the FACTION_LOGO_YORKSHIRE to a smaller one, the non-shield roll over effect turns out like this.
https://img412.imageshack.us/img412/...bathra5.th.jpg
I'm pretty sure too it's in stratpage_04.tga, the one in the red rectangle with its id SHIELD_HL.
https://img216.imageshack.us/img216/...bathop1.th.jpg
This is an image after a little change to SHIELD_HL and the alpha channel switch of FACTION_LOGO_YORKSHIRE.
https://img228.imageshack.us/img228/...bathch3.th.jpg
Re: Cracking the .sd files
Next all we need is to crack the battle.sd file so we can get the new round faction symbols to show in the bottom right of the battle interface, the symbol you click on to highlight your units with green etc.
Re: Cracking the .sd files
Quote:
Originally Posted by Lusted
Next all we need is to crack the battle.sd file so we can get the new round faction symbols to show in the bottom right of the battle interface, the symbol you click on to highlight your units with green etc.
1. battle.sd is cracked - a descriptor is included in the sd converter
2. Those images aren't in the battlepages. They seem to be in ui/faction_symbols but changing them appears to have no effect.
Re: Cracking the .sd files
Quote:
2. Those images aren't in the battlepages. They seem to be in ui/faction_symbols but changing them appears to have no effect.
Hmm, then is there no way to get the game to use them?
Re: Cracking the .sd files
Quote:
Originally Posted by Lusted
Hmm, then is there no way to get the game to use them?
Well I didn't really look into it to a larger extent, Zain seems to have changed it so we might best wait until he tells us which file we have to edit :P
https://forums.totalwar.org/vb/showp...2&postcount=16
Re: Cracking the .sd files
Alpaca, so what's the story? This is a really promising project, did you ever end up publishing a release? Also, roy merkel's code, is it still around? Should be easy to recompile it under Windows.
Re: Cracking the .sd files
Re: Cracking the .sd files
Yeah I think I did back then. When something doesn't work, I usually try doing it in the main folder.
Anyways, I'll look into that when I need to :sweatdrop:
Re: Cracking the .sd files
Quote:
Originally Posted by SigniferOne
Alpaca, so what's the story? This is a really promising project, did you ever end up publishing a release? Also, roy merkel's code, is it still around? Should be easy to recompile it under Windows.
http://www.3ddownloads.com/Strategy/...ls/readSd.zip#
here is my code, I was working on fixing it to parse the files better, had some odd behavior under native windows where long .sd files would be truncated. When getting from stdin (think windows non raw IO has some kind of a bug).
sort of got busy with other junk :sweatdrop:
by the way, nice work Alpaca :2thumbsup:
going to try some experiments with the mystery numbers later (unless someone already had them figured them out).
Roy.
Re: Cracking the .sd files
Anyone here using the retrofit mod? Because Unspoken Knight has included the sd.xml files used to make the .sd files in the mod.
Re: Cracking the .sd files
Nice, he included the CA in-house sd.xml files which can help the game regenerate the .sd files? That's fantastic, and further can help modding those said .sd files much easier.
Re: Cracking the .sd files
Quote:
Nice, he included the CA in-house sd.xml files which can help the game regenerate the .sd files?
That's what im guessing they are from the info inside them.
Re: Cracking the .sd files
Yeah BrandonM told me they are in there. Apparently the .sds are also re-generated, so obviously I'd rather use the .xmls instead of the sd converter unless you need extra mouse-over information.
Turns out that CA had pretty much the same ideas about the thing as I had with the mouse-over bmp usually taken somehow from the alpha channel.