Ludeon Forums

RimWorld => Mods => Help => Topic started by: SmartCheetah on July 20, 2016, 07:58:41 AM

Title: Creating research branch available only to one faction (tribal/colony/your own)
Post by: SmartCheetah on July 20, 2016, 07:58:41 AM
Howdy there!
As topic says, I'm curious If I can do that. I was fiddling with ResearchProjectsDef but I havent seen such option. I wanted to create few techs on different tiers available only to that specific faction I created.

Eg. lets call this faction "Space Marines"
On tier1 you could research space marines weaponry, on 2nd tier their armor etc. BUT to be able to do that, you would need to play a scenario as "Space Marines". I know how to create player factions etc. but I need help with faction unique research. Any clues?
Title: Re: Creating research branch available only to one faction (tribal/colony/your own)
Post by: 1000101 on July 20, 2016, 03:33:40 PM
Research only has one faction - The Player.

No other faction does research or has knowledge of it.

That being said, you can apply a research lock on the initial project (which will block the entire tree) and use something like a map component to unlock the tree if the proper scenario is selected.

A research lock is fairly easy to implement, just make it have a prerequisite of itself.  But, unless the player is using CCL it will still display the tech in the research window but they can never start it (because it's prerequisite - itself - isn't completed yet).  CCL hides projects which can never be researched (detours a predicate to check if a project is locked out in such a fashion).
Title: Re: Creating research branch available only to one faction (tribal/colony/your own)
Post by: SmartCheetah on July 20, 2016, 05:43:23 PM
Quote from: 1000101 on July 20, 2016, 03:33:40 PM
Research only has one faction - The Player.

No other faction does research or has knowledge of it.

That being said, you can apply a research lock on the initial project (which will block the entire tree) and use something like a map component to unlock the tree if the proper scenario is selected.

A research lock is fairly easy to implement, just make it have a prerequisite of itself.  But, unless the player is using CCL it will still display the tech in the research window but they can never start it (because it's prerequisite - itself - isn't completed yet).  CCL hides projects which can never be researched (detours a predicate to check if a project is locked out in such a fashion).

A'ight, I get it now! Thanks a lot! :)

That's how I get it done. My faction gets this tech on start, while all the other ones get something like this in the research screen:
(http://i.imgur.com/h5gJcQI.png)

Which means - they can't research it without cheating. That's exactly what I wanted :)
Title: Re: Creating research branch available only to one faction (tribal/colony/your own)
Post by: 1000101 on July 20, 2016, 08:29:26 PM
And, if they use CCL, it will never be shown ;)