Jump to content

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


linuxgurugamer

Recommended Posts

  On 9/16/2021 at 11:01 AM, Caerfinon said:

In this example any science lab that has one of the listed part modules will be considered valid. You can add a new parameter to identify the partmodule for the ones you want, or add a parameter that merely is a list of parts like the cupola one.

Expand  

Thank you. I did the modifications you suggested but I'd like to also include a universal patch (but I can't code). Can you give me one that accepts any parts with ModuleScienceLab that arent't included in the list (so they don't duplicate)? I'd like it to say "Include X" that uses the part's name and the reward to be Y times the cost of that part.

  On 9/16/2021 at 11:01 AM, Caerfinon said:

You could patch it to with additional "part =" lines for the parts you would like to see considered. Multiple part entries will all be considered.

Expand  

If I patched it with a part from a mod that isn't installed, would it cause errors?

And lastly, I wanted to make a new mission but it's getting more and more complicated. I'm not sure if it's worth doing, as I can't code so I can only ask others to code for me (well, to be specifically, to code a patch that hopefully gets added to this contract pack).

The simplified version is as follows. Modify this to check for ModuleScienceLab instead of that part:

targetVessel1 = AllVessels().Where(v => v.Parts().Contains(Large_Crewed_Lab) == false && v.VesselType() == Station && v.CrewCount() > 0).Random()

and make the contract scale the rewards based on the mass and costs of the science lab you choose to haul to the station.

And here's a more complex idea, probably too complex:

Contract Configurator would choose a random station without ModuleScienceLab. Then it checks for the radial size of the biggest part. It then gives the mission to dock a science lab of matching size, which it also checks for from the available parts. However, since there are sometimes multiple science labs of the same size, it gives you the option to bring any of those with different rewards scaling with mass, and refunds the cost of the part, too. It also checks whether the station has a centrifuge. If it doesn't have one and the appropriate size has a science lab with a centrifuge, it asks you to bring the centrifuge lab specifically.  If there's already a centrifuge, it asks you to bring a non-centrifuge lab of the appropriate size.

Edited by Krzeszny
Link to comment
Share on other sites

  On 9/17/2021 at 9:51 AM, Krzeszny said:

Thank you. I did the modifications you suggested but I'd like to also include a universal patch (but I can't code). Can you give me one that accepts any parts with ModuleScienceLab that arent't included in the list (so they don't duplicate)? I'd like it to say "Include X" that uses the part's name and the reward to be Y times the cost of that part.

Expand  

This can only partially be done. Contract Configurator does not know the cost of parts, but you could add mod specific stanzas with a list of parts.

If you kept a table of variables either at the contract level or the contract group level that listed the value of specific parts in an array then you could do your reward scheme.

  Reveal hidden contents
  On 9/17/2021 at 9:51 AM, Krzeszny said:

If I patched it with a part from a mod that isn't installed, would it cause errors?

Expand  

Contract configurator may or may not throw an exception, but if you protect the parameter stanza with a :NEEDS[mod]  statement, then you should be fine.

  On 9/17/2021 at 9:51 AM, Krzeszny said:

And here's a more complex idea, probably too complex

Expand  

The best way to learn how contracts work is to read some of the better ones. I started looking at making my own contracts in November of 2020 and I didn't know squat about how Contract Configurator worked. I read contract packs by nightingale (Field Science, Tourism Plus), Inigma (original GAP), DMagic (SCANStat), and Keniamin (Kerbin Side GAP) and deduced what their code was doing and adapted their stanzas to ideas I wanted to do in a contract. Also a lot of reading tin the CC wiki was very helpful. Eventually after some trial and error I got the hang of it and I now have 3 published Contract Packs.

Further discussion of contract code should probably take place in the Contract Configurator thread or a WIP Dev thread

 

Link to comment
Share on other sites

  • 2 weeks later...

Stockalike Station Parts Expansion Redux adds 5 new station core parts:

  • 1.25m station core
  • 1.875m station core
  • 2.5m station core
  • 3.75m station core
  • 5m station core

Do you think the "Launch the Space Station!" contract should require a station core if at least one of those parts is researched?

If not, how much should including a station core part pay?

Edited by Krzeszny
Link to comment
Share on other sites

  On 9/27/2021 at 4:20 PM, Krzeszny said:

Stockalike Station Parts Expansion Redux adds 5 new station core parts:

  • 1.25m station core
  • 1.875m station core
  • 2.5m station core
  • 3.75m station core
  • 5m station core

Do you think the "Launch the Space Station!" contract should require a station core if at least one of those parts is researched?

