I need some help with my mod and hopefully someone here could give me a hint or straight up help me with the code.
So I have created a new ship for X4 which already works and is buildable where I want it to be.
Now I would like to create a new research which the player has to finish first before the ship gets unlocked in the game, to make it a little bit challenging to the player to actually unlock that ship.
But I fail in creating a new research and disabling/enabling the ship building possibility.
I already have created a new ware in the wares.xml but I don't know how to actually add the research to the research menu.
Also some help would be great to understand how to actually activate the ship to be build, as soon as the research is completed. Therefore I would need to disable it in the beginning. And by disabling I mean not just hide it from the player, but actually disable the new ship for all the other factions as well, so that they only start building it as soon as the player has finished the research.
So basically I need help with these 3 points:
- Create a new custom research.
- Deactivate a ship for all faction, so that nobody can build it.
- Activate a ship for the allowed factions (including player) as soon as the research is finished.
I've looked in the original game's files but I can not find a working solution for my problem. My main focus was on the casino research and on the HQ warp but I can't get it to work at all.
Hopefully someone could help me on this one.