Skip to content

Update colony_integrator.md (updating description)#118

Open
adriansmart69-debug wants to merge 4 commits into
IntelligenceModding:0.7from
adriansmart69-debug:patch-1
Open

Update colony_integrator.md (updating description)#118
adriansmart69-debug wants to merge 4 commits into
IntelligenceModding:0.7from
adriansmart69-debug:patch-1

Conversation

@adriansmart69-debug
Copy link
Copy Markdown

Making the description clearer for the "progress" and "status" variable for getResearch().

Making the description clearer for the "progress" and "status" variable for getResearch().

Signed-off-by: BudgiusTarquin <adriansmart69@gmail.com>
Comment thread docs/peripherals/colony_integrator.md
Signed-off-by: BudgiusTarquin <adriansmart69@gmail.com>
| children: `table?` | A list of any child research |
| 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

@SirEndii SirEndii closed this Apr 29, 2026
@SirEndii SirEndii reopened this Apr 29, 2026
@IntelligenceModding IntelligenceModding deleted a comment from netlify Bot May 3, 2026
| children: `table?` | A list of any child research |
| 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
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants