All In One Example Table - FizX, FLEEP, Ball Rolling, PUP SSF, DOF - Easy to add!

@TerryRed , another solution is to use Ball.ExtFloat2 or Ball.ExtFloat3 instead of Ball.ExtInt3 for Ball Rolling.

FizX already use Ball.ExtFloat1, so Ball.ExtFloat2 and Ball.ExtFloat3 are free for it if nothing use them.

I remind that ball have 3 "memory" slot:

Ball.ExtInt1 --> Create a teleported ball
Ball.ExtInt2 --> Create a teleported ball
Ball.ExtInt3 --> FizX ( for now )

Ball.ExtFloat1 --> FizX ( can be free ! )
Ball.ExtFloat2
Ball.ExtFloat3


I ask rav if he can add more slot in case we need it
 
Last edited:
Something i think about slot just now in same time i wrote my message... I can avoid using Ball.ExtFloat1 now for FizX. :D

So you have 3 free slot again.

I just test it and FizX scatter bounce still work perfect!
 
@TerryRed , here the updated AIO table with only BallExtInt3 for FizX and 6 channel with ExtFloat3 for Rolling sound ^^

Now we have:

Ball.ExtInt1 --> Create a teleported ball
Ball.ExtInt2 --> Create a teleported ball
Ball.ExtInt3 --> FizX

Ball.ExtFloat1
Ball.ExtFloat2
Ball.ExtFloat3 --> Rolling sound ID
 

Attachments

  • All In One Example Table - FizX, FLEEP, PUP SSF, DOF (1.6 - JLou, TerryRed).fpt
    18.7 MB · Views: 5
I don't have PUP Streaming installed. When I play the unchanged template for version 1.5, I get a meditation error that says that "PUP_Stream_enabled" is not defined. According to the directions, PUP Streaming is not required to be installed.

Should I remark out the line in the script that says "PUP_Stream_enabled = false" or add a dim for "PUP_Stream_enabled"?
Just add a Dim for PUP_Stream_enabled
 
I don't have PUP Streaming installed. When I play the unchanged template for version 1.5, I get a meditation error that says that "PUP_Stream_enabled" is not defined. According to the directions, PUP Streaming is not required to be installed.

Should I remark out the line in the script that says "PUP_Stream_enabled = false" or add a dim for "PUP_Stream_enabled"?

DOH! How'd I miss that. I also missed removing PUP_DMD lines.

Remove PUP_Stream_enabled = false as that is not being used, and better to not confuse others. An update will probably be coming soon anyways.
 
Last edited:
An updated table is incoming with the fixes/updates from JLou and me, and a couple of things rearranged a bit. Just need to do some testing first.
 
@Popotte @Runner @Zobou @JLou5641 @GeorgeH @Gimli @AnonTet @LtJazz

1.6 - AIO Example table - Big update! Fixes and changes!

- removed commands for functions not used in this example table (PUP_DMD_Enabled, PUP_Stream_Enabled, etc) thanks to @GeorgeH for catching that!
- updated FizX physics code to change how ball ID's are handled to prevent conflicts
- updated FizX physics code for more efficient Rubber bounce handling
- updated Ball Rolling Sound code to change how ball ID's are tracked to prevent conflicts
- Ball Rolling Sound settings has a new option to disable / enable Ball Rolling Sounds
- Ball Rolling Sound settings has TrackedBalls() now (it was located in Rall Rolling Sound code section before)
- ray cast shadows are enabled, because..... why not :)


With the previous (1.5 AIO table and older) code for FizX and Ball Rolling Sounds, there were conflicts with some tables that used the same Integer arrays (for BAM Custom Balls and other things), which would cause some problems.

Now the following are used by FizX and Ball Rolling Sound tracking:

Ball.ExtInt3 --> FizX
Ball.ExtFloat3 --> Rolling sound tracking ID

This frees up the following for other uses:

Ball.ExtInt1
Ball.ExtInt2
Ball.ExtFloat1
Ball.ExtFloat2


Ball Rolling Sound Settings and startup changes:

- note the new Enabled setting and the new location for TrackedBalls() (which is no longer in the Ball Rolling Sound code!)

1674339501577.png


...and the Ball_Rolling_Sounds_Start has been updated

1674339618068.png


As for how the Ball Rolling sound works... a simple explanation as best as I can describe...

- Table starts
- Ball_Rolling_Sounds_Start is run, and the Ball Rolling Timer starts (timer is always running, never stops)
- Ball Rolling code waits to see if any balls are created
- once a Ball is created, it's detected and now assigned a tracking ID, and is now tracked
- looping sound is started with volume = 0 on next available "channel" (PUP has its own multiple channels, FP Sound uses specified playmusic channel in Ball Rolling Sound settings)
- volume / pitch will change based on ball speed and position, etc.
- if more balls are created, they are tracked, assigned an ID and will play another looping rolling sound on next available channel (PUP SSF only), which will change based on position / speed of those balls
- if a tracked ball is destroyed, then Ball Rolling tracking / looping sound ends (no longer using that "channel")
- Ball Rolling Timer checks for any other balls
- if any other balls exist, then process repeats and is now tracking another ball (next in line) and playing rolling sounds based on this ball's speed and position on next available channel
- this process repeats each time a ball is destroyed
- when all balls are destroyed, then timer keeps checking for any new balls

