We-the-People-civ4col-mod / Mod

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

Improve, optimize and refactor CvMainInterface #497

Open devolution79 opened 3 years ago

devolution79 commented 3 years ago

Some ideas:

Support 1080p / 4k resolutions

Port and adapt the caches (constants, icons, file paths etc) as exemplified here: https://github.com/caveman2cosmos/Caveman2Cosmos/blob/master/Assets/Python/Screens/CvMainInterface.py

Cache calls like like gc.getBuildingInfo(iBuilding).getWhatever(...)

Lay the foundation for an additional yield row or a way to display a subset of yields . See here for ideas\inspiration: https://forums.civfanatics.com/threads/adding-more-yields-work-in-progress.671213/page-3#post-16130841

devolution79 commented 3 years ago

Feel free to add additional topics / ideas :)

raystuttgart commented 3 years ago

I like to "hand taylor" such stuff - I did that for RaR as well. (Meaning I adjust the order of Yields manually in XML / DLL to match a certain systematic.)

  1. Food and Strategic Yields --> further to the left (coming first)
  2. "Produced Yield" below "Raw Yield".
  3. Similar Yields (or from same Terrain) e.g. Cotton / Indigo close together
  4. Cheaper Yields (e.g. for Domestic Market) a bit more left than Expensive Yields (e.g. pure Cash like Silver / Gold / Gems)
  5. ...

Something like that can and will always just be "hand taylored". A dynamic logic that can take care of all those things is hard to imagine for me ...


For Usability:

All (potentially available) Yields should ideally always be visible all time (No scrolling, No shifting, No ...)

Everything else is really bad for overview, quick comparisons or quick decisions. (So the rows should also never change dynamically ingame.)


Summary:

Almost everything I create is carefully hand taylored. It may be quite hard to later adjust and expand but it will look good.


Currently I have no good solution yet. But let me try to add all these new Yields and then we may figure out a good way to visualize.

Nightinggale commented 1 year ago

I'm not sure caching is a great idea because init is not called when changing python files. This means modding the main interface requires reloading the game as opposed to using uncached values, which will just work.

I will however say that #311 can be useful to split out the city screen and opening it can then call init to make such a cache.