If not, how much should including a station core part pay?

Expand  

How about a separate set of contracts directly addressing these parts?  Forcing all space station contracts to use one of these core parts restricts a player's ability to do his own thing with his own parts, etc.

Link to comment
Share on other sites

  On 9/27/2021 at 6:36 PM, linuxgurugamer said:

How about a separate set of contracts directly addressing these parts?  Forcing all space station contracts to use one of these core parts restricts a player's ability to do his own thing with his own parts, etc.

Expand  

Well, new station contracts already force players to have a docking node, 4 crew spaces, power generation and at least 1 unit of supplies. If the contract is meant to be a station core, I see nothing wrong with challenging players to bring 1 out of 5 cores of their choosing, if they have SSPXR installed.

I think it would make more sense to require a station core part but not require 4 crew spaces and supplies, perhaps not even power generation if it's just a literal station core with docking ports, when it comes to restricting players.

Edited by Krzeszny
Link to comment
Share on other sites

Hello guys! I'm trying this mod out and i really enjoying it! I play carriere hard mode with kerbalism, SSPXR, SCANsat and others in 1.12.2.
After I builded my kerbin orbital station there is a mission to build a Minmus orbital station with a cupola and science laboratory (optional both).
Now how can you see from the image, ksp is recognizing the lab part "PMA-3 'Nature' Science Lab" but not the cupola part "PAS-C 'Porthole' Observation Window".
Is that as intended? 
 

  Reveal hidden contents



 

Link to comment
Share on other sites

  On 10/4/2021 at 12:24 PM, visssius said:

Hello guys! I'm trying this mod out and i really enjoying it! I play carriere hard mode with kerbalism, SSPXR, SCANsat and others in 1.12.2.
After I builded my kerbin orbital station there is a mission to build a Minmus orbital station with a cupola and science laboratory (optional both).
Now how can you see from the image, ksp is recognizing the lab part "PMA-3 'Nature' Science Lab" but not the cupola part "PAS-C 'Porthole' Observation Window".
Is that as intended? 
 

  Reveal hidden contents



 

Expand  

 

That cupola on the top? It is from station partsvredux mod isn't it? Maybe the contract demands that stock cupola and doesnt recognize mod parts.

 

Try with this one:

 

https://wiki.kerbalspaceprogram.com/wiki/PPD-12_Cupola_Module

Link to comment
Share on other sites

  On 10/4/2021 at 12:24 PM, visssius said:

Hello guys! I'm trying this mod out and i really enjoying it! I play carriere hard mode with kerbalism, SSPXR, SCANsat and others in 1.12.2.
After I builded my kerbin orbital station there is a mission to build a Minmus orbital station with a cupola and science laboratory (optional both).
Now how can you see from the image, ksp is recognizing the lab part "PMA-3 'Nature' Science Lab" but not the cupola part "PAS-C 'Porthole' Observation Window".
Is that as intended? 

Expand  

 

  On 10/8/2021 at 2:09 AM, Daniel Prates said:

That cupola on the top? It is from station partsvredux mod isn't it? Maybe the contract demands that stock cupola

Expand  

What @visssius is correct.  Currently it is hard-coded to only look for the stock cupola.

The problem is that the cupola doesn't have any special modules in  it,  while the Science Lab does.

I'll see if I can add something which will help, but it might not work for all, especially if  the translated name doesn't include the word "cupola" (I'll see if I can search for a part with the word "cupola" in the title)

Link to comment
Share on other sites

  On 10/8/2021 at 11:23 AM, linuxgurugamer said:

 

What @visssius is correct.  Currently it is hard-coded to only look for the stock cupola.

Expand  

I think you mean "@me" and not @vissius. 

 

Lgg I saw the help you asked in the contract configurator page. I dont want to butt in too much there but, see, if what you asked turns out to be unpractical, you could just add  code for the few modded cupolas that exist out there. There are only a few; hab tech 2 has one, station parts redux has another (or is it two?) and thats it.  If you like, give me a few days and I'll comb that out for you, all mods that have cupolas or heavily glazed parts and the part names. What else would you require?

Link to comment
Share on other sites

  On 10/9/2021 at 3:09 AM, Daniel Prates said:

Lgg I saw the help you asked in the contract configurator page. I dont want to butt in too much there but, see, if what you asked turns out to be unpractical, you could just add  code for the few modded cupolas that exist out there. There are only a few; hab tech 2 has one, station parts redux has another (or is it two?) and thats it.  If you like, give me a few days and I'll comb that out for you, all mods that have cupolas or heavily glazed parts and the part names. What else would you require?

Expand  

That would certainly help. I was thinking of doing that, at least with SSPx.  Go ahead, I'll wait for you to do that.

LGG

 

Link to comment
Share on other sites

  On 10/10/2021 at 11:03 AM, linuxgurugamer said:

That would certainly help. I was thinking of doing that, at least with SSPx.  Go ahead, I'll wait for you to do that.

LGG

 

Expand  

Right, as far as cupolas go:

HAB TECH 2 has one, the part is called HT-C125 OBSERVATION MODULE

name = ht2_moduleCupola

KERBAL PLANETARY BASE SYSTEMS has one too, the part is called K&K PLANETARY CUPOLA

name = KKAOSS_Cupola_g

STATION PARTS REDUX have quite a few; I consider some proper cupolas and others more like heavily glazed command pods, but why not be generous? those are: a) PPD-24 'PANOMARA' OBSERVATION MODULE; b) PAS-C 'PORTHOLE' OBSERVATION WINDOW; c) PMA-C 'PANOPTES'  OBSERVATION MODULE; d) PAS-G 'G4RD3N' HYDROPONICS CUPOLA; e) PXL-9 'VISTA' ASTROGATION MODULE