The nice thing is.... you don't need to really understand how it works... as it just works automatically. :)



Updating previous tables already using the AIO Example code version 1.5 or older

To anyone who has used the AIO Example table code (1.5 or older), I highly recommend you update to the new code.

To properly update your table, do the following:

- make a backup of your current table with the older AIO Example table code
- copy ALL the code from the new 1.6 table starting from "COPY ALL CODE TO ANOTHER TABLE - START HERE!" to "COPY ALL CODE TO ANOTHER TABLE - END HERE!"... and replace your table's (AIO Example table) code with the new 1.6 table code (all of it!).
- it's important that you use all the new code, as some things are arranged different, and new settings added, etc
- update the FizX_General_Settings section using the settings from your backup table
- update the FizX_Profile_1_Settings section using the settings from your backup table
- update the FizX_Profile_2_Settings section using the settings from your backup table
- copy the PHYSICS XML section from your backup table and replace the PHYSICS XML section in the new table. Only do this if you made any needed changes to this section!
- copy the MECHANICAL SOUNDS AND FEEDBACK section from your backup table and replace the MECHANICAL SOUNDS AND FEEDBACK section in the new table
- update the "Ball Hit Sounds : Volume Setup" and the "Ball Rolling Sound Settings" as needed based on your backup table's settings


PUP SSF and the FP_PUP_SSF pup-pack

- if the player has PUP installed, but does not have the FP_PUP_SSF pup-pack installed, then if PUP_SSF_Enabled = true, the player will have no mechanical / ball rolling sounds, as PUP won't be able to load any sounds from the FP_PUP_SSF PuP-Pack
- I recommend you include the FP_PUP_SSF pup-pack folder with your tables that use this AIO Example code. Make mention in your download post about copying FP_PUP_SSF to the PUPVideos folder for anyone who has PUP installed
- if you do not want to include the FP_PUP_SSF pup-pack with your table, or don't want to support PUP features on your table... then be sure you have PUP_SSF_Enabled = false set in your table script




The new 1.6 table update can be found here (also on the first page's tutorial)

 
As for how the Ball Rolling sound works... a simple explanation as best as I can describe...

- Table starts
- Ball_Rolling_Sounds_Start is run, and the Ball Rolling Timer starts (timer is always running, never stops)
- Ball Rolling code waits to see if any balls are created
- once a Ball is created, it's detected and now assigned a tracking ID, and is now tracked
- looping sound is started with volume = 0 on next available "channel" (PUP has its own multiple channels, FP Sound uses specified playmusic channel in Ball Rolling Sound settings)
- volume / pitch will change based on ball speed and position, etc.
- if more balls are created, they are tracked, assigned an ID and will play another looping rolling sound on next available channel (PUP SSF only), which will change based on position / speed of those balls
...
If I well understand, you have to create first your "main" ball (for FP without PUP SSF) because if you, for example, create first a messenger ball, only it will be tracked, isn't it?
 
If I well understand, you have to create first your "main" ball (for FP without PUP SSF) because if you, for example, create first a messenger ball, only it will be tracked, isn't it?

I'm not sure what you mean by a messenger ball.

It will track whatever balls are created on a first come basis. So if you created 10 balls to use on an EM table with balls on the backbox... then it would track up to 6 of those balls. Any other balls created (for gameplay) wouldn't be tracked because of the backbox balls still existing.

It's a good point though. You could not start ball rolling at first and then wait for a game to start, and then try starting Ball Rolling... but the same problem will come I think in that once your ball drains, then any other existing balls will be tracked first.

Also... any balls "outside" the cabinet (like in a mini-playfield) probably won't track correctly. Well they "will", but their sound position will always be from the position of the original location of the mini-playfield. So if a ball is transported to a miniplayfield outside the cabinet, and the miniplayfield is "shown" in the the cabinet during gameplay, the ball sound position will still come from outside the cabinet.

For 95% of the tables out there.... this isn't a problem... but I can see it being tricky in cases like your EM tables that are using balls on the backbox. I'm not sure how best to make that work. Best thing to do is run Debugger, and monitor what is happening.
 
I think I'll give a name to the main ball and just ignore the other ones (with an empty name).
Have to try that.
 
Another thing to also consider..... Captive Balls.

If a table has numerous Captive Balls that always exists and may be hidden... then these will also use up the ball rolling sound channel for FP Sounds. PUP SSF is more flexible as it can track multiple balls and play their sound on multiple channels.

Again, most tables will use this Ball Rolling Sound code just fine... but there's bound to be the odd exception that will not allow it to work correctly, or may even cause an issue. This is why I added the option to not enable Ball Rolling Sounds in the Settings section, just in case.... and the player can turn them off as well if they don't actually like them (and save a bit more cpu usage as well).
 
Spectrum comes to mind with 2 captive balls.
 
just an idea.. tracked only ball that have more than a specific speed.. 200 should be a good start
 
just an idea.. tracked only ball that have more than a specific speed.. 200 should be a good start
Very good idea and even more if 200 is a variable...
For me, the goal is to know which is the ball to follow.
If it's not possible, it's not a drama for me as I'm not a great fan for ball rolling sound.
I'm really waiting for FizX 11.0 because you are really doing a great job! :cheers:
 
I use this trick for FizX to optimize it.

I'm not a fan of ball rolling sound too. On modern pinball, you can't really pay attention to this... apart on ramp.
But also, on next BAM update, we will have 9 slot for Ball.ExtInt.. Maybe it will help you 😉

Thanks for your compliment 😉.
 
For me, you really hear ball rollling sound when you have tilted. So....
And OK for ramps.
 
just an idea.. tracked only ball that have more than a specific speed.. 200 should be a good start

It's already "supposed" to work like that for balls not moving. Not sure about the actual value used for speed.

Easiest things to check, is run the DEBUGGER. It will tell you when a ball is being tracked, etc... and it writes to a text file (only when debugger is run)... assuming everyone copied my debugger code on their table as well.

It's easier to use with PUP SSF, as it has multichannel support... but for FP... it only uses one channel for all balls, so you won't hear them all in the same way, and depending on the situation... wont hear anything again until all balls are drained.

Ball Rolling is by far at the bottom of my priority list. :) That's why I added the option to enable and disable it just in case its a PITA and won't work on a particular table, or someone simply doesn't like it.

