Jump to content

gegy1000

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by gegy1000

  1. On 5/8/2018 at 11:01 PM, HamnavoePer said:

    Oh, I like this. Have you thought about trying to integrate multiplayer mods so people could start parties on KSP discords and invite others to join them?

    That would be great! Unfortunately, Discord doesn't allow invite and spectate functionality for modifications. :(

  2. 14 hours ago, sarbian said:

    Where do you put your libs in KSP ? With GCMon when it used libs I imported with the full path from ksp exe ( https://github.com/sarbian/GCMonitor/blob/5547e8325a2ed09321af52ebcc3e4830ced2c26b/GCMonitor.cs#L159-L178 )

    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. :)

  3. 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! :)

  4. On 1/27/2018 at 9:39 PM, GrandProtectorDark said:

    I would like to suggest an option to toggle off Richpresence while ingame, without having to deinstall the mod before launch(maybe through the difficulty settings menu).
    I'm don't always have Discord and KSP running a the same time, but this mod will(after my understanding) continuously send info to discord, even if discord isn't active.
    My main complain is that this unnecessarily spams into the log file without actually serving its intended purpose.

    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!

  5. 11 hours ago, Snark said:

    Hi @gegy1000,

    Congratulations on your new mod-- sounds really handy!  :)

    However, there are a few rules you need to follow if you'd like to post it here.  Please refer to the add-on posting rules:

    Specific things that you need to do, that you haven't done yet:

    • You need to provide a link to your mod's source code.
    • You need to specify what license your mod has.

    ^ The above requirements are common to all mods.  Your particular mod appears to be about network connectivity to Discord, so please also see this rule:

    ...so please update the OP to make it completely clear exactly what information the add-on will be sending.  Rule 6 definitely applies to you.  Rule 7 may or may not, depending on what info it sends.

    Thanks for your contribution to the modding community!
    Snark

    Sorry about that! I've updated the post. Let me know if there's anything else I need to change. :) 

    10 hours ago, Garlik said:

    Ok, back at you @gegy1000 after testing your 1.0.1 version of the mod on KSP 1.2.2

    Seems to work just fine.

    one bug I see, but that could be related to other mods (specifically thinking of "RP-0" in its current Development Branch) is that the cost it gives is wrong:

    https://imgur.com/gallery/5a808

    Again, this might be linked to another mod

    Still on the costs, if this can be changed, the cost could be rounded maybe to the closest (on lowest) integer? as can be seen in the picture, the accuracy is a bit high ;-)

    Maybe increase the refresh rates too? if this can be done, it seems like 10/20s for now, can it be lowered? I suppose the bandwith used is very low with this kind of tool, and could be pushed all the way to every second, though maybe not really useful

    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. :P

    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.

  6. 2 hours ago, Galileo said:

    the common link doesnt seem to be working. I got the 1.0 x64 version though

    Sorry about that! The file was being approved, it should work now. :)

    2 hours ago, CobaltWolf said:

    Very cool! I had no idea they had added that feature. 

    Thanks! It's still not very known - not many games have adopted it yet.

    2 hours ago, SamBelanger said:

    Very very interesting... :P

    And welcome to the forum!!!! :D

    Thank you! :D 

    2 hours ago, Garlik said:

    Neat!

    I see the supported version of KSP is 1.3.1. Any chance it could also work on 1.2.2? A lot of us still are on that version for RSS/RO.
    At work currenlty, when back home I'll see if this could work as is for 1.2.2 and report any bug if any

    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. :)

  7. 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

    KVVT2F7.png

    Orbiting around Minmus with a Semi-Major axis of 398km

    3yCntPX.png

    Idling in the KSC or Main Menu

    BPOn9HQ.png

    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

     

  8. 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...