Jump to content

[1.10.1] SCANsat [v20.4] -- Real Scanning, Real Science, at Warp Speed! [September 9, 2020]


DMagic

Recommended Posts

3 minutes ago, Cmaj6 said:

Thank you both for your quick and helpful replies! I will install SCANsat immediately! :) This is such a wonderful and mature community. Am proud to be a part of it!

No problem! Personally, I don't think you'll ever find a reason to remove SCANsat once you start using it. In the unlikely event that you DO, this is the application that I mentioned earlier for removing parts from a vessel (through save file editing). I haven't used it in KSP 1.2.X, but I know it worked in 1.1.X.

 

Link to comment
Share on other sites

44 minutes ago, NotAgain said:

Sorry to bother anyone, but I can't figure out how to make the resource overlay work.

Not a bother at all!

What are you trying to do, and what is not working the way you expect it? Once you have scanned (or at least started to scan) for resources, you should be able to open one of the maps (I mostly use the large map, I believe the small one works similarly), click on the button on the left-hand side to make sure the resource overlay is "on", and then select the resource you want to look at from the drop-down list in the upper-right hand corner of the map.

Link to comment
Share on other sites

2 hours ago, NotAgain said:

@Merkov, I'm trying to use the DMagic Multispectral imager (which says it can be used to scan for minerals) in a polar orbit of the Mun to scan for minerals. I've completed the multispectral scan to 100% and analysed data, but no overlay appears.

The DMOS Multispectral scanner can be used as a mineral scanner, BUT that is a different function than the Multispectral scan. When you right click on the scanner, you should see an option to start mineral scan. That is what you want. Also, I'm pretty sure the mineral scan and Multispectral scan both have different ideal scanning orbits (but I think they're only off by 50 km, so that shouldn't make a huge difference. Check the Multispectral scanner's tool tips in the VAB for details). 

As an aside, what do you have your resource scanning settings set to? SCANsat has a lot of options for customizing resource scanning exactly the way you want it. The tool tips in the SCANsat settings window describe them far more thoroughly than I can.

Link to comment
Share on other sites

I updated Space Dock and CKAN to mark this compatible with KSP 1.2.2. Let me know if anyone runs into any problems.

@NotAgain That Orbital Science scanner is a bit messy because it has two separate SCANsat modules, so you have to make sure to actually scan with both. The resource scanner part will only be available depending on your SCANsat resource scanning settings.

Link to comment
Share on other sites

  • 2 weeks later...

This is a question I first asked in the UKS thread, but apparently it's more of a SCANsat question. I apologize if this bug or problem has been reported already.  But I seem to have no Silicates anywhere in the Kerbol system, it doesn't even show up as an option for the scanners.  I have the latest Community Resource Pack from RD/s UKS package.

vHpdqqJ.png

Additionally, at least on Minmus (haven't yet gotten to other bodies in this save), a bunch of the resources show up as "No data".  I would understand 0.0%, but does "No Data" indicate that something might be wrong?  Especially for Dirt, I was under the assumption that Dirt should be everywhere.

E4JPz32.png

These are my settings:

 

hw0zjcA.png

 

Thank you for any help that can be given!

Link to comment
Share on other sites

Hi Everyone,

(I'm not sure this is the right place for this post...)

Fascinated by all the great mods out there, I've decided to start giving back to the modding community and contribute some work myself and generate some pull requests...

The first step for me is learning a bit of the structure of the KSP API, and some of the main mods out there to see what I could do...

And that's where I hit my first snag: I'm trying to compile scansat from source and it generates a bug in KSP at run-time that doesn't occur if I take the release DLL from DMagic.

 

In my KSP.log, I get the following error spams when I use the DLL I compiled, but all goes well when I use the one provided

[EXC 10:46:57.200] NullReferenceException: Object reference not set to an instance of an object
	KSP.UI.Screens.ResourceDisplay.CreateResourceList ()
	KSP.UI.Screens.ResourceDisplay.Update ()
[EXC 10:46:57.998] NullReferenceException: Object reference not set to an instance of an object
	SCANsat.SCANcontroller.Start ()

My platform is Windows 7 64 bit, and I'm compiling using VS. I have no other mods installed except blizzy's toolbar and AVC. I have tried without/with the other mods, and the bug shows up only when my compilation of scansat is used.

I'm guessing that DMagic compiles using Mono , correct ? Is there any specific reason behind this issue ? has anyone else had the same issue ?

 

I'v posted below a screen capture of the bug (i never get to the main menu, it immediately goes to this after the loading screen.) as well as the csproj file I m using.

 

I know this has nothing to do with the awesome work done on Scansat, and I'm not sure I'm asking in the right place, but any advice would be greatly appreciated for an aspiring fellow modder... (please pretty please :-) )

 

Spoiler

KDNTenZ.png

 

 


<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{3AE13948-477D-4375-8AB4-B45664966D9E}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>SCANsat</RootNamespace>
    <AssemblyName>SCANsat</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>none</DebugType>
    <Optimize>false</Optimize>
	<OutputPath>bin\DEBUG\</OutputPath>
    <DefineConstants>DEBUG;TRACE;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <UseVSHostingProcess>false</UseVSHostingProcess>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>none</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>..\GameData\SCANsat\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <CustomCommands>
      <CustomCommands>
        <Command type="AfterBuild" command="cp &quot;${ProjectDir}/CHANGELOG.txt&quot; ." workingdir="${TargetDir}" />
        <Command type="AfterBuild" command="cp &quot;${ProjectDir}/../README.md&quot; ." workingdir="${TargetDir}" />
        <Command type="AfterBuild" command="cp &quot;${ProjectDir}/LICENSE.txt&quot; ." workingdir="${TargetDir}" />
        <Command type="AfterBuild" command="bash -c 'for s in &quot;Plugins&quot; &quot;Flags&quot; &quot;Icons&quot; &quot;MM_Parts&quot; &quot;Parts&quot; &quot;Resources&quot;; do cp -ur &quot;${ProjectDir}/../SCANassets/$s&quot; .; done'" workingdir="${TargetDir}" externalConsole="true" />
        <Command type="Clean" command="rm LICENSE.txt CHANGELOG.txt README.md" workingdir="${TargetDir}" />
        <Command type="Clean" command="bash -c 'for s in &quot;Plugins&quot; &quot;Flags&quot; &quot;Icons&quot; &quot;MM_Parts&quot; &quot;Parts&quot; &quot;Resources&quot;; do rm -r $s ; done'" workingdir="${TargetDir}" externalConsole="true" />
      </CustomCommands>
    </CustomCommands>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="SCANconfigLoader.cs" />
    <Compile Include="SCAN_Color_Config.cs" />
    <Compile Include="SCAN_Data\SCANanomaly.cs" />
    <Compile Include="SCAN_Data\SCANdata.cs" />
    <Compile Include="SCAN_Data\SCANresourceBody.cs" />
    <Compile Include="SCAN_Data\SCANresourceGlobal.cs" />
    <Compile Include="SCAN_Data\SCANresourceType.cs" />
    <Compile Include="SCAN_Data\SCANterrainConfig.cs" />
    <Compile Include="SCAN_Data\SCANtype.cs" />
    <Compile Include="SCAN_Data\SCANwaypoint.cs" />
    <Compile Include="SCAN_Map\SCANmap.cs" />
    <Compile Include="SCAN_Map\SCANmapExporter.cs" />
    <Compile Include="SCAN_Map\SCANmapLegend.cs" />
    <Compile Include="SCAN_Map\SCANmapProjection.cs" />
    <Compile Include="SCAN_Map\SCANmapType.cs" />
    <Compile Include="SCAN_PartModules\SCANhiDefCamera.cs" />
    <Compile Include="SCAN_PartModules\SCANresourceDisplay.cs" />
    <Compile Include="SCAN_PartModules\SCANresourceScanner.cs" />
    <Compile Include="SCAN_PartModules\SCANRPMStorage.cs" />
    <Compile Include="SCAN_PartModules\SCANsat.cs" />
    <Compile Include="SCAN_Platform\Attributes\Bounds.cs" />
    <Compile Include="SCAN_Platform\Extensions\Colors\UnityEngine.Color_.cs">
      <SubType>Code</SubType>
    </Compile>
    <Compile Include="SCAN_Platform\Extensions\ConfigNodes\ConfigExtensions.cs" />
    <Compile Include="SCAN_Platform\Extensions\GUI\UnityEngine.GUILayout_.cs" />
    <Compile Include="SCAN_Platform\Extensions\GUI\UnityEngine.GUISkin_.cs" />
    <Compile Include="SCAN_Platform\Extensions\GUI\UnityEngine.GUIStyleState_.cs" />
    <Compile Include="SCAN_Platform\Extensions\GUI\UnityEngine.GUIStyle_.cs" />
    <Compile Include="SCAN_Platform\Extensions\GUI\UnityEngine.GUI_.cs" />
    <Compile Include="SCAN_Platform\Extensions\Math\UnityEngine.Mathf_.cs" />
    <Compile Include="SCAN_Platform\Extensions\Math\UnityEngine.Rect_.cs" />
    <Compile Include="SCAN_Platform\Extensions\MJExtensions.cs" />
    <Compile Include="SCAN_Platform\Logging.cs" />
    <Compile Include="SCAN_Platform\Palettes\ColorBrewer\ColorBrewer.cs" />
    <Compile Include="SCAN_Platform\Palettes\ColorBrewer\Include\Original.cs" />
    <Compile Include="SCAN_Platform\Palettes\FixedColors\FixedColorPalettes.cs" />
    <Compile Include="SCAN_Platform\Palettes\Palette.cs" />
    <Compile Include="SCAN_Platform\Palettes\PaletteLoader.cs" />
    <Compile Include="SCAN_Platform\Palettes\Palettes.cs" />
    <Compile Include="SCAN_Platform\Palettes\Swatches.cs" />
    <Compile Include="SCAN_Platform\SCAN_CLZF2.cs" />
    <Compile Include="SCAN_Platform\SCAN_ConfigNodeStorage.cs" />
    <Compile Include="SCAN_Platform\SCAN_KSPAddonImproved.cs" />
    <Compile Include="SCAN_Platform\SCAN_MBE.cs" />
    <Compile Include="SCAN_Platform\SCAN_MBW.cs" />
    <Compile Include="SCAN_Platform\SCAN_SkinsLibrary.cs" />
    <Compile Include="SCAN_Toolbar\SCANappLauncher.cs" />
    <Compile Include="SCAN_Toolbar\SCANtoolbar.cs" />
    <Compile Include="SCAN_Toolbar\SCANtoolbarwrapper.cs" />
    <Compile Include="SCAN_UI\SCANcolorSelection.cs" />
    <Compile Include="SCAN_UI\SCANbigMap.cs" />
    <Compile Include="SCAN_UI\SCANoverlayController.cs" />
    <Compile Include="SCAN_UI\SCANresourceSettings.cs" />
    <Compile Include="SCAN_UI\SCANzoomHiDef.cs" />
    <Compile Include="SCAN_UI\SCANzoomWindow.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANlanguagePack.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCAN_Localization.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANremoteView.cs" />
    <Compile Include="SCANcontroller.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANicon.cs" />
    <Compile Include="SCAN_UI\SCANinstrumentUI.cs" />
    <Compile Include="SCAN_UI\SCANkscMap.cs" />
    <Compile Include="SCAN_UI\SCANmainMap.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANpalette.cs" />
    <Compile Include="SCANquickload.cs" />
    <Compile Include="SCANreflection.cs" />
    <Compile Include="SCAN_UI\SCANsatRPM.cs" />
    <Compile Include="SCAN_UI\SCANsettingsUI.cs" />
    <Compile Include="SCANutil.cs" />
    <Compile Include="SCANmainMenuLoader.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANskins.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANuiColorPicker.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANuiSlider.cs" />
    <Compile Include="SCAN_UI\UI_Framework\SCANuiUtil.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <ItemGroup>
    <Reference Include="Assembly-CSharp">
      <HintPath>E:\Steam\SteamApps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
    </Reference>
    <Reference Include="Assembly-CSharp-firstpass">
      <HintPath>E:\Steam\SteamApps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
    </Reference>
    <Reference Include="System">
      <HintPath>E:\Steam\SteamApps\common\Kerbal Space Program\KSP_x64_Data\Managed\System.dll</HintPath>
    </Reference>
    <Reference Include="UnityEngine">
      <HintPath>E:\Steam\SteamApps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
    </Reference>
    <Reference Include="UnityEngine.UI">
      <HintPath>E:\Steam\SteamApps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Target Name="PostBuildMacros">
    <GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
      <Output TaskParameter="Assemblies" ItemName="Targets" />
    </GetAssemblyIdentity>
    <ItemGroup>
      <VersionNumber Include="@(Targets->'%(Version)')" />
    </ItemGroup>
  </Target>
  <PropertyGroup>
  <PostBuildEventDependsOn>
        $(PostBuildEventDependsOn);
        PostBuildMacros;
      </PostBuildEventDependsOn>
    <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)Output\GameData\SCANsat\Plugins\" /Y
xcopy "$(ProjectDir)..\SCANassets" "$(SolutionDir)Output\GameData\SCANsat\" /Y /S</PostBuildEvent>
  </PropertyGroup>
</Project>

 

 

Link to comment
Share on other sites

@bru stmopf: sure would have been better to ask in Plugin Development Help and Support. I'm leaving your post here for now so specific help with SCANsat dependencies may be provided.

As I believe you didn't change anything in code, your issue has probably to do with one or more of the referenced assemblies. You should make sure to use the correct ones for the KSP version.

As a general rule, to catch errors at runtime you should compile in debug mode and enable Unity debugging and profiling for VS. There's some wonderful help here to make so. You'll then be able to see where the error comes from.

Link to comment
Share on other sites

3 hours ago, diomedea said:

@bru stmopf: sure would have been better to ask in Plugin Development Help and Support. I'm leaving your post here for now so specific help with SCANsat dependencies may be provided.

As I believe you didn't change anything in code, your issue has probably to do with one or more of the referenced assemblies. You should make sure to use the correct ones for the KSP version.

As a general rule, to catch errors at runtime you should compile in debug mode and enable Unity debugging and profiling for VS. There's some wonderful help here to make so. You'll then be able to see where the error comes from.

Thanks. I actually saw that thread but I wasn't too sure coz my prob is definitely narrowed down to scan sat compilation... 

