Jump to content



Photo
- - - - -

MX Scripting


  • Please log in to reply
9 replies to this topic

#1 Pitbull100

Pitbull100

    Hobbyist

  • Members
  • PipPip
  • 33 posts

  • Flag: Germany

  • Favorite Pinball: Avatar MX

Posted 22 January 2018 - 06:32 PM

I started to play a bit with scripting...is there anywhere a tutorial which explains me how to adress the LEDs ? 

I have copied and modified a bit from the scripts from TerryRed, but honestly....I do not fully understand all the commands in there....

 

Thanks showing me a path....



#2 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,613 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 22 January 2018 - 08:49 PM

There is no tutorial, but happy to explain the basics and see if we can find where your questions are.

 

There are two parts to the puzzle:

1. There must a be a ROM (fake ROM) configured for DOF.  We've been doing this via the DOF config tool.

2. You point to the fake ROM and script into the FP table (or FX via .FX3 files)

 

Setting up a ROM is really about assigning trigger identifiers, such as "E101", E102", etc and then a string of MX commands, ie E101 Lime_green AT70 AH15 AFDEN40 AFMIN100 AFMAX160.  These commands can be seen in other ROM setups, and the DOF guide has them documented.  You have to build up the required effects one by one for every ROM, TeryRed and I do this in a semi-automated way via a spreadsheet and formula to concatenate the strings.  We've been building for a number of MX effects, Left FX, Right FX, Back FX and Back Flashers.

 

The table scripting is documented in the DOFLinx guide.  There are two commands used.  The first to link to the ROM, FF_ROM, ie 'FF_ROM fp_gremlins'.  The second triggers the effect via DOF, ie FF_DOF "E",101,100  (turn on ROM MX effect E101 for 100ms = 1 second)

 

I hope this gives you some idea of what's involved.  Happy to answer more questions.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#3 Pitbull100

Pitbull100

    Hobbyist

  • Members
  • PipPip
  • 33 posts

  • Flag: Germany

  • Favorite Pinball: Avatar MX

Posted 23 January 2018 - 10:06 AM

Thx DDH69. 

 

