Jump to content



Photo
- - - - -

Pup-Pack creation, what is the SendMsg function ?

Pup-Pack

  • Please log in to reply
5 replies to this topic

#1 jejepinball

jejepinball

    Enthusiast

  • Members
  • PipPipPip
  • 64 posts

  • Flag: ---------

  • Favorite Pinball: Theatre Of Magic, Metallica, Goldrake, Archer (Pinball FX)

Posted 04 October 2021 - 08:14 PM

Hi,
I am gradually learning how to create a Pup-Pack, but there is still a mystery function for me: PuPlayer.SendMsg
Indeed, I can not find documentation on this function. Does anyone know what it does and what the parameters correspond to?

Here are examples of codes found in table scripts:

 

PuPlayer.SendMSG("{  }") 'Format JSON

PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 2, ""FN"":11, ""VL"":40 }"
PuPlayer.SendMSG("{'mt':301, 'SN':  "+pGameInfo.toString() + " , 'FN':3, 'OT':1 }");

PuPlayer.SendMSG "{ 'mt':301, 'SN': " & pLargeDMD & ", 'FN':15, 'CP':'4,0,0,100,100' }"

PuPlayer.SendMSG("{'mt':301, 'SN':  "+pGameInfo.toString() + " , 'FN':3, 'OT':1 }");

PuPlayer.SendMSG "{ ""mt"":301, ""SN"": 1, ""FN"":32, ""FQ"":3 }"

                mt : always 301 !

                CP : custom position ?

                FN :

                FQ :

                OT :

                PM :

                SN : screen number

                VL : volume in %

 



#2 NailBuster

NailBuster

    Enthusiast

  • Members
  • PipPipPip
  • 300 posts

  • Flag: Canada

  • Favorite Pinball: YES

Posted 04 October 2021 - 08:26 PM

SendMSG are really not something you need to know when making a pup-pack.  They are 'low-level' protocol that are best wrapped into a SUB with parameters. 

 

Are you making a PuPPack or trying to make use of PuPDMD or orbital framework type display?   If you look at the my pupdmdframework vpx you'll see most of them wrapped in functions/subs.  But many of the PuPDMD authors find it easy enough to just directly use the custom msg/json manually so you'll see them scattered around their table code as well.



#3 jejepinball

jejepinball

    Enthusiast

  • Members
  • PipPipPip
  • 64 posts

  • Flag: ---------

  • Favorite Pinball: Theatre Of Magic, Metallica, Goldrake, Archer (Pinball FX)

Posted 04 October 2021 - 09:25 PM

SendMSG are really not something you need to know when making a pup-pack.  They are 'low-level' protocol that are best wrapped into a SUB with parameters. 

 

Are you making a PuPPack or trying to make use of PuPDMD or orbital framework type display?   If you look at the my pupdmdframework vpx you'll see most of them wrapped in functions/subs.  But many of the PuPDMD authors find it easy enough to just directly use the custom msg/json manually so you'll see them scattered around their table code as well.

Thank You for your answer. I see a lot of custom messages in tables scripts, so I wanted to understand if I have a correction to make or to be inspired by what has been done.
PuPlayer.LabelNew et LabelSet seem to display texts or labels, whatever the screen. If I understand well, functions for PupDMD or your pupdmdframework are used to be compatible with real DMD screens ?

 

In a video by scottywic, he explains that JSON format with the LabelSet function allows to pass more precise values in decimals.


Edited by jejepinball, 04 October 2021 - 10:02 PM.


#4 drinkcristal

drinkcristal

    Hobbyist

  • Members
  • PipPip
  • 26 posts

  • Flag: Australia

  • Favorite Pinball: Indiana Jones

Posted 22 December 2021 - 11:18 PM

I am trying to use the jukebox function to create a pup pack to play a background video on an original table. (Get Smart)

 

From the web site, I can see the commands are as follows.

 

'jukebox mode will auto advance to next media in playlist and you can use next/prior sub to manuall advance
'you should really have a specific pupid# display like musictrack that is only used for the playlist
'sub PUPDisplayAsJukebox(pupid) needs to be called/set prior to sending your first media to that pupdisplay.
'pupid=pupdiplay# like pMusic

Sub PUPDisplayAsJukebox(pupid)
PuPlayer.SendMSG("{'mt':301, 'SN': " & pupid & ", 'FN':30, 'PM':1 }")
End Sub

Sub PuPlayListPrior(pupid)
PuPlayer.SendMSG("{'mt':301, 'SN': " & pupid & ", 'FN':31, 'PM':1 }")
End Sub

Sub PuPlayListNext(pupid)
PuPlayer.SendMSG("{'mt':301, 'SN': " & pupid & ", 'FN':31, 'PM':2 }")
End Sub

 

 

However, I just want one folder to have the background videos that I will interrupt with splashes and DMD messages.

 

Is there a command to stop/pause the jukebox then re-start it?

 

eg

 

- ambient video plays (uses jukebox function)

- interrupt the ambient video with a callout or splash video

- ambient video resumes

 

Any help for coding something like this is greatly appreciated

 

BTW, at the moment, I am having to manually call the ambient videos through the playlistplayex function but I am having to manually set durations as all the videos are different lengths. The jukebox capability will make like way easier.

 

Cheers,



#5 NailBuster

NailBuster

    Enthusiast

  • Members
  • PipPipPip
  • 300 posts

  • Flag: Canada

  • Favorite Pinball: YES

Posted 23 December 2021 - 10:29 PM

think you only need to just pause/resume the pup display# thats playing the jukebox?  


think you only need to just pause/resume the pup display# thats playing the jukebox?  

 

Oh.  i think i understand more of what you are trying to do.   You would use a different forcepop display for pop-overs while the background pup is paused.



#6 drinkcristal

drinkcristal

    Hobbyist

  • Members
  • PipPip
  • 26 posts

  • Flag: Australia

  • Favorite Pinball: Indiana Jones

Posted 23 December 2021 - 11:46 PM

many thanks for the quick response. I think I have a work around ;-)

 

I am using Pup editor for the splash resume capability but directly calling the background video file in script using playlistplayex and use a timer to randomly pick the next file when the background video is meant to end.(all different durations I track in script)

 

When I want to spash a video, I add the duration of the splash to the background timer and use a Event trigger to the editor with splashresume.

 

I want the background to feel like a normal TV episode with very little dialogue then splash something rich in dialogue driven by the game (eg a tilt warning etc).

 

thanks again, I am enjoying the learning curve :-)







Also tagged with one or more of these keywords: Pup-Pack