Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » Tables Release




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: FPx Table Template v1
 Post Posted: Mon Dec 25, 2017 9:06 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 383
Location: Abbotsford
We all hate scripting. In fact most people (like 99.99 % of the entire planet) when they look at a bunch of code, find it so intimidating and complex that they won't even try. Others just don't even have the time to learn how to script, it's months of study and learning. The biggest problem with Future Pinball (and especially VPX now) is the scripting, it was always the scripting, and will be the scripting in the future.

The FPx template is designed to replace the stock New Table template in Future Pinball. This one will be aimed right at beginners, in fact, with luck, it may work exactly like the Pinball Construction set. This not only fixes the bugs and incompleteness of the New_table template, it also adds more features that every beginner would want, and then presents it in such a way to make it as easy to use as possible.

It is so easy to mess up a script, especially the high level code of a scoring and logic template. Even advanced coders can mess up pretty easily, because all the code is MIXED IN together. FPx divides the script in to 2 parts, with the first part a user section, and the second portion the actual engine. The engine contains "Hooks" to the user section, this allows just about everyone to make simple changes without needing to touch the engine at all, and yet be able to use one of the most powerful, full featured engines available for Future Pinball.

The FPx template is designed for those who want to get their feet wet with scripting, and yet has all the power and features for Intermediate coders to use.

Here's a list of features:

' 4 players support
' Bonus count up to 159, bonus multiplier up to 15x
' Replaced tilt system with a custom plumb bob tilt setup
' Added Variables for easy settings. balls per game, bonus, replay scoring etc
' 2 ball multiball
' Player memory system that requires typing in one line of code per light
' ball save, extra ball, special and jackpot support
' Complete routines included for all aspects of arcade tables, from power up, light Attract mode to a match feature
' Initialization, Light Attract, Match routines all ready included
' easy control of lights for Light Attract and game play, no typing required
' Pause key plays tune
' 9 element x4 translight display, Hud display x2 A.N.D. (Alpha Numeric Display) to support up to Williams System 11
' HUD display can be hidden or shown using the default HUD key set in the editor (Usually the tithe key, just below the esc key)
' Pre-set unified Bally type scoring
' Debug system variable for code testing in place. press F9 key at editor. Also writes to text file during debug mode to track code
' Special HUD displays for debug mode, shows bonus etc
' Multiple sound system capability with background music support
' Solid State and A.N.D. support HUD display
' Preset feature scoring Extra ball/Special etc with just one line of code
' Easy Beginners Fail safe system. All access needed for easy modification of the engine in ONE place without needing to touch the engine code
' You can add/remove/replace lights, sounds, change the display, adjust timers etc through this one setup
' Code is heavily remarked, and teachs you new methods as you work your way down the hit code
' Engine is fully automated as possible, so no need to touch the engine code, no rocket science degree needed.
' A brief tutorial is included in the script, at the very bottom

The FPx template is now available at Pinball Nirvana, and will be uploaded to other sites.
Screenshot at the download page
MERRY CHRISTMAS!!!

http://www.pinballnirvana.com/forums/do ... le&id=5344

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: Jungle Girl


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Mon Dec 17, 2018 5:54 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 58
Location: Australia
Blue, I'm making a table using your template and mostly it works really well. But there is one thing I cannot work out. I have a diverter gate on the right outlane that leads back to the shooter lane. It is set to close after the ball exits via the outlane or hits the drain. But the problem I have is that when multiball is enabled and one ball drains it closes the gate. I dont want that to happen until the second ball drains or exits the outlane. How can I script it so that it doesnt close on draining the first multiball?


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Mon Dec 17, 2018 10:51 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 868
Great job Blue! I've been writing code for FP for almost a decade, and so coding is second nature to me now, but when I started out....oh boy, just mumbo jumbo. But when you get going, you soon realise that coding is where all the creativity is. It's like being a film director - the sets are all built; the cameras and lights are set up; the actors are ready.....now make it all happen.

It's not at all boring when you get going, too much fun in fact. But afterwards, when it's all done and you're just bug fixing, then it sucks.


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Tue Dec 18, 2018 1:19 am 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 383
Location: Abbotsford
Quickly as limited time. No idea where your code is actually placed, but I figured it's wrong.

Simple way...
Put the code in the AddEvent "NEW_BALL" Subroutine, the entire engine is set up to do it this way. "NEW_BALL" is the case setting. This is used to reset the table for each new ball after the previous Player is finished his bonus and drain hit routines. In fact most arcade tables did it this way before full fledged computers took over the code.

(NOTE: "DRAINDELAY" is used more as a delay at a drain hit before the bonus system starts counting.)

@ Slam. Thanks, something like this is so badly needed, so it's just nice someone is actually using it.

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: Jungle Girl


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Tue Dec 18, 2018 3:26 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 58
Location: Australia
Thanks Blue, moving the close diverter code to the "NEW_BALL" Subroutine worked


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Thu May 23, 2019 5:59 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 383
Location: Abbotsford
Since I was on Hiatus to work on my new design (dubbed "project x" for lack of a better name) and it's now to the point that I can start testing the play, I needed a engine, and the only game in town for something like that one is FPX.

After a while I started adding in more advanced coding from Jungle girl, (guess I was in a scripting mood, which is very rare for me) and now decided to kill 2 birds with one stone, and hopefully release a new build of the FPX engine shortly.

Here's what I have so far for additions

'Build1.1
' NOTE: THIS is still being worked on. At the present moment, I am just starting work on moving the music/sound/display code to AddMusicSet().
' - Bug fixes etc
' - Light Attract routine expanded, now displays high score list, table name. This is now fully automated, so no need to add light bulb interval/on/off code
' - BAM support added with a simple system for the user to select among multiple xml physics files and a up to 10 different flipper bounce settings. All
' the user has to do is change a number at the top of the script. The Flipper bounce settings has 10 settings defined, for both high and low ball speed
' flipper bounce, based on the latest xml by GeorgeH. The low bounce settings will automatically adjust based on a math formula
'- The user can change the physic settings at the top of the list. Selectable are the xml, bounce, flipper Omega (force) and ball speed.

' Physics settings
' xPhysicsXML=1 ' Set the xml physics package you want here. 0= No XML(default xml in BAM (NOT TESTED YET)) 1=BAM Team xml 2=Jungle Girl XML by shiva
' fpxSetBounce=7 ' set the amount of "flipper Bounce". From 1 to 10, with 1 being the slowest and 10 the fastest. 6 is a good default value
' xMaxBallSpeed = 3500 ' Set the maximum speed a ball will play. This adds the value to xBAM.BallSpeedLimit
' const MaxOmega = 50 ' Default Max force for All flippers. Must be > MinOmega. These are here in case the omegas are not defined in the xml
' const MinOmega = 18 ' Default Min force for All flippers Must be < MaxOmega. These are here in case the omegas are not defined in the xml