name = sspx-dome-cupola-5-1

name = sspx-cupola-greenhouse-125-1

name = sspx-observation-25-1

name = sspx-cupola-125-1

name = sspx-cupola-375-1

name = sspx-cupola-1875-1

Hey @Nertea could you do us a BIG FAVOR? Linuxgurugamer is trying to index all cupolas from station parts into this contract pack, and I am helping comb out all cupolas from all mods. Turns out you have a unique system to name your parts in the config files am I am not sure if the part I mention at the start are the ones in the second list ... could you check the parts I named above and see if the part names (taken from the configs) are correct? 

Now I see no proper 'cupola' on BLUEDOG DESIGN BUREAU, although it has parts for a complete Skylab (which had no cupola). I think naming one of those parts a 'cupola' is forcing it too much. So though it is a mod with proper space stations, no cupola there. 

TANTARES: yup, Tantares has one. It is speculative I guess, I don't remember Saluyt et al having anything like it, but there it is. The part is called NASHIRA "UTSLKT" SIZE 1 CUPOLA. 

name = nashira_cupola_s1_1

Too bad about BDB, I really wanted to count some of those parts as a cupola. There are some obital modules with windows that use the 'hitckhker' as an IVA, but with a couple of small rounded windows, it is forcing it too much to call them cupolas I guess. 

Well... that's about it: all cupolas in the kerbalverse, that I can remeber, in mods that are current or at least some 2 or 3 versions old. Someone correct me if I am wrong. 

Edited by Daniel Prates
Link to comment
Share on other sites

  On 10/11/2021 at 5:10 PM, -MadMan- said:

Station have TH-NKR Res lab. But i cant get contract

Expand  

The picture says:

May only have 3 offered/active Bases and Station contracts at a time:  Unmet
Must have a station with a TH-NKR Research Lab and without a F-RRY Zoology Bay: Unmet
Must have unlocked part F-RRY Zoology Bay: Met

So you have two unmet lines.  The second line has two conditions, it MUST have the TH-NKR, and CANNOT have the F-RRY.  One of the two is unmet

Link to comment
Share on other sites

  On 10/11/2021 at 6:55 PM, linuxgurugamer said:

The picture says:

May only have 3 offered/active Bases and Station contracts at a time:  Unmet
Must have a station with a TH-NKR Research Lab and without a F-RRY Zoology Bay: Unmet
Must have unlocked part F-RRY Zoology Bay: Met

So you have two unmet lines.  The second line has two conditions, it MUST have the TH-NKR, and CANNOT have the F-RRY.  One of the two is unmet

Expand  

Must have a station with a TH-NKR Research Lab and without a F-RRY Zoology Bay: Unmet

Station have the TH-NKR and doesn't have the F-RRY. All  conditions are met. 

 

Link to comment
Share on other sites

Hello guys! Thanks a lot for considering my post on the cupolas!
Btw I have an other issue. So let me explain:
I accepted a supply run to my Minmus Station and bring some food(>1). Now since it takes days to arrive there, I accepted an other Supply Run Mission to my Kerbin station!
When I docked to the Kerbin station, the other mission was considered failed... so I thought that I have to do them in the right order (since I accepted the Minmus first, let me dock that one first), but it didn't work out.
The Supply Run Mission to Kerbin was considered failed once I docked with my second craft to the Minmus Station... considering it completed but the kerbin supply run considered failed like in the img.
So do I have to accept and complete one at a time? Waiting all the time neccessary for the mission to complete, without being able to accept other missions of the same kind, forcing me to skip them?

