Jump to content
LaunchBox Community Forums

jayjay

Members
  • Posts

    385
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

4,022 profile views

jayjay's Achievements

32-Bit GPU

32-Bit GPU (5/7)

205

Reputation

  1. No we cant update the caption. If I have a game menu item that needs to display that it has been selected, an enable/disable button for instance... I display a custom user control, enabled => control visible, disabled => control collapsed. Its not ideal, especially if you plan on sharing the plugin.
  2. jayjay

    Naming PS2 games

    Yeah its in the image. As I said its ugly. I was writing a save state manager type app for LB and pcsx2 saves the states using the blusXXXXX code. I never did finish it or clean up the code but it works. private string Get_Id_PCSX2(string romPath) { string id = string.Empty; if (romPath.ToLower().EndsWith(".iso") || romPath.ToLower().EndsWith(".bin")) { byte[] bytes = Get_Bytes(romPath, 0, 1000000); string s = GetIdFromString_PCSX2(Encoding.ASCII.GetString(bytes)); if (!string.IsNullOrEmpty(Check_Id(s.Replace("-", "")))) { return s; } } else { return string.Empty; } return id; } private byte[] Get_Bytes(string path, int origin, int length) { byte[] data = new byte[length]; using (BinaryReader reader = new BinaryReader(new FileStream(path, FileMode.Open))) { reader.BaseStream.Seek(origin, SeekOrigin.Begin); reader.Read(data, 0, length); } return data; } private string GetIdFromString_PCSX2(string data) { string id = string.Empty; if (data.Contains("SCUS-")) //NTSC-U { int length = data.IndexOf("SCUS-"); id = data.Substring(length, 10); } else if (data.Contains("SCUS_")) //NTSC-U, contains underscore and period { int length = data.IndexOf("SCUS_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SLUS-")) //NTSC-U { int length = data.IndexOf("SLUS-"); id = data.Substring(length, 10); } else if (data.Contains("SLUS_")) //NTSC-U, contains underscore and period { int length = data.IndexOf("SLUS_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SLES-")) //PAL { int length = data.IndexOf("SCES-"); id = CleanPS2(data.Substring(length, 10)); } else if (data.Contains("SLES_")) //PAL, contains underscore and period { int length = data.IndexOf("SLES_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SCED-")) //PAL { int length = data.IndexOf("SCED-"); id = data.Substring(length, 10); } else if (data.Contains("SCED_")) //PAL { int length = data.IndexOf("SCED_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SCES-")) //PAL { int length = data.IndexOf("SCES-"); id = data.Substring(length, 10); } else if (data.Contains("SCES_")) //PAL, contains underscore and period { int length = data.IndexOf("SCES_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SLPM-")) //NTSC-J { int length = data.IndexOf("SLPM-"); id = data.Substring(length, 10); } else if (data.Contains("SLPM_")) //NTSC-J, contains underscore and period { int length = data.IndexOf("SLPM_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SLPS-")) //NTSC-J { int length = data.IndexOf("SLPS-"); id = data.Substring(length, 10); } else if (data.Contains("SLPS_")) ////NTSC-J, contains underscore and period { int length = data.IndexOf("SLPS_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("PBPX-")) { int length = data.IndexOf("PBPX-"); id = data.Substring(length, 10); } else if (data.Contains("PBPX_")) { int length = data.IndexOf("PBPX_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("PCPX-")) //NTSC-J { int length = data.IndexOf("PCPX-"); id = data.Substring(length, 10); } else if (data.Contains("PCPX_")) //NTSC-J, contains underscore and period { int length = data.IndexOf("PCPX_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SCAJ-")) //NTSC-J { int length = data.IndexOf("SCAJ-"); id = data.Substring(length, 10); } else if (data.Contains("SCAJ_")) //NTSC-J, contains underscore and period { int length = data.IndexOf("SCAJ_"); id = CleanPS2(data.Substring(length, 11)); } else if (data.Contains("SCKA-")) //NTSC-K { int length = data.IndexOf("SCKA-"); id = data.Substring(length, 10); } else if (data.Contains("SCKA_")) //NTSC-K , contains underscore and period { int length = data.IndexOf("SCKA_"); id = CleanPS2(data.Substring(length, 11)); } if (id.Length == 11) { id = id.Remove(8, 1); } return id; } private string CleanPS2(string s) { StringBuilder sb = new StringBuilder(s); sb.Replace(" ", ""); sb.Replace("_", "-"); sb.Replace(".", ""); return sb.ToString(); } private string Check_Id(string id) { foreach (char c in id) { if (!char.IsUpper(c) && !char.IsNumber(c)) { return string.Empty; } } return id; }
  3. jayjay

    Naming PS2 games

    Cant help with .chd or any other format other than iso or bin. I have some ugly c# code to get the SLUSXXXXX code from bin or iso. I assumed if your using them on PS2, your roms might be iso, I know nothing about PS2 homebrew. Anyway if you want the code I can post it.
  4. jayjay

    Naming PS2 games

    What format are your roms in? iso or bin or?
  5. We cant add plugins to the pause menu. Unlike the game menu and system menu, we don't have an interface for pause menu. It'd be good to get a "PauseMenuItem" and also a "PauseThemeElement". But the problem is, not many people would use it. Jason and/or C-Beats would spend considerable time implementing it knowing its not gonna get much use. Which is a shame but understandable. At this moment in time its not possible to cycle through your save states in the pause menu.
  6. Hey @daz Like the other guys I have issues with the resolution. I was using play box 3 since you released it on the forums. Its a great theme. But since I got my new 50inch TV none of your themes look right, I have tried changing to different resolutions but no joy. Im assuming the reason why is because you use precise numbers, Width="500" or Margin="-100,0,200,0" etc etc I was hoping, if you build another theme, you would consider using the community theme editor, the reason why is because it has built in converters that will automatically scale your theme to other screen resolutions so you "should" only need to build the theme once. If, like me, you find it easier to work with xaml than the theme editor, what you could try... start a new theme with the editor, move some stuff about, add some widths and heights etc etc. Save the theme and take a look at the generated xaml's. You will see, for example, the width will look like this: Width="{Binding ElementName=Canvas,Path=ActualWidth,Converter={StaticResource ScalePropertyValue},ConverterParameter=W;500;1920}" This will pass values to, in this case, the "ScalePropertyValue" converter. The first part: Binding ElementName=Canvas,Path=ActualWidth this will pass the current width of the canvas to the converter. On your screen that could be 1000 but on my screen it could be 1100. The last part: ConverterParameter=W;500;1920 W: this tells the converter its a width property. Would be "H" for height or "X" for x coordinates etc etc. 500: this is the width we want the control to be. So if we wanted an image to be 500 pixels wide, we would add 500 here. 1920: The width of the screen the theme is created on. When the theme is loaded on a screen with different resolutions the converter will "do the math" to resize the control to fit the different screen resolution. Instead of using the actual theme editor you could just edit the generated xaml files but use the converters instead of precise numbers. The converters can also automatically scale margins, thickness, fontsize etc etc You may already know all this and your more than welcome to tell me to F off. But I thought I would mention it as I always use your themes but cant anymore. Anyway thanks for the time you put into your themes.
  7. If you close LB.... Remove all the custom badges .dll files from your Launchbox/plugin folder, then start LB again. Do you still get any errors?
  8. By the look of it, it seems there is no particular sort order, well none that I can work out: For better sorting you will have to create a feature request on Bitbucket. Its not something we have any control over with the badges.
  9. The LB Custom Badge.zip in the OP has been updated. The "Index" option has been removed as LB sets this for us. Thanks @C-Beats for helping me out with that.
  10. Oops sorry. Turns out I needed quotes around the paths and quotes around the whole command. Redownload the zip from the OP, Hopefully that fixes it.
  11. Solved the problem by switching the badge to .netcore, turns out it wasn't as "long" as I thought it would be. Updated OP.
  12. @Shelibor I have attempted to get this to work with the latest launchbox but I cant resolve a system drawing mismatch error. Im not willing to spend anymore of my free time trying to fix it. Sorry mate. Next time I get some time off work I'll attempt it again but for the foreseeable I wont be updating this.
  13. You could use LB's API or ahk script/additional apps options to implement it yourself. Maybe even share your code with the community to help out those who can't do it.
  14. Iv updated this plugin, I haven't much time to test so it will need some proper testing. Focus On Game Exit.zip Download it. Right click, properties, unblock. Extract the folder to Launchbox/Plugins. It has the original focus plugin built in but now has the option to override the original plugin on a per game basis. The focus being on games that uses launcher exe's. Right click on a game and select "Focus On Game Exit". Option 1 - Replace: Theoretically this should work with shut down screens. But don't hold me to it. Exe1 - this needs to be the 1st .exe the game uses. Wait - this is the amount of time, in seconds, to wait between... when the 1st exe closes and the 2nd exe launches. Its a delay to give the 2nd exe time to "properly open". Exe2 - this needs to be the secondary exe. Make sure Exe1 and Exe2 are spelt exactly the same as the games exe's. Including upper and lower case letters. IMPORTANT NOTE: this method comes with a major downside. The way this option works is by replacing the games launcher exe with an autohotkey script. This means that this option isnt compatible with portable LB setups. It also means that at any point, if you delete this plugin's directory you cannot restore the games original exe path... this path: If you want to remove this plugin but you have added a "Replace" script. Enable the "Focus On Game Exit" badge: This will make it easy to track down games that uses this plugin. Right click on the game and select "Focus On Game Exit" and press the delete button to restore the "Default Path". The default path... this: The ONLY time you need to change this path is if you move the associated game files. Otherwise dont change it at all. If using this option, you do so at your own risk. Option 2 - Window; Wont work with shutdown screens. Window 1: this is the games launcher window title. Wait. How many seconds to wait before the 2nd window opens. This is also a timeout (which may need more work). If the 2nd window doesn't open for whatever reason the timeout will elapse and should close the script. Window 2: the games secondary window title. Both window options need to be spelt exactly the same as the games window titles. This hasnt been tested a great deal. Option 3 - EXE: Wont work with shutdown screens. This option is the same as option 1 but it will not replace the games path in LB. The "wait" option, like option 2 is also a time out. To recap: Option 1 modifies LB data, use at your own risk. Options 2 and 3, does not modify LB data. Options 2 and 3, the ahk scripts could prob use some work. Can find the scripts in the plugin directory. If anyone has any suggestions for the scripts then let me know. Consider this a beta, I would suggest not adding the override scripts to a load of games til it has been properly tested.
  15. Looking at time crisis 5 files, I assume it first launches "RSLauncher.exe" then launches "TimeCrisisGame-Win64-Shipping.exe". At the weekend I'll make a plugin that will attempt to focus BB on game exit when playing a game that launches multiple exes.
×
×
  • Create New...