Jump to content

[1.2.0][WIP, PLUGIN][0.11.9.8][30/10/2016] KeepFit - Kerbal fitness degradation


timmers_uk
 Share

Recommended Posts

I've applied the Toolbar fix from the pull request, but it looks like KeepFit is still failing to startup properly on 1.2.  I'm seeing this in the log:

Spoiler

[LOG 18:27:42.670] 10/26/2016 6:27:42 PM,KeepFitScenarioModule,Constructor,.
[LOG 18:27:42.672] 10/26/2016 6:27:42 PM,KeepFitScenarioModule,OnAwake,Scene[SPACECENTER]
[EXC 18:27:42.680] NotSupportedException: The invoked member is not supported in a dynamic module.
    System.Reflection.Emit.AssemblyBuilder.GetExportedTypes ()
    KeepFit.CLSClient+<>c.<GetCLS>b__2_0 (.LoadedAssembly a)
    System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[AssemblyLoader+LoadedAssembly,System.Type].MoveNext ()
    System.Linq.Enumerable.Single[Type] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback)
    System.Linq.Enumerable.SingleOrDefault[Type] (IEnumerable`1 source, System.Func`2 predicate)
    KeepFit.CLSClient.GetCLS ()
    KeepFit.KeepFitScenarioModule.OnAwake ()
    ScenarioModule.Awake ()
    UnityEngine.GameObject:AddComponent(Type)
    ScenarioRunner:AddModule(String)
    ScenarioRunner:AddModule(ConfigNode)
    ProtoScenarioModule:Load(ScenarioRunner)
    ScenarioRunner:LoadModules(List`1)
    ScenarioRunner:SetProtoModules(List`1)
    Game:Load()
    <Start>c__IteratorC0:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[LOG 18:27:42.683] 10/26/2016 6:27:42 PM,GameConfig,Load,configNodeName[KeepFitSavedGameSettings]
[LOG 18:27:42.685] 10/26/2016 6:27:42 PM,GameConfig,Load,load complete [succeeded]
[LOG 18:27:42.685] 10/26/2016 6:27:42 PM,KeepFitScenarioModule,OnLoad: ,Loaded gameConfig
[ERR 18:27:42.686] Exception loading ScenarioModule KeepFitScenarioModule: System.NullReferenceException: Object reference not set to an instance of an object
  at KeepFit.KeepFitScenarioModule.OnLoad (.ConfigNode gameNode) [0x00000] in <filename unknown>:0 
  at ScenarioModule.Load (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ScenarioRunner.AddModule (.ConfigNode node) [0x00000] in <filename unknown>:0 

I don't have Connected Living Space loaded.  If I modify the GetCLS() function to always return null, both errors disappear and the button appears as expected.  I suspect loading CLS would also fix the issue.

Link to comment
Share on other sites

9 hours ago, RzTen1 said:

I've applied the Toolbar fix from the pull request, but it looks like KeepFit is still failing to startup properly on 1.2.  I'm seeing this in the log:

  Reveal hidden contents

[LOG 18:27:42.670] 10/26/2016 6:27:42 PM,KeepFitScenarioModule,Constructor,.
[LOG 18:27:42.672] 10/26/2016 6:27:42 PM,KeepFitScenarioModule,OnAwake,Scene[SPACECENTER]
[EXC 18:27:42.680] NotSupportedException: The invoked member is not supported in a dynamic module.
    System.Reflection.Emit.AssemblyBuilder.GetExportedTypes ()
    KeepFit.CLSClient+<>c.<GetCLS>b__2_0 (.LoadedAssembly a)
    System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[AssemblyLoader+LoadedAssembly,System.Type].MoveNext ()
    System.Linq.Enumerable.Single[Type] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback)
    System.Linq.Enumerable.SingleOrDefault[Type] (IEnumerable`1 source, System.Func`2 predicate)
    KeepFit.CLSClient.GetCLS ()
    KeepFit.KeepFitScenarioModule.OnAwake ()
    ScenarioModule.Awake ()
    UnityEngine.GameObject:AddComponent(Type)
    ScenarioRunner:AddModule(String)
    ScenarioRunner:AddModule(ConfigNode)
    ProtoScenarioModule:Load(ScenarioRunner)
    ScenarioRunner:LoadModules(List`1)
    ScenarioRunner:SetProtoModules(List`1)
    Game:Load()
    <Start>c__IteratorC0:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[LOG 18:27:42.683] 10/26/2016 6:27:42 PM,GameConfig,Load,configNodeName[KeepFitSavedGameSettings]
