YesNoOk
avatar

Stage transparency (Read 4023 times)

Started by Creamy_Goodness, June 03, 2023, 11:06:47 pm
Share this topic:
Stage transparency
#1  June 03, 2023, 11:06:47 pm
  • ***
    • USA
    • creamyg.jdluke.com/

> I'm currently editing a stage that was created for Mugen 1.1 to be compatible with WinMugen. Right now, I'm having trouble getting the transparency to work. I moved the main BG layer (0, 4) to be the first sprite in the sff, then edited the sprite in Photoshop so that the transparency color was the last color in the palette. After importing the sprite back into the sff using Fighter Factory Classic, I turned on the "Activate Transparency" check box, and the transparency color disappeared like it was supposed to. However, when I tested the stage in game, the transparency still wasn't working, because Color 255 was still visible. Here is the stage's def file that I edited...

[Info]
 ;Name of the stage.
name = "Epoch Park"
displayname = "Epoch Park" ;Name to display
versiondate = 06,22,2017   
mugenversion = 1.0         
author = "Vdisco"       

;--------------------------------------------------------
[Camera]
 ;Camera starting position: Usually 0 for both
startx = 0
starty = 0
;boundleft = -540 ;-830
boundleft = -195
;boundright = 540
boundright = 195
;boundhigh = -500 ; -800
boundhigh = -150
boundlow = 0
verticalfollow = 1.5 ;.85
;floortension = 360
floortension = 30
;tension = 180
tension = 55
;overdrawhigh = 120
;overdrawlow = 120
;cuthigh = 55
;cutlow = 25
;startzoom = 1
;zoomin = 0.9 ;1
;zoomout = 0.65


;--------------------------------------------------------
[PlayerInfo]
;--- Player 1 ---
 ;Player 1 starting coordinates.

;p1startx = -280          ;Starting x coordinates
p1startx = -70          ;Starting x coordinates
p1starty = 0            ;Starting y coordinates
p1startz = 0           
p1facing = 1            ;Direction player faces: 1=right, -1=left

;--- Player 2 ---
;p2startx = 280
p2startx = 70
p2starty = 0
p2startz = 0           
p2facing = -1

;;--- Player 3 ---
;p3startx = -400
;p3starty = 0
;p3facing = 1

;;--- Player 4 ---
;p4startx = 400
;p4starty = 0
;p4facing = -1

;--- Common ---
 ;Don't change these values.
;leftbound  = -4000 ;Left bound (x-movement)
leftbound  = -1000 ;Left bound (x-movement)
;rightbound =  4000 ;Right bound
rightbound =  1000 ;Right bound
topbound  =  0     
botbound  =  0     

;--------------------------------------------------------
[Bound]
 ;Distance from left/right edge of screen that player can move to
 ;Typically 15
screenleft = 30    ;58 Dist from left of screen that player can move to
screenright = 30   ;58 Right edge

;--------------------------------------------------------
[StageInfo]
;zoffset = 645
zoffset = 220
autoturn = 1
resetBG = 1

;localcoord = 1280, 720

; ;Horizontal and vertical scaling factor for drawing.
;xscale = 2.14
;yscale = 2.14

;--------------------------------------------------------
[Scaling]
topz     = 0       
botz     = 50     
topscale = 1     
botscale = 1.2     

;--------------------------------------------------------
[Shadow]
 ;This controls the darkness of the shadow. Valid values range
 ;from 0 (lightest) to 256 (darkest). Defaults to 128 if omitted.
intensity = 54

 ;This is the shadow color given in r,g,b. Valid values for each
 ;range from 0 (lightest) to 255 (darkest).
 ;Defaults to 0,0,0 if omitted.
 ;intensity and color's effects add up to give the final shadow
 ;result.
color = 0,0,0

 ;This is the scale factor of the shadow. Use a big scale factor
 ;to make the shadow longer. You can use a NEGATIVE scale factor
 ;to make the shadow fall INTO the screen.
 ;Defaults to 0.4 if omitted.
yscale = .1

 ;This parameter lets you set the range over which the shadow is
 ;visible. The first value is the high level, and the second is
 ;the middle level. Both represent y-coordinates of the player.
 ;A shadow is invisible if the player is above the high level,
 ;and fully visible if below the middle level. The shadow is
 ;faded in between the two levels. This gives an effect of the
 ;shadow fading away as the player gets farther away from the
 ;ground. If omitted, defaults to no level effects (shadow is
 ;always fully visible).
fade.range = 0,0

;--------------------------------------------------------
[Reflection]
 ;Intensity of reflection (from 0 to 256). Set to 0 to have no
 ;reflection. Defaults to 0.
intensity = 0

;--------------------------------------------------------
[Music]
 ;Put a filename for a MOD, MP3 or MIDI here, or just leave it
 ;blank if you don't want music. If an invalid filename is
 ;given, then no music will play. To play CD audio, put
 ;the track number followed by ".da". Using a track number of
 ;0 will play a random audio track. For example, to play
 ;track 3 from a music CD, use:
 ;  bgmusic = 3.da
;bgmusic = sound/bensound-dance.mp3
bgmusic = sound/jigglyPark_BGM_Final_01.mp3
;music by GLWuffie
;bgmloopstart = <sample number>
;bgmloopend = <sample number>

 ;Adjust the volume. 100 is for 100%.
;bgmvolume = 90
bgvolume = 0

