Modding limitations

MolybdenumMatt

Chieftain
Joined
Mar 20, 2015
Messages
3
Hello

I have a question regarding modding possibilities. So far I have made a few mods with new faction and buildings, but I wanted to try something a bit more complex. Specifically I was thinking about:

1) Creating a trait that gives bonus to production based on science output. This means that each turn each city would receive a bonus to production equal to a percentage of science points generated in that city. I know it is possible to have a bonus to culture or science from extra health points, but I couldn't find any information if similar thing could be done with other outputs.

2) Making a sponsor that can gain specific technology faster. It would mean having a list of technologies for a custom faction. When I'm having such sponsor research one of those technologies it would either require less science points to complete or a significant bonus to science would be applied.

Can any of those thing be done?

Thanks for the help.
 
I hope the lack of an immediate response didn't discourage you Moly.

1) This is doable but tricky. It will require LUA and can't be done as elegantly as the existing mechanisms for having health grant culture or science. Those conversions are hard-coded and you can't just drop another yield type in and be done. You'll have to fake the conversion yourself.

2) On the plus side, this will be relatively easy. Let's say you want tech_XYZ which normally costs 100 science to be cheaper for your faction. When the game starts, you can give them 50 science toward tech_xyz. Use teamTech:ChangeResearchProgress(TechType index, int change, PlayerID player) function.
 
Back
Top Bottom