Jump to content

[1.9.x] Contract Pack: Bases and Stations Reborn


linuxgurugamer

Recommended Posts

On 10/15/2021 at 5:42 PM, linuxgurugamer said:

New release, 3.7.2.6

  • Thanks to forum user @Daniel Prates for gathering the needed information:
    • Added following Cupolas from various mods:
      • sspx-dome-cupola-5-1
      • sspx-cupola-greenhouse-125-1
      • sspx-observation-25-1
      • sspx-cupola-125-1
      • sspx-cupola-375-1
      • sspx-cupola-1875-1
      • KKAOSS_Cupola_g
      • ht2_moduleCupola

Due to a limitation in CC, this breaks the contract.

I'm going to have to redo it, having multiple entries for each.  Hope to have it out soon

Link to comment
Share on other sites

I need some of you to test this, please, it's a combined package of all (including those I missed) cupolas for the StationCore.

Delete the file:  ContractPacks/KerbinSpaceStation/StationMissions/StationCore.cfg and add this in it's place

Please let me know how it goes, I don't have time right now to test it

Spoiler
@CONTRACT_TYPE[StationCoreCombined]:NEEDS[Kopernicus]
{
	@PARAMETER[NewStation]
	{
		@PARAMETER[LKO]
		{
            %maxAltitude = @/targetBody1.IsSun() ? 113549713200 : @/targetBody1.SpaceAltitudeThreshold()
		}
	}
}
CONTRACT_TYPE
{
    name = StationCoreCombined
    group = BasesandStations
    title = Launch the @/targetBody1 Space Station!
	genericTitle = Launch a New Space Station
    description = In order to aid our efforts of exploring @/targetBody1 we'd like you to launch a space station.
	genericDescription = We'd like you to deploy a new space station.
    synopsis = Launch the @/targetBody1 Space Station!
    completedMessage = Station Complete!
    
	// Contract min/max expiry in days.
    minExpiry = 1
    maxExpiry = 7
    // Contract can be cancelled and declined.
    cancellable = true
    declinable = true
    targetBody = @/targetBody1

     maxSimultaneous = 3
      
    // Contract rewards - no science random other rewards.
    rewardScience = 0
    rewardReputation = Random(1.0, 10.0)
    rewardFunds = Random(100000.0, 150000.0)
    failureReputation = Random(1.0, 100.0)
    failureFunds = 50000.0
    advanceFunds = 50000.0

    // Failsafe Data.
    DATA
    {
        type = List<Vessel>
		requiredValue = false
        stations = AllVessels().Where(v => v.VesselType() == Station)
    }
    DATA
    {
        type = CelestialBody
        requiredValue = true
        uniquenessCheck = GROUP_ACTIVE
        targetBody1 = OrbitedBodies().Where(body => @/stations.Where(v => v.CelestialBody() == body).Count() == 0).SelectUnique()
		//targetBody1 = Kerbin
		title = Must have orbited a Celestial Body, but not have any stations deployed.
    }


    //Checks all vessel parameters are correct
    PARAMETER
    {
        name = NewStation
        type = VesselParameterGroup
        title = Launch a new Station Core into the specified orbit around @/targetBody1.
        notes = The station must include 1 Docking Port and support 4 Kerbals.  This can be done in one launch, or multiple launches.

		//Checks station is in orbit
		PARAMETER
        {
            name = LKO
            type = Orbit
          
			targetBody = @/targetBody1
            situation = ORBITING
			maxAltitude = @/targetBody1.IsSun() ? 113549713200 : @/targetBody1 == Gilly ? 16000 : @/targetBody1.SpaceAltitudeThreshold()
        }

        //Check for a Docking Port
		PARAMETER
		{
			name = PartValidation
			type = PartValidation
			
			partModule = ModuleDockingNode
			minCount = 1
		}
		
		//Check for crew capacity
        PARAMETER
        {
            name = HabModuleChild
            type = HasCrewCapacity
			title = Support 4 Kerbals
            
			minCapacity = 4
            
        }
		
		//Checks that vessel can generate power, accepts solar panels or RTGs
        PARAMETER
        {
            name = RTGSolar
            type = Any
            title = Have one of the following power generators

            PARAMETER
            {
                name = PartValidationRTG
                type = PartValidation
				title = 1 or more solar panels
				hideChildren = true

                partModule = ModuleDeployableSolarPanel
                minCount = 1
            }
                
            PARAMETER
            {
                name = PartValidationSolar
                type = PartValidation
                title = 1 or more generators
				hideChildren = true
                
                partModule = ModuleGenerator
                minCount = 1
            }
			
			PARAMETER:NEEDS[NearFutureSolar]
			{
				name = PartValidationNearFutureSolar
				type = PartValidation
				title = 1 or more curved solar panels
				hideChildren = true
				
				partModule = ModuleCurvedSolarPanel
				minCount = 1
			}
			
			PARAMETER:NEEDS[NearFutureElectrical]
			{
				name = PartValidationNearFutureReactors
				type = PartValidation
				title = 1 or more fission reactors
				hideChildren = true
				partModule = FissionReactor
				minCount = 1
			}
			
			PARAMETER:NEEDS[NearFutureElectrical]
			{
				name = PartValidationNearFutureRTGs
				type = PartValidation
				title = 1 or more radioisotope generators
				hideChildren = true
				partModule = ModuleRadioisotopeGenerator
				minCount = 1
			}
			
			PARAMETER:NEEDS[Kopernicus]
			{
				name = PartValidationRTG
                type = PartValidation
                hideChildren = true
                title = 1 or more solar panels
                partModule = KopernicusSolarPanel
                minCount = 1
			}
        }
	}
	PARAMETER
	{
		name = Any
		type = Any

		//OPTIONAL Checks for cupola
		PARAMETER
        {
            name = PartValidation
            type = PartValidation
            title = Include a stock cupola (optional)
			optional = true
			hideChildren = true
            
// Can add multiple "part" lines here will match on ANY of them
            part = cupola
            minCount = 1
        }
		PARAMETER:NEEDS[StationPartsExpansionRedux]
        {
            name = PartValidation
            type = PartValidation
            title = Include a cupola from Station Parts Expansion (optional)
			optional = true
			hideChildren = true

			part = sspx-dome-cupola-5-1
			part = sspx-cupola-greenhouse-125-1
			part = sspx-observation-25-1
			part = sspx-cupola-125-1
			part = sspx-cupola-375-1
			part = sspx-cupola-1875-1

            minCount = 1
        }


		PARAMETER:NEEDS[HabTech2]
        {
            name = PartValidation
            type = PartValidation
            title = Include a cupola from HabTech2 (optional)
			optional = true
			hideChildren = true
            
// Can add multiple "part" lines here will match on ANY of them
            part = ht2_moduleCupola

            minCount = 1

        }
		PARAMETER:NEEDS[PlanetaryBaseInc]
        {
            name = PartValidation
            type = PartValidation
            title = Include a cupola from Planetary Base Inc (optional)
			optional = true
			hideChildren = true
            
// Can add multiple "part" lines here will match on ANY of them
            part = KKAOSS_Cupola_g
            minCount = 1
        }
		PARAMETER:NEEDS[Tantares]
        {
            name = PartValidation
            type = PartValidation
            title = Include a cupola from Tantares (optional)
			optional = true
			hideChildren = true
            
// Can add multiple "part" lines here will match on ANY of them
            part = nashira_cupola_s1_1
            minCount = 1
        }


		
		//Checks for Supplies (USI Life Support)
		PARAMETER:NEEDS[USILifeSupport]
		{
			name = Supplies
			type = HasResource
			title = Have Supplies on board your vessel
			
			resource = Supplies
			minQuantity = 1
		}
		
		//OPTIONAL Checks for science labs from various mods
		PARAMETER
		{
			name = ScienceModuleValidation
			type = Any
			optional = true
			completeInSequence = true
			
			PARAMETER
			{
				name = ScienceLab
				type = PartValidation
				title = Include a Mobile Processing Lab MPL-LG-2
				rewardFunds = 75000.0
				hideChildren = true
				
				partModule = ModuleScienceLab
			}

			PARAMETER:NEEDS[StationScience]
			{
				name = PartValidation
				type = PartValidation
				title = Include a TH-NKR Research Lab
				rewardFunds = 85000.0
				hideChildren = true
				
				part = StnSciLab
			}
			
			PARAMETER:NEEDS[Kerbalism]
			{
				name = PartValidation
				type = PartValidation
				title = Include a Science Laboratory
				rewardFunds = 75000.0
				hideChildren = true

				partModule = Laboratory
			}
		}
		
		PARAMETER
		{
			name = VesselIsType
			type = VesselIsType
			
			vesselType = Station
		}
	
	}

	//Begins a 2-day countdown. Station must be in orbit for 2 days for contract to complete
	PARAMETER
	{
		name = Duration
		type = Duration
		duration = 2d
		preWaitText = Orbit time required:
		waitingText = Time to completion: 
		completionText = You survived!
		startCriteria = PARAMETER_COMPLETION
		parameter = NewStation
	}
	
	
	REQUIREMENT
	{
		name = PartModuleUnlocked
		type = PartModuleUnlocked

		partModule = ModuleDockingNode
	}

	REQUIREMENT
	{
		name = Any
		type = Any
	
		REQUIREMENT
		{
			name = PartModuleUnlocked
			type = PartModuleUnlocked
			
			partModule = ModuleDeployableSolarPanel
		}
		
		//REQUIREMENT:NEEDS[Kopernicus]
		//{
		//	name = PartModuleUnlocked
		//	type = PartModuleUnlocked
		//	
		//	partModule = KopernicusSolarPanel
		//}
		
		REQUIREMENT:NEEDS[NearFutureSolar]
		{
			name = PartModuleUnlocked
			type = PartModuleUnlocked
			
			partModule = ModuleCurvedSolarPanel
		}	
	}
	
	// REQUIREMENT
	// {
		// name = CompleteContract
		// type = CompleteContract
		// contractType = StationCore
		// minCount = 0
		// checkOnActiveContract = false
		// cooldownDuration = 5d
		// title = Must not have completed this contract in the last 5 days.
	// }

	REQUIREMENT
	{
		name = PartUnlocked
		type = PartUnlocked
		
		part = crewCabin
	}
	
	REQUIREMENT
	{
		name = SunCheck
		type = Expression
		expression = !@/targetBody1.IsSun()
		title = Target body must not be the Sun
	}
}
	

 

 

 

Edited to update parameters

Edited by linuxgurugamer
Link to comment
Share on other sites

12 minutes ago, Grimmas said:

Yes, I got offered contracts for Mun and Minmus stations again and there is no issue without HabTech2 installed. Though ironically I am actually planning on installing it now lol.

Grimmas if you could, do check what parts of SSPR work and which doesnt. I went through all part configs but I am as yet unsure that I got all of them right.

Link to comment
Share on other sites

I'd have to attach each cupola one by one and cheat the station into orbit to do this, right? My loading times are abysmal, it takes 15 mins just to start the game and every scene change takes 15-20 seconds or more of staring at a black screen, so that's quite a task :) 

I think it's fine to wait and see. If there's a problem, someone who uses the mod (like me) will eventually notice. And no news is good news.  

Link to comment
Share on other sites

On 10/17/2021 at 3:42 PM, Grimmas said:

I'd have to attach each cupola one by one and cheat the station into orbit to do this, right? My loading times are abysmal, it takes 15 mins just to start the game and every scene change takes 15-20 seconds or more of staring at a black screen, so that's quite a task :) 

I think it's fine to wait and see. If there's a problem, someone who uses the mod (like me) will eventually notice. And no news is good news.  

 

Yeah I guess flaws will appear eventually. As for tantares and habtech2 I am confident, part names in the VAB and configs are easily relatable. It is with SSPR that I worry somewhat. Nertea uses a nomenclature that is certainly obvious to him but wast for me. But we'll see.

Link to comment
Share on other sites

2 hours ago, MirrorsareHard154 said:

AVC Won't let me play KSP as it thinks this needs to be at version 3.7.2.7 even though there's only 3.7.2.6 on github

Ignore that, 3.7.2.6 is the current one.  AVC is just giving you a warning that it thinks there is a newer one, I'll fix that

Edit:  Looks like I forgot to upload the last update, doing that now

Edited by linuxgurugamer
Link to comment
Share on other sites

2 hours ago, MirrorsareHard154 said:

Well, it gets to the main menu now, but pressing any key just instantly closes the game

Then you have another problem.

No logs, no support

Read this BEFORE asking for supporthttp://forum.kerbalspaceprogram.com/index.php?/topic/83212-how-to-get-support-read-first/

Link to comment
Share on other sites

1 minute ago, MirrorsareHard154 said:

 Can't the site handle this, stupid goddamn entry barrier

Log files can be 20 meg or bigger (that's 20,000,000).  That's a rather large file for a text-based system to deal with. 

Tens of thousands of other people seem to be able to deal with this without a problem.   I've never seen anyone complain about this requirement (before this, that is).

If you have Google Drive, you can use that.  

I did a quick Google search for you.  Lots came up, here is a page which lists 10 good ones:

https://www.softwaretestinghelp.com/file-sharing-sites-and-software-programs/

Link to comment
Share on other sites

2 hours ago, MirrorsareHard154 said:

 

I found the following in the log file, which could cause the problem you have, but I have no idea what mod that is:


PartLoader: Compiling Part 'JDSA/KSPMagnetoDrive/EC6/EC6/TeeslaKaanon' 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Module ModuleEnginesFX threw during OnLoad: System.ArgumentException: Requested value 'ElectricCharge' was not found.
  at System.Enum+EnumResult.SetFailure (System.Enum+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument) [0x00023] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) [0x0017a] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) [0x00010] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Enum.Parse (System.Type enumType, System.String value) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at ModuleEngines.OnLoad (ConfigNode node) [0x002ed] in <cd473063d3a2482f8d93d388d0c95035>:0 
  at PartModule.Load (ConfigNode node) [0x001ab] in <cd473063d3a2482f8d93d388d0c95035>:0  
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

 

Edited by linuxgurugamer
Link to comment
Share on other sites

30 minutes ago, MirrorsareHard154 said:

So that worked, for some reason, despite it being in the gamedata folder, that mod was nowhere to be found among my installs in CKAN, and I can't remember it having to be installed as part of a dependency, Unity is a strange beast

What worked?  What was the mod?  

 

Link to comment
Share on other sites

I had a thing happen after my game crashed while a KRASH simulation was loading. Before running the game I saw an update for Bases and Station version 2:3.7.2.7. Upon loading I had duplicated toolbar buttons (including an additional one I have never seen before).  I reverted to the previous version of Bases and Stations and the problem was gone.

Not looking for support, just letting you know in case it's related.  Thanks for everything you do.

Link to comment
Share on other sites

8 hours ago, PhilTact said:

I had a thing happen after my game crashed while a KRASH simulation was loading. Before running the game I saw an update for Bases and Station version 2:3.7.2.7. Upon loading I had duplicated toolbar buttons (including an additional one I have never seen before).  I reverted to the previous version of Bases and Stations and the problem was gone.

Not looking for support, just letting you know in case it's related.  Thanks for everything you do.

Totally unrelated, this is only a contract pack, it doesn't have any code.

I'll test it, but don't expect anything

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