PDA

View Full Version : Tutorial: Adding a new faction symbol



alpaca
03-15-2007, 16:37
It is recommended to use the files strategy.sd.xml, shared.sd.xml and battle.sd.xml that can be found in the Retrofit Mod (http://www.twcenter.net/forums/forumdisplay.php?f=485) for Kingdoms (but they also work in M2TW). To use them, simply place them alongside a copy of the sd files in your data/ui folder, then edit them to your liking and the game will inject the information into the sd.
Their structure is somewhat similar to that of the sd converter descriptor files so you can probably still gather some valid information from this tutorial.

This tutorial will teach you how to add a new faction icon to the game. It's designed to go together with my .sd converter, and you'll need that to follow this tutorial.

Prerequisites

- Download the .sd converter and follow the instructions under "Installation" in the readme:
https://forums.totalwar.org/vb/showthread.php?t=81320
- A basic grasp about editing image files (including transparency information in the alpha layer)


1. Creating the Icons

Well the first step is obviously to create your new icons. So, search for a nice image on the internet or create one yourself.
When you did that, open up modpage.tga in your .sd converter folder. It should look like this:


https://img380.imageshack.us/img380/1460/modpagezj1.jpg

This shows the Yorkshire Rose in large and small that I'll use as an example in this tutorial.

Now, clear up the modpage (don't forget the alpha channel) by filling it with black, and copy your image to the top left corner, and a smaller version next to that.
Now we still need to supply alpha information, because with a black alpha channel the image won't show. So select the alpha channel (make the RGB channels invisible) and edit it so that it is white where your icon is and black everywhere else.


https://img183.imageshack.us/img183/5798/modpagealphamx0.jpg

You can also add shadows, like I did in the lower-left portion of the Rose:


https://img444.imageshack.us/img444/7357/modpageshadowcw2.jpg

Well that's all we need to do here. Save the image - and make sure to uncheck "Compress (RLE)" when you save the .tga, like this (and of course save the alpha channel, so 32bit):


https://img219.imageshack.us/img219/9277/tganocompressrb9.jpg



2. The Descriptors

What we do now is to create the input files to tell the converter what we want to go into the .sd files.
I included two files, called modpage_strat.txt and modpage_shared.txt in the sd converter release. These are basically all you need to start off with your first icon and I'll explain them now:

modpage_strat.txt

strategy.sd

tga=modpage.tga

entry=FACTION_LOGO_YORKSHIRE
top=0
left=0
bottom=114
right=119
Each descriptor file has exactly one associated .sd file. You'll have to specify the name of that file in the first line of the descriptor (in this case strategy.sd).
Then follow entries for a number of pages (in this case only 1, our modpage) - they simply consist of a tga=name statement

Each page has a number of UI entries associated with it. These consist of an initial entry=UI_TAG statement, followed by the coordinates of your image (x values of top and left, and y values of bottom and right edges, as shown in Photoshop)


https://img292.imageshack.us/img292/6178/coordinateinfonu1.jpg

Please edit FACTION_LOGO_YORKSHIRE to whichever name you want for your faction logo (such as FISHPANTS for example)


modpage_shared.txt

shared.sd

tga=modpage.tga

entry=SMALL_FACTION_LOGO_YORKSHIRE
left=120
top=0
bottom=+38
right=+40
This looks very much like the above, but contains an interesting additional option: If you use right=+x, this is treated as relative to the left border, so +38 in this case doesn't mean that the right edge is at the coordinate 38, but that our image is 38 pixels wide. The same goes for bottom=+y and height.
Also note that this specifies shared.sd as the associated .sd file

Well, we're already finished here, so let's move on to the actual generation of the .sd files.


3. Compiling the .sd files

To generate strategy.sd and shared.sd, simply run modpage.bat which automates that process for the modpage files.
It looks like this:

sd_converter_1_0.py -c strategy_sd_desc.txt modpage_strat.txt shared_sd_desc.txt modpage_shared.txt
PAUSE
So, only really one command in there. The "-c" option simply tells the converter that it should compile, followed by a list of descriptor files separated by spaces.
It's important to note that, in addition to our modpage descriptor files, the converter will also have to use the vanilla descriptors, or all the buttons the game uses will be lost (I created the vanilla descriptor files with the decompile option explained below).


4. Updating descr_sm_factions.txt

To marvel at your symbol in the game, you'll have to edit descr_sm_factions.txt. Link your new symbols like this:

logo_index FACTION_LOGO_YORKSHIRE
small_logo_index SMALL_FACTION_LOGO_YORKSHIRE


Well that's it. Copy strategy.sd and shared.sd to your data/ui directory, modpage.tga to your data/ui/southern_european/interface directory and descr_sm_factions.txt to your data directory.
If you want to work in a mod folder, you will also have to copy a version of strategy.sd and shared.sd into the vanilla data directory (M2/data/ui) - this can also be the unpacked vanilla version, or probably even an empty file.
Then start a campaign and you should be able to see your new faction icon in all its glory:


https://img263.imageshack.us/img263/6804/yorkshirerose2yk7.jpg


5. Advanced options

Well I wouldn't be me if I hadn't included a few more options in the .sd converter than just the above.
First of all, have a look at the files I supplied for the vanilla .sd information (strategy_sd_desc.txt, etc.)
These contain full information about the original sd files, so be careful when editing them.
Anyways, you will see that these files use more commands than just those mentioned above. Click on "Show" to see a list of available descriptor commands.
tga=stratpage_01.tga
As mentioned above, this tells the converter which page it should open. You will notice that strategy_sd_desc.txt for example contains 5 files (the 4 stratpages and editor_strat01.tga).

width=512, height=512
If you want you can override the width and height information which is normally read from the mouse-over image. However I wouldn't recommend this and these options are more of an artifact from a previous version when they weren't automatically read.

mouseover=stratpage_01.tga_mouseover.tga
Now this command is one of the most interesting. It allows you to specify a different mouse-over image for this page (although it still has to be a tga and mouse-over info will still have to be stored in the alpha layer). This can be useful if you use a lot of shadows, or don't want some parts of your image to be clickable, or want transparent parts clickable. I included the original mouse-over information from the .sd files because automatically generating it yielded fairly bad results.
An example usage of this would be a complex image where you have a lot of transparent holes that you want nonetheless to be clickable.

entry=BUTTON_OUTER_RING_SMALL
As above, this is the name of a UI entry. A lot of these aren't actually used, but be careful when playing around with this.

topleft=432,323, bottomright=468,362
You can use these instead of the left, top, right and bottom keywords but they are mainly artifacts from an earlier program version.

page=stratpage_01.tga
As each UI entry explicitly has an associated page in the .sd file, you can also set this inside the descriptor if you want.
This can be useful if you want a specific ordering for your descriptor file.

alpha=1
This enables transparency for this entry. If you use 0, you can switch it off.

mystery=0 and coord=0,0
These are some bytes we couldn't yet really fathom the use for, but I presume they are dead weight and not used.



The converter also comes with a decompile option that allows you to dump the information stored in a .sd file into a descriptor (and optionally generate a mouse-over tga image). You can use it with the command-line option "-d":

sd_converter_1_0.py -d sourceSD target [True/False]
This tells the converter to use sourceSD as a source, generate Target as the target descriptor and if you set the last argument to True, you will get sourceSD_mouseover.tga which stores mouse-over information.

Lusted
03-15-2007, 17:33
Just what i was looking for alpaca, this will be a great help.

Lusted
03-15-2007, 18:37
Just got everything ingame and it worked like a charm, though it looks like the 2 .sd files might need to be in the main ui folder and not a mod switch ui folder. Hopefully this will be fixed with the fix of file paths in 1.2.

wilddog
03-15-2007, 21:26
Alpaca
Excellent and well done. I'll try and give this a go at the weekend.

alpaca
03-15-2007, 22:07
Just got everything ingame and it worked like a charm, though it looks like the 2 .sd files might need to be in the main ui folder and not a mod switch ui folder. Hopefully this will be fixed with the fix of file paths in 1.2.
A mod folder works fine for me. I made the screen with a mod-folder version.
It might be that you need a version of these files in the normal data folder, too, though - you could try copying the vanilla files into it and then try it with a mod folder. That's pretty much my setup (I have the unpacked files in the vanilla data folder)

Lusted
03-15-2007, 22:14
Yeah it appears you do need a version of these files in the vanilla folder as well as the mod folder, just in the mod folder doesn't work.

Lord Condormanius
03-16-2007, 04:47
Whenever I try to convert the file, I get this error:

"struct.error: unpack requires a string argument of length 1"

any ideas?

LC

alpaca
03-16-2007, 15:20
Whenever I try to convert the file, I get this error:

"struct.error: unpack requires a string argument of length 1"

any ideas?

LC
Please quote the full program output (including the Reading ... and Writing ... statements), otherwise I can't really look into it. Sounds like a file ended preliminary.

@Lusted: Ok, I'll put it into the tutorial.

Lord Condormanius
03-16-2007, 20:47
Please quote the full program output (including the Reading ... and Writing ... statements), otherwise I can't really look into it. Sounds like a file ended preliminary.

Ok... here is the full output


Reading strategy_sd_desc.txt
Reading modpage_strat.txt
Traceback <most recent call last>:
File "C:\Documents and Settings\Administrator\Desktop\.sd_Converter\sd_converter_1_0.py", line 752, in <module>
sdf.compile<sdtopaths[sdf]>
File "C:\Documents and Settings\Administrator\Desktop\.sd_Converter\sd_converter_1_0.py", line 685, in compile
if not page.isComplete<> or not ent.isComplete <>:
File "C:\Documents and Settings\Administrator\Desktop\.sd_Converter\sd_converter_1_0.py", line 216, in isComplete
self.readMouseoverTGA<self.file>
File "C:\Documents and Settings\Administrator\Desktop\.sd_Converter\sd_converter_1_0.py", line 203, in readMouseoverTGA
a = readByte<f>
File "C:\Documents and Settings\Administrator\Desktop\.sd_Converter\sd_converter_1_0.py", line 13, in readByte
return struct.unpack<'B', fhandle.read<1>>[0]
File "C\Python25\lib\struct.py", line 87, in unpack
return o.unpack<s>
struct.error: unpack requires a string argument of length 1

Any help would be great!

LC

alpaca
03-17-2007, 14:44
Ok... here is the full output

Any help would be great!

LC
Hmm strange, could you upload your modpage.tga and modpage_strat.txt somewhere (or attach them here) so that I can try to reproduce this?

Lord Condormanius
03-17-2007, 20:48
Hmm strange, could you upload your modpage.tga and modpage_strat.txt somewhere (or attach them here) so that I can try to reproduce this?

I posted them at the original thread at TW Center http://www.twcenter.net/forums/showpost.php?p=1589712&postcount=3.

For some reason, they won't let me post attachments at the Guild.

LC

alpaca
03-18-2007, 10:21
I posted them at the original thread at TW Center http://www.twcenter.net/forums/showpost.php?p=1589712&postcount=3.

For some reason, they won't let me post attachments at the Guild.

LC
Ah. Make sure that when saving the tga you uncheck "Compress (RLE)" in the dialog where you set the bit-rate.

Lord Condormanius
03-18-2007, 17:21
Ah. Make sure that when saving the tga you uncheck "Compress (RLE)" in the dialog where you set the bit-rate.

Thanks, I'll try it out.

LC

Lord Condormanius
03-18-2007, 17:55
Ah. Make sure that when saving the tga you uncheck "Compress (RLE)" in the dialog where you set the bit-rate.

Ok...I got the symbols onto the map. However, only half of the large symbol shows up on the campaign map.

http://farm1.static.flickr.com/177/425410055_ca3a60e103.jpg

Any thoughts?

LC

By the way, should I be copying over the original shared.sd adn strategy.sd files in the ui folder? I think so.

alpaca
03-18-2007, 18:52
Ok...I got the symbols onto the map. However, only half of the large symbol shows up on the campaign map.

Any thoughts?

LC

By the way, should I be copying over the original shared.sd adn strategy.sd files in the ui folder? I think so.
You need to set the width of your image in the descriptor file. And you don't need the original files, those generated by the tool should be fine.

wilddog
03-19-2007, 20:01
Alpaca
Tool works great so well done. I've only tried with the larger faction logo so far.
Now need to edit the button effect for selecting the logo when in the campaign.

Curious do you recommend adding the new selection button shape to the new TGA files and the new txt files and removing the entries from the decompiled text files..... or just amending the shape in the original TGA's? The first option would preserve the original TGA's leaving only the 2 SD files to be replaced and the new TGA

Lord Condormanius
03-19-2007, 20:16
You need to set the width of your image in the descriptor file. And you don't need the original files, those generated by the tool should be fine.

Perfect. Thanks.

LC

alpaca
03-19-2007, 23:29
Alpaca
Tool works great so well done. I've only tried with the larger faction logo so far.
Now need to edit the button effect for selecting the logo when in the campaign.

Curious do you recommend adding the new selection button shape to the new TGA files and the new txt files and removing the entries from the decompiled text files..... or just amending the shape in the original TGA's? The first option would preserve the original TGA's leaving only the 2 SD files to be replaced and the new TGA
Well, since it works fine, I would recommend not messing with the original files and adding your own stuff in a new TGA (or multiple if you want). If you want to change stuff like the original buttons, I'd probably do that in the original files unless it's something that doesn't fit in there, in which case I'd just use one of the new files.

repman
04-18-2007, 21:29
Even with the leaked patch 1.2 the 2 .sd files need to be in the main ui folder and not in the mod switch ui folder as some other files....grrr... so much for mod isolation

repman

wilddog
04-18-2007, 22:09
Even with the leaked patch 1.2 the 2 .sd files need to be in the main ui folder and not in the mod switch ui folder as some other files....grrr... so much for mod isolation


At least its in line with the other symbols etc which are in models_strat as they aren't isolated either.

alpaca
04-18-2007, 22:17
Even with the leaked patch 1.2 the 2 .sd files need to be in the main ui folder and not in the mod switch ui folder as some other files....grrr... so much for mod isolation

repman
Actually you only have to have SOME version of that file in there. I have the vanilla one in the main folder and my edited one in the mod folder and it works fine.
I think the game reads the UI links from the main folder one (i.e. CA forgot to change that link to relative paths)

zxiang1983
04-20-2007, 03:10
What if I need to put in 2 factions' icons?
first I deal with 1st faction's icon and create the .sd files. But then what to do? If I just deal with 2nd faction's icon in the same way, will that over write the 1st faction's icon in .sd file?

Hope I express myself clearly. Anyway I just want to know the procedure of putting in 2 factions' icons. Thanks in advance.

alpaca
04-20-2007, 12:22
Well you add it to the page next to the one you added first, then add a description in modpage_strat.txt and modpage_shared.txt similar to the first one but with updated coordinates and rebuild the .sd files

zxiang1983
04-21-2007, 18:27
Hi, alpaca. Thanks for your reply.

Please forgive me but I'm still a little confused :P

ok, let me summarize my understanding
1, I put my 1st faction symbol in 1.tga, and by using your converter I get strategy.sd(a) & shared.sd(a)

2, I leave the strategy.sd(a) & shared.sd(a) in your converter's folder(instead of moving them to ui folder)

3, I put 2nd faction symbol in 1.tga, too, just different place with the 1st one

4, I re-write coordinates in modpage_strat.txt and modpage_shared.txt to point them to the 2nd faction symbol's location.

5, Then I run your converter again and get strategy.sd(b) & shared.sd(b)

6, strategy.sd(b) & shared.sd(b) is what I wanted.

Am I right?

wilddog
04-22-2007, 09:03
That's basically it but you don't need to do steps 1 and 2 as you're overwriting them anyway in the later steps.

zxiang1983
04-22-2007, 09:16
I don't understand.
I thought the converter will read information from strategy.sd(a) & shared.sd(a).

If I don't do step 1&2, how will the converter know anything about the 1st faction symbol?

Oh, I know you mean I just have to write 2 entries in modpage_strat.txt and modpage_shared.txt. And then the converter will read the 2 factions' symbols together. Thanks a lot!

wilddog
04-22-2007, 10:12
Yes you just add whatever you want to the new TGA file you are using and add in as many corresponding entries into the two modpage files. Create the new *.sd files and then use them.

You don't need to add and compile one symbol at a time.

If you see any strange results its normally just because you got your coordinates wrong.

alpaca
04-22-2007, 14:48
Yeah the converter doesn't use the .sd files at all when compiling them, you add two icons to the tga and the description file you want to use and compile. That's it :smash:

tornnight
05-01-2007, 05:48
You've got a bug with entry name lengths.

I've reproduced

SMALL_FACTION_LOGO_KHW
SMALL_FACTION_LOGO_ABA

works

SMALL_FACTION_LOGO_KHWAREZM
SMALL_FACTION_LOGO_ABBASSID

does not.


Other conditions during this occurance:

I have two seperate tgas 1 for strat 1 for shared.
Each has 12 seperate entries for a total of 24 entries.

I know your example has a long entry name, but under some condition the entry names lengths start to matter.

Lord Condormanius
05-01-2007, 06:05
You've got a bug with entry name lengths.

I've reproduced

SMALL_FACTION_LOGO_KHW
SMALL_FACTION_LOGO_ABA

works

SMALL_FACTION_LOGO_KHWAREZM
SMALL_FACTION_LOGO_ABBASSID

does not.


Other conditions during this occurance:

I have two seperate tgas 1 for strat 1 for shared.
Each has 12 seperate entries for a total of 24 entries.

I know your example has a long entry name, but under some condition the entry names lengths start to matter.

SMALL_FACTION_LOGO_TOULOUSE
SMALL_FACTION_LOGO_BURGUNDY
SMALL_FACTION_LOGO_ARMENIA
SMALL_FACTION_LOGO_IRELAND
SMALL_FACTION_LOGO_WALES

all work for me...

alpaca
05-01-2007, 10:58
Can you give me your files so I can test it?
It should work.

kornsoadhts
05-06-2007, 15:04
How would you go about changing the mouseover image? (The semi transparent white overlay is what I'm talking about).

Also, where does the SMALL_... file show in game? In other factions diplomacy scrolls? It's not showing up on the faction selection screen if thats where it's supposed to be.

EDIT: I still need help with the other things mentioned but I figured out that the faction selection screen icons were located in the symbols24 and 48 folders.

wilddog
05-06-2007, 15:45
The selection screen uses data\menu\symbols\fe_buttons_48

The small_ symbol is used in several screens eg the faction ranking screens.

To change the overlays its the same as for the main symbols. Simplest is to amend the existing overlay image in the TGA files.

kornsoadhts
05-06-2007, 19:14
Ok, I compiled a stratey.sd and shared.sd of the overlay.

I had two tgas, one that contained a white overlay with open alpha and the other a mouseover file to go with it.

When I go in game it's still the old shield_hl.

I'm also trying to get rid of wooden_pillar with no result.

wilddog
05-06-2007, 20:21
Ok, I compiled a stratey.sd and shared.sd of the overlay.

I had two tgas, one that contained a white overlay with open alpha and the other a mouseover file to go with it.


I take it then that rather than amend the old one you added a new one in a new TGA file?. If that is the case did you change the text to refer to the new one? Otherwise that's why its easier to replace the old TGA (I haven't tried including it in the new TGA's and therefore needing to recompile the .sd for the overlay).

Don't know why you aren't getting the wooden pillar to disappear as its quite straight forward. Edit the campaign script and simply add

restrict_strat_radar false

Near the start eg
; Campaign script
;
script
restrict_strat_radar false


That's all you need to do.

kornsoadhts
05-06-2007, 20:29
Oh, I wasn't aware of a command to get rid of the pillar so thank you. I'm going to try to ammend the old tga and hopefully it will work out.

tornnight
05-11-2007, 15:13
You should add that you need to put any new mod_page.tga that uses the shared.sd into

data\ui\middle_eastern\interface

as well. Otherwise, middle eastern factions won't see those images.

tornnight
05-11-2007, 15:39
Ehh disregard that last post.
You don't need it in the

data\ui\middle_eastern\interface

:dizzy2:


I finally got it working stable for me. After many different attempts, it seems like it was unstable when using two different .tga files for shared.sd and strat.sd. With this combination, I would see frequent crashes when clicking on interface buttons.

Once I merged my images into 1 tga file, it worked fine. :2thumbsup:

alpaca
05-11-2007, 16:12
Hmm interesting. Not sure what could cause that but maybe the game has problems with it.

Beregorn
06-24-2007, 09:09
can anyone help me? When I choose alpha layer the image won't show. How do i edit to see my image as white

alpaca
06-24-2007, 11:20
What do you mean the image won't show? Please be a bit more specific.

Beregorn
06-24-2007, 14:32
oh I sorted it out now (though I don't know how I did it:D ) and succesfully putted my own symbol. thanx for your help.

stilgar
07-13-2007, 20:34
Hello,
I try to did a new faction symbol but I failed.
Files I change :
http://i20.servimg.com/u/f20/11/16/85/81/modpag10.jpg (http://www.servimg.com/image_preview.php?i=150&u=11168581)


strategy.sd

tga=modpage.tga

entry=FACTION_LOGO_LEINSTER
top=0
left=0
bottom=69
right=66


shared.sd

tga=modpage.tga

entry=SMALL_FACTION_LOGO_LEINSTER
left=67
top=0
bottom=+29
right=+20


but when I want to run the modpage.bat:

http://i20.servimg.com/u/f20/11/16/85/81/bug_bm10.jpg (http://www.servimg.com/image_preview.php?i=151&u=11168581)

Nothing is created why?

alpaca
07-13-2007, 21:59
You have to install python 2.5 (get it from http://www.python.org)

Aleynasdad
08-13-2007, 08:59
Hi Alpaca!

Tried to downlaod SD converter but when I unpacked from rar all I got was a another rar fıle called sd.converter.rar.

Any idea why?

Trying to create a logo and banner for my new faction but withou your converter I am a bit flummoxed. Also don't have paintshop.

alpaca
08-13-2007, 11:55
Try it with another archive software (such as 7-zip).

Miloshus
08-21-2007, 11:54
I have successfully added large symbols, but with a smaller problem, I cannot click on the symbol, when I point my mouse on the symbol nothing happens, I cannot open faction summary. Help:help: ?

alpaca
08-21-2007, 15:10
It should work, are you sure you edited the alpha channel correctly?

irishron2004
09-22-2007, 23:37
I have been trying to use this program and I get the error it is missing stratpage_01.tga_mouseover.tga. When I installed this convertor, I got alot of straegy.tgas without a clue for which is which. I figured out strategy (6).txt was strategy_sd_desc.txt and strategy (14).txt was battle_sd_desc.txt but don't have a clue what to rename strategy (5).tga, strategy (7).tga, etc. All help would appreciated.

Edit: Corrupted download. Now works. Now I have to learn how to use it.

Beregorn
10-30-2007, 22:43
I did everything you've said but for some reason it only shows the bottom left corner. Anyone knows hoew to fix it?

alpaca
11-01-2007, 22:21
I did everything you've said but for some reason it only shows the bottom left corner. Anyone knows hoew to fix it?
Maybe your symbol is the wrong size or you specified wrong coordinates?

You could also try using the xml files supplied with the retrofit mod instead of the sd converter.

zxiang1983
11-05-2007, 06:11
The xml files are amazing but useless...

No matter I put them in mod folder or M2TW folder, they will not create the .sd files and have no effect at all.

Maybe we need some special command line?

Edit:

Ah, those xml files work!! I thought I should delete those .sd files and let them recreate new sd files but actually just modify the xml files and leave the original .sd files there and they will work!

Really useful files from retrofit mod! It is much easier to add in new faction symbols now.

alpaca
11-05-2007, 18:31
The xml files are amazing but useless...

No matter I put them in mod folder or M2TW folder, they will not create the .sd files and have no effect at all.

Maybe we need some special command line?

Edit:

Ah, those xml files work!! I thought I should delete those .sd files and let them recreate new sd files but actually just modify the xml files and leave the original .sd files there and they will work!

Really useful files from retrofit mod! It is much easier to add in new faction symbols now.
Ah sorry, my mistake. I only tried them once (left the rest to Solo) and must've confused them with something else :sweatdrop:

wilddog
11-05-2007, 22:04
Alpaca
A slightly different question on this theme. Have you come across anything whereby you can use a different (bigger) sized image to the one displayed? Problem I have is the resolution of the game seems to be set at a lower resolution than my monitor (1600*1200) so these symbols get expanded and become more blurry. For other menu ones you can do that but I don't know if its possible here.

Other alternative is if you know how to adjust the anchor point. At the moment larger images seem to keep the same height and possibly top left corner. So if I could adjust that it would give more flexibility.

alpaca
11-06-2007, 19:13
I think the game interface automatically defaults to a size of 1024 and then creates the other resolutions by bicubic resizing which is the reason why it's blurry on different resolutions.
I have the same problem with my LCD that has a native res of 1280*1024, things get blurry with either resolution :no:

You should be able to change the size but it won't be of any much help in the game I believe because key interface positions are set absolutely.

wilddog
11-06-2007, 21:24
Alpca
Thanks I figured that was likely to be the case so just clutching at straws in case there was a way around it.

I opted for a slightly larger symbol in the end so that I can get a bit more detail even though the enlargement still blurs it.

I also saw on an earlier note a reference to an XML. Did Kingdoms do anything to simplify this. I haven't had time to go back and recheck that.

alpaca
11-07-2007, 21:06
Alpca
Thanks I figured that was likely to be the case so just clutching at straws in case there was a way around it.

I opted for a slightly larger symbol in the end so that I can get a bit more detail even though the enlargement still blurs it.

I also saw on an earlier note a reference to an XML. Did Kingdoms do anything to simplify this. I haven't had time to go back and recheck that.
There are some xml files which are written into the sd files by the game released with the retrofit mod (they should be used instead of the sd converter).

wilddog
11-07-2007, 21:31
Alpaca Thanks for that. I hadn't down loaded the retrofit mod so I guess I need to. I've still been using the SD files from your converter.

wilddog
11-08-2007, 18:59
OK it worked Just needed to remember everything starts counting from zero.

Rhyfelwyr
12-17-2007, 12:40
Great tutorial Alpaca, got it working 1st time (and thats a 1st for me when modding!)

What would I need to do to get the logo to appear outwith camaigns, and even on the select faction screen?

EDIT: I tried editing the logo there, replaced it with the venetians using copy/paste. However, when looking at the coordinate info I get really low values, eg 2.23, 1.45 etc. Not 119 or big values like in the tutorial. I set 2 of the values in the text file to 2 and 3, the other two are still 0 obviously. Works in game fine. Tried resetting the figures closer to the values you get, symbo still appeared fine ingame, but when I clicked on it the white shine was a bit out of place.

Also are there any tools for editing battlemap banners?

wilddog
01-05-2008, 11:30
Just a word of caution. There is I believe a size limit associated with the .SD files in particular the shared.sd which leads to a memory leakage.

I was being lazy and using the same TGA at 512*512 for both shared and strat as an extra file. However I noticed a corruption and after playing around narrowed it down to the shared.sd. I resolved it by using a much smaller file for the extra shared one and now it seems OK. Basically the SD file at 120,818 memory size was corrupting and a new one at 91,006 seems to be OK (sizes are read from the log file in trace).

Teleklos Archelaou
02-18-2008, 01:31
Question: I have gotten my new icons to show up in the game, but my small ones don't have the tooltip passover on them (but they do if I make them refer to the vanilla small icons), and they aren't "clickable" either (the new ones only), so if you click on an icon of an ally, it won't take you to that ally's list of friends/enemies. What did I mess up to cause that?

alpaca
02-18-2008, 11:40
Did you make sure that you saved with alpha information and that it works correctly?
Also make sure that if you specified an external mouse-over tga that this works correctly.

Teleklos Archelaou
02-18-2008, 13:37
I'm not using an external mouse-over tga, and the alpha information matches up perfectly. I tried putting extra spaces between my small icons too, thinking maybe they were too close and that a 'bleed over' of sorts was occurring, but that still hasn't done any good. Maybe there is a size limit for small icons that I'm narrowly stepping over the limits of. But it seems like the same problem a guy was having on the last page of this thread though he never replied back that he got it fixed or gave up.

alpaca
02-18-2008, 15:28
Try running the unpack option with your files (in a new folder, mind) to see what the mouse-over info in the sd files looks like.
You could also try splitting up the tga into a shared and a strat page - the game sometimes seems to get problems when they're in the same file.

Teleklos Archelaou
02-18-2008, 16:09
EDIT: Success! Ah, one thing I was doing wrong was editing the .tga files in the interface subdirectory. You have to edit them while the tga file is still in the folder where the converter is. I thought I could use the converter just to turn the text files into the sd files, then put the sd files into the UI directory, but it won't work fully and it won't take into account any changes you make in the files, unless you edit them in the converter-folder, and then put them into your interface files when you are all done. It all works now! Woot.

stilgar
02-26-2008, 20:14
Hello alpaca, and first thanks for your great work.

I was trying to two factions symbol, I tryed the first, it works. But when I added the second it doesn't want to work.

This is what I made :

shared.sd

tga=modpage.tga

entry=SMALL_FACTION_LOGO_WALES
left=67
top=0
bottom=+33
right=+22

entry=SMALL_FACTION_LOGO_TEUTONIC_ORDER
left=160
top=0
bottom=+33
right=+22


strategy.sd

tga=modpage.tga

entry=FACTION_LOGO_WALES
top=0
left=0
bottom=74
right=66

entry=FACTION_LOGO_TEUTONIC_ORDER
top=0
left=94
bottom=74
right=160

Here is the modpage.tga :
http://i30.servimg.com/u/f30/11/53/28/68/modpag10.jpg (http://www.servimg.com/image_preview.php?i=140&u=11532868)

And this is the error I had :
http://i30.servimg.com/u/f30/11/53/28/68/error10.jpg (http://www.servimg.com/image_preview.php?i=141&u=11532868)


Thanks for your work :yes:

alpaca
03-04-2008, 15:56
Sorry, I don't really know. Did you extract all the files in the archive to the same directory?

SigniferOne
04-27-2008, 22:01
Alpaca, I've added a new .tga file containing faction symbols, using the retrofit .xml files, yet something strange happens: first of all, some areas within a faction icon are unclickable (the icon doesn't light up); secondly, the shape of the lit-up icon is different from the icon's shape, or even the alpha's shape.

I'm suspecting that both problems have to do with the 'clickable' shape, which you mentioned in your tutorial, but I found nowhere specified in the .xml files. What do you think? Is there some 'clickable area file' that I don't know about?

https://img135.imageshack.us/img135/358/iconpl2.jpg


PS. I haven't changed the SMALL_FACTION_LOGO yet, I doubt it should affect anything.

saw
01-20-2009, 10:38
I am making a modd for kingdom, and I can't get this to work

saw
01-26-2009, 12:04
Is there sombady who knows how to get this to work in Kingdom? I am working on a modd bast on teutonic, but I can't get this to work.

atropaten
12-05-2013, 19:31
hi
modpage.bat can not create .sd files
Why do not?
11365