[H5 EDITOR] Troubleshooting topic
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.
Do you havy any idea what could be wrong?
.
LOL! I was wondering what "not a power of 2" could mean, but it simply is "2^x". I resized this picture to 1024x1024 and it works fine now. Thanks!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've done all you describe above... first make an tga file coverted it to dds... saved both file in my \map folder
then created an PWL.(Texture).xdb with your code within (and yes both my tga and dds file are in there.....)
then I've put this PWL.... file into my h5m file...... when I now start my map I only get a "grey" screen..... what's wrong.....
(when I put this PWL file into my map file I must change it to .pak right??? and then back to .h5m after...)
anyway I'm stucked on this.....
So, lets make it this way... Here is my test-map, with working PWL:
http://d.turboupload.com/de/1029817/79qpi4h5fd.html#
Study structure of this file... and I think everything should be clear then.
.
http://d.turboupload.com/de/1029817/79qpi4h5fd.html#
Study structure of this file... and I think everything should be clear then.
.
thanx alot.....
now I can se that I'm missing the "path" to my tga and dds file
(maps\multiplayer\"mapname"\)
all other files got the right path exept these two files....
how do I make the path right ?
Okay I've got it right now.... just needed to open the file with "winrar" then add the files and then they got the right "path"
thanx alot for all your effort....
now I can se that I'm missing the "path" to my tga and dds file
(maps\multiplayer\"mapname"\)
all other files got the right path exept these two files....
how do I make the path right ?
Okay I've got it right now.... just needed to open the file with "winrar" then add the files and then they got the right "path"
thanx alot for all your effort....
Hmmm.... I'm not sure if I understand clearly what you are trying to say But 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.
.
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.
.
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
My map is a single player map with all 6 positions playable. I am trying to determine which heroe the player selects at the start of the map. The heroe is generated in the player's town. Here is the script I have tried.
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
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
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];
O.
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
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];
The error I had been getting was that the heroe was not leveling up.
I had put
LevelUpHero (humanmainheroe);
in the script to level up the heroe so I would know whether or not
was working. It was not, and you found the cause. Thanks again.humanmainheroe = humanheroelist(0);
Edit: The information about arrays starting with element 1 will also probably save me some headache!
GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
GetDifficulty() does not show up in the editor as red and I could not get it to work so I'm guessing the function was disabled. Looks like we need to look at the gold values to determine difficulty like was necessary in HOMM4....unless I'm missing something.
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.
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
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 say But 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.
.
But today I've been working with the PWLTutorialHinttrigger
that's a hard one here is what I found in the Heritage.pak file:
<?xml version="1.0" encoding="UTF-8"?>
<AdvMapDescTag>
<AdvMapDesc href="/M4.xdb#xpointer(/AdvMapDesc)"/>
<NameFileRef href="/Name.txt"/>
<DescriptionFileRef href="/Description.txt"/>
<TileX>136</TileX>
<TileY>136</TileY>
<Goal>OBJECTIVE_KIND_DEFEAT_ALL</Goal>
<teams>
<Item>4</Item>
<Item>4</Item>
</teams>
<thumbnailImages>
<Item href="/mM4_pic.xdb#xpointer(/Texture)"/>
<Item href="/mM4_2_pic.xdb#xpointer(/Texture)"/>
<Item href="/mM4_3_pic.xdb#xpointer(/Texture)"/>
<Item href="/mM4_4_pic.xdb#xpointer(/Texture)"/>
</thumbnailImages>
<HasUnderground>true</HasUnderground>
</AdvMapDescTag>
(map-tag.xdb for Heritage)
----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Texture>
<SrcName href="/texture/Interface/PWL/Multipayer/mM4_4.tga"/>
<DestName href="/mM4_4_pic.dds"/>
<Type>TEXTURE_2D</Type>
<ConversionType>CONVERT_TRANSPARENT</ConversionType>
<AddrType>CLAMP</AddrType>
<Format>TF_8888</Format>
<Width>240</Width>
<Height>180</Height>
<MappingSize>0</MappingSize>
<NMips>1</NMips>
<Gain>0</Gain>
<AverageColor>-29812472</AverageColor>
<InstantLoad>true</InstantLoad>
<IsDXT>false</IsDXT>
<FlipY>false</FlipY>
<StandardExport>true</StandardExport>
<UseS3TC>false</UseS3TC>
</Texture>
(mM4_pic.xdb for Heritage)
-----------------------------------------------------------
</AvailableHeroes>
<MapRumours/>
<Music/>
<MoonCalendarModifications>
<BlockMonstersWeeks>false</BlockMonstersWeeks>
</MoonCalendarModifications>
<thumbnailImages>
<Item href="/mM4_pic.xdb#xpointer(/Texture)"/>
<Item href="/mM4_2_pic.xdb#xpointer(/Texture)"/>
<Item href="/mM4_3_pic.xdb#xpointer(/Texture)"/>
<Item href="/mM4_4_pic.xdb#xpointer(/Texture)"/>
</thumbnailImages>
<PWLPicture/>
(parts of M4.xdb for Heritage)
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...
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...
.
Who is online
Users browsing this forum: No registered users and 0 guests