'- FlipperBounce has 2 values, one for a faster ball, and one for a slow ball. Normally this is set to 200, but after tests with a cradled ball, it shows that when the flipper is dropped
' the pick picks up speed to 380 by the time it leaves the tip of the flipper, so the low ball setting has been changed to 400
'- Debug mode (press f9 key in editor) now shows general table info including physics package
' - New Display and Light Seq routines added
' - New Control routine added, which adds multiple soundset support, with the ability to customize all displays/lightSeq/music per soundset. The FPX engine
' has Bally (1982) music and routines, but shortly Williams System 4/5 will be added, with it's own set of code. The user can set which set he wants
' with one change in code and this feature can also be scripted. The new soundset system can support any amount of different sets, so sets from other
' eras or companies like Stern/gottlieb can also be added. (This requires coding) Users should be able to play any soundset/company style with any fpx table just by
' loading in a music library and changing one small line of code.
' - Because of this new system, the engine has been rewritten, and a lot of code has been moved to this new section. It also means that this system can be
' re-used in Hit_Code as well so you can run routines when ever you want just by typing one line of code (e.g. AddMusicSet "LightAttract1") As well,
' you can change the messages in the display in your code
' (e.g. Message(1)= "FPX ":Message(2)= "Engine ":Message(3)= "by ":Message(4)= "shiva ":"LightAttract1")
' All display and lightseq code is also usable in code as well (e.g. AddDisplay "BlinkMessageFast":AddLightFX "BlinkFast")
' - HUD displays expanded from 2 to 4 displays, to match the backglass displays. This is for possible future support of williams/bally system11
' and Data East tables
'- all music/sound code has been (or will be by the time the next build is released) moved to the main control routine (AddMusicSet) so we can have multiple styles without the user having to do anything. This also
' prevents a lot of fustration with all the coding needed, as there are also background sound code, as well as lightseq and a far more advanced text display.
'- There are about 15 display routines now coded, with 6 new routines added. (More will come)
'- Most of the display text code is in AddMusicSet, due to being quite tricky to write, but the user can change the text display for some of them in the AddEvent subroutine.
' Here is a example using the LightAttract1 case, which you can change to your table name and place your author name. (NOTE: there are 4 segments now, but they can
' Only display 7 characters per segment)
'
' Case "LightAttract1"
' ' You can change this to your own message, it will display during light Attract. Note the blank spaces so it will display better
' Message(1)= "FPX ":Message(2)= "Engine ":Message(3)= "by ":Message(4)= "shiva " ' change between the quotes to your message
' AddMusicSet "LightAttract1" ' points to preset routine to displaytext/light show/ music
'
' There are 4 messages, each message corresponds to the display. (i.e. Message(1) is the player one display) Just change the message between each quote and make sure you
' leave in the AddMusic "LightAttract1" line, as this handles all the lights/display/sounds/routines automatically. So your changes could look like this...
'
' Case "LightAttract1"
' ' You can change this to your own message, it will display during light Attract. Note the blank spaces so it will display better
' Message(1)= "MY ":Message(2)= "TABLE ":Message(3)= "by ":Message(4)= "ME!!! " ' change between the quotes to your message
' AddMusicSet "LightAttract1"
'
' All the changeable display code can be found in each of the case settings within the AddEvent main subroutine. Almost all the user adjustable code can be found within
' the AddEvent subroutine, as the engine code is very advanced and even most advanced scripters can make mistakes very easily. The AdEvent subroutine solves this problem
' by having pointers (called "hooks") within the engine directly to AddEvent for any user modification or additional code in a pretty fool proof method. Beginners shouldn't be
' scared to use this,even if you make a mistake, it's a lot easier to find and fix the mistake because it's all in one place and not scattered among thousands of lines of code
'- The AddEvent timer (TimerSetEvent1) has been moved to be part of the main engine, and should not be modified unless you really really know what you are doing
'- Timers, most noteably the background timer, has been rewritten and now has expanded capabilities.
'- The background music timer has also been moved to the engine code from the user modification system
'- A new timer has been created (TimerCloseScoringEvent) to give users a simple single timer if they need it for the hit_code (e.g. pop targets delay time before they pop back up)
' More code will be added in the future, this was used in my Jungle Girl table, and proved to be quite useful. When a music file has finished playing, the engine then points to
' the background music timer (to play the background sound). The background sound system then points to TimerCloseScoringEvent to run any closing statements. The very nice thing
' about this is you don't even have to code a timer interval, it's already set by MusicIntervalTime in AddMusicSet.

The main thing is AddMusicSet, I'm starting to take out the excess coding from the AddEvent() subroutine, and move everything that is Audio/Video/light into the preset routines. This allows for very advanced code, multiple soundset support as a database and just a hell of a lot easier for any beginner to use, and a fraction of the code he has to do as well.

If people want to submit xmls (as the system is set up to use a xml from a selection of multiple physics) or additional BAM coding I can fold it in pretty easily. There's a lot of BAM stuff, it will be nice to have a complete set, but just don't have the time to work it all out.
I will put up what I have got done once I get tired of looking at code and want to do something else. :)

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: Jungle Girl


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Future Pinball » Tables Release


Who is online

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