
edit: How do you convert TGA to DDS? I was searching for some freeware program, but found nothing...
.
Moderator: Moderators
alavris wrote:edit: How do you convert TGA to DDS? I was searching for some freeware program, but found nothing...
.
Pitsu wrote:I used http://eliteforce2.filefront.com/file/DDS_Converter;29412 but there might be better ones available.
Pitsu wrote:Are you sure your tga image is exactly 1024 x 1024 pixels? The "not a power of 2" error should mean that your image does not have 2^n x 2^m pixels.
Pitsu wrote:i am curious also whether it actually needs *both* images. Especially since the tga format takes almost 3 MB...
Code: Select all
<SrcName href="111.tga"/>
Pitsu wrote:Evenshade wrote:Has anyone succeeded in getting their own PWL image to work for their map? I seem to have the procedure right (according to the tutorial), but whenever I go to provide the SrcName (i.e., the .tga file) for the texture, it just simply refuses to put the text of the filename in or load the file. I always just get a pure grey PWL background when I start the map ingame...
Looks like the editor does not want to convert the tga and create proper references. By manually creating a dds file and proper reference files and adding them into h5m archive it can be done.
1. Create tga and dds files of the image and place them into unpacked map directory where you have all other map files.
2. Create text file named for example PWL.(Texture).xdb with the following text (the parameters can later be edited in editor if i am not mistaken): Note the references to image files ("filename.tga or dds"). EDIT: in fact this is the file you can create in editor already. The editor simply refuses to put the image file references into it and leaves the "href=" blank.Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Texture>
<SrcName href="filename.tga"/>
<DestName href="filename.dds"/>
<Type>REGULAR</Type>
<ConversionType>CONVERT_TRANSPARENT</ConversionType>
<AddrType>CLAMP</AddrType>
<Format>TF_DXT1</Format>
<Width>1024</Width>
<Height>1024</Height>
<MappingSize>0</MappingSize>
<NMips>1</NMips>
<Gain>0</Gain>
<AverageColor>0</AverageColor>
<InstantLoad>true</InstantLoad>
<IsDXT>false</IsDXT>
<FlipY>false</FlipY>
<StandardExport>true</StandardExport>
<UseS3TC>false</UseS3TC>
</Texture>
3. pack everything into a h5m archive again.
If it does not work like that, then i have forgotten to mention something.
--determine human player
whoishuman = GetCurrentPlayer(); --determine human player, always goes first
humanheroelist = GetPlayerHeroes(whoishuman);
humanmainheroe = humanheroelist(0);
LevelUpHero (humanmainheroe); --debug routine
GetPlayerHeroes
GetPlayerHeroes – return the names of the heroes belonging to the player
Syntax
GetPlayerHeroes(playerID);
Description
This function returns an array that contains the names of the heroes belonging to the specified player.
playerID – the player’s number
Code: Select all
humanmainheroe = humanheroelist[0];
Othmaar wrote:It would help to know what error message you get, if any. I always reference arrays with brackets:Code: Select all
humanmainheroe = humanheroelist[0];
It is also worth mentioning that LUA starts indexes for arrays at the number 1, but the function GetPlayerHeroes() returns an array with index starting at 0, as you have correctly used.
LevelUpHero (humanmainheroe);
humanmainheroe = humanheroelist(0);
difficultylevel = GetDifficulty();
if difficultylevel == "DIFFICULTY_HARD" then
MessageBox ("Maps\SingleMissions\Seize The Throne\debugmess1.txt");
end;
if difficultylevel == "DIFFICULTY_HEROIC" then
MessageBox ("Maps\SingleMissions\Seize The Throne\debugmess2.txt")
end;
GetDifficulty
GetDifficulty – determine the game’s difficulty level
Sytax
GetDifficulty(void);
Description
This function returns the game’s difficulty level. The following constants are set to identify the difficulty levels: DIFFICULTY_NORMAL, DIFFICULTY_HARD, DIFFICULTY_HEROIC. The constants are sorted by growth, which makes it possible to use constructions like GetDifficulty() > DIFFICULTY_NORMAL, etc.
alavris wrote:Hmmm.... I'm not sure if I understand clearly what you are trying to sayBut if I'm going the right path... Unpack your h5m file and just copy TGA and DDS files into unpacked [maps\multiplayer"mapname"\] folder. Then zip this whole path again into h5m format.
But if the problem is in other thing, just tell me, because as I said, I'm not sure if I understood you the right way.
.
fiur wrote:I did the same on my name.h5m file.... (only ofcourse used my file names)
coverted all my dds file into the correct size (240*180)
and put it all into my name.h5m file
but when I'm in the selection screen I don't get any images beside the description of the map.....
I've been working on this for about 5 hours now and think I'm giving up by now...
Users browsing this forum: No registered users and 4 guests