
edit: How do you convert TGA to DDS? I was searching for some freeware program, but found nothing...
.
I used http://eliteforce2.filefront.com/file/D ... rter;29412 but there might be better ones available.alavris wrote: edit: How do you convert TGA to DDS? I was searching for some freeware program, but found nothing...
.
I've known this application before, but it didn't work. Here's error message screen:Pitsu wrote:I used http://eliteforce2.filefront.com/file/D ... rter;29412 but there might be better ones available.
LOL! I was wondering what "not a power of 2" could mean, but it simply is "2^x".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.
I tried it without TGA file and worked ok. I also deleted this line from my 111.(Texture).xdb file: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"/>
oh..... plz help me with this one....Pitsu wrote: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.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...
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.
3. pack everything into a h5m archive again.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>
If it does not work like that, then i have forgotten to mention something.
I know from other code that the variable "whoishuman" is set correctly. Am I referencing the array correctly? Below is how the manual describes GetPlayerHeroes.--determine human player
whoishuman = GetCurrentPlayer(); --determine human player, always goes first
humanheroelist = GetPlayerHeroes(whoishuman);
humanmainheroe = humanheroelist(0);
LevelUpHero (humanmainheroe); --debug routine
GOWGetPlayerHeroes
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];
Thanks! Changing the paranthesis to brackets worked!Othmaar wrote:It would help to know what error message you get, if any. I always reference arrays with brackets:
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.Code: Select all
humanmainheroe = humanheroelist[0];
LevelUpHero (humanmainheroe);
was working. It was not, and you found the cause. Thanks again.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;
GOWGetDifficulty
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.
I got it right (when I start my map now the PWL are loading......)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.
.
Could you upload your map file somewhere (for example on turboupload.com) that I can check what's inside? I think it would be easier way to find the solution...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 0 guests