Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 2241 posts ]  Go to page Previous  1 ... 188, 189, 190, 191, 192, 193, 194 ... 225  Next
Author Message
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 04, 2019 2:03 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2479
Location: Arkansas, USA
You have identified what I have been struggling with. The coding I posted works when I play the table the first time and press the Special1 key. But then the flashers don't work when I close the table and open it a second time. As you know, I am not the best coder in the world.

George


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 04, 2019 8:42 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2816
Location: Ontario, Canada
:oops:


Last edited by Gimli on Thu Jul 04, 2019 8:58 am, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 04, 2019 8:46 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2816
Location: Ontario, Canada
The trick is allowing user to over ride the table developers settings such that when they do , it will be saved next time.

This kinda works but will need tweaking:
Copy and paste it at top of script.
Lets say we are using nvR1 to store our light settings in nvRAM

Code:
If nvTotalGamesPlayed = 0 then nvR1 = 1
CheckLightSettings()

Sub CheckLIghtSettings()
AddDebugText "nvR1 = " & nvR1
Select Case nvR1
Case 1
         Flasher9.State = bulbbon: Flasher10.State = bulboff ' Day
         xBAM.Lights.EnableNewRenderer             = TRUE
         xBAM.Lights.MainLightLock                 = FALSE
         xBAM.Lights.SetMainLightPosition                 0,    650,    500
         xBAM.Lights.SetMainLightProperties               1,      0.8,    0.4,   0.15
         xBAM.Lights.SetMainLightAttenuation              1,      0,      0
         xBAM.Lights.SetOtherLightsAttenuation            3,      0,      1
         xBAM.Lights.EnablePostprocessing          = FALSE
         xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
         xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
      Case 2
         Flasher9.State = bulbon: Flasher10.State = bulboff ' Night
         xBAM.Lights.EnableNewRenderer             = TRUE
         xBAM.Lights.MainLightLock                 = FALSE
         xBAM.Lights.SetMainLightPosition                 0,    650,    500
         xBAM.Lights.SetMainLightProperties               1,    0.6,   0.75,  0.075
         xBAM.Lights.SetMainLightAttenuation              1,      0,      0
         xBAM.Lights.SetOtherLightsAttenuation          0.2,      0,      1
         xBAM.Lights.EnablePostprocessing          = FALSE
         xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
         xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
      Case 3
   Flasher9.State = bulboff: Flasher10.State = bulbon ' Dark Night (Slamt1lt's Version)
         xBAM.Lights.EnableNewRenderer             = TRUE
         xBAM.Lights.MainLightLock                 = FALSE
         xBAM.Lights.SetMainLightPosition                 0,    650,    500
         xBAM.Lights.SetMainLightProperties               1,    0.3,      1,   0.05
         xBAM.Lights.SetMainLightAttenuation              1,      0,      0
         xBAM.Lights.SetOtherLightsAttenuation        0.066,      0,  0.333
         xBAM.Lights.EnablePostprocessing          = FALSE
         xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
         xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
         Lighting = 0
     
   Case 4
   AddDebugText "No Settings used in script" 'Should then go with tablename.cfg settings automatically
   AddDebugText "Define your settings in Bam then reboot table"
  End Select
 End If

   


Then either use a menu or if you wish a simple Special1key code, something like this:


Code:
 If (KeyCode = GetKeyCode(Special1Key)) and BAM_VERSION => 254 Then
     nvR1 = nvR1 + 1: PlaySound "everythingelsed"
   If nvR1 > 4 then nvR1 = 1
         CheckLIghtSettings()
   End If


"If nvTotalGamesPlayed = 0 then nvR1 = 1 "
Determines what our initial choice will be prior to playing the first game

nvR = 4 has nothing and therefore won't impose any script based light settings and BAM should use the default.cfg or tablename.cfg if it exists...

If a user wishes to have his own settings saved then once nvR = 4 is chosen he can go into BAM config menu and choose his settings and this will create a tablename.cfg that will
be loaded each time...until he chooses a different selection using Special1key.

The user may choose to paste his own light settings code in the nvR = 4 slot which is currently empty...


Last edited by Gimli on Thu Jul 04, 2019 10:59 am, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 04, 2019 10:32 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2816
Location: Ontario, Canada
To make it clearer, you may wish to add some sort of DMD notification such as :
Code:
MyNewDmd.Text = "[f2][xc][y10]Light Setting " & nvR1


