syd711 / vpin-studio

Competition, table, and player management for VPins.
MIT License
33 stars 2 forks source link

[Bug] PinballY Issues #580

Open syd711 opened 3 weeks ago

syd711 commented 3 weeks ago

I'm just gathering here the first feedback, since I haven't installed PinballY yet.

Marten — Today at 7:18 PM Hi! Great work on the PinballY integration, had a go at it this weekend! Needed some tweaking to switch over from the popper variant... I am running into an issue with generating Higscore cards. In the settings screen under Higscore preferences I can't set a screen to generate the highscores for (it also still displays "Select the PinUP popper screen"). I would like to generate them into the "Topper Images" or "DMD Images" folder of PinballY.

martenschukkink commented 3 weeks ago

Found something else. My media assets did not correctly display in VPin studio at first. I think this had to do with the fact I updated the media name of my tables to only include the table name and nothing else where my vpx-filename includes the manufacturer and year.

I changed this through Game setup > Edit game details... > Media name (textbox) (or press "0" three times from PinballY main screen). This results in the next entry in the config XML:

<game name="Rollercoaster Tycoon (Stern 2002)">     ← vpx-file excluding .vpx extension
    <description>Rollercoaster Tycoon</description> ← filename of media assets (different in my case)
</game>

After updating the XML <description> to match the <game name> and renaming the media files to match, VPin studio showed the media assets and PinballY showed them properly. Unfortunately, after matching the tables in VPin Studio with a table in the Virtual Pinball Spreadsheet, the <description> got updated with the Game Screen Name instead of the Game Name, which made PinballY show no media assets anymore :-/

I did some investigating and found this seems to be the way information is stored in the XML file:

<game name="Rollercoaster Tycoon (Stern 2002)">     ← Game File Name in VPin studio (excluding .vpx)
    <title>Rollercoaster Tycoon</title>     ← Game Screen Name in VPin studio 
    <description>Rollercoaster Tycoon</description> ← Game Name in VPin studio (filename of media assets)
</game>

I think the mapping should be updated in VPin Studio (and should changing the Game Name in VPin Studio also rename all media assets in PinballY as it does in Pinup Popper?).

leprinco commented 2 weeks ago

hi @martenschukkink You are right, I discovered after r3.9 that management of table names was a bit more complex that I understood it at first sight, notably the usage of tags description and title which varies according to their presence/ So here is how it will be in 3.10 : three cases are supported

<game name= />  
<game name= > <description /> </game>
<game name= > <description /> <title /> </game>

if title provided, displayName should be set from title and gameName from description if no title provided, displayName should be from description and gameName defaulted from filename If no title nor description, both displayName and gameName will be defaulted from filename

leprinco commented 2 weeks ago

@syd711 I will have one last issue is that pinballY stores this table file using the charset of the machine. I cannot recall if studio forces UTF-8 charset or finally leave the default charset of the machine ?

syd711 commented 2 weeks ago

My knowledge gaps regarding PinballY are a bit too large here. Let's take this to Discord.

martenschukkink commented 2 weeks ago

if title provided, displayName should be set from title and gameName from description if no title provided, displayName should be from description and gameName defaulted from filename If no title nor description, both displayName and gameName will be defaulted from filename

@leprinco yeah, that sounds good to me, thanks for fixing that!

Did you have a look at the problem of not being able to generate highscore cards mentioned in the issue? Some more context: when I hit the "Generate card" button in the Highscore Cards screen, a message pops up "No target screen selected" but when I want to set it in preferences, there is nothing to select in the "Generate Higscore Cards for Screen" pulldown. This also means that generating new Highscore Cards from PinballY by calling the API doesn't work anymore.

leprinco commented 2 weeks ago

@martenschukkink I am not masterising highscore card generation, but added topper and menu in preferences : image

syd711 commented 2 weeks ago

I take it from there and will fix the card generation.

syd711 commented 2 weeks ago

@martenschukkink @leprinco seems to have fixed the issue so far. I have only added the screen "Apron/Menu" as another alternative since this is an optional screen for PinballX. With version 3.9.3 (which does not include the "Apron" screen yet) you would be able to select a screen and generate the cards.

Please let us know if the solution works for you.

martenschukkink commented 2 weeks ago

@syd711 looks like the fix from @leprinco is in rc3.10, right? Will test when it is available.

leprinco commented 2 weeks ago

I committed in 3.10 branch so I guess yes it will be made available next time...

syd711 commented 1 week ago

Version 3.10 is out, so I assume this ticket is fixed. I leave it open for now, @martenschukkink it would be great if you could give us feedback.

martenschukkink commented 1 week ago

I had a first look, generating Highscore Cards for a screen (topper in my case) seems to work. The highscore is (then) also shown as the topper in the table assets, however, my other table assets don't display. It seems there is still something wrong with determining the correct file name to use for the assets. I will have a more thorough look later and provide some more feedback.

martenschukkink commented 1 week ago

@leprinco @syd711

if title provided, displayName should be set from title and gameName from description if no title provided, displayName should be from description and gameName defaulted from filename If no title nor description, both displayName and gameName will be defaulted from filename

It isn't working properly for me. I think this should be changed to:

When reading config from PinballY: