SpacePirateScott
Pinball Wizard
- Joined
- Jan 11, 2024
- Messages
- 63
- Reaction score
- 60
- Points
- 24
- Favorite Pinball Machine
- Scared Stiff
What is the best practice for including a .vbs library into your table script. As far as I know there are two ways:
One is to include the script via the LoadExternalScript command
e.g.
The other is take the contents of .vbs and directly paste it into your table.
LoadExternalScript
Thoughts?
One is to include the script via the LoadExternalScript command
e.g.
ExecuteGlobal LoadExternalScript("SPSColorSequencer_v0_1.vbs")
The other is take the contents of .vbs and directly paste it into your table.
LoadExternalScript
- Pros
- Updating the library is easy, just copy the new .vbs into the scripts directory. All tables using it are automatically updated
- Easy to add to table. Add one line of code.
- Doesn't add 1000's of lines to your table script that you have to navigate when editing the script
- Cons
- Copying a new version of the library may break existing tables
- Table installation is more difficult because you have to provide the library file and it has to be copied into the scripts directory
- May cause issues with anti virus software.
- Pros
- All table code is contained within the .fpt file.
- Easier installation, only one file to copy
- Won't be affected by when installing other tables that overwrite the library with a newer/older version
- All table code is contained within the .fpt file.
- Cons
- Clusters up table script code
- Copy past is hard? :)
- Each table will have to updated independently if there are bug fixes in the library
Thoughts?