or whatever you wish it to say


Code:
If nvTotalGamesPlayed = 0 then nvR1 = 1
CheckLightSettings()

Sub CheckLIghtSettings()
AddDebugText "nvR1 = " & nvR1
MyNewDmd.Text = "[f2][xc][y10]Light Setting " & nvR1
Select Case nvR1
Case 1
        Flasher9.State = bulbbon: Flasher10.State = bulboff ' Day
         xBAM.Lights.EnableNewRenderer             = TRUE
         xBAM.Lights.MainLightLock                 = FALSE
         xBAM.Lights.SetMainLightPosition                 0,    650,    500
         xBAM.Lights.SetMainLightProperties               1,      0.8,    0.4,   0.15
         xBAM.Lights.SetMainLightAttenuation              1,      0,      0
         xBAM.Lights.SetOtherLightsAttenuation            3,      0,      1
         xBAM.Lights.EnablePostprocessing          = FALSE
         xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
         xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
      Case 2
         Flasher9.State = bulbon: Flasher10.State = bulboff ' Night
         xBAM.Lights.EnableNewRenderer             = TRUE
         xBAM.Lights.MainLightLock                 = FALSE
         xBAM.Lights.SetMainLightPosition                 0,    650,    500
         xBAM.Lights.SetMainLightProperties               1,    0.6,   0.75,  0.075
         xBAM.Lights.SetMainLightAttenuation              1,      0,      0
         xBAM.Lights.SetOtherLightsAttenuation          0.2,      0,      1
         xBAM.Lights.EnablePostprocessing          = FALSE
         xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
         xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
      Case 3
   Flasher9.State = bulboff: Flasher10.State = bulbon ' Dark Night (Slamt1lt's Version)
         xBAM.Lights.EnableNewRenderer             = TRUE
         xBAM.Lights.MainLightLock                 = FALSE
         xBAM.Lights.SetMainLightPosition                 0,    650,    500
         xBAM.Lights.SetMainLightProperties               1,    0.3,      1,   0.05
         xBAM.Lights.SetMainLightAttenuation              1,      0,      0
         xBAM.Lights.SetOtherLightsAttenuation        0.066,      0,  0.333
         xBAM.Lights.EnablePostprocessing          = FALSE
         xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
         xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
         Lighting = 0
     
   Case 4
   AddDebugText "No Settings used in script" 'Should then go with tablename.cfg settings automatically
   AddDebugText "Define your settings in Bam then reboot table"
  End Select
 End If


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 04, 2019 5:14 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2479
Location: Arkansas, USA
Gimli wrote:
This kinda works but will need tweaking


It did need some tweaking but it works. I never would have thought of using a basically blank case selection.

George


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 04, 2019 8:20 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2816
Location: Ontario, Canada
GeorgeH wrote:
It did need some tweaking but it works. I never would have thought of using a basically blank case selection.
George


It's a bit of shell game.

Rav made it so the script based settings trump the CFG settings...so if there are no script settings (ie the case selection is empty)...then the CFG settings prevail

Even still it is a bit of a slippery fish because as soon as you choose a different lighting setup , using your special1key code, then BAM auto saves that as the new CFG file....so the ideal way to go is for users to either bypass the table developers settings or learn how to copy and paste their settings into the blank case selection slot...so that will become a permanent option in addition to the developers suggested lighting


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Fri Jul 05, 2019 12:25 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2479
Location: Arkansas, USA
Gimli wrote:
GeorgeH wrote:
It did need some tweaking but it works. I never would have thought of using a basically blank case selection.
George


It's a bit of shell game.

Rav made it so the script based settings trump the CFG settings...so if there are no script settings (ie the case selection is empty)...then the CFG settings prevail

Even still it is a bit of a slippery fish because as soon as you choose a different lighting setup , using your special1key code, then BAM auto saves that as the new CFG file....so the ideal way to go is for users to either bypass the table developers settings or learn how to copy and paste their settings into the blank case selection slot...so that will become a permanent option in addition to the developers suggested lighting


It is true you can't press the special1key again and exit the table or you will save one of the other options. I don't think too many people will be pressing the special1key very often.

The idea I was trying to figure out was to save the nvR code to each case selection and write a different subroutine where the nvR codes would operate the flashers. I have a feeling that it wouldn't have ended up working much differently than your way.