[LOG 18:27:42.685] 10/26/2016 6:27:42 PM,GameConfig,Load,load complete [succeeded]
[LOG 18:27:42.685] 10/26/2016 6:27:42 PM,KeepFitScenarioModule,OnLoad: ,Loaded gameConfig
[ERR 18:27:42.686] Exception loading ScenarioModule KeepFitScenarioModule: System.NullReferenceException: Object reference not set to an instance of an object
  at KeepFit.KeepFitScenarioModule.OnLoad (.ConfigNode gameNode) [0x00000] in <filename unknown>:0 
  at ScenarioModule.Load (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at ScenarioRunner.AddModule (.ConfigNode node) [0x00000] in <filename unknown>:0 

I don't have Connected Living Space loaded.  If I modify the GetCLS() function to always return null, both errors disappear and the button appears as expected.  I suspect loading CLS would also fix the issue.

I suspect the same fix that was needed for Toolbar is also needed for soft-dependency on CLS ... I should have time tomorrow to look into it.

 

tim

Link to comment
Share on other sites

On 27/10/2016 at 11:03 AM, timmers_uk said:

I suspect the same fix that was needed for Toolbar is also needed for soft-dependency on CLS ... I should have time tomorrow to look into it.

 

tim

Ok, finally got to it - pulled in @Kerbas_ad_astra's fixes and additional configs - many thanks, and also (I think - got a bit confused during merging and conflict resolution between branches during the process, so maybe @Kerbas_ad_astra already fixed the CLS assembly loading code too).

 

anyway ... new release up on spacedock and github, and first post updatified.

 

Timmers

Dammit - just remembered I also need to deal with Neutral tooltip colour not working any more - grr.

Link to comment
Share on other sites

  • 3 weeks later...
On 14/10/2016 at 3:34 AM, Drew Kerman said:

SpaceDock worked but Github release, which I tried first, only offers up source files

 

I'm taking a KSP break right now due to being old and broken and lacking in KSP mojo - I suspect it'd be fine in 1.2.1 from what I understand are the scope of changes, but I don't want to make that official without someone else confirming.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
On 2/8/2017 at 0:12 PM, gowthamn said:

Does the work for KSP 1.2.2?

Just loaded it up with no issues, haven't really played with it tho

On 12/28/2016 at 4:13 PM, New Horizons said:

Did anyone of you combined this mod with Kerbalism, recently?

 

There is this patch, but I've never tried it myself, could be outdated by now but still a good starting point

Link to comment
Share on other sites

  • 2 months later...
On Friday, February 10, 2017 at 3:00 PM, Drew Kerman said:

Just loaded it up with no issues, haven't really played with it tho

I just attempted to play with it on 1.2.2, Module Manager notified me while doing the initial load-up that the current version is not supported for KeepFit and to use 1.2, looks like KeepFit is due for an update to work on 1.2.2

Edited by chaoseclipse01
Typo
Link to comment
Share on other sites

3 hours ago, chaoseclipse01 said:

I just attempted to play with it on 1.2.2, Module Manager notified me while doing the initial load-up that the current version is not supported for KeepFit and to use 1.2, looks like KeepFit is due for an update to work on 1.2.2

Hi,

Can't say I've tried it, having been away from KSP for a while now, but I think the notification would have been from AVC rather than module manager, and is a notification/warning rather than an outright 'your doomed' notification.

 

Tim

Link to comment
Share on other sites

5 hours ago, chaoseclipse01 said:

I just attempted to play with it on 1.2.2, Module Manager notified me while doing the initial load-up that the current version is not supported for KeepFit and to use 1.2, looks like KeepFit is due for an update to work on 1.2.2

2 hours ago, timmers_uk said:

Hi,

Can't say I've tried it, having been away from KSP for a while now, but I think the notification would have been from AVC rather than module manager, and is a notification/warning rather than an outright 'your doomed' notification.

 

Tim

Yup that's just AVC giving people a "heads up this mod may cause issues" general warning. Unless you actually notice a problem it should be working fine in v1.2.2

Link to comment
Share on other sites

  • 1 month later...
17 hours ago, Talvid said:

Miss this mod... Game crashes with the 1.3 update, not to be one of those.... but... Any chance of an update to 1.3 in the future?

Hi,

Honest answer is not until next week at the earliest, as I've got other things clogging up my diary during this week, and the weekend I'll be away.

Hopefully next week though, dependant on how much of a PITA the 1.3 update is on the coding front.

T.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
On 5/31/2017 at 1:44 PM, timmers_uk said:

... dependant on how much of a PITA the 1.3 update is on the coding front.

Timmers, do you know if there is work to be done, or if it is a 'straight forward' (syntax) matter of compiling it for KSP 1.3.0? Have you looked at it already? If not, do you think it is a good idea if I fork your repository and make an attempt to release a build? (probably won't be this month though).

Link to comment
Share on other sites

  • 3 weeks later...
On 25/07/2017 at 7:29 PM, Rodhern said:

Timmers, do you know if there is work to be done, or if it is a 'straight forward' (syntax) matter of compiling it for KSP 1.3.0? Have you looked at it already? If not, do you think it is a good idea if I fork your repository and make an attempt to release a build? (probably won't be this month though).

Feel free to fork. I've been away from KSP from some time now, and am more than happy if someone else wants to take a look at KeepFit.

Link to comment
Share on other sites

27 minutes ago, timmers_uk said:

Feel free to fork. I've been away from KSP from some time now, and am more than happy if someone else wants to take a look at KeepFit.

Cool, I will aim to release a build for KSP 1.3 in the week that is coming up. I will post a link when it is done.

And again, thank you for keeping KeepFit around for as long as you have already. To me it is the perfect middle ground between hardcore life support mods (which is too strict/harsh for my kind of play) and the sandboxy stock gameplay where Bill, Bob, Jeb and Val flies all missions.

Link to comment
Share on other sites

  • 5 weeks later...

Hey Rodhern, I've figured out why Keepfit hasn't been working for me in 1.3.  You've got an extra/outdated CLSInterfaces.dll in the repo (in GameData/KeepFit).  It causes KeepFit to fail to initialize properly (deleting it was all I had to do to get it working again).  You should probably grab the most up-to-date CLSInterfaces.dll from the latest CLS download, and definitely store it outside the GameData folder for compiling against it.

Link to comment
Share on other sites

On 9/15/2017 at 3:46 AM, Kerbas_ad_astra said:

Hey Rodhern, I've figured out why Keepfit hasn't been working for me in 1.3.  You've got an extra/outdated CLSInterfaces.dll in the repo (in GameData/KeepFit).  It causes KeepFit to fail to initialize properly (deleting it was all I had to do to get it working again).  You should probably grab the most up-to-date CLSInterfaces.dll from the latest CLS download, and definitely store it outside the GameData folder for compiling against it.

Hi Kerbas ad Astra.

Thank you for making the observation.

I did ask about what to do with the CLSInterfaces.dll in the CLS thread, but it seemed no one was able to offer a suggestion, and so I decided to just keep the file in as it was already there.

I just now tried to remove the file from GameData to see what happens. Keepfit fails to load if there isn't a CLSInterfaces.dll to be found. That means, it is probably not the best answer to remove the file either.

For now I will put a notice on the latest Github release that you may need to delete CLSInterfaces.dll.

- Rodhern

Link to comment
Share on other sites

3 hours ago, Kerbas_ad_astra said:

Maybe replacing it with the updated version from the latest CLS release will work?

It is worth a try.

In which folder locations do you have CLSInterfaces dlls in your install? What happens if you download an 'extra' and put it in GameData/KeepFit ?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...