Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/peripherals/colony_integrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ Returns a table of all possible colony research as a tree where the root table c
| ------------------------ | ------------------------------------------ |
| id: `string` | The research id |
| name: `string` | The name of the research |
| status: `number` | The current research status |
| status: `string` | The current research status: `NOT_STARTED`, `IN_PROGRESS`, `FINISHED` |
| researchEffects: `table` | A list of effects provided by the research |
| children: `table?` | A list of any child research |
Comment thread
adriansmart69-debug marked this conversation as resolved.
| progress: `number` | Research progress |
| children: `table?` | A list of any child research |
| progress: `number` | A value between 0 & 72/144/288/576/1152/2304 for level 1-6 researches respectively. Ticks up when the research is in progress |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A value between 0 & 72/144/288/576/1152/2304

Is there any reference? If so I believe it is better to link it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iirc I straight up stole that from the source code
And yes, a link would be better, but I am not sure what the reference was

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to test it out personally. Minecolonies has a very weird bit of code working out the time a research takes. The first level of research takes half an hour, it then doubles everytime. However in game it doesn't tell you exactly how long each research takes. Only to the nearest 15 minutes. I had a devil of a job working out what the progess value actually stood for, which is why i thought the AP code was broken. Remember this is the backend of the code so thats why the numbers are so ugly. I think I found the formula in the code, I can't remember where though.

Copy link
Copy Markdown
Member

@SirEndii SirEndii May 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base research time is 60 * 60 / 25 / 2 https://github.com/ldtteam/minecolonies/blob/dd437dcb0dae9f732f33fdca767626742c64e4f2/src/main/java/com/minecolonies/api/research/util/ResearchConstants.java#L25

Which comes to 72 (According to the comment)

The base time of a research is then calculated based of
(BASE_RESEARCH_TIME * this.baseTime * Math.pow(2, depth - 1))

https://github.com/ldtteam/minecolonies/blob/dd437dcb0dae9f732f33fdca767626742c64e4f2/src/main/java/com/minecolonies/core/research/GlobalResearchBranch.java#L85

Where base time is depending on the research tree - can be looked up in the data folde rof th emod under data/minecolonies/researches but currently always 1.0

Depth is the The university level for the research. So I assume 1-5

For example for the fertilizer research in the tech tree that has the research level 5
72 * 1 * 2^(5-1) which is 1152
And that fits for every other value the author provided, one for every research depth - some researches have a depth of 6 or are instant

@adriansmart69-debug would you be able to document it a bit with the math I provided?
You can use the math integrations of material for mkdocs, but that's optional

| requirements: `table` | List of requirements for the research |
| cost: `table` | The cost of the research (list of tables) |

Expand Down