Thank you again for your precious time!

  Reveal hidden contents

 

Edited by visssius
Link to comment
Share on other sites

  On 10/11/2021 at 6:55 PM, linuxgurugamer said:

The picture says:

May only have 3 offered/active Bases and Station contracts at a time:  Unmet
Must have a station with a TH-NKR Research Lab and without a F-RRY Zoology Bay: Unmet
Must have unlocked part F-RRY Zoology Bay: Met

So you have two unmet lines.  The second line has two conditions, it MUST have the TH-NKR, and CANNOT have the F-RRY.  One of the two is unmet

Expand  

 

One more contract

cbf0ePE.jpeg

I have just one station with only  the TH-NKR. No D-ZZY. Т No F-RRY.

 

Link to comment
Share on other sites

  On 10/12/2021 at 4:43 PM, -MadMan- said:

 

One more contract

cbf0ePE.jpeg

I have just one station with only  the TH-NKR. No D-ZZY. Т No F-RRY.

 

Expand  

A copy of the save file would be useful

  On 10/12/2021 at 9:49 AM, visssius said:

Hello guys! Thanks a lot for considering my post on the cupolas!
Btw I have an other issue. So let me explain:
I accepted a supply run to my Minmus Station and bring some food(>1). Now since it takes days to arrive there, I accepted an other Supply Run Mission to my Kerbin station!
When I docked to the Kerbin station, the other mission was considered failed... so I thought that I have to do them in the right order (since I accepted the Minmus first, let me dock that one first), but it didn't work out.
The Supply Run Mission to Kerbin was considered failed once I docked with my second craft to the Minmus Station... considering it completed but the kerbin supply run considered failed like in the img.
So do I have to accept and complete one at a time? Waiting all the time neccessary for the mission to complete, without being able to accept other missions of the same kind, forcing me to skip them?

Expand  

Sounds like CC got confused.  Would be best to do one at a time

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  On 10/15/2021 at 9: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
Expand  

Oh we are the ones who are thankful!

@visssius you requested this one, do you mind doing some testing? I am specially curious about the SSPR parts, because the names on the configs are a bit unusual.

Link to comment
Share on other sites

  On 10/11/2021 at 6:55 PM, linuxgurugamer said:

The picture says:

May only have 3 offered/active Bases and Station contracts at a time:  Unmet
Must have a station with a TH-NKR Research Lab and without a F-RRY Zoology Bay: Unmet
Must have unlocked part F-RRY Zoology Bay: Met

So you have two unmet lines.  The second line has two conditions, it MUST have the TH-NKR, and CANNOT have the F-RRY.  One of the two is unmet

Expand  

ModuleStationScienceZoologyBay.cfg

//Find a Station with a Research Lab but without a Zoology Bay
	DATA
    {
        type = Vessel
		uniquenessCheck = CONTRACT_ACTIVE
		requiredValue = true
		targetVessel1 = AllVessels().Where(v => v.Parts().Contains(StnSciZoo) == false && v.Parts().Contains(StnSciLab) == true && v.VesselType() == Station && v.CrewCount() > 0).SelectUnique()
		//targetVessel2 = @targetVessel1.Where(v => v.Parts().Contains(StnSciZoo) == false && v.Parts().Contains(StnSciLab) == true)
		title = Must have a station with a TH-NKR Research Lab and without a F-RRY Zoology Bay

3 conditions? The station MUST have crew?

Link to comment
Share on other sites

StationCore contract won't load for me anymore after this patch. Based on the error, it sounds like it's because I don't have HabTech2 installed (I have all the other mods installed whose parts are listed in the config): 

  Reveal hidden contents

Edit: to me this looks like there is inadequate exception handling in the Contract Configurator code. Not much you can do about it in this mod itself, but just a heads up. 

Edited by Grimmas
Link to comment
Share on other sites

  On 10/17/2021 at 12:46 AM, Grimmas said:

StationCore contract won't load for me anymore after this patch. Based on the error, it sounds like it's because I don't have HabTech2 installed (I have all the other mods installed whose parts are listed in the config): 

  Reveal hidden contents

Edit: to me this looks like there is inadequate exception handling in the Contract Configurator code. Not much you can do about it in this mod itself, but just a heads up. 

Expand  

Thanks, I'll let him know.  and I'll see if I can split this up into multiple entries

Edited by linuxgurugamer
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.

×
×
  • Create New...