Jump to content

Creating Admin Strategies


Recommended Posts

I have seen several mods that add new strategies to the game such as Strategem and Serious Kerbal Business. I would like to try my hand in strategy creation, but I don't know where to start. I have looked at the configuration file for SKB, but that still doesn't tell me how to use the options given and what options are available that I don't see used there. Does anyone know the entire set of options available for strategy creation, or at least have a straightforward way of explaining how the basic options work? Any help would be much appreciated. Thanks!

Link to comment
Share on other sites

Have you looked at the default strategies? location: Kerbal Space Program --> GameData --> Squad --> Strategies -- Strategies.cfg

It's all written there in human-readable text. As for a complete listing of all things that strategies can take as input and output (e.g. StructureConstruction, RecoveryMinimumDelta), I don't know of anything that isn't already there in the default config file.

Link to comment
Share on other sites

You can see all the stock strategy configurations by opening the file at: <KSP_Install_Dir>/GameData/Squad/Strategies/Strategies.cfg

In each STRATEGY node you have a few settings common to the strategy, and then several EFFECT nodes that decide how it will behave

STRATEGY
{
name = StratName [COLOR=#ff0000]//This is the internal strategy name. Must be unique and have no spaces, but otherwise value is irrelevant[/COLOR]
title = StratTitle [COLOR=#ff0000]//The name that will show up ingame[/COLOR]
description = blah [COLOR=#ff0000]// self explanatory[/COLOR]
icon = iconPath [COLOR=#ff0000]// path to the icon file starting from GameData[/COLOR]

groupTag = Basic,B [COLOR=#ff0000]// This is for making groups of contracts that you can only have one of active at the same time (so you don't have a funds => science and a science => funds conversion happening at the same time)[/COLOR]

[COLOR=#ff0000]//Duration stuff seems irrelevant[/COLOR]

initialCost<Currency> = 0 [COLOR=#ff0000]// Fixed cost in <currency> for activating the strategy[/COLOR]
initialCost<Currency>Min = 0 [COLOR=#ff0000]// scaling <currency> cost at 0% commitment[/COLOR]
initialCost<Currency>Max = 100 [COLOR=#ff0000]// scaling <currency> cost at 100% commitment[/COLOR] [COLOR=#ff0000](cost = Min + Commitment * (Max - Min))[/COLOR]

hasFactorSlider = true [COLOR=#ff0000]// allows variable commitment[/COLOR]
factorSliderDefault = 0.1 [COLOR=#ff0000]// default commitment %[/COLOR]
factorSliderSteps = 10 [COLOR=#ff0000]// number of selectable points between 0 and 100%.[/COLOR] [COLOR=#ff0000]You get a valid position every (100 / steps) %[/COLOR]

EFFECT {}
EFFECT {}
}

The CurrencyConverter EFFECT (the rest are mostly just variations on this)

  EFFECT
{
name = CurrencyConverter [COLOR=#ff0000]// Effect type. Valid values are CurrencyConverter (input one currency, output another), CurrencyOperation (Add or multiply currency), CurrencyExchanger (converter on existing currency instead of income), or ValueModifier (operations not to do with currency, only documented for recovery %'s[/COLOR]
input = Science [COLOR=#ff0000]// input currency[/COLOR]
output = Reputation [COLOR=#ff0000]// output currency[/COLOR]
minShare = 0.0 [COLOR=#ff0000]// take 0% of all input currency at 0% commitment[/COLOR]
maxShare = 1.0 [COLOR=#ff0000]// take 100% of all input currency at 100% commitment[/COLOR]

minRate = 0.01656302579767544536 [COLOR=#ff0000]// return 0.016... output currency per 1 input currency converted at 0% commitment[/COLOR]
maxRate = 0.02070378224709430670 [COLOR=#ff0000]// return 0.020... output currency per 1 input currency converted at 100% commitment[/COLOR]

AffectReasons = ScienceTransmission, VesselRecovery [COLOR=#ff0000]// When to allow the converter to run[/COLOR]

effectDescription = gains from field work [COLOR=#ff0000]// description[/COLOR]
}

You just have to mix and match the elements in a cfg somewhere and it'll get added to the list of available strategies

Link to comment
Share on other sites

  • 2 weeks later...
Thanks, this is exactly what I was looking for! :D I was hoping there would be an option to reduce/increase cost of hiring new Kerbals with a strategy, but no luck it seems...

Check out Custom Barn Kit here: http://forum.kerbalspaceprogram.com/threads/121100

^^ Along with ModuleManager, this mod will allow you to create custom career parameters. Custom strategies aren't possible with it, unfortunately, but it does allow you to tweak around with the hiring cost settings at will.

recruitHireBaseCost is the cost of that first recruit hired

recruitHireFlatRate is the flat rate increase if using a fixed rate to change hire costs per Kerbal

recruitHireRateModifier is a recurring multiplier (like an interest rate) that compounds if not using a fixed rate

recruitHireFixedRate is a Boolean (true/false) that selects between fixed rate or compounding rate for price increases

Used by itself, the mod will establish a 10,000 fund first hire cost and a 1.5% compounded cost increase for each subsequent hire. Hope this helps.

Link to comment
Share on other sites

Check out Custom Barn Kit here: http://forum.kerbalspaceprogram.com/threads/121100

^^ Along with ModuleManager, this mod will allow you to create custom career parameters. Custom strategies aren't possible with it, unfortunately, but it does allow you to tweak around with the hiring cost settings at will.

recruitHireBaseCost is the cost of that first recruit hired

recruitHireFlatRate is the flat rate increase if using a fixed rate to change hire costs per Kerbal

recruitHireRateModifier is a recurring multiplier (like an interest rate) that compounds if not using a fixed rate

recruitHireFixedRate is a Boolean (true/false) that selects between fixed rate or compounding rate for price increases

Used by itself, the mod will establish a 10,000 fund first hire cost and a 1.5% compounded cost increase for each subsequent hire. Hope this helps.

Interesting, if it's possible to expose those options in the first place, that would mean it could be affected by a strategy. I just don't know if it's possible to add new effects for strategies to use.

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