It would be simpler if lighting changed the brightness of flashers. I guess flashers were never really intended to work as GI. I have noticed there is no way to change glow radius on them. The only way to do it is to adjust the color. You might notice on MB the lit color on some of the nanoflasherrs I added is almost black.

I did encounter this weird problem on the DMD I described on the last posting here:

viewtopic.php?f=15&t=10214&start=10

George


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 11, 2019 11:19 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2479
Location: Arkansas, USA
blue wrote:
Code:
' * - Simple bally system, awards 100 or 1000 when lit. Light by Center target bank
Dim SpinnerBulbs(9,9)
Set SpinnerBulbs(1,1)=BulbLeftLoop1
Set SpinnerBulbs(1,2)=BulbLeftLoop2
Set SpinnerBulbs(1,3)=BulbTriggerGuide5
Set SpinnerBulbs(1,4)=BulbLeftLoop3
                                             
' Total amount of trigger Bank lights in this group (used for scriptwide For/Next loops)
Const SpinnerCountBulbs = 4                                                

Sub Spinner1_Hit()
      FOR x = 1 TO SpinnerCountBulbs
         SpinnerBulbs(1,x).FlashForMs (MusicIntervalTime), (FlashForMSBlinkInterval), BulbOn
      NEXT
End Sub


Use the set command instead. From fpxEngine here's a small sample code. Because fpx is being setup to handle as many or as little same objects as possible, I set each light, and SpinnerCountBulbs is the total amount of those bulbs that I set. This way, I can add more lights under set or delete as many lights as I want if I want to reuse the code for other tables, without causing errors. It also works a lot better than the execute command and the eval command.


I have decided to mod "Jurassic Park" next. I ended up using Francisco's instructions on how to get rid of the "execute" command because I couldn't figure out Blue's method.

Using Francisco's directions, this set of code:

Code:
Sub blockItBAllOff()
Dim x
   for x=1 to 17
      Execute "blockItB"&x&".Collidable=false"
      Execute "blockItB"&x&".Render=false"
   next
end sub


becomes this:

Code:
Sub blockItBAllOff()
   blockItB1.Collidable=false
   blockItB2.Collidable=false
   blockItB3.Collidable=false
   blockItB4.Collidable=false
   blockItB5.Collidable=false
   blockItB6.Collidable=false
   blockItB7.Collidable=false
   blockItB8.Collidable=false
   blockItB9.Collidable=false
   blockItB10.Collidable=false
   blockItB11.Collidable=false
   blockItB12.Collidable=false
   blockItB13.Collidable=false
   blockItB14.Collidable=false
   blockItB15.Collidable=false
   blockItB16.Collidable=false
   blockItB17.Collidable=false
   blockItB1.Render=false
   blockItB2.Render=false
   blockItB3.Render=false
   blockItB4.Render=false
   blockItB5.Render=false
   blockItB6.Render=false
   blockItB7.Render=false
   blockItB8.Render=false
   blockItB9.Render=false
   blockItB10.Render=false
   blockItB11.Render=false
   blockItB12.Render=false
   blockItB13.Render=false
   blockItB14.Render=false
   blockItB15.Render=false
   blockItB16.Render=false
   blockItB17.Render=false
End Sub


It actually only took a few minutes to do it once I had the method figured out. This table needs other help too. It only has one DMD. I think I can improve the lighting and physics also. There are several versions of the table in the one download and each has different textures for the models so I get to pick and choose the ones I like best.

George


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 18, 2019 6:26 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2479
Location: Arkansas, USA
ravarcade wrote:
BAM Update v.254

4. Lights controled in script.
You can control lights in script. There is 9 new commands... all are described on this on image:
Image
... and as usualy you can use CTRL-C in Lights or postprocessing menu to get ready to paste in script code with values.


Rav,

It is not all that critical but you might add "Ball Brightness" to your list of parameters. I find I need to adjust it fairly often when I set up the lighting.

George


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Thu Jul 18, 2019 6:32 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2479
Location: Arkansas, USA
I just thought of something. Does anyone want an option where you can do more than just fade the HUD in and out in the script? I would like to have an option where you can just turn the HUD on and off. Maybe it is just me, but it bugs me when I see the HUD briefly when the table opens and then have it fade out.

George


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2241 posts ]  Go to page Previous  1 ... 188, 189, 190, 191, 192, 193, 194 ... 225  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 3 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: