Antipodes

[1.3] WalkAbout v1.7.1 (17-07-2017)

Recommended Posts

I have been playing around with your mod and I'm running into a strange problem: The only available facility point is Administration with only the main Entrance as available starting location. The debug message reflect that here:

[LOG 14:40:11.722] WalkAbout (LoadLocationFiles): 13 location files loaded
[LOG 14:40:11.725] WalkAbout (RefreshLocations): availabe = 1 of 344 locations

full log: http://pastebin.com/R3qD4UpA

I think the issue might have something to do with my save file since it sometimes works if I start a new game after I create a new save. It then also gives me access to all locations when I load the original save second. It makes no sense and debugging this is a nightmare.

I have uploaded my persistence.sfs for testing here: https://www.dropbox.com/s/638nlf1be5lscgs/persistent.sfs?dl=0

This was all done on a stock install. However, the persistence.sfs is taken from my modded install so It contains additional flags and information not present in the stock game. I was unable to track the issue down further.

Share this post


Link to post
Share on other sites
On 2016-11-24 at 5:49 AM, Three_Pounds said:

I have been playing around with your mod and I'm running into a strange problem: The only available facility point is Administration with only the main Entrance as available starting location. The debug message reflect that here:


[LOG 14:40:11.722] WalkAbout (LoadLocationFiles): 13 location files loaded
[LOG 14:40:11.725] WalkAbout (RefreshLocations): availabe = 1 of 344 locations

full log: http://pastebin.com/R3qD4UpA

I think the issue might have something to do with my save file since it sometimes works if I start a new game after I create a new save. It then also gives me access to all locations when I load the original save second. It makes no sense and debugging this is a nightmare.

I have uploaded my persistence.sfs for testing here: https://www.dropbox.com/s/638nlf1be5lscgs/persistent.sfs?dl=0

This was all done on a stock install. However, the persistence.sfs is taken from my modded install so It contains additional flags and information not present in the stock game. I was unable to track the issue down further.

Thanks for pointing out that issue @Three_Pounds. I have found the cause and I will publish a new version after I do a little more testing.

Share this post


Link to post
Share on other sites
9 hours ago, Antipodes said:

Thanks for pointing out that issue @Three_Pounds. I have found the cause and I will publish a new version after I do a little more testing.

Great! Thanks for looking into it. 

Share this post


Link to post
Share on other sites

Mine just says 'no locations loaded' when I press ctrl-W. I'm using the latest version from Spacedock and the Launchpad and Runway configs.

Kopernicus is the only other mod that might change the KSC.

EDIT: Removed Kopernicus and KIS and still nothing.

Edited by Osmium

Share this post


Link to post
Share on other sites
5 hours ago, cy4n said:

Mine just says 'no locations loaded' when I press ctrl-W. I'm using the latest version from Spacedock and the Launchpad and Runway configs.

Kopernicus is the only other mod that might change the KSC.

EDIT: Removed Kopernicus and KIS and still nothing.

@cy4n, you may be experiencing the same problem as @Three_Pounds: Either Sqaud changed the way they use one of their internal values (ScenarioUpgradeableFacilities.GetFacilityLevelCount) or I didn't properly understand what it represents. In either case I have a work-around.

 I will try to get a new version out today.

Edited by Antipodes

Share this post


Link to post
Share on other sites

@Antipodes I use GPP and would love to be able to use WalkAbout with it. The problem is that it moves KSC so all of the WalkAbout locations put a kerbal halfway around the planet from where I want them to be. Do you know any easy way to get all of the WalkAbout locations to move to match the new KSC (now at latitude = 8.510 N longitude = 168.250 W and altitude = 26m)?

Share this post


Link to post
Share on other sites

First. Thank you @Antipodes for this mod. It is very handy with KCT, allowing a vehicle to stay parked, but the kerbals load and unload for different missions.

Im not familiar with Unity coding, but I was looking at the code and it seems like the volume of items are only calculated by their dimensions. Some parts have a ModuleKISItem module that includes a volumeOverride. I think this is why the S.E.P. (Surface Experiment Package) central station isn't showing up in the list. The model is non-small, but the volumeOverride is set to only 100. This mod doesn't read the overrides, so objects that should be seen as small enough are not.

<clueless suggestions>
It looks like in Refreexcrementsems in InventoryItems.cs, the part should be checked for a ModuleKISItem module containing a volumeOverride, and only if it doesn't exist, to calculate volume by the model bounds.
</clueless suggestions>

I have to look up how to set up Unity/VStudio for modding so I can just fix and pull request in situations like this.

EDIT:  I set up a development enviroment finally, and I think I fixed it. Testing it in my heavily modded career game first.

Edited by LabRats
Noting my working on it

Share this post


Link to post
Share on other sites

Ok. I edited the code to check if a volumeOverride is specified in a ModuleKISItem for each part. Hopefully the code isn't too bad. I'm new to c# (but not programming in general) and this is my first edit of KSP mod code.

In the file "Entities\InventoryItems.cs", in the function "internal void Refreexcrementsems()"

Change this:

var boundsSize = PartGeometryUtil.MergeBounds(part.partPrefab.GetRendererBounds(), part.partPrefab.transform).size;
var volume = boundsSize.x * boundsSize.y * boundsSize.z * 1000f;

To this:

// Start LabRats Edit
Single volume = 0.0f;
try {
	if ((part.partPrefab.Modules != null) && (part.partPrefab.Modules.Count > 0)) {
		for (int i = 0; i < part.partPrefab.Modules.Count; i++)
		{
			if (part.partPrefab.Modules[i].moduleName == "ModuleKISItem") {
				try {
					volume = Single.Parse(part.partPrefab.Modules["ModuleKISItem"].Fields["volumeOverride"].originalValue.ToString());
				} catch (Exception e) {
					$"WalkAbout: Exception: Part[{part.name}] {e.Message}".Debug();
				}
			}
		}
	}
} catch (Exception e) {
	$"Exception checking for volumeOverride: {e.Message}".Debug();
}

if (volume == 0.0f) {
	var boundsSize = PartGeometryUtil.MergeBounds(part.partPrefab.GetRendererBounds(), part.partPrefab.transform).size;
	volume = boundsSize.x * boundsSize.y * boundsSize.z * 1000f;
} else {
	$"{part.name} has defined volume {volume}".Debug();
}
// End LabRats Edit

If @Antipodes doesn't make any response/comment on this (rejecting it, accepting it, what ever) I will share my compiled version.

As a side, does anyone want filled lifesupport bars on spawn? At first, I got annoyed about TAC-LS being empty after spawning, but then I realized it kinda fits as them just stepping out without supplies. I personally don't want to "fix" that after all. If I receive some private messages asking for it, I might try to make an optional edit for topping off some resources specified in the settings.

Share this post


Link to post
Share on other sites

Firstly, hello to all and Happy New Year!

Second - I apologise: an insanely irritating, time-consuming annoyance interrupted my KSP game-playing again.  My friends call it "life in the real world", but I just call it "time away from KSP". I know that WalkAbout is need of a recompile and some changes, but I'm not sure that I will be able to get to it this weekend - perhaps next.

 

On 2016-12-12 at 7:28 PM, TheRagingIrishman said:

@Antipodes I use GPP and would love to be able to use WalkAbout with it. The problem is that it moves KSC so all of the WalkAbout locations put a kerbal halfway around the planet from where I want them to be. Do you know any easy way to get all of the WalkAbout locations to move to match the new KSC (now at latitude = 8.510 N longitude = 168.250 W and altitude = 26m)?

@TheRagingIrishman, I had a request earlier to look into getting WalkAbout to work with the Kopernicus mod. I did do some coding for it, but for some reason I did not carry through with it. I shall put support for a relocatable KSP back at the top of the list of enhancements.

 

On 2016-12-27 at 8:01 PM, LabRats said:

