We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
89 stars 37 forks source link

Natural Wonders #250

Open devolution79 opened 5 years ago

devolution79 commented 5 years ago

Civ5,6 and this modcomp for 4 has it: https://forums.civfanatics.com/threads/natural-wonders-mod-comp.494229/

so why can't WTP have it as well ?

Nightinggale commented 5 years ago

Obviously we can and it would be nice to have some sort of engine to add natural wonders as in unique plots. Platy has a bunch of good mods, but we have to remember that his design goal is to make python only mods in order to make them mac compatible. Since we already have a modified DLL, we should consider how to implement this rather than hacking a solution to work with the vanilla DLL.

Platy implemented NW as features. We might consider adding more data to CvPlot itself, something Platy wouldn't have access to. This would allow us to say find some NW in a jungle and then clear the jungle and use the NW to increase the yield from farming.

Our real limit is the display engine. It can handle terrain, feature and bonus. I would say using the bonus entry would likely be the most flexible when it comes to a proper implementation in the Colonization engine. In fact we should consider if NW should be a standalone file or just an addition to the bonus file. In fact NW could be implemented as simple as adding an int xml tag, which tells how many of the bonus in question can be in a game. 0 is unlimited (well current system) and 1 is unique. This also allows setting say 5 if we like. Perhaps some way of scaling with map size like max 1 on small maps, but 3 on gigantic.

devolution79 commented 5 years ago

Yeah, there are a number of issues with respect to the python implementation.

    def onEndGameTurn(self, argsList):
        'Called at the end of the end of each turn'
        iGameTurn = argsList[0]
## Natural Wonders Start ##
        if CyGame().getElapsedGameTurns() == 0:
            NaturalWonders.NaturalWonders().placeNaturalWonders()
## Natural Wonders End ##

The natural wonders are placed in a hack-ish way on the first turn.

    def onPlotRevealed(self, argsList):
        'Plot Revealed'
        pPlot = argsList[0]
        iTeam = argsList[1]
## Natural Wonders Start ##
        NaturalWonders.NaturalWonders().checkReveal(pPlot, iTeam)
## Natural Wonders End ##

This is a possible performance issue

The only real issue is to repurpose the bonuses and translate the "fake" natural wonder building effects to WTP xml.

devolution79 commented 5 years ago

I've actually merged the NW modcomp from platy but I haven't gotten around to push the branch yet.

devolution79 commented 5 years ago

For testers: Requires ModularLoading = 1 in the .ini file You have to place a unit (e.g. a colonist) near the wonder for the icon to show up. When in cheat mode, pressing N should toggle the icon to be displayed Asserts and python errors occur due to the python code attempting to place non-existing "virtual" NW buildings in a city if it has a NW

raystuttgart commented 4 years ago

I have a few "conceptual" issues with this. (And yes in RaR we also thought about it but could not come up with a satisfying concept.)

1. What game mechanics / features make use of it?

I really don't like just adding code and graphics that no features makes use of.

In other CIV games they boost happiness/culture/religion/... or give ridiculous plot yield increases. But what kind of game mechanic would fit thematically the theme of colonizing the New World?

2. The amount of "Natural Wonders" in the New World simply is a bit smaller than in the whole world.

And how many of those would European Players realistically get into possession on their land on a Gigantic Map?

3. We would need to adjust all "Scenario Maps" that do not have random feature generation.

Of course we could and probably should code it as a new Map Option like I did for "Randomized Goodies" setting in Maps.

4. We would also need adjust the AI to consider these plots with higher plot value for settlement.

But I guess the code adjustment should not be too difficult and risky considering bugs.

5. A few minor questions.


Thus before coding and setting up the XML feature base we should probably first:

  1. Collect a list of Natural Wonders that existed in the (former) New World
  2. Make a concept of their usage in terms of game mechanics or maybe bonus yields that fits the theme.
  3. Have a general idea how AI would handle that new feature.
raystuttgart commented 4 years ago

Are we going to do anything with this now? In terms of building a real feature?

It is great to have the technical base capabilities for such a feature "Natural Wonders". Personally I simply currently have absolutely no idea how to make a good feature concept for it that fits the "New World" / "Colinization Theme" of WTP.

But if we don't use it and no mod-mod is using it as a feature is was most likely wasted effort. That would be a pitty though.