Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

PLUGIN - also possible to get romname ?


Dna Disturber

Recommended Posts

Hi,

Is it possible to get the variable for the romname using the PLUGIN template ?

romname is used in pinemhi support , you can see it being assigned in the (normal) log.

If so what is the variable name and can i just add it to the structure in the template?

Maybe a question for adultery ?

Want to add a plugin to send the hiscores and special scores (loop champion etc) to the website http://www.pinemhi.com/hiscores.php

TIA,

Dna Disturber

Link to comment
Share on other sites

Table file is the ROM mame I think, if you don't get it first I'll get back to ya on that.

The table file is the actual tablename (with .vpt at the end)

didn't find the romname in the template...propably because it was made prior to the pinemhi support.

for instance for Attack from mars it should be afm_113b

Link to comment
Share on other sites

Oh okay I got ya, I was thinking game file name. I forget about ROMs that PinMame uses but I know exactly what you mean.

I will bring this up with the big guy, he's got an update coming, perhaps there's a way this can be included.

Is there a way to get that info from vPinMame, kind of like the way a MAME listxml switch works?

Link to comment
Share on other sites

It's already implemented in pinballx using the pinemhi.ini file

the windowname from vpinmame can be converted to a romname using a list of names in the ini-file.

One table can make use of a number of roms, this is why you need to get the right one when the game is running

Tom has already put that in to make pinemhi work.

To see if i can send the hiscores i need the variable that is used in your template.

The plugin system is really interesting :)

With pinemhi leaderboard i extract the last score that's been made , it doesn't have to be a score that's in the hiscorelist of the table.

also it extracts the special scores , for afm for instance ruler of the universe, loop champion etc.

With this working there could also be an offline achievement system.

The website already had a badge system (achievements) and you can do challenges.....

Leaderboard and cupstandings are also in.

Link to comment
Share on other sites

That's what I mean...

Just because Tom uses a variable doesn't mean he'll also pass it to the plugin system. I have to ask Tom for the data so it can be used in the plugin you're creating. Since he's already using it as you mentioned, I'm sure it won't be a big deal to get it added in. But again. it's ultimately up to him.

If he does, I'll of course add the variable to the template's structure.

Side note: I really like the idea. I've been thinking of making a plugin for GameEx that uses an online DB to save some scores for MAME, the same way this will post them to your site, and to possibly create some achievements also. It's quite ambitious, but it has def crossed my mind. I hope that can become reality for your project, it's an awesome idea! :)

I've already been doing some stuff on the side (like the game tag generator) to test some theories and DB queries, but having an existing system to patch into is really quite cool. Godspeed, my friend!

Link to comment
Share on other sites

Mame should also be possible.....but with all the changes being made it's hard to keep up

Vpinmame is really stable , only one update a year and no renaming a lot off roms etc.

I've been a member of the HitoText team...but the constant changes with mame were a pita...

With every update something broke..

It could be done

All you have to do really is just know the position of the 1st player score in the .hi or .nv

Capture it and send it to the database

Ok not that easy but it is possible

Certainly not trying to make it cheatproof. That's impossible and would make things very complicated.

Honorary system is the way to go.

First Picking up the nicer games and slowly build on that.

Thanks in advance for asking about the romname variable to Tom :)

The game tags are really cool btw , quite some info...and also with a picture...awesome

Link to comment
Share on other sites

I have added ROM. It will be in the next release. In the meantime you can use the attached. I have not fully tested but it was not a lot involved.

Basically after you launch a table a string called "ROM" at the end of the plugin structure will be populated with the rom name as taken from your ini, assuming it is found.

GameEx only uses pinemhi when launching a table so the value wont be there until after exiting the table the first time. It will then always be available. The rom value will though be available on the Game_Exit plugin event the first time the table is launched. Hopefully that will work for you. Let me know how you get on.

Cheers.

Tom.

PinballX.zip

  • Like 2
Link to comment
Share on other sites

So I git this straight...

After the table run event is triggered it is available, and I can't access it until the exit event is triggered. Right? :-)

Link to comment
Share on other sites

I seem to have a bit of a problem getting the ROM value

I think it doesn't come through for the plugin

First off I put the ROM in the structure

<StructLayout(LayoutKind.Sequential)> _        Public Structure PlugInInfo_1            Public System As String            Public SystemName As String            Public INI As String            Public GameName As String            Public GameDescription As String            Public GameShortDescription As String            Public TableFile As String            Public TablePath As String            Public Parameters As String            Public DisplayWidth As Integer            Public DisplayHeight As Integer            Public DisplayRotation As Integer            Public DisplayWindowed As Boolean            Public PlayFieldDisplayNbr As Integer            Public BackGlassDisplayNbr As Integer            Public DMDDisplayNbr As Integer            Public Filter As String            Public ROM As String        End Structure

after that i use a MSGBOX to see if i could get the ROM and Tablefile

Public Sub Event_GameExit(ByVal InfoPtr As IntPtr)            'Called when a game is exited            Dim Info As PlugInInfo_1 = CType(Marshal.PtrToStructure(InfoPtr, GetType(PlugInInfo_1)), PlugInInfo_1)            MsgBox("Romname = " & Info.ROM & " Tablename = " & Info.TableFile)        End Sub

Tablefile goes fine , ROM stays empty in the msgbox

Looking at the normal pinballx log it says

17:39:32.2 23-2-2014: L:\vpinball\VPinball912.exe /play -"L:\vpinball\Tables\Black Belt.vpt"
17:39:32.4 23-2-2014: D:\PinballX\vpauto.exe
17:39:46.9 23-2-2014: Found PinMAME ROM: blackblt.nv

In the statistics.ini it is also mentioned

TIA

Link to comment
Share on other sites

I' m also using the statistics.ini to get the rom for a check before start to check for same scores.

The sections in the statistics.ini are a combination of variable system then an underscore and then variable gamename.

Only with the gamename the spaces have been replaced by underscores and also the . ( ) have been deleted.

Just to make sure to have a good conversion , is that all or do you have other characters that are converted or deleted?

TIA

Link to comment
Share on other sites

I' m also using the statistics.ini to get the rom for a check before start to check for same scores.

The sections in the statistics.ini are a combination of variable system then an underscore and then variable gamename.

Only with the gamename the spaces have been replaced by underscores and also the . ( ) have been deleted.

Just to make sure to have a good conversion , is that all or do you have other characters that are converted or deleted?

TIA

@Tom

Could i have the exact line of code you're using for the conversion ?

TIA

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...