******************************************************************* *** shivaEngine Build 1.8, based on the spike script series 5 *** ******************************************************************* September 2001 shivaengine.vpt text files written and updated by shiva. shivaEngine Team: shiva - Layout, scripting, Team Leader Cold1 - Main Scripter 4Eyes - Scripter (Quickball) Thanks to: Black for the HS save codes and Randy Last Updated: February 21, 2002 spike_script5.vpt By Spike Beta tested and critiqued by Mr_Staypuft ======================== shivaEngine Files ======================== There are a small series of files that should be included with this engine and example table: Some of these files may have a version number included within the file name - shivaEngine.vpt ' Table Example - shivaengine.vps ' External file, include with your vpt table ' in the same folder. Make sure this file IS IN THE ' SAME FOLDER WITH THE VPT TABLE - termiana2.TTF ' Font used, place in your Windows/Fonts folder - ShivaEngineChanges ' This file - codes_for_your_table ' Details all the code calls used by this engine ' for inclustion into your own table ' Also details and lists all the subs ' and timers - Tutorials/Docs Folder ' Expanded Tutorials/code snippets on some of the features ' used in shivaEngine - Files folder ' graphics files used in this example ============ Terms of Use ============ Spike script ============ There are no strings attached for using this script. Mr_Staypuft and I would appreciate a minor mention in your credits, but it is not required. You may use this script in any manner you see fit to enable you to learn and create pinball tables for VP (with the exception of calling it your own). We do ask that you give credit to Black if you use the load/save routines in your code. THAT'S IT. Enjoy. shivaengine v1 ============== No Strings attached to this version, though a mention in the credits would be nice, especially if you use any of the graphics. =========== Changes (SpikeScript version 2 to 5) =========== Version 2 - Compacted some of the code. Mostly changing the long if/then statements to select/end select statements. Minor changes in the match routine to use the mod statement for getting the last two digits of the score. Also used mod in the bonus count section. - Added a ball image. Credit goes to Pac Dude for making it. - Added pins in the plunger area so the ball is now shot out instead of pushed. - Did some minor post and plastic work on the slingshots as an example. - Replaced the outerwall with discrete components. Should make alteration much easier to do. Version 3 - Addition of LED readouts for score, ball, and credits - Due to the 8 digit score limit, the machine will 'turn over' at 100,000,000 points Version 4 - Multi-player support: up to 4 players - Score flash: current players score flashes until ball is launched Version 5 - Drop target bank: Each target is worth 1000 points. Drop all three for 25,000 points. - Saucer: Scores 25k, 50k, 75k, and Special, then repeats. - Countdown match: Match number does not just appear. It steps through several numbers before stopping at the actual match number. - Fixed bug in computing/saving highscore =================== shivaengine Changes =================== Build 1.1 (shiva) ================= - New Template layout, replaced outer walls, flipper/slings, added apron and skirt, outer walls etc. It's a very rough layout, so there isn't so much to modify for a new design. Some parts are more polished so new designers can study table layout and design. - Modified table design of the old spike script layout. Most of the code was kept so people could follow the changes from the spike script to the engine script - Added new table objects for demo purposes of new script features, modified settings of bumpers, flippers and others based on the game Trigon's settings, as well as other layouts previously done by shiva - Renamed walls, lights etc so the names are similar in a group. If you have a lot of different objects, or objects that overlap, it's sometimes hard to tell what you are clicking on, so it's a very good habit to get into. - Moved internal code to group as much object code as possible together (makes it easier to understand if it's all in one place) - New features added for demonstration purposes are: * Debug Keys * Multiball * Multidirectional kicker example (with a "warp" to blue ramp during multiball) * Lane change with rollovers * Ramp diverter (another way instead of using a gate) * Looping tutorial with timer * Button targets (with bonus light) There is also a brief tutorial included to explain some of the coding. Build 1.2 (4Eyes) ================= - Tidied code, added definition of tablename for loadhs/savehs and MsgBox's, * changed this back to shivaengine.txt for load/save hs * wouldnt load the hs * I kept the tablename because it has other functions r for rules - Mod'ed to use CreditKey and StartGameKey instead of 1 and 5 - Added QuickBall code - also needs QBLight - I put between flippers... could poss use LightEB instead * also added QuickBallTextBox for use with this * had to add QuickBallTimer.Interval = 20000 it wouldnt have 20 seconds all the time without it Build 1.4 (Cold1) ================== - Added sounds to most hit events & plunger - Changed shivas ABC targets to line up correct - Fixed high score game light to go off when games started - Added drop targets timer on targets abc - Added bonus collect & bonus collect kicker - Changed the name of save game to shivaengine.txt, you would change this in all 3 lines to whatever the name of your game is - Upped the goal1 & goal2 points for free game Goal1 = 250000 ' Set the first replay score to 250,000. Change as needed Goal2 = 500000 Build 1.5 (Cold1) =================== - Added a credits text display, showed how to use it & tagged it in case you don't wan't it in your script/ search this '4CreditsText to find all the lines of script that use the routine - Changed keycode = AddCreditKey from(6)keycode = 6 keycode = StartGameKey from(2)keycode = 2 - Added some info on the bonus countdown - Fixed a sound or two........wrong ones at the right time Build 1_6 (Cold1) =================== - I combined all changes the script using 4Eyes Changes & the other builds - Changed LightStates so you have less typing instead of LightStateOn it now = 1 instead of LightStateOff it now = 0 instead of LightStateBlinking it now = 2 - Made LightHS blink when hi score is broken - Had to fix a few things here "*" Build 1.7 ==================== - Tutorial additions - Bug fixes Build 1.8 (shiva unless noted) ==================== - Major Layout changes and adjustments to make it nice and pretty. :) - New backdrop added - Additional files added, images used in this table example (only 2, the backdrop and the shivaEngine logo, which can be removed in the backdrop editor) - Backdrop rearrangement and redo, with lights and text replaced - Added: Countdown goes faster with each countdown of bonus - Added: Bonus Collect, which gives bonus value un-multiplied, then restores the bonus and returns the ball back into play. This replaces the orginal routine written by Cold1 - Added: Bonus Countdown by multiplier! (script 8a) - Added: Converted some features into subroutines, so one line script calls triggers that routine New routines are getSpecial, GetExtraBall, TAdvMult(), BonusCollect - Added new debug keys - Changed: 3 lane with lane change by flippers changed to 5 lanes. Inner lanes by flippers also control lane changes. You now need 5 lights lit to make Multibonus. A new tutorial has been written for this separate from this file. - Changed: 5x Multiplier now 4x - Fixed: RampLoop Bonus scoring restored, was missing from previous version (?) - Fixed: LockKicker1 no longer drain ball on kickback. - Fixed: No sound on 10 count - Fixed Tilt Bugs and added new Tilt routines * Bonus will no longer countdown after a tilt * Kickers will just kick a ball back if tilted * Bug fix - prevent Quickball/Ballsaver being triggered after a tilt and a loss of a ball * Tilt routines for targets, triggers and any other scoring feature in place - Major script clean-up and rearrangement into code sections. - New text file included for codes and subroutines used/needed for doing your own Table design, with descriptions and Timer details - Tutorials written and added for Lane change and Bonus Collect, with code snippets - Code Snippet for Attract Mode, written by Chris - QuickBall issues fixed. It now just pops the ball out back to the plunger without triggering the bonus countdown or clearing any values if the ball in play is less than 20 seconds. (Cold1) =========== Disclaimer: =========== This table is a example only. The table design and a lot of the script additions are just to show the various concepts. This is not a polished table, nor it intended to be. You may actually find mistakes in the layout. The rules of the table are just to show off the examples, and a quick layout was put in place for these examples. This table is intended to be used by people who have never scripted before, or are beginners to scripting. The code reflects that by being very basic. If you wish to finish off the layout, or add new features, change things around, by all means. This is free to use by everyone. To make things as easy as possible, we color coded table objects, and grouped objects together. If you have any suggestions, contributions or improvements, please send them to p_d_sanderson@hotmail.com ================= Known Bugs to fix ================= - Display bug, when the attact mode shows the high score, the loop lights no longer flash. - Bumpers still bump the ball when tilted. They no longer flash though ========================= SpikeScript Features List ========================= - Simple Attract mode - Changeable balls per game (initially set to 3) - Four Player Support - Bonus up to 39k - Bonus multipliers of 2x, 3x, and 5x - Realistic bonus countdown at end of ball - Tilt mechanics - Handles 1 extra ball per ball in play - Load and save game stats (slightly altered from Black's code) - Uses standard keys; '1' starts game, adds a new player and '5' inserts coin - Lots of in script comments - Creates the ball in the trough and kicks it out rather than creating the ball at the plunger - Handles high score - Allows for two replay scores - End of game match routine (Lucky Number) ============================================= SpikeScript Subroutine Usage and Game Changes ============================================= The script will handle most things automatically. However, there are a few items of note that you should know how to use or change: - 3 balls per game. - Tilt penalty ball in play. - One replay awarded for matching. - One replay awarded at 100,000 points. - One replay awarded at 200,000 points. - Three replays awarded for beating the high score. - Adding to the players score: To add to the players score call the subroutine addscore followed by the points to be added. Example: addscore 100 - Advancing the bonus count: To advance the bonus count call the subroutine AddBonus without an argument. Example: AddBonus() - Advancing the bonus multiplier: To advance the bonus multiplier call the subroutine TAdvMult_Hit() without an argument. This was not made a separate routine due to its use here, but you may want to do so if you have several things that will advance the bonus multiplier. Example: TAdvMult_Hit() - Changing the balls per game: The variable 'Balls' controls how many balls per game there are and is initially set to 3. You can change this at line 110 in the code. - Changing the replay scores: The variables 'Goal1' and 'Goal2' hold the two replay scores which are initially set to 100,000 and 200,000 respectively. These can be changed at lines 113 and 114 in the code. - Changing the initial high score: The high score is initially set to 250,000. This can be changed at line 91 in the code. - Game stats file: This table creates a stats file that tracks the high score and the game credits. You will need to change the default name, "spkscrpt5.txt", to a different name on lines 1153, 1171, and 1174 in the code. Generally the name should be based on your table name. - Limit on credits: Like real pinball machines, this table limits the total amount of credits that can be 'racked up' at one time. Initially this is set to a 15 credit limit. To change this you must change the following lines in the code: 256, 648, 829, 838, 999, and 1029.