Jump to content

gegy1000

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by gegy1000

  1. That would be great! Unfortunately, Discord doesn't allow invite and spectate functionality for modifications.
  2. @MeateaWNeat! This is really nice. Currently I solved it by abstracting all DllImport calls to an interface, but this looks a lot better! :)
  3. Alright, following what you did there by referencing from GameData, it works! I guess that means editing the PATH was at fault. Thanks for the help.
  4. I scan for them in the plugin directory: https://github.com/gegy1000/KSP-DiscordRP/blob/master/DiscordRP/DiscordRPMod.cs#L27-L28
  5. I am dependent on an external DLL to perform some functionality for my plugin. To do this I use P/Invoke's DllImport and it works all fine on Windows. When on Linux/OSX, however, a DllNotFoundException is thrown. (I am using dedicated mac/linux libs when appropriate) [EXC 13:45:27.864] DllNotFoundException: osx/discord-rpc.bin DiscordRP.Discord.OSXInvoker.Initialize (System.String applicationId, .EventHandlers& handlers, Boolean autoRegister, System.String optionalSteamId) DiscordRpc.Initialize (System.String applicationId, .EventHandlers& handlers, Boolean autoRegister, System.String optionalSteamId) DiscordRP.Discord.PresenceController.Initialize () DiscordRP.DiscordRPMod.Start () The file definitely exists, so this error can only mean some other issue occurred while loading was attempted. Windows imports: https://github.com/gegy1000/KSP-DiscordRP/blob/master/DiscordRP/Discord/Win64Invoker.cs#L33-L46 OSX imports: https://github.com/gegy1000/KSP-DiscordRP/blob/master/DiscordRP/Discord/OSXInvoker.cs#L33-L46 Used library files: https://github.com/discordapp/discord-rpc/releases/tag/v2.1.1 I'm quite lost as to what's going on here -- so any help would be appreciated!
  6. Data is sent to the Discord servers through the Discord client, so if the client is not running no data will be sent. I do understand the issue with log-spam, though, which will still happen. I'll look into an option, thanks!
  7. Sorry about that! I've updated the post. Let me know if there's anything else I need to change. Interesting. I looked into this and I suspect the incorrect cost might come from modified resource values - I don't account for those currently. The cost should definitely be rounded, I hadn't really tested with mods, so I didn't imagine you could get costs like that. The refresh rate is 10s, although I initially tested with lower values. They didn't seem to make a difference, though, due to the low update rate of the actual Discord client.
  8. Sorry about that! The file was being approved, it should work now. Thanks! It's still not very known - not many games have adopted it yet. Thank you! I haven't really explored different versions or how they work yet. I will take a look! Anything you find would be really useful, still.
  9. DiscordRP DiscordRP introduces Rich Presence integration for KSP. Rich Presence is a recently introduced Discord feature that allows more information to be displayed about the game currently being played. You can find a more detailed description of it here. This mod displays various implementation through this depending on the player's current situation. Examples Orbiting around Minmus with a Semi-Major axis of 398km Idling in the KSC or Main Menu Building a craft in the VAB Shared Information This mod sends various information about your game state over the internet: Your current game state Idle: Time idled for VAB: Cost and part count of current craft Landed: Latitude and Longitude on your current body Flight: Altitude and Velocity on current body Orbit: Semi-Major axis and Eccentricity around current body This information is sent for the Discord account you currently are logged into, to Discord's servers. Any other user who is in a server or friends with you can see this state along with your Discord name. Downloads CurseForge (common): 1.0.3 Dropbox (common): 1.0.3 Older Versions CurseForge (Windows only): 1.0.2 CurseForge (x32): 1.0.0 CurseForge (x64): 1.0.0 Source DiscordRP on GitHub License: MIT
  10. I am working on a plugin that requires a DLL (C), completely unrelated to Unity or KSP. With this, I need to call certain functions through PInvoke, so I have put this DLL in the same directory as my plugin. However, when KSP starts up, it tries to load this DLL as a plugin, which it is not, and prints this error into the log: System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0 at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0 at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0 at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0 at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0 at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0 How can I prevent this DLL from being loaded as a plugin? Thanks.
×
×
  • Create New...