wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-08-2007, 08:01 PM   #31
Szythe
User
 
Join Date: Sep 2006
Posts: 320

Submissions (3)

Szythe has a spectacular aura about (143)

Spell Making Session 11 WinnerSmiley contest 4th and 5th place.Mapping Contest Third PlaceSpell making session 08

Default

I don't get it...How am I supposed to type anything in when the instant I push any key the program closes...
When I start the program up, it tells me to "Push any key to continue" and when I start to type the arguments the program instantly closes.
Szythe is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-08-2007, 08:31 PM   #32
blu_da_noob
Nonchalant
 
blu_da_noob's Avatar


Respected User
 
Join Date: Mar 2006
Posts: 1,933

Submissions (2)

blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)blu_da_noob is just really nice (398)

[Quicksilver #2] - 2nd Place[Quicksilver#1] 1st place

Send a message via MSN to blu_da_noob
Default

You have to 'start the program up' with the arguements. Never used stuff from command line before? I think someone wrote something about it in the blp palleter thread.
__________________
blu_da_noob is offline   Reply With Quote
Old 04-08-2007, 09:02 PM   #33
Szythe
User
 
Join Date: Sep 2006
Posts: 320

Submissions (3)

Szythe has a spectacular aura about (143)

Spell Making Session 11 WinnerSmiley contest 4th and 5th place.Mapping Contest Third PlaceSpell making session 08

Default

It's just silly to assume that a person knows something like this in a tutorial for wc3 modding. I've talked to 3 people who have tried to implement text splats and all of them said that the instructions were too confusing or they couldn't get them to work for one reason or another. The point of the instructions is to allow easy implementation of this great system, but you have to be specific with the instructions. Add a part about how to run this program, because not all people know how to do this stuff.

Quote:
Originally Posted by blu_da_noob
I think someone wrote something about it in the blp palleter thread.

Could I have a link to this thread? Search didn't match any threads to "blp palleter"

Last edited by Szythe : 04-08-2007 at 09:05 PM.
Szythe is offline   Reply With Quote
Old 04-08-2007, 10:54 PM   #34
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Quote:
Originally Posted by Instructions
This is a command line tool, so you better start the command prompt, navigate to said folder and type FontConv FontName.tga FontName 34.

Well, this means that you click Start\Run and type in cmd
(this starts the command prompt)
Your working directory will now be something like C:\Documents and Settings\blah
Let's assume you have FontConv and the .tga file at D:\FontConv\
So you type in
D: hit enter
then you type
cd FontConv
hit enter
(you navigated to said folder)
Then you type in the line
FontConv DirtyEgo.tga DirtyEgo 34
and hit enter to start the tool with those parameters.


An alternative way is writing a batch file, which is probably easier.
In the explorer go to the directory where FontConv and the .tga are.
Create a new textfile, open it with a text editor and enter the following 2 lines

FontConv DirtyEgo.tga DirtyEgo 34
pause

Save the file. Now you have to rename the extension of this file to .bat.
So if you had called it Convert.txt you now change it to Convert.bat
Then you can double-click the .bat file to start the conversion.

Here's some background info on windows command line: http://commandwindows.com/command1.htm
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 04-09-2007, 01:10 AM   #35
Szythe
User
 
Join Date: Sep 2006
Posts: 320

Submissions (3)

Szythe has a spectacular aura about (143)

Spell Making Session 11 WinnerSmiley contest 4th and 5th place.Mapping Contest Third PlaceSpell making session 08

Default

I'm still running into problems.

I was having trouble getting my DirtyEgo to work, so I decided to go back and try it on the sample given. I converted it to 32bit .tga.

Zoom (requires log in)

On the top is a picture of the folder just after I double clicked the Convert.bat file. The program created an Initialization.j file, however it is completely blank. There were also no .blp's created.

In the middle is the program just after it has run the code, but before I have unpaused it.

And on the bottom is the text included in my Convert.bat file.
Attached Images
File Type: jpg StillNotWorking.JPG (45.8 KB, 207 views)
Szythe is offline   Reply With Quote
Old 04-09-2007, 11:50 PM   #36
The)TideHunter(
SpeakerGames.com
 
The)TideHunter('s Avatar
 
Join Date: Mar 2006
Posts: 1,328

Submissions (1)

The)TideHunter( is a jewel in the rough (160)The)TideHunter( is a jewel in the rough (160)

Send a message via MSN to The)TideHunter(
Default

Right, simple, open Command Prompt, (not ANYTHING in the FontConv folder).
Just start, run, cmd.
Then you have your usual line like Pitzer said, C:\Documents and Settings\~UserName~

At this point, you need to navigate your "C:\Documents and Settings\~UserName~" to wherever the FontConv folder is, so to make life easier, put it directly in "C:\Documents and Settings\~UserName~".
After that, type your FontConv DirtyEgo.tga DirtyEgo 34. No Ctrl+v, if you want to paste right click and Paste.

This does work, you just musnt be doing it right yet.
__________________
Big plans...
The)TideHunter( is offline   Reply With Quote
Old 04-10-2007, 01:34 AM   #37
Szythe
User
 
Join Date: Sep 2006
Posts: 320

Submissions (3)

Szythe has a spectacular aura about (143)

Spell Making Session 11 WinnerSmiley contest 4th and 5th place.Mapping Contest Third PlaceSpell making session 08

Default

Zoom (requires log in)

And with underscores:

Zoom (requires log in)

I'm about to give up.
Attached Images
File Type: jpg Still no.JPG (60.0 KB, 190 views)
File Type: jpg Still no 2.JPG (19.4 KB, 189 views)

Last edited by Szythe : 04-10-2007 at 01:42 AM.
Szythe is offline   Reply With Quote
Old 04-10-2007, 07:45 AM   #38
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

When you're already in C:\Documents and Settings\User then you only need to type
cd "My Documents"
and hit enter to navigate to that directory.

The picture of where you used the .bat file looks like the FontConv program crashed for some reason.

I've recompiled it with g++. Please try the attached FontConv.exe instead of the old one. (you can try with the .bat file again, if you have trouble using cmd)
Attached Files
File Type: zip FontConv.zip (109.2 KB, 16 views)
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 04-10-2007, 08:03 PM   #39
Szythe
User
 
Join Date: Sep 2006
Posts: 320

Submissions (3)

Szythe has a spectacular aura about (143)

Spell Making Session 11 WinnerSmiley contest 4th and 5th place.Mapping Contest Third PlaceSpell making session 08

Default

It's still crashing, even with the updated program. I think it might be easier to simply have you convert the tga for me, because it might be some part of the program that does not work for my computer specifically.

Attached is the .tga, I abbreviated the font set to only include the characters 0-9 and A-Z, since those are the only ones that I will be needing for my map, and I wanted to reduce file size by as much as possible. Tell me if this will be a problem. Just send me back a .zip of the init code and the blp's. Also, if there is any way for me to collect data on why or how the program is crashing, I'd be glad to help, just tell me what I need to do.


Edit: I might have found the problem. When I'm converting my .psd's to .tga, the transparency is lost for some reason. It turns the transparent background into white, which merges together with my white font, making a single white blank space. I can't figure out why exactly it won't save the transparency info. Anyways, all I'm doing is opening the sample .psd, changing the font, and saving it as a 32bit .tga, and it isn't working. When I change the font color to black (so its saving black text on a white background) it still crashes and just makes the 0kb initialization.j file. I'm attaching the .psd instead of the .tga (Uploaded as a .rar since the forums won't accept .psd attachments).
Attached Files
File Type: rar DirtyEgo.rar (15.6 KB, 13 views)

Last edited by Szythe : 04-10-2007 at 08:28 PM.
Szythe is offline   Reply With Quote
Old 04-10-2007, 09:12 PM   #40
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Unfortunately I don't have this font, so I can't save it from Photoshop (unless you upload the font too, you can find it in the Windows\Fonts folder).

The characters that you don't need should be sorted out after converting the file. Otherwise the numbering of the blps will be wrong. (the numbering follows a standard ASCII table, and if you remove characters it will screw the order up)

Also your tga would be useful so i can try to reproduce the crash of the program.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 04-10-2007, 10:19 PM   #41
Szythe
User
 
Join Date: Sep 2006
Posts: 320

Submissions (3)

Szythe has a spectacular aura about (143)

Spell Making Session 11 WinnerSmiley contest 4th and 5th place.Mapping Contest Third PlaceSpell making session 08

Default

Here ya go. This specific .tga is one in which the font is black on top of white (It still causes a crash). The .rar contains the exact files in the folder upon executing the program, plus the font file.
Attached Files
File Type: rar DirtyEgo.rar (179.2 KB, 9 views)
Szythe is offline   Reply With Quote
Old 04-28-2007, 10:10 PM   #42
Waldbaer
Dragonblood Creator
 
Waldbaer's Avatar
 
Join Date: Nov 2003
Posts: 73

Submissions (3)

Waldbaer will become famous soon enough (37)Waldbaer will become famous soon enough (37)

Default

Hm, I think there is a very strange problem with this system: It does not work on Macs with PowerPC CPUs (machines from before Apple's switch to Intel).
I don't know why, but it seems quite obvious: I tested it on my two PowerPC Macs and nothing is visible, but on my father's Mac Pro and on our PC, it's no problem. I posted the map in a mac games forum and requested to test it: on PowerPC machines it does not work.

It might be interesting if the CreateImage() function works on these computers in any way (I never used it until now) or if it generally doesn't, but nevertheless: At the moment this system should not be applied in any way that is necessary for gameplay.
If you need Macintosh testers, just contact me. I'd be pleased to help you to get this very nice system to work on every computer that normally is capable of running Warcraft III.
__________________
Waldbaer is offline   Reply With Quote
Old 07-01-2007, 07:56 PM   #43
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

@ Szythe: I have finally had time to look into the problem. The alpha channel in the tga image that you provided was screwed (ie alpha was 0xFF for the whole image).

I've converted the files for you (see attachment) if you still need them.

I've also updated the FontConv program to output an appropriate error message in such cases.
Attached Files
File Type: zip DirtyEgo.zip (22.1 KB, 13 views)
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 10-07-2007, 07:44 PM   #44
peq
User
 
peq's Avatar
 
Join Date: Jul 2006
Posts: 57

peq has little to show at this moment (4)

BUG

Collapse JASS:
            if (temp >= 32 and temp <= 127) then
                set curSize = GetStoredInteger(udg_TextSplatCache, "Font::" + font, "Width" + I2S(temp)) * sizePerUnit
                set curWidth = curWidth + GetStoredInteger(udg_TextSplatCache, "Font::" + font, "Width" + I2S(temp))
                if (temp != 32) then
                    set img = CreateImageEx(TS_FONTSPATH() + font + "\\" + I2S(temp) + ".blp", 32 * sizePerUnit, 32 * sizePerUnit, 0, 0, 0, true)
                    
                    call SetImageColor(img, r, g, b, a)
                    call StoreInteger(udg_TextSplatCache, ref, "Image" + I2S(count) + "Line" + I2S(lnr), H2I(img))
                endif
                call StoreInteger(udg_TextSplatCache, ref, "Letter" + I2S(count) + "Line" + I2S(lnr), temp)
                set count = count + 1
            endif

The red line does not create an image if it is the first letter of a text-splat and a text-splat has been destroyed before.

This code fixed it in my tests:
Collapse JASS:
            if (temp >= 32 and temp <= 127) then
                set curSize = GetStoredInteger(udg_TextSplatCache, "Font::" + font, "Width" + I2S(temp)) * sizePerUnit
                set curWidth = curWidth + GetStoredInteger(udg_TextSplatCache, "Font::" + font, "Width" + I2S(temp))
                if (temp != 32) then
                    set img = CreateImageEx(TS_FONTSPATH() + font + "\\" + I2S(temp) + ".blp", 32 * sizePerUnit, 32 * sizePerUnit, 0, 0, 0, true)
                    if H2I(img) == 0 then
                        set img = CreateImageEx(TS_FONTSPATH() + font + "\\" + I2S(temp) + ".blp", 32 * sizePerUnit, 32 * sizePerUnit, 0, 0, 0, true)
                    endif
                    call SetImageColor(img, r, g, b, a)
                    call StoreInteger(udg_TextSplatCache, ref, "Image" + I2S(count) + "Line" + I2S(lnr), H2I(img))
                endif
                call StoreInteger(udg_TextSplatCache, ref, "Letter" + I2S(count) + "Line" + I2S(lnr), temp)
                set count = count + 1
            endif

I think this is the same bug Antiarf posted one year before.

*you should try to destroy some textsplats in your demo

Last edited by peq : 10-07-2007 at 07:45 PM.
peq is offline   Reply With Quote
Old 10-16-2007, 10:55 AM   #45
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

Waldbaer Macs a piece of shit =) (before intel cpus) so "we" don't care it's purly Blizz problems. cause the reasons are hardcoded.
__________________
Toadcop is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 03:00 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services