@Antipodes for this mod. It is very handy with KCT, allowing a vehicle to stay parked, but the kerbals load and unload for different missions.

On 2016-12-28 at 3:37 AM, LabRats said:

Ok. I edited the code to check if a volumeOverride is specified in a ModuleKISItem for each part. Hopefully the code isn't too bad. I'm new to c# (but not programming in general) and this is my first edit of KSP mod code.

In the file "Entities\InventoryItems.cs", in the function "internal void Refreexcrementsems()"

Change this:[...]

To this[...]

If @Antipodes doesn't make any response/comment on this (rejecting it, accepting it, what ever) I will share my compiled version.

As a side, does anyone want filled lifesupport bars on spawn? At first, I got annoyed about TAC-LS being empty after spawning, but then I realized it kinda fits as them just stepping out without supplies. I personally don't want to "fix" that after all. If I receive some private messages asking for it, I might try to make an optional edit for topping off some resources specified in the settings.

Thank you, @LabRats. I will look at incorporating this ASAP.  And I love that whatever editor you used saw an obscenity in Refreexcrementsems and corrected it - priceless!

Edit: HAH! It's the forum itself! It just did it to me. Just in case any non-programmers are wondering what I am talking about, "Refreexcrementsems" refers to a block of code in Walkabout that is actually called "Refresh Items" (but without the space). But when it is written as one word, the forum software sees it as containing a swear word and inserts "excrements" instead.

Edited by Antipodes

Share this post


Link to post
Share on other sites

I also came here to ask about Kopernicus support, so I'm grateful to see that it's in the works. Very much looking forward to adding this mod.

Share this post


Link to post
Share on other sites

During play, I noticed spawning without Life Support resources has an annoying side effect. When a kerbal with empty life support (Water, Oxygen, Food, Electricity in the case of TAC-LS) boards a vessel, they siphon away resources from the vessel. When they leave the vessel, they don't return the resources. Therefor, leaving a vessel loaded between missions causes the EC and Life Support to be siphoned away with each mission.

@Antipodes, I have another code contribution. In the file KspAccess\WalkAboutKspAccess.cs, in the function PlaceKerbal, at the top of the function I added:

// Start LabRats Edit
// TODO: Read list from config file
string[] resourcesToFill = new string[] {"Food","Water","Oxygen","ElectricCharge"};
// End LabRats Edit

And further down in that function, before ""adjusted vesselNode".Debug();":

// Start LabRats Edits
try {
    ConfigNode[] pNodes = vesselNode.GetNodes("PART");
    if ((pNodes != null) && (pNodes[0] != null)) {
        ConfigNode[] resNodes = pNodes[0].GetNodes("RESOURCE");
        for (int rIdx = 0; rIdx < resNodes.Length; rIdx++) {
            try {
                string resName = resNodes[rIdx].GetValue("name");
                for (int chkIdx = 0; chkIdx < resourcesToFill.Length; chkIdx++)
			    {
			        if (resName.Equals(resourcesToFill[chkIdx])) {
                        resNodes[rIdx].SetValue("amount",resNodes[rIdx].GetValue("maxAmount"),true);
                        chkIdx = 999999;
                    }
        		}
            } catch (Exception e) {
                $"Exception checking resource. {e}".Debug();
            }
        }
    }
} catch (Exception e) {
    $"Exception while adding EVA resources. {e}".Debug();
}          
// End LabRats Edits

Oh, and I had to add a "Using System;" directive at the top of the file for the Exception type.

EDIT: Oh. Have you considered adding the inventory items directly to the ConfigNode before loading the Kerbal, instead of waiting for the Kerbal to enter a flight scene?

Edited by LabRats

Share this post


Link to post
Share on other sites

@Antipodes Are you aware of any issues with this mod conflicting with any other mods? I ask as I'm running a fairly large mod set and I've just downloaded this mod and started using it, but every time I use it to place a kerbal out into the space center my game crashes to desktop. every single time, no exceptions. When I reload the game the kerbal is outside of which ever building I chose, so the mod does work, and I'm not seeing anyone else reporting this problem, unless I've somehow managed to miss it, so I'm assuming it's a problem unique to my game, and since I'm running a crap ton of mods, thought I'd ask if there were any known conflicts before trying to wheedle it down on my end.

EDIT: I stand corrected, there was indeed a couple of posts on page 2 that answers my very issue. I'm terribly sorry, somehow in my rapid skim the first time I managed to miss those posts. I feel like a moron.

Edited by vardicd

Share this post


Link to post
Share on other sites

Hi folks. I am not dead - just overwhelmed at the moment with stuff outside of KSP.  I promise I will update WalkAbout at some point. 

@vardicd, this problem has been noted. Look at some of the earlier posts and you will see a post about a setting for a workaround and let's  WalkAbout function without crashing. 

Sorry, but I have to run... I have to prepare for a job interview in San Francisco. 

Edited by Antipodes

Share this post


Link to post
Share on other sites
On 2/7/2017 at 2:43 AM, Drew Kerman said:

Putting a kerbal outside the Admin building :D

@Drew Kerman, yeah, I'm aware of that. Unfortunately, it seems to be an issue with KSP. I have to manually change all the locations that have kerbals appearing underneath portions of buildings to move them out a bit.

If I remember correctly, that bug stopped me from placing a kerbal in the elevated walkway in the R&D facility - I'll have to double check that though.

Share this post


Link to post
Share on other sites

Just tested the mod out, as far as I can tell, everything is working in 1.3, some of the spawn locations are a little sketchy, but it looks like that is still a WIP

Thanks for the mod! this is exactly what I was looking for!

Share this post


Link to post
Share on other sites

Heavily modded games will cause WalkAbout to crash KSP 1.3 when you place a kerbal. It's fine with each mod in isolation, but if you keep adding more it will eventually reach a point where it will crash, no matter which mod you add.

As a workaround, changing PostPlacementAction to noreload in settings.cfg will prevent the crash, but you will have to change scenes to see your kerbal.

Share this post


Link to post
Share on other sites

Version 1.7 is finally out.

The major point to note is that it now works with relocated KSPs (e.g. Galileo's Planetary Pack, Alien Space Program,  etc).

If you have created custom locations, please note that you will have to recreate them for this version - sorry.

After this, I will work on updating the GUI and hopefully getting more functionality out of the Perpetual Motion mode.

 

Have fun guys - and thank you for waiting for this update so patiently.

On 7/4/2017 at 7:43 AM, StevenV said:

Heavily modded games will cause WalkAbout to crash KSP 1.3 when you place a kerbal. It's fine with each mod in isolation, but if you keep adding more it will eventually reach a point where it will crash, no matter which mod you add.

As a workaround, changing PostPlacementAction to noreload in settings.cfg will prevent the crash, but you will have to change scenes to see your kerbal.

While working on the latest release, I found a number of cases where WalkAbout was creating situations that it handled without incident, but which seemed to cause problems within KSP. In some of these cases, KSP would not crash until the scene changed. I have no proof, but I think that one or more of these cases may have been the reason for KSP crashing after placing a kerbal. In other words, it is possible that the crashes had nothing to do with placing the kerbal in the game - it was caused by an earlier error in setting up the GUI or determining which locations were available, etc.  

I have "sealed up" a lot of these holes in the code and I hope that this will help prevent any more unexpected crashes when placing kerbals.

If anyone does still have unexpected crashes - please let me know. If you used to have crashes and don't anymore - please let me know.

Thank you for you patience in waiting for me to get this mod out.

Share this post


Link to post
Share on other sites

I still have a similar problem with the new version; it works fine in a clean install, but with enough mods it stops working. It doesn't crash KSP anymore though, the placement window simply doesn't come up.

Here's the relevant bit from KSP.log. It also still calls itself version 1.6.1, I double-checked to make sure its the latest version.

 

[LOG 18:27:40.824] WalkAbout: Started [Version=1.6.1, Debug=False]
[LOG 18:27:40.825] WalkAbout: Loaded from default due to error - did not find file [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\Settings.cfg]
[LOG 18:27:40.830] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\Admin.loc]
[LOG 18:27:40.833] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\AstronautComplex.loc]
[LOG 18:27:40.836] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\MissionControl.loc]
[LOG 18:27:40.837] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDCentralBuilding.loc]
[LOG 18:27:40.839] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDCornerLab.loc]
[LOG 18:27:40.849] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDMainBuilding.loc]
[LOG 18:27:40.851] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDObservatory.loc]
[LOG 18:27:40.853] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDSideLab.loc]
[LOG 18:27:40.854] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDSmallLab.loc]
[LOG 18:27:40.856] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDWindTunnel.loc]
[LOG 18:27:40.859] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\SPH.loc]
[LOG 18:27:40.862] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\TrackingStation.loc]
[LOG 18:27:40.867] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\VAB.loc]
[EXC 18:27:40.872] NullReferenceException: Object reference not set to an instance of an object
	PartModuleList.Contains (Int32 classID)
	PartModuleList.Contains (System.String className)
	KspWalkAbout.Entities.InventoryItems.GetPartKisModule (.Part part)
	KspWalkAbout.Entities.InventoryItems.CalculatePartVolume (.Part part)
	KspWalkAbout.Entities.InventoryItems.Refreexcrementsems ()
	KspWalkAbout.Entities.InventoryItems..ctor ()
	KspWalkAbout.Entities.WalkAboutPersistent.GetAllItems ()
	KspWalkAbout.WalkAbout.Start ()

 

Share this post


Link to post
Share on other sites
1 hour ago, StevenV said:

I still have a similar problem with the new version; it works fine in a clean install, but with enough mods it stops working. It doesn't crash KSP anymore though, the placement window simply doesn't come up.

Here's the relevant bit from KSP.log. It also still calls itself version 1.6.1, I double-checked to make sure its the latest version.

 


[LOG 18:27:40.824] WalkAbout: Started [Version=1.6.1, Debug=False]
[LOG 18:27:40.825] WalkAbout: Loaded from default due to error - did not find file [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\Settings.cfg]
[LOG 18:27:40.830] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\Admin.loc]
[LOG 18:27:40.833] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\AstronautComplex.loc]
[LOG 18:27:40.836] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\MissionControl.loc]
[LOG 18:27:40.837] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDCentralBuilding.loc]
[LOG 18:27:40.839] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDCornerLab.loc]
[LOG 18:27:40.849] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDMainBuilding.loc]
[LOG 18:27:40.851] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDObservatory.loc]
[LOG 18:27:40.853] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDSideLab.loc]
[LOG 18:27:40.854] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDSmallLab.loc]
[LOG 18:27:40.856] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\RDWindTunnel.loc]
[LOG 18:27:40.859] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\SPH.loc]
[LOG 18:27:40.862] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\TrackingStation.loc]
[LOG 18:27:40.867] WalkAbout: Loaded [C:\Users\steve\Documents\KSP 1.3 test\GameData\WalkAbout\locFiles\VAB.loc]
[EXC 18:27:40.872] NullReferenceException: Object reference not set to an instance of an object
	PartModuleList.Contains (Int32 classID)
	PartModuleList.Contains (System.String className)
	KspWalkAbout.Entities.InventoryItems.GetPartKisModule (.Part part)
	KspWalkAbout.Entities.InventoryItems.CalculatePartVolume (.Part part)
	KspWalkAbout.Entities.InventoryItems.Refreexcrementsems ()
	KspWalkAbout.Entities.InventoryItems..ctor ()
	KspWalkAbout.Entities.WalkAboutPersistent.GetAllItems ()
	KspWalkAbout.WalkAbout.Start ()

 

Thanks @StevenV - I just discovered that myself. Something went wrong with the release build - I'm on it.

Share this post


Link to post
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.