Dna Disturber Posted February 22, 2014 Share Posted February 22, 2014 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.phpTIA,Dna Disturber Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 22, 2014 Share Posted February 22, 2014 Doesn't it already support this? I'll have to look at the template hold on. Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 22, 2014 Share Posted February 22, 2014 Table file is the ROM mame I think, if you don't get it first I'll get back to ya on that. Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 22, 2014 Author Share Posted February 22, 2014 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 Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 22, 2014 Share Posted February 22, 2014 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? Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 22, 2014 Author Share Posted February 22, 2014 It's already implemented in pinballx using the pinemhi.ini filethe 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 runningTom 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. Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 22, 2014 Share Posted February 22, 2014 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! Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 22, 2014 Author Share Posted February 22, 2014 Mame should also be possible.....but with all the changes being made it's hard to keep upVpinmame 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 doneAll you have to do really is just know the position of the 1st player score in the .hi or .nvCapture it and send it to the databaseOk not that easy but it is possibleCertainly 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 Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 22, 2014 Share Posted February 22, 2014 Hey,I will look into this for you.Cheers.Tom. Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 23, 2014 Share Posted February 23, 2014 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 2 Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 23, 2014 Share Posted February 23, 2014 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? :-) Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 23, 2014 Share Posted February 23, 2014 Yes but just the first time the table is run. After that its always available. Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 23, 2014 Share Posted February 23, 2014 By the way if you wanted to access the data outside of pinballx it is stored in \database\statistics.ini.Again - its just before the table is first ran with this new feature present that the rom is not available. Not a big deal and probably obvious. Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 23, 2014 Author Share Posted February 23, 2014 Hi Tom,I think that's all i need to make the plugin work.I'm gonna play around with it ,see if i can get it to workThanks for the quick support. Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 23, 2014 Author Share Posted February 23, 2014 I seem to have a bit of a problem getting the ROM valueI think it doesn't come through for the pluginFirst 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 Structureafter that i use a MSGBOX to see if i could get the ROM and TablefilePublic 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 SubTablefile goes fine , ROM stays empty in the msgboxLooking at the normal pinballx log it says17: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.exe17:39:46.9 23-2-2014: Found PinMAME ROM: blackblt.nvIn the statistics.ini it is also mentionedTIA Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 23, 2014 Share Posted February 23, 2014 It looks like you are using an old plugin template. Where did you get it? Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 23, 2014 Author Share Posted February 23, 2014 I found it in a link in a post from adulteryCouldn't find one in the download sectionIt's version 1.0.0Where can i find the newest one? Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 23, 2014 Share Posted February 23, 2014 Its included with the normal pinballx install. Adulterys one must be out of date. Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 23, 2014 Share Posted February 23, 2014 Won't be for long. :-)Sorry about that, I'll fix it today. Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 24, 2014 Author Share Posted February 24, 2014 No problem...Totally overlooked the one that came with the pinballx setup Works like a charm, i can get the content from variable ROM nowThanks Guys Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 24, 2014 Share Posted February 24, 2014 Kudos! :-) Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 24, 2014 Author Share Posted February 24, 2014 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 Quote Link to comment Share on other sites More sharing options...
Adultery Posted February 24, 2014 Share Posted February 24, 2014 You'll probably see other brackets (ie (). [], {}, etc) being dropped as well if that's what's going on. Quote Link to comment Share on other sites More sharing options...
Dna Disturber Posted February 28, 2014 Author Share Posted February 28, 2014 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@TomCould i have the exact line of code you're using for the conversion ?TIA Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.