Down below two subroutines I`ve copied from RetroFlair....I understand the flashers and the bumper.....I do not understand here the ,511, or the ,508,...

you mentioned I can find it in the DOF guide ? May you can show me a link as I haven´t found it....Thanks again !

 

 

Sub DOFLinx_itrigger12_Hit()  'DOFLinx_itrigger12_Hit
    FF_Flasher DV_FLIR,FL_FD,2,10,100,"Orange_red"
    FF_Flasher DV_FLOR,FL_FD,2,10,100,"Orange_red"
    FF_Dev DV_BR,-1
    FF_DOF "E",511,-1 'DOFLinx DOF MX - Orange_red Outer Right Invader
End Sub

Sub DOFLinx_itrigger13_Hit()  'DOFLinx_itrigger13_Hit
    FF_Flasher DV_FLOL,FL_FD,2,10,100,"Yellow"
    FF_Flasher DV_FLIL,FL_FD,2,10,100,"Yellow"
    FF_Dev DV_BL,-1
    FF_DOF "E",508,-1 'DOFLinx DOF MX - Yellow Outer Left Invader
End Sub


Edited by Pitbull100, 23 January 2018 - 11:03 AM.


#4 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,613 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 23 January 2018 - 09:51 PM

http://pinball.weile...P/inifiles.html

 

What you will see in this link to the DOF guide is how to setup the contents of an INI file.  It takes some digesting, there is no simple walk thought.

 

The 511 / 508 you are looking at are actually E511 and E508, these are the identifiers (ID) in the DOF INI file.  So FP hands the ID to DOFLinx, that then calls it in DOF.  You must setup the ID in your DOF config file (usually via the config tool) to take the action you want for that ID.  So DOF ID E511 might equate to a streak of purple from left to right on the back MX for the ROM opened by this table script.

 

For VPX (ie true ROM based tables) the ID is a light or switch, ie W15, L7.  TerryRed and I decided that the "E" range was the most appropriate for non-ROM tables (its actually flagged as an identifier for electro-mechanical tables).  DOF is setup to only use certain letter prefixes, the number is then up to you.  The letter prefixes have been assigned some standards, ie W=switch.  I think these are in the DOF guide somewhere, if not they are in the DOF code - I looked them up ages ago when we settled on "E" for everything DOFLinx.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#5 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,807 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 23 January 2018 - 10:32 PM

DDH69  - Do you happen to know what these settings mean/do

E108 @dt@

S52 60/S52 60 Invert

S51 60 Invert

W55 @t@



#6 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,613 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 24 January 2018 - 05:44 AM

They do not look familiar to me.

 

The first part, E108, S52,S51,W55 are the ID's used to call them, the commands, not sure.

 

The easy way is test them.  You can use DOFLinx to do this.  Steps are:

 

  1. Edit your directoutputconfig30.ini (or other appropriate number for your MX device) - I suggest saving your known good copy first
  2. Add the command and ID as you have it to a ROM of your choosing.  There is a doflinx ROM that you could add it to
  3. Fire up DOFLinx with DEBUG=1
  4. Use the right click test menu (I think its Test ROM)
  5. Enter in the ROM name, command ID, and a time (I usually use 5000mS to limit the effect to 5 seconds)
  6. See what happens

Of course when you edit your DirectOutputConfig30.ini file, ensure you put it in the correct toy area, ie Left MX or Right MX.  The alternative is replace steps 1 & 2 with setting up a private config for a known ROM in the config tool, generate, download and install a test configuration.  This saves on manual edits, but if you do it lots does get boring.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#7 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,000 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 24 January 2018 - 06:38 AM

DDH69  - Do you happen to know what these settings mean/do

E108 @dt@

S52 60/S52 60 Invert

S51 60 Invert

W55 @t@

 

 

 

 

Anytime you see @xxx@, it's referring to a variable that is set in your DOF config files. If you look in your directoutputconfig.ini and directoutputconfig30.ini you will see a variables section with a lot of stuff in there for easy reference when doing DOF commands. (I asked Arngrim to add my Letter and Number shapes to that a long time ago)

 

I believe @dt@   and @t@   are whatever you set for your target and drop target durations in DOF Config Tool.

 

So:

 

E108 @dt@

 

= E108 will trigger for 60 ms (if you have it set to that)

 

 

S52 60/S52 60 Invert

 

Solenoid 52 will trigger (be ON) for 60ms

Solenoid 52 will turn OFF for 60ms.

 

This may be used for a "toggle" or maybe fail-safe pulse if they are both being used in the same device. Not sure why its used together like that.

 

S51 60 Invert

 

This "could" be used to reverse a "state". From On to Off or the reverse.

 

Keep in mind that Solenoid could also be referring to a Flasher as well on some tables. (not the same as a light, Lxxx)

 

 

 

W55 @t@

 

Switch 55 will trigger for whatever you have set for Target duration in DOF Config Tool.

 

 

 

The site link DDH69 posted....while daunting at first....does provide the answers to most of DOF's wizardry.  :)

 

http://directoutput....les_triggerpara



#8 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,807 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 24 January 2018 - 06:45 PM

First I want to apologize to DDH69 because I should of mentioned this was for regular DOF

But thank you for the Info (explanation) and suggestions.... This coding stuff is like a foreign language and I'm no good at that either but getting better...

--------------------------------------------------------------------------------------------------------------------------------------------------------

Terry thanks for the explanation..... Now this stuff makes a little more sense......

The reason I'm changing the DOF stuff and I'm doing it right on the DOF config tool site Is because I've added 20 solenoids to my Cab and I am separating them to work individually in different areas of the table.... It has been a A time consuming project ....

-

http://www.vpforums....topic=39093&hl=



#9 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,613 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 24 January 2018 - 08:49 PM

No problem.  The commands are the same regardless of emulator for MX via DOF.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#10 Pitbull100

Pitbull100

    Hobbyist

  • Members
  • PipPip
  • 33 posts

  • Flag: Germany

  • Favorite Pinball: Avatar MX

Posted 11 February 2018 - 04:08 PM

Thanks for clarifications DDH69.   I guess to start to understand.....

 

I have another question, please.  When I read the rom from motu I see the string

E309 Red 100 AT80 AH20 ADD AS300

Am I right that ADD is the direction character in DOF  - the third digit means D-for Down ?

Am I right that AS300 is the speed character in DOF - ca. 1/3 of a second  ?

 

You mentioned you have already built a lot of MX-Strings.....would it be possible to give me a copy ?


Edited by Pitbull100, 17 February 2018 - 11:24 AM.