Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 2242 posts ]  Go to page Previous  1 ... 194, 195, 196, 197, 198, 199, 200 ... 225  Next
Author Message
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 11:57 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2854
Location: Ontario, Canada
Here's a simple drill to understand, changing colour of a flasher:

1. in table editor create a flasher named "Flasher1"
2. At top of script under option explicit add this:
Code:
xBAM.CreateAllExt


3. Under "Sub FuturePinball_KeyPressed(ByVal KeyCode)"
add this:
Code:
if keycode = 47 then Flasher1.State =BulbBlink:Flasher1Ext.SetLitColor 0, 255, 0
 ' V on keyboard... Green
   if keycode = 48 then Flasher1.State =BulbBlink:Flasher1Ext.SetLitColor 0, 255, 255' B on Keyboard ....light blue


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 1:09 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2512
Location: Arkansas, USA
I think you can use "lightExt.GlowRadius = x" on flashers also to adjust brightness which can't be done in the FP editor.

Also, for those of you that cannot use the alternate FP EXE files with your front end program, you can now turn off the watermark while using the original FP EXE file.

George


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 1:19 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2854
Location: Ontario, Canada
GeorgeH wrote:
I think you can use "lightExt.GlowRadius = x" on flashers also to adjust brightness which can't be done in the FP editor.

Also, for those of you that cannot use the alternate FP EXE files with your front end program, you can now turn off the watermark while using the original FP EXE file.

George


Cool stuff , so in above example it would be:
Code:
Flasher1Ext.GlowRadius = x


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 1:27 pm 
Offline
User avatar

Joined: Sun Sep 13, 2015 1:16 pm
Posts: 535
SLAMT1LT wrote:
Colour changing lights...I didn't think it was possible :o . Fantastic job Rav. I can't wait to try them out.


What this allows for now....is the ability to have RGB Mode lighting for inserts or hardware flashers such as used in Star Trek LE or Tron Legacy's Neon RGB Ramps.

So I wonder if this could be used for FP's Tron Stern Ramps to change the light colour if the object is treated as a light? (instead of swapping ramp objects using different colours)

Changing all lights to cycle through the RGB spectrum (for attract modes,etc) shouldn't be too hard. I've seen it used for VPX tables in a similar manner.


But man this could lead to some really cool effects. Imagine F-14 Tomcat's Beacon using hardware flashers... or Aliens Legacy when the power goes out, you can have moving hardware flashers for an emergency beacon effect...

....or for Jaws you could have all the Flashers appear white for "unlit".... but then have them change to any colour you want for any modes or events such as Shark Cage.

Using movable hardware flashers far away from the visible playfield can make for some neat effects...especially for horror themed games! You could use no model for the flasher...or a nano flasher,etc.

Or maybe use them for Blade Runner when the Police Car flies across the playfield...it top lights would illuminate the PF as it goes.

Maybe you can somehow use many lights with Glow radius (not hardware lights) for the Star Wars DSA Lightsabers... HEY! We can now choose our own coloured Lightsaber with this feature! Screw you Galaxy's Edge! :)

Being able to now change the GLOBAL Lighting in script (have it turned off completely for an event) would allow for some neat effects for a Silent Hill table... imagine bloody effects...or flash lights...



Job well done Rav! The FP logo was most likely an Overlay that was always there....so this solution is great for those AMD users that can't run the modified EXEs because it crashed on certain tables.


Now if we can only somehow get Image lights or surfaces to be fully lit on their own like an Overlay or Hologram. That one thing would allow for FP tables to be raised to a completely new level.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 1:28 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
I'm getting a mediation error relating to the dynamic flippers, as soon as I add 'xBAM.CreateAllExt' to the code. There's a conflict there somewhere.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 1:32 pm 
Offline
User avatar

Joined: Sun Sep 13, 2015 1:16 pm
Posts: 535
Gimli wrote:
GeorgeH wrote:
I think you can use "lightExt.GlowRadius = x" on flashers also to adjust brightness which can't be done in the FP editor.

Also, for those of you that cannot use the alternate FP EXE files with your front end program, you can now turn off the watermark while using the original FP EXE file.

George


Cool stuff , so in above example it would be:
Code:
Flasher1Ext.GlowRadius = x



I'm not sure that is true. I think you can only adjust the Halo Glow on the flashers... but this has no effect on the flasher's brightness or area of projection, etc..

Try running the demo table with Dark Night preset...then turn ambient to 0 and Diffuse to 0. Then turn on the test flasher. you will see the Glow change but not the actual Light.


Unless I'm missing something? I hope I'm wrong as this would be amazing if it could be done! Would allow for far more control with lighting.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 1:39 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2854
Location: Ontario, Canada
SLAMT1LT wrote:
I'm getting a mediation error relating to the dynamic flippers, as soon as I add 'xBAM.CreateAllExt' to the code. There's a conflict there somewhere.


Yep.
You have to remove code that has set leftflipperext as xbam.createallext replaces that...

