The International Simutrans Forum

PakSets and Customization => Pak128 Bug Reports => Pak128 => Pak128 Solved Bug Reports => Topic started by: gauthier on December 24, 2009, 04:23:57 pm

Title: strange bug with making fences ...
Post by: gauthier on December 24, 2009, 04:23:57 pm
Yesterday I began a small fances addon for pak128 ...
I made a first fence which worked very well.
Today I made a palisade which is working fine too but now the fence makes a bery strange graphical bug ...

I use Simutrans 102.1 underground slopes

(http://img1.imagilive.com/1209/horreur.png)

Here are the sources :
(http://img1.imagilive.com/1209/grillage.png)

(http://img1.imagilive.com/1209/palissade.png)

Quote
Obj=way
waytype=track
system_type=255
Name=fence
cost=5000
maintenance=0
topspeed=0
max_weight=0
intro_year = 1900
intro_month = 1
icon=> grillage.4.0
cursor=grillage.4.1
image[-]=grillage.3.1
image=grillage.0.1
image[N]=grillage.0.3
image[W]=grillage.0.2
image[E]=grillage.0.0
image[NS]=grillage.0.5
image[EW]=grillage.0.4
image[NSE]=grillage.2.3
image[NSW]=grillage.2.1
image[NEW]=grillage.2.0
image[SEW]=grillage.2.2
image[NSEW]=grillage.3.0
image[NE]=grillage.1.1
image[SE]=grillage.1.3
image[NW]=grillage.1.2
image[SW]=grillage.1.0
imageUp[3]=grillage.3.3
imageUp[6]=grillage.3.2
imageUp[9]=grillage.3.5
imageUp[12]=grillage.3.4
diagonal[NE]=grillage.2.4
diagonal[NW]=grillage.1.5
diagonal[SE]=grillage.1.4
diagonal[SW]=grillage.2.5
-------------------------
Obj=way
waytype=track
system_type=255
Name=palisade
cost=2500
maintenance=0
topspeed=0
max_weight=0
intro_year = 1800
intro_month = 1
icon=> palissade.4.0
cursor=palissade.4.1
image[-]=palissade.3.1
image=palissade.0.1
image[N]=palissade.0.3
image[W]=palissade.0.2
image[E]=palissade.0.0
image[NS]=palissade.0.5
image[EW]=palissade.0.4
image[NSE]=palissade.2.3
image[NSW]=palissade.2.1
image[NEW]=palissade.2.0
image[SEW]=palissade.2.2
image[NSEW]=palissade.3.0
image[NE]=palissade.1.1
image[SE]=palissade.1.3
image[NW]=palissade.1.2
image[SW]=palissade.1.0
imageUp[3]=palissade.3.3
imageUp[6]=palissade.3.2
imageUp[9]=palissade.3.5
imageUp[12]=palissade.3.4
diagonal[NE]=palissade.2.4
diagonal[NW]=palissade.1.5
diagonal[SE]=palissade.1.4
diagonal[SW]=palissade.2.5

And by the way I have another problem with graphic.simutrans ...
(http://img1.imagilive.com/1209/wherewherewhere.jpg)
Title: Re: strange bug with making fences ...
Post by: vilvoh on December 24, 2009, 04:36:48 pm
The image format is 32 bits, with transparency activated. It must be 24 bits. Create a new image of the same size and just copy & paste the old one on it.

About the g.s.c problem..which web browser are you using (operating system and version)?
Title: Re: strange bug with making fences ...
Post by: DirrrtyDirk on December 24, 2009, 04:50:37 pm
Yes that looks like PNG with alpha channel active. Save without alpha and it should be fine.
Title: Re: strange bug with making fences ...
Post by: gauthier on December 24, 2009, 05:39:32 pm
Quote
The image format is 32 bits, with transparency activated

I see ... one more bug from windows 7's MSpaint -_-"
thanks, I'm going to try this solution.

Quote
About the g.s.c problem..which web browser are you using (operating system and version)?
Firefox 3.5, windows 7 pro x32 bits.
Title: Re: strange bug with making fences ...
Post by: VS on December 24, 2009, 06:09:19 pm
I see ... one more bug from windows 7's MSpaint -_-"
I think it's rather problem of makeobj which accepts only subset of PNG format...
Title: Re: strange bug with making fences ...
Post by: vilvoh on December 24, 2009, 06:31:43 pm

I can't test it with windows 7, but I've tested it with Firefox 3.5.5 and windows xp sp2 and it shows the captcha img. It's a dinamically generated image, as the source is a php script. So I guess something is blocking it. Are you using some kind of firefox blocking addon link Adblock or similar?
Title: Re: strange bug with making fences ...
Post by: gauthier on December 24, 2009, 07:09:52 pm
I'm using adblock ...

Quote
Quote
I see ... one more bug from windows 7's MSpaint -_-"
I think it's rather problem of makeobj which accepts only subset of PNG format...

No it's a problem with paint since I never asked it to use 32bits png.
Title: Re: strange bug with making fences ...
Post by: vilvoh on December 24, 2009, 07:15:16 pm

Then please disable adblock for g.s.c or include g.s.c in the allowed sites list...  ;D

No it's a problem with paint since I never asked it to use 32bits png.

I'm not agree. My experience says that It's the default behaviour of several painting programs. GIMP sometimes actives the alpha channel too, even you don't specify it.
Title: Re: strange bug with making fences ...
Post by: DirrrtyDirk on December 24, 2009, 08:09:45 pm
Yes, GIMP chooses automatically. If you use layers (or what are they called in English?) in GIMP, it automatically uses alpha channel / layer internally. And if you save that, you end up with 32bit format saves as well. So you have to use the "remove Alpha" function before saving, or ... the other function, whatever it's called in English (sorry, only have the Geman version available here)
Title: Re: strange bug with making fences ...
Post by: gauthier on December 25, 2009, 11:09:46 am
Quote
Then please disable adblock for g.s.c or include g.s.c in the allowed sites list...  Grin

... doesn't work  :-X