Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,282
I didn't mean to blame you. However I think it would be wrong not to mention that I entirely disabled assigning techs this way without adding any replacement code, meaning the pope will not get any techs as it is right now.So, in defense of my 41 techs to NationStates hardcode it wast a design.
Yeah, we should have some advanced start code, but I think we should keep it simple or CivEffects will never be playable. The ability to add all techs of certain categories will have to be enough, possibly for quite a while. Anything more advanced than that really isn't a priority and I don't think it should be before next release.Also, the option to purchase techs shouldnt be limited to nation states, but rather any Civ with Tech points to spend can spend those at the start including the player. This way if you wanted to set up Advanced or more Difficult scenarios you can set the starting civ players to be able to purchase techs and all you have to worry about is setting their starting traits and the AI will choose their techs. This would be cool if there where tons of Or techs that has been talked about as the AI could choose which Or tech it wanted based on its Traits (Militaristic Civs would choose Military Category techs more often).
I have been thinking about this and the more I think about it, the more I like it. It opens up lots of interesting possibilities while at the same time it is surprisingly simple in the DLL code.Anyway, the CivEffects as Category and the Or bonus/penalty costs sounds like a great idea and also the ideas on assigning all Native Techs and such based on Traits.
Adding the same CivEffect over and over is possible with the current design, but we should consider sideffects from doing so. Somehow I wonder if it would make sense to restrict it to modifiers only. That way it shouldn't be possible to trigger unintended behaviour from XML.
We have to consider adding the same over and over anyway because I added support for "future technology" in the data structure. At some point it will be possible to add a bool to XML telling that this tech can be researched even if it is researched. This too could be modifiers only. If we are to stick to score bonus, we would have to add a score modifier to CivEffects.
Something else, I'm working on censures. It would appear that there is a lot of custom code for those. However lots of it can be replaced with generic CivEffect code. There appears to be some timer thing going on. I added a timer as well. There is a JIT array of length num censures. Set the number to say 5 if you want it to be active for 5 turns. On each turn start, it reduce by 1 until it reaches 0, where it disables itself. The custom code to disable crosses and professions producing crosses should be possible to replace with simply adding allow yield YIELD_CROSSES = -1. That will disable production of crosses and professions producing or consuming crosses (once the code for that is written). The beauty of this is the generic CivEffect code will also work if we do the same from a non-censure CivEffect using a different yield/profession.