Comments (8)
This would allow people to add more wonders too if they wanted to
from civ2-clone.
I'll take a look at it.
from civ2-clone.
Ok so it's the transporter thingie.
No of units, terrains, leaders, etc. however is the same in TOT/MGE (well there are more units in TOT but they appear at the end of the list so it's not really an issue).
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:
- Add transporter to ImprovementType.cs at position 35 so we have a universal enum for both interfaces
- At ProcessImprovements in RulesParser.cs count the number of
values
at the end of method. - If the number of values = 68 it's TOT and you don't have to do anything.
However if the number of values = 67 it's MGE and in that case you just have to increase Type of all improvements after port facility by one:
if (values.Length == 68)
{
Rules.Improvements.Where(i => (int)i.Type > 35).Select(i => i.Type += 1);
}
That way the Transporter enum for MGE will be skipped. And you won't have to change ProcessEndWonders.
That's my suggestion but I haven't tested this.
Also this is ok if the no of improvements in all TOT scenarios =68, which should be the case but I'm not 100%.
from civ2-clone.
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.
from civ2-clone.
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.
Good that you've noticed that! I think it's a good approach.
Also if we remove improvementtype enum we'll probably have to remove other similar enums as well.
from civ2-clone.
But if the enums are removed how will you know which logic to hook up individual wonders and improvements to?
from civ2-clone.
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
from civ2-clone.
ok yeah, you basically just need an index of an improvement
from civ2-clone.
Related Issues (20)
- Draw city size box
- Saving game HOT 5
- Game crashes when dead civ is chosen for next turn
- Don't update the map every time unit moves HOT 2
- Fastrandom bug? HOT 6
- Missing references - Broken code HOT 1
- Some issues with BitmapStorage
- Drawing with different zoom levels
- Search paths don't have the local sav/scn folder HOT 1
- Raylib-cs and .net8 HOT 2
- Feature Request: use Bilinear/Bicubic interpolation scaling on zooming HOT 10
- Unit Actions HOT 4
- What civ can see vs what is there HOT 2
- Game type parameter for TOT
- RaylibUI.Mac does not exist HOT 2
- Adjust Menus for TOT HOT 1
- Menu styling HOT 2
- Update dialog tiles when loading game/scenario HOT 3
- Update status panel HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from civ2-clone.