;========================================================
;--------------------------------------------------------
; Background definition
; ***
;-------------------------------------
; [BG x]
; type = ?       "Normal"/"Parallax"  (def: "normal")
; spriteno = ?, ? Sprite group and number: groupno, imgno  (req'd)
; start = ?, ?   Starting location (integer)  (def: 0, 0)
; delta = ?, ?   Change in location per camera unit moved (float)  (def: 1,1)
; trans = ?      Transparency settings: "none"/"add"/"add1"/"sub"/"addalpha" (def: "none")
; alpha = ?, ?   (only for trans=addalpha) Source,dest alpha (def: 256,0)
; mask = ?       Masking (int): 0 - off, 1 - on  (def: 0)
; velocity = ?, ? Velocity: x, y (float): speed background moves (def: 0, 0)
; tile = ?, ?    Tiling: xtile, ytile (int): 0 - off, 1 - infinite,
;                        >1 - tile that number of times  (def: 0, 0) - only for Normal BG
; tilespacing = ?, ? Tiling: x, y (int) : space between tiles (def: 0, 0)
;  Parallax-only:
; xscale = ?, ?    Top xscale, bottom xscale (float)
; width = ?, ?     Top width, bottom width (int)  (use either this or above, but not both)
; yscalestart = ?  Starting y-scale (float, in percent)  (def: 100)
; yscaledelta = ?  Change in y-scale per unit (float, in percent)  (def: 0)
;-------------------------------------

;-------------------------------------
; Main background definition
[BGdef]
 ;Filename of sprite data
spr = Epoch_Park.sff
debugbg = 0

;----------

[BG sky]
type  = normal
spriteno = 0,1
start = 0, 1
;makes BG move
delta = 0.6, 1 
;mask = 1
;tile =
;velocity =

;----------

[BG bldgs]
type  = normal
spriteno = 0,2
start = 80, 4
;makes BG move
delta = 0.7, 1 
mask = 1
;tile =
;velocity =

;----------

[BG trees tall]
type  = normal
spriteno = 0,3
;start = 0, -50
start = 0, 0
;makes BG move
delta = .8, 1
mask = 1
;tile =
;velocity =


;----------

[BG trees low]
type  = normal
spriteno = 0,6
;start = 0, -50
start = 0, 0
;makes BG move
delta = .9, 1
mask = 1
;tile =
;velocity =

;----------
[BG main]
type  = normal
spriteno = 0,4
;start = 0, -50
start = 0, 0
;makes BG move
delta = 1.1, 1 
mask = 1
;tile =
;velocity =

;----------

;[BG sm gazebo]
;type  = normal
;spriteno = 0,4
;start = 0, -50
;makes BG move
;delta = 1, 1 
;mask = 1
;----------

;[BG food truck]
;type  = normal
;spriteno = 0,7
;start = 0, -50
;makes BG move
;delta = 1.1, 1 
;mask = 1
;tile =
;velocity =

;----------

;[BG fore tress]
;type  = normal
;spriteno = 0,8
;start = 0, -50
;makes BG move
;delta = 1.1, 1 
;mask = 1
;tile =
;velocity =

;----------

;[BG Wall]
;type  = normal
;spriteno = 1,0
;start = 0, 11
;delta = .8, .75
;mask = 1
;tile = 1, 0

;----------
;[BG Pillar Bottom]
;type  = normal
;spriteno = 15,0
;start = 0, 180
;delta = .8, .75
;mask = 1
;tile = 1, 0

;----------
;[BG Pillar Top]
;type  = normal
;spriteno = 15,1
;start = 0, 11
;delta = .8, .75
;mask = 1
;tile = 1, 0

> Any help would be appreciated.

= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Last Edit: June 05, 2023, 01:56:48 pm by Creamy_Goodness
Re: Stage transparency
#2  June 04, 2023, 01:08:39 am
  • *****
  • Shame on you!
    • USA
vVv Ryuko718 Updated 10/31/22 vVv
Re: Stage transparency
#3  June 04, 2023, 10:47:36 am
  • ***
    • USA
    • creamyg.jdluke.com/

@Odb718

"Are you sure the sff is saved in the winmugen format?"

> That's something that I'm sure of. When I saved the sff in the latest version of Fighter Factory, I was asked what format to save it in, and I picked WinMugen. Besides, I was able to open the sff in Fighter Factory Classic after I converted it, so I know the format isn't the problem.


"Check this out and see if doing these steps gets you anything different. https://mugenguild.com/forum/topics/use-fighter-factory-3-make-palette-fast-177794.0.html

But use Save As, and name it something completely different. Then use NotePad or something easy to edit the Stage's Def file and change it to the crazy named sff."

> I'll give that a try, thanks.
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Re: Stage transparency
#4  June 05, 2023, 01:17:21 am
  • *****
  • Shame on you!
    • USA
I haven't switched from 1.1 to winmugen. When I converted a 1.1 to 1.0 It was a royal pain in the butt. I tried using Save As 20 plus times. It wasn't until I made a fresh 1.0 sff that I got it to work. You can use FF3 to import ALL the sprites from one project to the other. I can't see it take more than 4 minutes tops.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Stage transparency
#5  June 05, 2023, 01:20:25 pm
  • ***
    • USA
    • creamyg.jdluke.com/

> OK, I was just doing some further experimentation with the stage, when I decided to try commenting out the main BG layer. When I did, all of the other layers showed up with their transparencies working just fine. I'll let you know if I'm able to make any further progress with this stage.
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Re: Stage transparency
#6  June 05, 2023, 01:56:36 pm
  • ***
    • USA
    • creamyg.jdluke.com/

> OK, I fixed the problem. It turns out that the issue was with the palette I created when editing the main BG layer in Photoshop. In that palette, two indexes, including the last one used for the background layer were set to the same exact color. This is why Fighter Factory Classic was showing that the transparency was correctly applied, but the BG color was still showing up in WinMugen. All I had to do was change the color of the index not being used as the BG color, resave the palette, and make sure the BG image was using the right colors. I'd like to thank Odb718 for his help on this problem, and now I can finally mark it as Solved.
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/