1674426648513.png
 
Like so (mind the paths to reflect yours)
Code:
@echo off


cd "C:\Emus\Future Pinball\BAM\"

echo.
echo ---------------------------------------------------------------
echo This windows should close automatically AFTER you exit the game
echo ---------------------------------------------------------------
echo.

rem FPLoader.exe /STAYINRAM /open %1 /PLAY /exit
FPLoader.exe

echo Make sure Future Pinball.exe is killed
taskkill /f /im "Future Pinball.exe"

I used this to double click .fpt file and run the table directly but that command is commented (rem) and like this it just calls FP and you go from there.
The bold part is what kills all references found (if any) to "future pinball.exe"

I created the batch file. When I click on it, it briefly displays the command prompt and closes. It doesn't do anything else. How did you set it up to run when you double click .fpt file?
 
I created the batch file. When I click on it, it briefly displays the command prompt and closes. It doesn't do anything else. How did you set it up to run when you double click .fpt file?

New code (very small changes)

Code:
@echo off

c:
cd "C:\Emus\Future Pinball\BAM\"

echo.
echo ---------------------------------------------------------------
echo This windows should close automatically AFTER you exit the game
echo ---------------------------------------------------------------
echo.

FPLoader.exe /STAYINRAM /open %1 /PLAY /exit

echo Make sure Future Pinball.exe is killed
taskkill /f /im "Future Pinball.exe"

  • You MUST Adjust the paths accordingly to your FP location.
  • Right click an FPT file and click Properties
  • Press the Change button
  • Scroll down to the option Choose an app on you PC
  • point to the batch file (you'll lose the icon in .fpt files though)
But I've moved on from this. I'm using FPRocket
 
New code (very small changes)

Code:
@echo off

c:
cd "C:\Emus\Future Pinball\BAM\"

echo.
echo ---------------------------------------------------------------
echo This windows should close automatically AFTER you exit the game
echo ---------------------------------------------------------------
echo.

FPLoader.exe /STAYINRAM /open %1 /PLAY /exit

echo Make sure Future Pinball.exe is killed
taskkill /f /im "Future Pinball.exe"

  • You MUST Adjust the paths accordingly to your FP location.
  • Right click an FPT file and click Properties
  • Press the Change button
  • Scroll down to the option Choose an app on you PC
  • point to the batch file (you'll lose the icon in .fpt files though)
But I've moved on from this. I'm using FPRocket

Your method works but it disables the right click context that I set up as I describe on my tutorial:


I will probably have to disable the bat file. I use the right click when I work on tables.
 
I have ran into that problem before. So I had to icons pinned to start menu. (win 11). When I just wanted to play, I'd double click the .fpt otherwsie I simply called Fploader.

You can also try to use just FPLoader.exe /open %1 but I'm not sure it it'll do the trick of just open the table... been a while.
 
I have ran into that problem before. So I had to icons pinned to start menu. (win 11). When I just wanted to play, I'd double click the .fpt otherwsie I simply called Fploader.

You can also try to use just FPLoader.exe /open %1 but I'm not sure it it'll do the trick of just open the table... been a while.

I tried editing that line several ways and can't make the right click work with the bat.
 
You mean right click to choose between "edit" and "open sort of way? I can't help there. I supose some registry hacking is needed (if possible) but that's beyond my level of knowledge.
 
You mean right click to choose between "edit" and "open sort of way? I can't help there. I supose some registry hacking is needed (if possible) but that's beyond my level of knowledge.

The way I do it is you don't even need to open RegEdit. You create a *.reg file that you double click to save the changes to the right place in the registry.
 
That trick I know. I'm just don't know the appropriate hack for what you want (assuming it is possible)
 
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: dizzeee has left the room.
      Back
      Top