Jump to content

[1.8.x] Contracts Window + [v9.4] [11/1/2019]

Recommended Posts


Contracts Window + v9.4



Download from SpaceDock

Download from CurseForge

Alternate Download: GitHub

Localization is supported and the following translations are included in the download package:

Russian           |           Chinese          |         Polish          |              Spanish     |              French

Russian by @vladimir_v | Chinese by @QAQdong | Polish by @Moskit | TilRiNO.png by @fitiales  |  E2FHchF.png by don-vip



btn_donate_SM.gif Consider donating if you like what you see here. * Money will not go directly to development or upkeep of this addon

Source is available at GitHub

A new contract monitoring window designed to give more information and be more flexible than the stock window.

This window gives players a number of options for displaying contracts. Grouping and ordering of contracts can be modified and contracts can be placed into custom mission lists. All contract and parameter reward and penalty values are displayed, along with the amount due to any strategy modifiers.

The contract reward modification section of this addon has been removed. Its functionality has been moved to a new, separate add-on that can be found here.


sedAsbt.jpgThe top bar has several buttons that are used to adjust contract ordering and display options.

  • The top-left icon opens a new window with options for changing sort order based on several criteria.
  • The next icon toggles between ascending and descending order for the selected sorting type.
  • The eyeball icon on the right toggles between the active and hidden contract list. Each mission list has its own active and hidden contract lists.
  • The top-right icon opens a new window displaying all of the existing contract missions. Selecting a mission will switch the primary display to those contracts. The primary mission is always at the top of the list and contains all contracts.


i2EbuHG.jpgThe bottom bar has several buttons that control various window options.

  • The version number is displayed on the left.
  • Tooltips for most buttons can be toggled on and off with the next icon.
  • The spinning arrows icon is used to reset the window and primary contract list. A confirmation box will open upon pushing this button.
    • This should generally not be needed, but if there are errors in the contract window (no contracts displayed, no "MasterMission" contract list, the window is too small, etc...) this can be used. All window size, font size, and position options will be reset; the internal list of contracts will be updated with all active contracts and the "MasterMission" will be reset with this internal list. All other mission lists should be unaffected, these can be manually deleted if there are any other problems.
  • The aA icon controls font size for most of the window's labels. Each font is increased by one unit.
  • The next icon toggles the overall window and texture element size. It also increases the font size by two units.
    • Between the font and window size options there are four available font sizes and two window element size options.
  • The arrow icon in the lower-right is a re-size handle; it can be dragged to increase or decrease the window size in either dimension.

aSIBDjd.jpgEach contract has a title bar above it with information and options for the contract.

  • The contract difficulty, or prestige, is displayed on the left with one to three stars.
  • The time remaining for the contract is shown next. It updates every five seconds (at high time-warp several days can go by during this period) and switches to days and hours, and turns yellow, when the counter gets low. The year/day time is dependent on your selection of Earth/Kerbin days in the KSP settings menu.
  • The A icon can be used to display the flag and name of the contract's agency.
  • The eyeball icon can be used to move the contract into the hidden or active contract list.
  • The pin icon can be used to pin the icon to the top of the list, regardless of sort type or order; a contract's pinned state is persistent.
  • The checkbox icon can be used to move the contract into a different contract mission list or create a new one.
  • The blue icon at the end can be used to display contract notes if they exist; these are different from individual parameter notes.

KxYahnb.jpgThe primary contract and parameter display shows the same information as the stock window.

  • In orange is the contract title. It is a button that can be pushed to collapse or expand the contract's parameters. When completed the contract text will turn green; when failed it will turn red.
  • The contract parameters are shown in white. When completed these will turn green.
  • Contract parameter notes can be displayed using the blue icon.
  • Sub-parameters are offset slightly and are shown in a darker color. When all sub-parameters are completed they will be collapsed into their parent parameter and no longer displayed.

azJO6gk.jpgThe rewards for each contract and their parameters are displayed on the right side of the window.

  • Funds, Rep, and Science rewards are displayed depending on how wide the window is. Rewards are in green, penalties are in red.
  • The amount of any reward/penalty due to strategies, if any, is displayed in parenthesis.

LzkNCtl.pngWhen the green checkbox icon is selected the mission list will appear.

  • The current contract mission lists are displayed in this window.
    • A green checkmark indicator on the left indicates that the currently selected contract is already in that mission.
    • The green number to the right is the amount of contracts in that list.
    • The red x box on the right can be used to remove a contract from any mission that it is present in.
  • Selecting any existing mission will add the contract to it.
  • Selecting the "Create New Mission" option will open the mission creator window.
  • New missions can be created after giving them a name. Missions must have a name, can't use the same name, and must be under 20 characters.

xVEgs9h.png  All progress nodes, their rewards, and in some cases, information about when they were completed is shown in this window.

  • There are four types of Progress Nodes.
    • Interval Nodes: These are nodes with multiple levels of progression, such as the altitude or speed records.
    • Standard Nodes: These are nodes not specific to any one Celestial Body.
    • Point of Interest Nodes: These are nodes completed by visiting anomalies.
    • Celestial Body-Specific Nodes: These are nodes which are given separately for each Celestial Body


rGgyMiJ.png Interval progress nodes.


pW1vByT.png Standard progress nodes.


Djb2xit.png  The mission title bar is shown at the top of the window.

  • The Title Bar is a button that can be used to switch to Progress Node mode.


vIA8q5L.png  The edit mission window is opened with the pencil icon in the mission title bar for all but the Master Mission.

  • Change the name of any mission.
  • Delete any mission; this won't affect the contracts, and all contracts are still available in the Master Mission list.


- Update for KSP 1.8

- French translations by don-vip
- Fix contract window resetting when game settings are applied with the contracts window closed
- Fixed mission list popup windows not accommodating more than 4 or 5 lists
- Fixed errors when switching between stock and the old Unity UI style

- Prevent window from always open on scene load
- Prevent opening of progress node display during loading

- Contracts and parameters update their states properly
- Contract and parameter titles update when they should

- Window positioning is fixed
     - When dragging the window around the screen
     - When loading a file where the last saved window position is off the screen

- Avoid null reference errors when accepting contracts immediately after installing the mod
     - Only applies when the mod has never been installed for a save file before

- Fix some potential bugs that caused the contract window to be blank

- Updated for KSP 1.4.5

- Updated for Progress Parser 10.0
      - Required for some problems with point of interest progress nodes

- Complete overhaul of internal code for loading and displaying contracts and progress nodes
      - Improves performance when:
           - Opening/closing the window
           - Switching between contract and progress node modes
           - Switching between mission lists

- Fixes to ensure that contract mission lists and all contract data is fully loaded before the window is initialized

- Update for KSP 1.4

- Update for Contract Parser 8.0
- Update for Progress Parser 9.0

- Spanish translations by Fitiales

- Fix some UI positioning issues
- Some UI performance improvements

- Russian translations by v1adimir-v
- Chinese translations by QAQdong
- Polish translations by Moskit

- Updated for Contract Parser v7 and Progress Parser v8
- Some UI updates to accommodate localized text

- Updated for KSP 1.3

- Updated for Contract Parser 6.0
- Updated for Progress Parser 7.0

- Option to switch to KSP style window
- Localization support for all UI text

- Use TextMesh Pro for all text input fields
- Lock keyboard controls while typing in input fields

- Fix bug in VAB/SPH that caused the currency tumblers to be invisible
- Bring window to the front when clicked on
- Several tooltip bug fixes and improvements

- Updated for KSP 1.2.2; should work fine in previous versions
- Tighter spacing between contract parameters and sub parameters
- Settings file no longer included
      - No longer overwrites existing settings
      - Only generated when saving with Contracts Window + installed

- Updated for KSP 1.2.1

- Fix bugs with the replace stock toolbar option
- Fix bug that was making contracts always show all parameters
- Fix several UI scale and position bugs
- Performance improvements
      - Faster switching between contract mission lists and progress nodes
      - Faster window opening
      - Less lag when accepting contracts with a large number of already active contracts

- Add a Pixel Perfect toggle to the window options menu
        - Aligns all non-text elements to pixel edges
	    - Can affect performance with a large number of contracts

- Updated for KSP 1.2

- Updated for Contract Parser 5.0
- Updated for Progress Parser 6.0

- Complete UI replacement
        - Now using the Unity 4.6 UI system
        - Should be functionally the same as before
        - More UI scaling options

- UI and toolbar settings are saved in a persistent file on disk 

- Updated Toolbar wrapper
- Fix Unity initialization errors

- Update for KSP 1.1.3

- Update for Contract Parser 4.0
- Update for Progress Parser 5.0

- Fix an error caused by different date time formatters

- Update for KSP 1.1.2

- Update for Contract Parser 3.0
- Update for Progress Parser 4.0

- Add replace stock toolbar function
- Fix an issue where the window would not open after exiting the Mission Control building

- Update for KSP 1.1

- Update for Progress Parser 0.3
- Update for Contract Parser 0.2

- Disable stock toolbar override

- New installation location; must fully remove any old copies of Contracts Window +
- New addon dependencies: Progress Parser and Contract Parser
   - Both found in the same folder as Contracts Window + GameData/DMagicUtitlities/

- Fix progress node reward displays
- Progress nodes reload on every scene
- Fixes the issue where progress nodes would be incorrect after loading an earlier save/reverting
- Fix showing custom contract notes

- Progress Node tracking mode
   - All progress node reward and completion information is tracked
   - A separate dll is required for progress tracking - Contracts Window + will not function without it

- Added a third window size option
   - The window size button on the bottom cycles through all three sizes

- Added custom notes for some stock contracts
   - These display the available parts that can be used to fill certain contract requirements
   - These notes are only displayed in the Space Center and VAB/SPH scenes

- Newly added contract parameters will be added to the window as soon as it updates

- Updated for KSP 1.0.5

- Mission creator/addition window works from all mission lists
       - Checkmark indicates which mission the current contract is present in
       - Red x button can be used to delete contracts from that mission

- Some minor performance improvements

- Option to sort contracts by planet
- The current mission list is saved for each vessel
       - The mission list active when saving or changing scenes during flight stores the ID of the current vessel
       - The next time that vessel is loaded it automatically switches to that mission list if it is still available
- Option to rename mission lists
- Contracts added while something other than the Master Mission is selected will be added to both the current mission and the Master Mission

- Updated for KSP 1.0.2
- Allow the window to be partially dragged off screen
- Fixed contracts app replacement function
- Fixed a bug with contract penalty display
- Fixed a bug that was delaying loading when World First Record contracts were active

- Updated for KSP 1.0
- Contract rewards are displayed in a more compact manner
- Contracts with the same name shouldn't flip positions periodically

- Contract Rewards Configuration function removed; part of a separate addon now
- Can now group contracts into custom mission lists
	- The primary "MasterMission" list holds all active contracts
	- Contracts from the master list can be moved to other existing missions or to a new mission
	- Select from available missions with a new icon in the top-right corner
	- Missions and their contracts are persistent
- Window can be freely re-sized in both dimensions
	- "Wide Mode" has been removed
	- Contract rewards only display if the window has been appropriately re-sized

- Fix for updating sub-parameter titles and notes
- Compatibility with Contract Configurator

Performance Improvements:
- Local caching of most contract and parameter info
      - Reduces overhead caused by generating titles for certain contract types
- More efficient GUI code
      - Significantly reduced the number of GUILayout calls; more manual content positioning
      - Most GUI elements are not drawn unless they are actually visible in the window
- Manual methods are available for resetting contract and parameter titles and notes
      - These reset every five seconds by default; these methods can be used if you want the info to update immediately

- Fix for contract window not closing on the first click when using the stock app launcher
- Prevents other app launcher buttons from closing the contracts window when replacing the stock contracts app
- Prevents nameless parameters from being displayed
- Prevents child parameters from being displayed when the parent is completed or failed

- Fix for replacing the stock contract toolbar button
- Correctly display the strategy rewards/penalties for science and rep

- Updated for KSP 0.90

- Stock app launcher support
- Contract agency icon added
- Strategy effects are shown for contract rewards and penalties
- Editor part preview function disabled
- KSP-AVC support added

- New Contract Configuration Window
- All reward and penalty amounts can be configured for each contract and parameter type
   - Can adjust active contracts, or only make changes to newly offered contracts
- Contract duration can be adjusted
   - Only affects newly offered contracts
- Maximum number of contracts active or offered can be selected for each contract type
- All addon contract and parameter types should be supported
- All settings are save-file specific

- Window reset will only trigger in rare conditions or upon using reset button

- Added support for Mission Controller part-specific parameters
- Fix for improperly re-sized windows
- Reset icon now resets all window parameters
- Workaround for bugs caused by skipping the main menu on loading
      - You must load KSP normally at least once for the Contracts Window scenario module (and any other scenario module) to be created

- UI has been reorganized and cleaned up
      - New title bar for each contract, shows difficulty, expiration time and options buttons
      - Medium width mode removed; expiration time is always displayed
- New font and window re-size buttons added along bottom bar
      - Window size button changes the size of all UI assets and fonts
      - Font size button toggles between small and large font size; two for each window size
- New contract pin function
      - Pinned contracts move to the top of the list
- Pinned and/or minimized state of contracts is now persistent
- Completed or failed or contracts can be removed from the list
- All texture assets re-made for more consistent styling and size
- Window will now show in the SPH

- Fixed display of parameter rewards and penalties
- Fixed broken sort-by-altitude method
- Added support for more part-specific contracts
- Now able to display root contract notes, not just individual parameter notes

- Fixed a bug where sub-parameters were showing up under all primary parameters

- Some part-specific contracts now display a part preview icon while in the VAB/SPH
- A few new icons, aesthetic improvements and layout fixes
- A few changes to improve efficiency of the window code
- Fixed a bug where the contract window was not being fully destroyed while changing scenes

- Contracts window settings stored on a per-game basis, rather than a global settings file
- Window options stored for each game scene
- Contracts can be moved back and forth between the standard display and a hidden list
     - Toggle between the two lists using the 'eye' icon along the title bar
     - Hide or reveal contracts using the 'eye' to the right of the contract title
-Sort based on contract type
     - Any part test contracts with an altitude component will be sorted based on minimum altitude
- Tooltips for many buttons added
     - Toggle tooltips with button on the footer bar
- Reset contracts display
     - Use reset button on the footer bar
     - A confirmation dialog box will appear
     - Does not affect contract status, only updates appearance on the window
     - Use in case of errors/duplicate contracts displaying
- Proper handling of sub-parameters
- Improvements to editor click-through
     - VAB part tooltips should not appear or be selectable through the contracts window

- Fixed debug options causing infinite fuel to be turned on

- Various aesthetic improvements
      - Replace several text buttons with icons
      - Cleaner interface
      - Use stock reward icons

- More compact form

- More information presented in expanded mode
      - Information periodically updates

- Improvements to dragging, click-through, and resizing.

- Folder structure changed, delete and copy new version into GameData folder

- Sort options
      - Variety of sort methods
      - Ascending and descending order

- Horizontally expandable
      - Three modes included
           - Default compact window
           - Middle version shows time to expiration (doesn't update until the contracts reload)
           - Wide version shows Fund reward amounts

- Removed some click-through issues


This add-on uses TriggerAu's KSP Plugin Framework code

Released under the MIT License.

Edited by DMagic
Version 9.4
Link to post
Share on other sites

I had seven active contracts when I went to the Mission Controller building. there, I added four more missions.

When I went to the VAB, only the original seven were showing. I had to click the Rebuild Contracts window + button to see all eleven.

I would assume that when i went to the VAB or added a mission in the MC building, that the Contracts Window+ database would be updated without manual intervention.

Link to post
Share on other sites
I had seven active contracts when I went to the Mission Controller building. there, I added four more missions.

When I went to the VAB, only the original seven were showing. I had to click the Rebuild Contracts window + button to see all eleven.

I would assume that when i went to the VAB or added a mission in the MC building, that the Contracts Window+ database would be updated without manual intervention.

They should be added as soon as you accept them, you can't see this happen, because the Mission Control Center locks out any outside UI windows, but they should be there when you go back to the space center. The only thing that might prevent you from seeing them is if you are viewing the hidden contracts list (the eyeball icon toggle in the upper left).

There is a standard list and a hidden list; hiding contracts with the little eye icon to the right of their title moves them into the hidden list, but all new contracts are added to the standard list, regardless of which you are looking at. Each list of contracts is saved every time you change scenes, so unless something is somehow circumventing the saving procedure, new contracts should always be view-able in the standard list. The two contract lists are persistent across all scenes, but all of the other contracts window options are saved per-scene, so it's possible to be looking at one list in the space center and another in the VAB.

Wow, this is a very well thought and neatly designed mod for contract management.

+1 for this mod!

Thanks, the stock window bugs be to no end.

Link to post
Share on other sites

I did not set any contracts to Hidden. As I mentioned, I exited the MCC to the Space Center to the VAB. Upon displaying the contracts window in the VAB, the four new contracts were not shown. The stock contracts window did list them.

Bottom line: no big deal. Resolved by resetting the list. I really do prefer your mod to the stock window.

Link to post
Share on other sites
I did not set any contracts to Hidden. As I mentioned, I exited the MCC to the Space Center to the VAB. Upon displaying the contracts window in the VAB, the four new contracts were not shown. The stock contracts window did list them.

Bottom line: no big deal. Resolved by resetting the list. I really do prefer your mod to the stock window.

Oh wow, I just realized what's causing this. If the window isn't open during in the spacecenter it won't catch newly added contracts. That's dumb. I can fix that pretty easily.

Edit: or wait, scratch that; I still don't know why this would happen, maybe on the very first time running it won't save properly, but after that it should save everything after adding new contracts.

Edited by DMagic
Link to post
Share on other sites

I updated this with a minor bug fix. Contracts with multiple primary parameters and sub-parameters were showing the sub-parameters under every primary parameter. I'm not sure how much this affected stock contracts, but I only caught during testing of the next DMagic Orbital Science update.

Link to post
Share on other sites

I updated this to version 1.2.

There were a few bugs with how parameter rewards were shown after they were completed. For some reason the reward amounts are set to zero upon completion, maybe so they can't be rewarded more than once, so I made sure to store those values so they can continue to be shown in the fully expanded mode.

I also fixed a bug introduced in the last update that prevented the altitude range contracts from being sorted correctly.

The root contract notes can now be displayed. These aren't used as much as the parameter notes, except by DMagic Orbital Science. Previously they were only able to be viewed in the mission control center, the stock contract window didn't show them either. I also made new note display and hide icons, they match the note text a bit better.

Support for more part-specific contracts is included. It should work with Fine Print after its next update, and it works with all DMagic Orbital Science contracts using the latest version of that addon.

Link to post
Share on other sites

A setting for larger fonts is definitely a good idea. I will probably want something that resizes the not just font size, but also texture elements and the window itself. This is something I'll need to play around with to get right (increasing the font size by something like 1.5X, but the window and textures by only 1.2X, or something like that), so it probably won't happen any time soon.

I'll try to get to this by the time 0.25 is released though.

Link to post
Share on other sites
  • 2 weeks later...

Version 2 is almost ready and will come with a number of updates. There are a few more things to fix, but otherwise it's almost there.

These screenshots were taken running KSP at 1600 * 900 (with KSP windowed on a 1080P screen), you might need to open the images in a new tab and zoom in to see them clearly.



The two new icons on the bottom row control the size options displayed above. The font icon increases the font size for most of the text by 1. The window re-size icon increases the font size by 2, increases the window width, and increases the size of all of the texture elements. This gives you a range of four possible font sizes; a font can be toggled between, say, 11 - 12 in the small window, or 13 - 14 in the big window. This makes a pretty big difference. It's difficult to change the font size too much without changing everything else, so the increased window and texture sizes help accommodate the biggest font sizes.

The textures have all been remade from scratch, they are more uniform in style and size and behave better when re-sized.

You can also see the new title bar above each contract. The expiration date is always displayed, so there is no need for the intermediate width window anymore. The difficulty is also displayed along with the note and show/hide icons. The new pin icon allows you to move a contract to the top of the list and ignore any sorting options. Pinned contracts are added in order, so the first one to be pinned will always stay at the top until you un-pin it.

The pinned state, along with the collapsed state (whether or not it shows the parameters) is saved now, so you won't have to reset everything when you load or change scenes. There is also a button that appears when a contract is completed allowing you to remove it whenever you want, though they will still be automatically removed when you load a new scene.

And it also works in the SPH now, too. :confused:

Link to post
Share on other sites
  • 2 weeks later...
any plans to get rid of the toolbar dependency ?

At some point, maybe.

Outside of bug fixes, maintenance updates, and adding support for more part-specific contract types I consider this to be basically done.

I'll probably have to figure out the stock applications bar at some point for SCANsat. So if it's simple enough I'll add an option for that here too, but I wouldn't count on that until maybe the next KSP update.

Link to post
Share on other sites

Hello, this mode is really useful, thanks !

I've found a little bug ... I don't know what I've done but I send it, if that can help you.


If you need the Player.log: https://www.dropbox.com/s/xd1kkgtp5roo6vl/Player.log?dl=0

Mods that I've used:

000_Toolbar 1.7.7

Chatterer 0.7.1

Contracts Window + 2.0

DeadlyReentry 6.1

LandingHeight 1.1

DMagic Orbital Science 0.8.6

EditorExtensions 1.4

SafeChute 1.2.2

IFILS 1.11

KAS 0.4.9


KWRocketry 2.6c

NavBallDockingAlignmentIndicator v4

NavHud 1.1.2

NEAR 1.2.1

PartCatalog 3.0 RC8

PreciseNode 1.1.1

ProceduralFairings 3.09

Protractor 2.4.13

RemoteTech 1.5.1

SCANsat 8.0

SelectRoot Jul18

ShowFPS 0.2

SRL 1.10



If you need more information, I'm open to others questions ;)

Link to post
Share on other sites
Hello, this mode is really useful, thanks !

I've found a little bug ... I don't know what I've done but I send it, if that can help you.

Did this happen after upgrading from an older version of Contracts Window +? Or is it newly added? And does it happen everywhere, or just the space center?

In the future I'll make the reset contracts button also reset the window settings and size parameters, though I'm not sure that would actually help here, since I can't really see the reset icon.

All I can suggest here is that you open up the persistent.sfs file (make a backup), search for "contractScenario" without the "". Find the line WindowPosition = ... a few lines down, and replace it with this (copy and paste it exactly):

WindowPosition = 50,80,250,300,50,80,250,300,50,80,250,300,50,80,250,300

It should look like this to start with (the numbers will obviously be different):

SortMode = 4,4,4,4
WindowPosition = 161,281,480,551,344,60,480,535,140,115,250,678,50,80,250,300
WindowVisible = False,False,False,False

and this after you are finished

SortMode = 4,4,4,4
WindowPosition = 50,80,250,300,50,80,250,300,50,80,250,300,50,80,250,300
WindowVisible = False,False,False,False

Link to post
Share on other sites

Another NullReferenceException, I just installed the ContractsWindow, but cannot get any GUI:

[ERR 11:09:57.472] [Toolbar] [ERROR] error while handling click event: ContractsWindow.ContractManager

[EXC 11:09:57.478] NullReferenceException: Object reference not set to an instance of an object
ContractsWindow.contractToolbar+<>c__DisplayClass2.<.ctor>b__0 (Toolbar.ClickEvent e)
Toolbar.Command.click ()
Toolbar.Log:log(LogLevel, Exception, String, Object[])
Toolbar.Log:error(Exception, String, Object[])
Toolbar.Button:drawInToolbar(Rect, Boolean)
[ERR 11:09:58.144] [Toolbar] [ERROR] error while handling click event: ContractsWindow.ContractManager

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

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