viewtopic.php?nomobile=1&f=86&t=3249&p=93069&hilit=xBAM.CreateAllExt#p93069


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:06 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
Gimli wrote:
SLAMT1LT wrote:
I'm getting a mediation error relating to the dynamic flippers, as soon as I add 'xBAM.CreateAllExt' to the code. There's a conflict there somewhere.


Yep.
You have to remove code that has set leftflipperext as xbam.createallext replaces that...

viewtopic.php?nomobile=1&f=86&t=3249&p=93069&hilit=xBAM.CreateAllExt#p93069



I don't understand any of that. Can you create the new dynamic flipper code and send me a copy? Thanks.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:14 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
TerryRed wrote:

But man this could lead to some really cool effects. Imagine F-14 Tomcat's Beacon using hardware flashers... or Aliens Legacy when the power goes out, you can have moving hardware flashers for an emergency beacon effect...

....or for Jaws you could have all the Flashers appear white for "unlit".... but then have them change to any colour you want for any modes or events such as Shark Cage.

Using movable hardware flashers far away from the visible playfield can make for some neat effects...especially for horror themed games! You could use no model for the flasher...or a nano flasher,etc.

Or maybe use them for Blade Runner when the Police Car flies across the playfield...it top lights would illuminate the PF as it goes.

Maybe you can somehow use many lights with Glow radius (not hardware lights) for the Star Wars DSA Lightsabers... HEY! We can now choose our own coloured Lightsaber with this feature! Screw you Galaxy's Edge! :)



Yes, so many new ideas. I still don't think it's possible to move hardware lights to create the tracking effect you mentioned for Blade Runner. That might be out of BAM's reach.

Future Pinball is still restricted by it's 12 year old engine. Zen Pinball's engine is light years ahead of Future Pinball and I'm very jealous of the effects they can pull off. But their games are boring :lol:

I was about to change the light inserts for Star Trek when I got the mediation error...so I'm already on it.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:15 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2854
Location: Ontario, Canada
Code:
' I modifeid the physics to make the ball appear heavier and slower, like a bowling ball
' but you can easily switch it back to a normal ball...

'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>
'  <!—Custom Physics for Strikes And Spares -->
'  <physics fps="296" threaded="1"></physics>
'  <ball newtonDamping="0" mass="90" gravity="6200" damping="0.65"></ball>
'  <flipper releaseOmega="18" rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="1" mass="20150" omega="43" moeMethod="0"
'           leftXoff="0" leftYoff="1500" leftZoff="0"
'           rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>
'  <bumper impulse="90.0" impulseRandomness="0" vectorRandomness="6"></bumper>
'  <autoplunger mass="20000.0" force="60000.0"></autoplunger>
'  <diverter mass="10000.0" omega="33.0"></diverter>
'  <gate mass="5.0" gravity="2500.0" damping="0.25"></gate>
'  <kicker impulse="1000.0" vukImpulse="1400.0" impulseRandomness="2" vectorRandomness="1"></kicker>
'  <plunger mass="20000.0" force="30000.0"></plunger>
'  <slingshot impulse="645.0" impulseRandomness="15" vectorRandomness="3"></slingshot>
'  <spindisk mass="10000.0" angularDamp="0.33" linearDamp="0.25"></spindisk>
'  <spinner mass="60.0" gravity="100.0" angularDamp="0.25" angularAccel="5.25"
'           spinDampLoose="0.55" spinBackLoose="1.70"
'           spinDampNorm="0.75" spinBackNorm="1.80"
'           spinDampTight="0.95" spinBackTight="1.90"></spinner>
'  <emkicker mass="10000.0" omega="80.0"></emkicker>
'  <varitarget mass="500.0" damping="0.9" tension="3.0" return="15.0"></varitarget>
'  <magnet impulse="10.0" impulseRandomness="2"></magnet>
'  <nudge impulse="240.0" impulseRandomness="25.0" warningLevel="300" leftAngle="60" upAngle="0" rightAngle="320"
'         vectorRandomness="5" visualDistance="3" waitPeriod="300" maxBallVelocity="500.0"></nudge>
'  <defaultMat softnessCoef="0.03" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.02"></defaultMat>
'  <playfieldMat softnessCoef="0.02" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.02"></playfieldMat>
'  <metalMat softnessCoef="0.01" elasticCoef="0.15" staticFriction="0.02" kineticFriction="0.02"></metalMat>
'  <woodMat softnessCoef="0.03" elasticCoef="0.15" staticFriction="0.03" kineticFriction="0.02"></woodMat>
'  <plasticMat softnessCoef="0.02" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></plasticMat>
'  <rubberHardMat softnessCoef="0.08" elasticCoef="0.50" staticFriction="0.04" kineticFriction="0.055"></rubberHardMat>
'  <rubberIntMat softnessCoef="0.1" elasticCoef="0.72" staticFriction="0.05" kineticFriction="0.065"></rubberIntMat>
'  <rubberSoftMat softnessCoef="0.12" elasticCoef="0.83" staticFriction="0.06" kineticFriction="0.075"></rubberSoftMat>
'  <gateMat softnessCoef="0.05" elasticCoef="0.65" staticFriction="0" kineticFriction="0"></gateMat>
'  <kickerMat softnessCoef="0.01" elasticCoef="0.05" staticFriction="0.8" kineticFriction="0.8"></kickerMat>
'  <rampMat softnessCoef="0.01" elasticCoef="0.01" staticFriction="0.01" kineticFriction="0.01"></rampMat>
'  <plungerMat softnessCoef="0.04" elasticCoef="0.55" staticFriction="0.02" kineticFriction="0.02"></plungerMat>
'  <spindiskMat softnessCoef="0.05" elasticCoef="0.5" staticFriction="1.5" kineticFriction="2"></spindiskMat>
'</document>
'=============================== PHYSICS XML ===========================

