Make xBAM.ShadowMap not case sensitive?

madmrmax

Weeeeeee
Site Supporters
Joined
Sep 21, 2017
Messages
375
Solutions
1
Reaction score
192
Points
55
Favorite Pinball Machine
Indiana Jones (Williams)
When I build out a shadow map TGA and get the BAM_Init list of shadow maps, it would be awesome if I could update the code from:
Code:
xBAM.ShadowMap "gibulbrightslingshot1"
xBAM.ShadowMap "gibulbrightslingshot2"
xBAM.ShadowMap "gibulbrighthorseshoe1"
xBAM.ShadowMap "gibulbrighthorseshoe2"
xBAM.ShadowMap "gibulbrighthorseshoe3"
xBAM.ShadowMap "gibulbrighthorseshoe4"
xBAM.ShadowMap "gibulbrighthorseshoe5"
xBAM.ShadowMap "gibulbrighthorseshoe6"
xBAM.ShadowMap "gibulbrighthorseshoe7"
to
Code:
xBAM.ShadowMap "GIBulbRightSlingshot1"
xBAM.ShadowMap "GIBulbRightSlingshot2"
xBAM.ShadowMap "GIBulbRightHorseshoe1"
xBAM.ShadowMap "GIBulbRightHorseshoe2"
xBAM.ShadowMap "GIBulbRightHorseshoe3"
xBAM.ShadowMap "GIBulbRightHorseshoe4"
xBAM.ShadowMap "GIBulbRightHorseshoe5"
xBAM.ShadowMap "GIBulbRightHorseshoe6"
xBAM.ShadowMap "GIBulbRightHorseshoe7"
And the command would still work. It appears to be keyed to the lowercase values.

Alternatively, when doing Ctrl+C in the BAM menu for the Shadow Map, perhaps it can use the actual casing of the Bulb names instead of doing lowercase there?

@ravarcade any chance?
 
I added the following code to Attack From Mars and it worked. I added "Attack From Mars 1.03-shadows.tga" to the textures and it worked also. I don't use Ctrl+C to get the code. I just copy the code from a previous table. I copy the names of the bulbs from the table and paste then into the code. I don't change the font. I have never had a problem with fonts. The comments help to make changes. This site uses proportional fonts but the columns do align correctly in the script.

I have had a problem building the shadow maps from the BAM menu. It makes all the lights turn dark when I do it that way. I do have to close the table, edit the code and play the table whenever I make a change which is a hassle. I haven't actually tried building the maps from the BAM menu in a few years. Maybe I should try it again.

Code:
' SHADOW MAP SECTION

' You can delete this section if you want to remove shadow maps.  Delete everything between "SHADOW MAP SECTION" and "End of shadow maps".
' If you plan to copy the dynamic flipper code to use on another table, you need to delete this section.

' Amount [4 - 2000] - how dark is shadow. In most cases 1000 will make center of shadow 100% dark.
'         If you set it higher, edges become more dark.
' Passes [1 - 10] - number of shadows calculation passes. You may see "gradient" on shadow
'        calculated in one pass. You can use higher value to calc averge shadows and remove
'        that gradient. It has no impact how dark shadows are. Higher value -> long calculation time.
' Radius [0.1 - 20.0] - radius of light source. Higher value -> blured edges of shadows. Smaller value -> sharp edges
' Brightness [0.001 - 1000] - well... you know.  TIP: you can set Brightness low and Spotlight range high.
'         You will see big spot light, but it will add only little bit of light.
' Spotlight Range [0.001 - 10] - you can change "range" of that spot light
' White Light [0.0001 - 10] - only for bulbs - you for example bulb is RED (rgb: r=200 g=0, b=0)
'         you can add some "white light" to it and make it little brighter. FP does it.
' Reflection [0.0001 - 10] - only for bulbs - light from bulb will make "playfield" color visible,
'         but what will happend if "playfield" is black? So, part of final color can be just color of light source.
'                                                                           Spotlight    White  
'                                          Amount, Passes, Radius, Brightness, Range      Light    Reflection
'                                          4-2000, 1-10,  .1-20,   .001-1000, .001-10,   .0001-10, .0001-10
' Slingshot bulbs (flash when hit)
    xBAM.ShadowMap "LeftSlingFlash1",         2000,        1,       3.5,         5,                3,         0.1,            0
    xBAM.ShadowMap "LeftSlingFlash2",         2000,        1,       3.5,         5,                3,         0.1,            0
    xBAM.ShadowMap "RightSlingFlash1",         2000,        1,       3.5,         5,                3,         0.1,            0
    xBAM.ShadowMap "RightSlingFlash2",         2000,        1,       3.5,         5,                3,         0.1,            0

    xBAM.ShadowMap "LeftSlingshotBulb1",      1500,        1,        3.5,            4.5,            2,            0,             0.03
    xBAM.ShadowMap "LeftSlingshotBulb2",      1500,        1,        3.5,            4.5,            2,            0,             0.03
    xBAM.ShadowMap "RightSlingshotBulb1",     1500,        1,        3.5,            4.5,            2,            0,             0.03
    xBAM.ShadowMap "RightSlingshotBulb2",     1500,        1,        3.5,            4.5,            2,            0,             0.03

' Other bulbs
    xBAM.ShadowMap "gi5",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi6",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi9",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi11",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi12",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi15",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi19",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi20",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi24",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi25",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi28",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi29",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi30",                         2000,         1,       2.5,         5,             3,         0,                0.03

' End of shadow maps
 
I added the following code to Attack From Mars and it worked. I added "Attack From Mars 1.03-shadows.tga" to the textures and it worked also. I don't use Ctrl+C to get the code. I just copy the code from a previous table. I copy the names of the bulbs from the table and paste then into the code. I don't change the font. I have never had a problem with fonts. The comments help to make changes. This site uses proportional fonts but the columns do align correctly in the script.

I have had a problem building the shadow maps from the BAM menu. It makes all the lights turn dark when I do it that way. I do have to close the table, edit the code and play the table whenever I make a change which is a hassle. I haven't actually tried building the maps from the BAM menu in a few years. Maybe I should try it again.

Code:
' SHADOW MAP SECTION

' You can delete this section if you want to remove shadow maps.  Delete everything between "SHADOW MAP SECTION" and "End of shadow maps".
' If you plan to copy the dynamic flipper code to use on another table, you need to delete this section.

' Amount [4 - 2000] - how dark is shadow. In most cases 1000 will make center of shadow 100% dark.
'         If you set it higher, edges become more dark.
' Passes [1 - 10] - number of shadows calculation passes. You may see "gradient" on shadow
'        calculated in one pass. You can use higher value to calc averge shadows and remove
'        that gradient. It has no impact how dark shadows are. Higher value -> long calculation time.
' Radius [0.1 - 20.0] - radius of light source. Higher value -> blured edges of shadows. Smaller value -> sharp edges
' Brightness [0.001 - 1000] - well... you know.  TIP: you can set Brightness low and Spotlight range high.
'         You will see big spot light, but it will add only little bit of light.
' Spotlight Range [0.001 - 10] - you can change "range" of that spot light
' White Light [0.0001 - 10] - only for bulbs - you for example bulb is RED (rgb: r=200 g=0, b=0)
'         you can add some "white light" to it and make it little brighter. FP does it.
' Reflection [0.0001 - 10] - only for bulbs - light from bulb will make "playfield" color visible,
'         but what will happend if "playfield" is black? So, part of final color can be just color of light source.
'                                                                           Spotlight    White 
'                                          Amount, Passes, Radius, Brightness, Range      Light    Reflection
'                                          4-2000, 1-10,  .1-20,   .001-1000, .001-10,   .0001-10, .0001-10
' Slingshot bulbs (flash when hit)
    xBAM.ShadowMap "LeftSlingFlash1",         2000,        1,       3.5,         5,                3,         0.1,            0
    xBAM.ShadowMap "LeftSlingFlash2",         2000,        1,       3.5,         5,                3,         0.1,            0
    xBAM.ShadowMap "RightSlingFlash1",         2000,        1,       3.5,         5,                3,         0.1,            0
    xBAM.ShadowMap "RightSlingFlash2",         2000,        1,       3.5,         5,                3,         0.1,            0

    xBAM.ShadowMap "LeftSlingshotBulb1",      1500,        1,        3.5,            4.5,            2,            0,             0.03
    xBAM.ShadowMap "LeftSlingshotBulb2",      1500,        1,        3.5,            4.5,            2,            0,             0.03
    xBAM.ShadowMap "RightSlingshotBulb1",     1500,        1,        3.5,            4.5,            2,            0,             0.03
    xBAM.ShadowMap "RightSlingshotBulb2",     1500,        1,        3.5,            4.5,            2,            0,             0.03

' Other bulbs
    xBAM.ShadowMap "gi5",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi6",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi9",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi11",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi12",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi15",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi19",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi20",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi24",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi25",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi28",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi29",                         2000,         1,       2.5,         5,              3,         0,                0.03
    xBAM.ShadowMap "gi30",                         2000,         1,       2.5,         5,             3,         0,                0.03

' End of shadow maps
Thanks! And do you save the TGA shadow map image in the table's Texture Manager? I was having problems where changing the casing (lower case to upper case) of a string would cause the shadow map to have to be regenerated during the table loading.
 
Thanks! And do you save the TGA shadow map image in the table's Texture Manager? I was having problems where changing the casing (lower case to upper case) of a string would cause the shadow map to have to be regenerated during the table loading.
Normal, as you change something in the shadow map (even if it's just lower case to uppercase: it's not the same so reloading).
 
Thanks! And do you save the TGA shadow map image in the table's Texture Manager? I was having problems where changing the casing (lower case to upper case) of a string would cause the shadow map to have to be regenerated during the table loading.

The only time I use the BAM menu is to save the TGA. It saves it to the same folder as the table. Then I just add it to the Texture manager. I don't change the case and just use it as is. I normally wait to add the TGA until just before publishing. There have been a few times where it seems like a change to something else in the script triggers the TGA to not be used. I haven't had that problem in awhile though. You can change the beginning portion of the TGA file to anything and it will work. I tried it a few times. The green part below can be anything. You can't change the red part. That is a good thing because people tend to change the names of tables after they download them.

Attack From Mars 1.03-shadows.tga
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    Drogo has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    SmashXD has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    mrdarc has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    butterface5000 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Pinheads has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    helptv has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    joeboxer has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Auleric has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    vizzone has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Develop has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Krusty104 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    grh450 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    redharry has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    kono87 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Blonderkarli has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Seven Tigerz has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    onedevotee75 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    rgmohr has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    teelegend has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    artmetz has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    chaoswar has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    jerseydude has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Necat has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    SpaceFace70 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    hannon904 has left the room.
      Chat Bot Mibs Chat Bot Mibs: hannon904 has left the room.
      Back
      Top