-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements in MPG vs TOT #91
Comments
I'll take a look at it. |
Ok so it's the transporter thingie. Sadly, I've found a scenario where Capitalization is not in brackets so that option's off. Also the name Capitalization can be anything in scenarios, like Wealth, Harry Potter House, etc. My suggestion is not to mess with interfaces too much and do this:
That way the Transporter enum for MGE will be skipped. And you won't have to change ProcessEndWonders. |
Thanks for looking into it I think it might be useful to leave if flexible as I'd like our engine to be more mod-able than the original not less. I think the ImprovementTypes enum should probably be removed as it limits mod-ability of city improvements. It has occurred to me that every wonder needs an entry in the ENDWONDER section. Perhaps the best way to work out where the first wonder is is to work the other way. If there are N entries in the ENDWONDER values array we apply those to the last N improvements. That way it won't matter how many improvements there actually are and modders will be free to add more if they need. |
This would allow people to add more wonders too if they wanted to |
Good that you've noticed that! I think it's a good approach. |
But if the enums are removed how will you know which logic to hook up individual wonders and improvements to? |
Have a look at improvements.lua that's a ones I've already implemented no enum required, and it's lua so very easy for people to modify |
ok yeah, you basically just need an index of an improvement |
Line 377 of the RulesParser refers to ImprovementType.Pyramids as the first wonder index.
var firstWonderIndex = Rules.Improvements.First(i => i.Type == ImprovementType.Pyramids).Id;
this works for MPG but TOT has an additional improvement so in TOT this is going to the (Capitalization) instead which will break city improvements.
Is there a way to do this more flexibly? Do we know at this stage of parsing the rules if we're looking at TOT or MPG?
Perhaps we could base this on the name? Could we assume that the first wonder is the first thing after Capitalisation? Or perhaps the first after a city improvement that has brackets around the name?
The text was updated successfully, but these errors were encountered: