Skip to content

Commit 1be2537

Browse files
committed
Added Code-less SP.
1 parent 4842d29 commit 1be2537

File tree

5 files changed

+141
-4
lines changed

5 files changed

+141
-4
lines changed

ModdingGuide/modding-basics.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Besides the assets from [previous part](./getting-started.MD#assetripper), you w
1717

1818
_Personal choice: .NET 9 or the latest_
1919

20-
The game uses .NET so you need to have the .NET SDK installed on your computer. The game uses `netstandard2.1` but you can install the latest version of the .NET SDK to use the latest language features as long as they are syntactical sugar and not new features.
20+
The game uses .NET so you need to have the .NET SDK installed on your computer. The game uses Mono that conforms to `netstandard2.1` but you can install the latest version of the .NET SDK to use the latest language features as long as they are syntactical sugar and do not need new underlying members to support them.
2121

2222
### IDE
2323

ScientificProjects/codeless.MD

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
title: "Scientific Projects"
3+
description: Modify Scientific Projects without any code.
4+
date: 2025-05-14
5+
tags: mods timberborn guide modding scientific projects
6+
---
7+
8+
With this guide you can make an extension mod that **modifies** other Scientific Projects (including the ones added by other extension mods). Note that you _cannot_ add a new project without code. You can also rearrange the grouping of the projects, including creating a new group and moving the projects around into different groups.
9+
10+
You should have read at least the first step of the guide: [Getting Started](../ModdingGuide/getting-started).
11+
12+
# Changing a simple project
13+
14+
All projects are defined by `ScientificProjectSpec` JSON files. You can find them in the mods' `Blueprints` folders or in the mods' source code [here](#to-be-updated). For example, consider the _Resin-Infused Planks_ project:
15+
16+
```jsonc
17+
// ScientificProjects\Factions\FtPlankUpgrade.ScientificProjectSpec.json
18+
{
19+
"ScientificProjectSpec": {
20+
"Id": "FtPlankUpgrade",
21+
"GroupId": "Factions",
22+
"NameKey": "LV.SP.FtPlankUpgrade",
23+
"EffectKey": "LV.SP.FtPlankUpgradeEff",
24+
"LoreKey": "LV.SP.FtPlankUpgradeLore",
25+
"Icon": "Sprites/Projects/ftplank",
26+
"ScienceCost": 2500,
27+
"Parameters": [ 1, -0.9999 ],
28+
"Order": 10,
29+
"Factions": [ "Folktails", "GreedyBuilders" ]
30+
}
31+
}
32+
```
33+
34+
Most of the time, you will want to change the `ScienceCost` or the `Parameters` properties. If you are not sure which number the parameters are, check the `Localizations\enUS.csv` file, the description should have placeholders explaining which parameter corresponds to which effect.
35+
36+
```csv
37+
LV.SP.FtPlankUpgradeEff,"Woodworkshop uses {1:#.###%} power and {0:+#%} the Treated Planks output.",
38+
```
39+
40+
**Note**: the parameter index starts at 0. So you can see the first number in `Parameters` is for the output multiplier (but when showing as text, it's formatted as a percentage for easy reading) while the second number is the power reduction, again formatted as a percentage when showing on the UI.
41+
42+
For example, let's say you want to increase the science cost but also increase the output (1 stands for +100% output), in your mod, create a file `FtPlankUpgrade.ScientificProjectSpec.json` anywhere in the `Blueprints` folder:
43+
44+
```jsonc
45+
// Blueprints\Vanilla\FtPlankUpgrade.ScientificProjectSpec.json
46+
{
47+
"ScientificProjectSpec": {
48+
"ScienceCost": 5000,
49+
"Parameters": [ 2, -0.9999 ]
50+
}
51+
}
52+
```
53+
54+
# The Projects Group
55+
56+
As you can see above, the project has the `"GroupId": "Factions"` property. You should see the `blueprints\ScientificProjectGroups\Factions.ScientificProjectGroupSpec.json` file that defines that group:
57+
58+
```json
59+
// ScientificProjectGroups\Factions.ScientificProjectGroupSpec.json
60+
{
61+
"ScientificProjectGroupSpec": {
62+
"Id": "Factions",
63+
"NameKey": "LV.SP.FactionsGroup",
64+
"DescKey": "LV.SP.FactionsGroupDesc",
65+
"Order": 40
66+
}
67+
}
68+
```
69+
70+
You can create, modify and move projects into other groups as you wish.
71+
72+
# Daily and Custom Cost projects
73+
74+
Some other projects like "Precision Tool Maintenance" (`WorkEffUpgrade2.ScientificProjectSpec.json`) are Daily-cost projects. These projects do not have an up-front cost to unlock but instead use `RequiredId` to be locked by a prerequisite project (note that a normal one-time cost project can still be locked with `RequiredId`):
75+
76+
```jsonc
77+
// ScientificProjects\WorkEffs\WorkEffUpgrade2.ScientificProjectSpec.json
78+
{
79+
"ScientificProjectSpec": {
80+
"Id": "WorkEffUpgrade2",
81+
"RequiredId": "WorkEffUpgrade1",
82+
"GroupId": "WorkEff",
83+
"NameKey": "LV.SP.WorkEffUpgrade2",
84+
"EffectKey": "LV.SP.WorkEffUpgrade2Eff",
85+
"LoreKey": "LV.SP.WorkEffUpgrade2Lore",
86+
"Icon": "Sprites/Projects/WorkEffUpgrade2",
87+
"ScienceCost": 15,
88+
"MaxSteps": 5,
89+
"HasScalingCost": true,
90+
"ScalingCostKey": "LV.SP.WorkEffUpgrade2Cost",
91+
"Parameters": [ 0.1, 15, 20 ],
92+
"Order": 20
93+
}
94+
}
95+
```
96+
97+
With `"MaxSteps": 5`, the project is considered a Daily-cost project automatically and `ScienceCost` becomes the normal daily cost per step instead.
98+
99+
However, if you read the Description, you will notice this project cost scales with the number of Adult beavers you have too (and is defined by `"HasScalingCost": true`):
100+
101+
```csv
102+
LV.SP.WorkEffUpgrade2Eff,"{0:+#%} additional work efficiency of all beavers per Level.",
103+
LV.SP.WorkEffUpgrade2Cost,"[Cost] per Level, and {1} for every {2} Adult beavers (rounded up)",
104+
```
105+
106+
With `"HasScalingCost": true`, `ScalingCostKey` is required and it's handled with custom C# code but the text has access to a special placeholder `[Cost]` which is the `ScienceCost`. So for this project `Parameters`, the first number is the Work Efficiency boost **per Level/step**, `ScienceCost` is the flat cost per Level, and the second number is the cost increase per the third number of adult beavers.
107+
108+
For example, let's say we want to keep the flat cost but increase the science cost to 30 per 30 beavers instead, and also increase the maximum Levels/Steps to 10:
109+
110+
```json
111+
// Blueprints\Vanilla\WorkEffUpgrade2.ScientificProjectSpec.json
112+
{
113+
"ScientificProjectSpec": {
114+
"MaxSteps": 10,
115+
"Parameters": [ 0.1, 30, 30 ]
116+
}
117+
}
118+
```
119+
120+
# Conclusion
121+
122+
This guide likely covers all scenarios in which you can mod Scientific Projects without C# code. You can likely make significant balance changes with this approach but unfortunately you cannot really change the behavior or add a new project.
123+
124+
In order to do that, you will need to code a mod using C#. The [Modding Scientific Projects with C# guide](./coding) would come in handy.
125+
126+
[Back to Scientific Projects](./)

ScientificProjects/coding.MD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Modding Scientific Projects with C#"
3+
description: Add and modify Scientific Projects for Timberborn with C#
4+
date: 2025-05-14
5+
tags: mods timberborn guide modding scientific projects
6+
---
7+
8+
Placeholder content

ScientificProjects/index.MD

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
22
title: "Scientific Projects"
3-
description: Add Scientific Projects for Timberborn
4-
date: 2025-03-13
3+
description: Add and modify Scientific Projects for Timberborn
4+
date: 2025-05-14
55
tags: mods timberborn guide modding scientific projects
66
---
77

8-
[Placeholder content here]
8+
The [Scientific Projects](#to-be-updated) and its extension mods can be expanded with or without code.
9+
10+
- [Code-less guide](./codeless) (JSON mods): You do not need any C# code. You can mostly modify project's parameters but not adding new ones.
11+
- [C# modding guide](./coding.MD): You can add or modify other projects. This is how extension mods are made including the ones I released.

0 commit comments

Comments
 (0)