xBAM.CreateAllExt

' === Ball Rolling FX ===

ExecuteGlobal LoadExternalScript ("ZBRrollingballsoundslib.vbs")

ZRBrampHeight = 40
ZRBtablewide = 516

ZRBsoundballchan = 2
ZRBvolNormLevel = 0.4
'ZRBrollingSound="zfx_ballrollingb2"
'ZRBPitchTunning=-40

ZRBrampSoundballchan = -1  'set to -1 to disable rampsound roll
ZRBrampVolNormLevel = 0.40
'ZRBrampRollingSound="zfx_ballrolramp"
'ZRBrampPitchTunning=40



' === Dynamic Flipper Settings ===

Const BAM_VERSION = 0
AddDebugText BAM_VERSION

Sub BAM_Init()
   If BAM_VERSION < 233 then Exit Sub
   'Set RightFlipperExt      = xBAM.Flipper("RightFlipper")
   'Set LeftFlipperExt       = xBAM.Flipper("LeftFlipper")
   End Sub







If BAM_VERSION => 233 then
'Dim RightFlipperExt,LeftFlipperExt            ' Needed for BAM
Dim omegaCorrectionR
Dim omegaCorrectionL
xBAM.BallSpeedLimit = 3000
End If

Sub OnPreHitFlipperSettings(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
 OnPreHitFlipperSettings_bounceControl(FlipperExt)
End Sub


If BAM_VERSION => 233 then
   const MaxOmega  = 45  ' Omega at base of flipper.  Must be > MinOmega. Default = 45
   const MinOmega  = 32  ' Omega at tip of flipper. Must be < MaxOmega. Default = 32
End If

Sub RightFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(RightFlipperExt)
   omegaCorrectionR = MaxOmega - (RightFlipperExt.ContactPoint * ((MaxOmega - MinOmega)/1.2))
      If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = MaxOmega
      If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = MinOmega
      If (RightFlipperExt.ContactPoint => 0.0) And (RightFlipperExt.ContactPoint =< 1.2) then
         RightFlipperExt.Omega = omegaCorrectionR
      End if
End Sub

Sub LeftFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(LeftFlipperExt)
      omegaCorrectionL = MaxOmega - (LeftFlipperExt.ContactPoint * ((MaxOmega - MinOmega)/1.2))
      If LeftFlipperExt.ContactPoint < 0.0 then LeftFlipperExt.Omega = MaxOmega
      If LeftFlipperExt.ContactPoint > 1.2 then LeftFlipperExt.Omega = MinOmega
      If (LeftFlipperExt.ContactPoint => 0.0) And (LeftFlipperExt.ContactPoint =< 1.2) then
         LeftFlipperExt.Omega = omegaCorrectionL
      End if
End Sub


Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
   ' Params to tweak
   const base_elasticCoef                        = 0.90 ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 350  ' calc elasticCoef to get desired ball speed after ball hit flipper
   const minimum_elasticCoef_to_scale_fast_balls = 0.15 ' we will add this to calculated elastiCoef, so ball after hit will have aditional 5% of speed before hit
   const reduction_for_flipper_in_motion         = 0.17 ' if flipper is not in starting point, reduce elasticCoef by 20%
 
   If FlipperExt.Hit Then
      Dim elasticCoef
      Dim maxElasticCoef
      Dim ballSpeed
      ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5 ' averge speed of

      maxElasticCoef = base_elasticCoef
      If FlipperExt.AngleDiff > 1 Then maxElasticCoef = maxElasticCoef - reduction_for_flipper_in_motion

      elasticCoef = base_elasticCoef
      If ballSpeed > 1 Then elasticCoef = expected_ball_speed_after_hit / ballSpeed
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      If elasticCoef > maxElasticCoef Then elasticCoef = maxElasticCoef

      FlipperExt.SetMaterial elasticCoef
   End If
End Sub

' === End of Dynamic Flipper Settings ===


All I did was put createallext at top and inactivate Dim and Set leftflipperext and rightflipperext references...

simple demo table
https://www.dropbox.com/s/8757z6h8r5jlv ... e.fpt?dl=0

press V and B to change flasher colour...
I copied your code from spares and strikes minus the shadow textures...


SLAMT1LT wrote:
Yes, so many new ideas. I still don't think it's possible to move hardware lights to create the tracking effect you mentioned for Blade Runner. That might be out of BAM's reach.


Of course it is Rav's demo shows you can move flashers where ever you want them...


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2242 posts ]  Go to page Previous  1 ... 194, 195, 196, 197, 198, 199, 200 ... 225  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 5 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:  
cron