With the new VBS scripts the impulse plunger only works the first launch, there is something that I have to change to make it work?
Thanks
Max
Oh dear, that might be a bug. I'll take a look ASAP.
Posted 05 June 2015 - 06:36 PM
Well, reading the thread you should have spotted when the transparency in the VP10 got changed . Now you can actually actually specify how much transparency you want from a PNG, or better said how much of the alpha transparency you want to be visible. When you import an image, you will see at the right bottom of the window an "Alpha Mask" and a value from 0 to 255. 1 is the default, which means that most of the alpha pixels will be visible. But if you want more transparency (this is less alpha pixels visible) then you increase this number. So in you case I guess that a number of 128 will just do fine
That's all. No bugs here, just features
Thanks JP for testing this! saves me some time..
Posted 05 June 2015 - 07:11 PM
Oh just one reminder, I saw on some VP10 tables that all rubbers have a hit event even though they don't use them in the script. For better performance only activate the hit event on those elements you actually use in the script.
The hit event is an expensive COM call and should only be used when needed, therefore the hit event is unchecked for rubbers when you create a new one.
Expensive COM call? That is interesting. Every rubber I have put on a table for years has had a hit event not only by default but by design. If it only applies to newly created ones it is no big deal, just changing up long used table building way. The hit event for rubber is to trigger a sound. Many other tables as well.
Since rubbers are hit though and the program reacts to it, by using the settings given individually to each one, even without the hit event set, could one of those settings be a sound?
If they are in a collection that is used to trigger a sound, does each one need the hit event set by the builder?
Posted 05 June 2015 - 07:15 PM
core345.zip 24.37KB 4 downloads
With the new VBS scripts the impulse plunger only works the first launch, there is something that I have to change to make it work?
Thanks
Max
Oh dear, that might be a bug. I'll take a look ASAP.
Yep, I think I found the problem. Copy/paste error on my part.
If you go to line 598 of core.vbs and replace this line:
If IsObject(mDict(Item)) Then
with
If IsObject(mDict(aKey)) Then
The silly thing should start working correctly.
Sorry folks.
I'll have an update off to toxie shortly.
Okay, no, I'm wrong. There is definitely still a bug there. I'm still investigating - hang tight. It looks to me like the same bug that may be affecting this may also affect cvpmMagnet and cvpmTurntable, since they use the same methods to track which balls are in the area of influence. I'll let you know what I find.
UPDATE: Okay, yeah, I've tracked it down to a bug in the updated cvpmDictionary - the .Remove method isn't actually removing keys from the MS dictionary like it should be - instead, it's replacing the Item at that key with "Empty". I'm working on a fix now. (Seems odd that it would be doing that, given I'm literally just passing the key along to MSDict.Remove .)
UPDATE 2: Huh. Okay, it WAS that line, apparently. The reason the fix didn't work for me was that I was saving my working copy of the script in the wrong place. Go figure.
Okay, so yeah, as a temporary fix, just change the one line of core.vbs as shown above.
Edited by KieferSkunk, 05 June 2015 - 08:23 PM.
Posted 05 June 2015 - 08:24 PM
The message board is being a little strange at the moment. If you can see an attachment on this reply, download it to replace your current core.vbs with the bugfixed one. I'll make sure this gets added to the current distribution as well.
core345-bugfixed-no-really.zip 24.37KB 40 downloads
Edited by KieferSkunk, 06 June 2015 - 06:53 AM.
Posted 05 June 2015 - 10:44 PM
Got a question for table scripters out there:
I'm working on some updates to the BallStack class, and I keep running into some problems with how cvpmBallStack is designed. As it is right now, cvpmBallStack has two "operating modes" - Saucer and Trough. There are only a couple of things these two modes have in common, but for the most part these two concepts are very different from one another, and the current class implementation mixes the concepts too much for my liking. That's making my updates difficult, so I have a proposed change here:
- Add "cvpmTrough" and "cvpmSaucer" classes, which each take over for the two "cvpmBallStack" operating modes.
- Keep cvpmBallStack unchanged - it becomes a "legacy" class and would be kept around for compatibility with non-updated tables.
The new Trough class would be designed for all subways and main ball troughs and would cleanly handle trough-specific concepts, including adding balls at the entrance, stacking balls at the exit, kicking balls out, handling trough switches, etc.
- This class would be able to handle any number of balls (it can have a set size and then "queue up" additional balls outside of it, and you would be able to add as many switches as you have "ball slots" in the trough, if you so desire.
The new Saucer class would be designed for all top-side saucers where there is no concept of a "trough" and only one ball can occupy the saucer at a time. It would still support two kick directions, Z-force, etc.
Here is how you might use these new classes in a typical table:
Dim trough, leftSaucer Set trough = new cvpmTrough : With trough .MaxBalls = 6 ' 6 ball slots .InitSw Array(29, 30, 31, 32, 33) ' Set any number of switches starting at exit .InitEntry kickTEntry, 28, 9 ' Set entrance kicker, associated switch and solenoid .InitExit kickTExit, 10, 90, 8 ' Exit kicker, solenoid, dir, force .InitKickVariance 2, 2 ' Vary force and direction by N units each .MaxBallsPerKick = 2 ' Kick up to 2 stacked balls out of exit .InitExitSnd "kickEmpty", "kickBall" .Balls = 5 ' Trough starts with 5 balls in it. End With Set leftSaucer = new cvpmSaucer : With leftSaucer .InitKicker kickSaucer, 47, 13, 180, 6, 2 ' Kicker, switch, solenoid, direction, force, Z-force .InitAltKick 270, 6, 2 ' Alternate kick dir, force, Z-force .InitKickVariance 2, 2 ' Vary force and direction by N units each .InitExitSnd "kickEmpty", "kickBall" .CreateEvents "leftSaucer" .AddBall ' Start full. End With
If you don't like this change and would prefer to continue just using cvpmBallStack in its current form, I can still do my updates - they're just more complicated and harder to understand (and will take more time).
(EDIT: Removed Twilight Zone examples, as the scenario I mentioned there doesn't actually exist - balls stack up on the exit kicker no matter where they come from.)
Edited by KieferSkunk, 05 June 2015 - 11:43 PM.
Posted 06 June 2015 - 01:22 AM
It sounds good to me, KieferSkunk. Just keep the cvpmBallStack for compatibility with older tables, as you already said. And remember to update the documentation file, vbsdoc.html
These are my tables, sorted by date, all them playable with VPX 7 or newer:
After 18 years making tables, it is time to take a rest and let new authors do their thing.
I guess at last I'll play some more pinball . But I'm sure I'll make some table updates from time to time
Posted 06 June 2015 - 06:12 AM
The message board is being a little strange at the moment. If you can see an attachment on this reply, download it to replace your current core.vbs with the bugfixed one. I'll make sure this gets added to the current distribution as well.
This core.vbs gives me an error message:
Line: 1
Undefined variable: 'mDebug'
The fixing of the line 598 seems to work well!
Thanks
Max
Posted 06 June 2015 - 06:55 AM
Alrighty, sorry about that. Serves me right for trying to strip out debug code at the last second without testing it. (I tested it this time. It works now, I promise. )
core345-bugfixed-no-really.zip 24.37KB 96 downloads
Posted 06 June 2015 - 07:13 AM
these scripts are really great
it could be great if we have a script for loading the controllers, and disabling the mech sounds
this is what is/was used for a long time
the soundfx method is surrounded for every sound that needs to be shut with option 4, and the sub dof send info to b2s.server for scripted events for DOF
everybody will benefit from it, authors and users, is it feasible?
Posted 06 June 2015 - 08:21 AM
Alrighty, sorry about that. Serves me right for trying to strip out debug code at the last second without testing it. (I tested it this time. It works now, I promise. )
Thanks, this works fine.
The kickers raised from the playfield, on a wall, the ball passes through the wall and gets stuck under, work in legacy mode.
Thanks
Max
Posted 06 June 2015 - 04:00 PM
sure, any questions just ask
yes it can be universal for all tables, including EM
the initial requirement is to have the ability to change of controller without opening the script of the table
so we need a place where to store the configuration, which is now the user folder of vp.
for the soundfx method,
PlaySound "FlipperUp" becomes PlaySound SoundFx("FlipperUp"), and if ccontroller = 4, sound is muted in the soundfx method, else sound is played.
The majority of the sounds can be muted because they are redondant with force feedback, but not all, like rollovers, plunger, drain, kicker in, rubbers, metal hit
for the DOF method, it can be used if the user has DOF or not, if ccontroller = 3 or 4, that's why i put if ccontroller > 2. if controller is vpinmame.controller, it will give an error, because behind that method there is the B2SSetData functionality which is a B2S.Server command
example how it is used
there's no direct solenoid that i can map, so i create my own script event which will interact which will be propagated into b2.server when program goes to that part of the code
any improvement suggestions are welcome
@Arngrim: is that something that would be universal for all tables? If so, that shouldn't be difficult to incorporate. Would want to learn a bit more about it.
Edited by arngrim, 06 June 2015 - 04:01 PM.
Visual Pinball →
Visual Pinball →
Plunger and Flipper IssueStarted by QuickSave80 , 07 Feb 2021 VP10, plunger, controls, support |
|
||
Visual Pinball →
VP & VPM MODs - New Releases →
4 Queens (Bally 1970) Modbysing[Visual Pinball X MOD]Started by singinfool64 , 02 Jul 2020 4 queens, electromechanical, vp10 and 2 more... |
|
||
Visual Pinball →
Visual Pinball →
Screenres per table?Started by qcol , 15 Mar 2019 b2s, Backglass, vp10 |
|
||
Visual Pinball →
VP Recreations - New Releases →
Ro Go (Bally 1974).zip[Visual Pinball X]Started by HSM , 18 Mar 2018 VP10, WPC, 1991, Terminator 2 and 2 more... |
|
||
Virtual Pinball →
Frontends and Addons →
4EyesVPL_rev14.zipStarted by 4Eyes , 21 Jan 2018 Space Station, Williams, VP10 and 1 more... |
|