Open syd711 opened 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?).
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
@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 ?
My knowledge gaps regarding PinballY are a bit too large here. Let's take this to Discord.
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.
@martenschukkink I am not masterising highscore card generation, but added topper and menu in preferences :
I take it from there and will fix the card generation.
@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.
@syd711 looks like the fix from @leprinco is in rc3.10, right? Will test when it is available.
I committed in 3.10 branch so I guess yes it will be made available next time...
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.
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.
@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:
When saving config to PinballY:
(between [] the label names in VPin Studio, between \<> the tags in XML config)
For now, I fixed it by clearing the Media name field in PinballY, restoring it to the default. Now I can see the assets in VPin Studio too.
Will test some more if I have the time...
Here is from the pinballY code
// Here's the PinballX/HyperPin schema, with PinballY additions marked
// with (*):
//
// <menu>
// <game name="Game_filename">
// <description>Game Title (Manufacturer year)</description> // media name - see note below
// <title>Game Title</title> // table title (*)
// <manufacturer>Williams</manufacturer> // manufacturer name
// <year>1980</year> // YYYY format; year of original arcade game release
// <rom>Rom Name</rom> // VPinMAME ROM name, or DOF effects and high score retrieval
// <type>SS</type> // IPDB type code: SS=solid state, EM=electromechanical, ME=pure mechanical
// <hidedmd>True</hidedmd> // boolean
// <hidetopper>True</hidetopper> // boolean
// <hidebackglass>True</hidebackglass> // boolean
// <enabled>True</enabled> // boolean; default = true
// <rating>0</rating> // star rating, 1-5; 0 if unrated
// <ipdbid>1234</ipdbid> // PinballY extension: the IPDB ID for the game, if known
// </game>
// </menu>
//
// The <description> tag is PRIMARILY used as the media name. It also
// implies the table title, manufacturer name, and release year, IF those
// values aren't specified separately by their respective tags. If the
// other tags are also present, they override the implied values from the
// <description>.
//
// PinballY extensions:
//
// <title> - the table title. With PinballX/HyperPin, the base title can
// only be inferred from the <description> field. We do that as well, but
// since the <description> field also serves as the media name, and since
// we allow setting the media name and title separately in our internal
// "live" representation, we need a way to save the title separately in
// the XML. Thus this tag. If present, it overrides the title inferred
// from the <description> tag. On save, we store this only if it's
// different from the implied title in the media name.
//
When reading config from PinballY:
- [Game File Name] should be based on
+ ".vpx"
Agree and should be the case
- If
is provided, [Game Name] should be based on , otherwise on
Agree. Was missing the otherwise case, so
- If
is provided, [Game Screen Name] should be based on , otherwise on
What is in the code and for me, correct if I look at pinballY code : [Game Screen Name] should be based on
When saving config to PinballY:
is [Game File Name] - ."vpx" - If [Game Name] is different [Game File Name] - ".vpx", add
with [Game Name] as value - If [Game Screen Name] is different from [Game File Name] - ".vpx", add
with [Game Screen Name] as value
OK and should be the case_
try again :)
Unfortunately, it's still not working properly.
<description>
, which is the field that is used for the assets, therefore breaking the displaying of assets in PinballY. <description>
) in PinballY, it will break displaying the assets in VPin Studio.Some more investigation tells me <description>
should always be mapped to [Game Name] and visa versa (with a fallback to <game name>
when reading). This seems not to be the case now, since updating the Game Screen Name updates <description>
@leprinco To fix this I changed PinballXTableParser.java line 249-265 (local ony):
// three cases supported (third used by pinballY only for handling specific mediaName
// <game name= /> stores the filename without extension
// <title /> stores the gameDisplayName if different from filename without extension
// <description /> stores the gameName (for media assets) (always stored)
// </game>
if (!StringUtils.equals(detail.getGameDisplayName(), gameName)) {
appendValue(writer, "title", detail.getGameDisplayName());
}
appendValue(writer, "description", detail.getGameName());
I'm not sure if this is compatible with PinballY... I will contact you on how I can make changes to the code and how you guys work
(update: description is always written in PinballY, removed equals-check)
I'm just gathering here the first feedback, since I haven't installed PinballY yet.