You're correct in assuming I did not change anything in any of the code files. The only difference is in the referencing the right libraries, and I checked : they're referencing the game's dll in "Kerbal Space Program\KSP_x64_Data\Managed"

I'm already compiling in debug, but I'll try to follow the link you gave to enable run time debugging of unity (not gonna compile mono though...)

Link to comment
Share on other sites

After reading the update notes and doing a search on waypoints, I stil can't figure out how to put down a marker for Mechjeb.  In the old version, you had to turn it on under options and then there was a button to activate that let you click and place a waypoint marker in the zoom map.

That all seems to be gone and I can't make heads or tails of what is meant by "fine print" and such.  How do I set my MechJeb landing waypoint?

Thanks!

 

Link to comment
Share on other sites

@tsaven I didn't know that Silicates was an MKS resource (it used to be KSP Interstellar), I'll have to add it to the MM configs for the resource scanner.

For the scan on Minmus, "No Data" means that a scan for that resource hasn't been completed for that area. Those resources should all be covered when using the Narrow Band scanner, and all resources, regardless of what MM configs are present will be covered by the M700 scanner.

@Waxing_Kibbous SCANsat contracts fall under their own category in the Contract Configurator version of the Mission Control screen, and they are all offered by the SCANsat agency with its flag (the same logo as seen in the first post).

@mjl1966 MechJeb integration is disabled and will probably remain so until I get the next version out, which will be a very long time.

@bru stmopf The SCANsat project on GitHub is a bit of a mess. You should probably not use the .sln from there, instead just take the SCANsat folder, and SCANsat.csproj file, ignore the .mdproj and the other assemblies. Then you'll probably have to set up the references again (Assembly C-Sharp, UnityEngine, and UnityEngine.UI) and make sure it's compiled with .NET 3.5.

Link to comment
Share on other sites

11 hours ago, DMagic said:

@tsaven I didn't know that Silicates was an MKS resource (it used to be KSP Interstellar), I'll have to add it to the MM configs for the resource scanner.

For the scan on Minmus, "No Data" means that a scan for that resource hasn't been completed for that area. Those resources should all be covered when using the Narrow Band scanner, and all resources, regardless of what MM configs are present will be covered by the M700 scanner.

Thank you!  Yeah, turned out I hadn't done a scan of Minmus yet. 

Silicates was added to MKS with the latest release.  Appreciate you adding it, is it a simple change that I could paste in to the appropriate file or is it more involved?  I'm plenty comfortable tweaking MM configs, but if it's more advanced I'll wait on an update.

Link to comment
Share on other sites

On 18/12/2016 at 1:39 PM, diomedea said:

@bru stmopf: sure would have been better to ask in Plugin Development Help and Support. I'm leaving your post here for now so specific help with SCANsat dependencies may be provided.

As I believe you didn't change anything in code, your issue has probably to do with one or more of the referenced assemblies. You should make sure to use the correct ones for the KSP version.

As a general rule, to catch errors at runtime you should compile in debug mode and enable Unity debugging and profiling for VS. There's some wonderful help here to make so. You'll then be able to see where the error comes from.

@diomedea : thanks a lot for that link. it really helped me getting things started

@DMagic: I may be wrong but It could be there is a difference between the dll provided in the release of Scansat v16.11 and a compilation of the github code from branch release. I cloned your repo, compiled the code as is against the ksp libraries (version 1.2.2.1622, 64 bit windows) and launched the game. I still get the same weird crash. When I debug the code, it seems that it crashes when the main menu is loaded, and a call is made to the FlightGlobals.currentMainBody field which happens to be null (I checked with debug in vs). I posted underneath the frist occurence of code that throws a nullref exception (from scansatcontroller).  I'll create the issue in the github repo. Anyway, thanks for everything.

			if (HighLogic.LoadedSceneIsFlight)
			{
				if (!body_data.Contains(FlightGlobals.currentMainBody.name))
					body_data.Add(FlightGlobals.currentMainBody.name, new SCANdata(FlightGlobals.currentMainBody));
				try
				{
					mainMap = gameObject.AddComponent<SCANmainMap>();
					settingsWindow = gameObject.AddComponent<SCANsettingsUI>();
					instrumentsWindow = gameObject.AddComponent<SCANinstrumentUI>();
					colorManager = gameObject.AddComponent<SCANcolorSelection>();
					BigMap = gameObject.AddComponent<SCANBigMap>();
					resourceOverlay = gameObject.AddComponent<SCANoverlayController>();
					resourceSettings = gameObject.AddComponent<SCANresourceSettings>();
					zoomMap = gameObject.AddComponent<SCANzoomWindow>();
				}
				catch (Exception e)
				{
					SCANUtil.SCANlog("Something Went Wrong Initializing UI Objects: {0}", e);
				}
			}
Link to comment
Share on other sites

Hey, quick question - is it intended when running MKS along with KSP Interstellar, that both the narrowband and the surface scanners only show the Interstellar resources?

If it is intended - how would one get detailed scans for the MKS resources? (Metallic Ore, Minerals etc...)

If it isn't intended and I found a misbehaviour - can I simply paste the MKS resources under the following MM Patch Part?

@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin,KolonyTools]

Thanks and merry christmas!

Link to comment
Share on other sites

@DMagic   : Thanks to you I finally found the solution to my compilation "bug" problem. I'll leave the solution here in case anyone else has the same issue (it actually took me a while to figure it out).

The scansat code is completely fine, but when recreating a csproj file to compile the project, do not define the DEBUG constant. it sends stock ksp in limbo...

Edited by bru stmopf
Link to comment
Share on other sites

Hey, what do I need to change to get the ScanSAT parts to scan for Silicates when using USI MKS?

I added the following lines to the SCANsat_Resource_Scanner.cfg file:

    {
        name = SCANresourceDisplay
        sensorType = 268435456
        ResourceName = Silicates
    }

Into what I assumed were the appropriate parts (anything that had FOR[SCANsat]:NEEDS[KolonyTools] in it).  And while now Silicates show up as a resource on the Narrow-Band scanner, it simply reads "No data" still.

Is there something else I need to change?

Edited by tsaven
typo
Link to comment
Share on other sites

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.

×
×
  • Create New...