Multiple Maps and Mapscripts

Make our plea, my friend. I'll work with anyone who responds and shows they know what they're doing. I've long wished AIAndy or Koshling would get the bug to return to the team to pick up this hatchet.
 
I'm interested in seeing if we get any response.

I figure down the road I may be able to sort some things out... it's just... very mysterious on many levels.
 
The big issue with multi-maps is getting units to go from one map to the other.

I agree with TB here, this bit is almost trivial now that we have missions. It is just a matter of defining the action to occur at a valid point on a valid unit and then changing its location and ending its turn. It is that simple. Once we decide how we define the maps.


Instructing the UI to change maps is not too hard. In fact it should just do it once we do all the definition stuff. The mini map is the hard part. The UI code is all in one module CvMainInterface.py. It is only 3000 lines long. It could possibly be 100 lines long with smaller modules for the various bits. It also does not need to be written the way it is (draw everything then hide/show the correct bits as needed) but it could be.

Interactions with the exe may be a problem.

Probably the simplest place to start would be with a "tactical battle" map which does not have a mini map.
 
@Thunderbrd

We got a response in the Civ4 thread. Can you answer his question?

You can just post like this and get better programmers :eek:

It sounds really interesting, but for the time being I'm way too busy with Medieval Conquest to look into new problems. Maybe later (and later is not next week). You could link to something, which gives even better insights into what has been done so far, like the source code itself.

From what I get, plots are now x,y,z and looking at a different z means marking everything dirty in the drawing engine, which forces it to reload all data from the DLL and redraw everything. Then comes all the other problems with AI, pathfinder and stuff. It sounds complex, but doable.

I'm not sure if it should be like Colonization where you go to the edge of the map and then leave the map to show up in another part of the world (which would be another map) or if it would be like Master of Magic where it has gateways (towers) to link to a plot on another map. I suspect the latter is the case and the first can then be added by adding the jump plots on the edge of the map.
 
This is the easy part.

Instructing the UI to switch maps and providing buttons in the UI for players to be able to do that, getting the maps to switch to where the next unit that comes up for command is, without it costing forever to do it, generating the processes and functions for generating the other map types, and debugging the millions of little issues this is bound to create, those are all the things beyond my ability. My lack of understanding of some of this stuff is extremely obvious in my inability to work with the unit animation crashes we've been getting, which is likely very related to issues like what we would see left and right if we moved to implement this.

The short answer is, I need a very very knowledgeable, tenacious, professional level programmer to help me sort this out. I was hoping that Spirictum could be groomed into this role...
responding here based on the request posted in C3 C&C:

From what I've seen map-making in C3 is quite different from C4. Different enough that I'm not sure I could make a decent C4 map even though i've made several for C3. And certainly once you get into DLLs and programming there is not really any overlap between the games in how things function behind the scenes. I'm sure there are several of us that would be glad to help if we could - but we don't have the skills or knowledge to do so. AFAIK even the couple of professional level programmers who work with C3 modding would not be familiar enough with advanced C4 requirements. But you never know ...
 
Continuing on Blue Monkey's post (from a Civ3 modding point of view), he's correct that Civ3 modding skills aren't really transferable to Civ4 in general. Civ4 was the first game in the series to make large amounts of the game's code moddable, whereas Civ3 (and I believe Civ2, though I'm not very familiar with it) allowed scenario files that could modify preset options, but had no ability to add entire new features such as multiple maps to the game (although I believe there have been a couple mods that attempted to work around this by having custom maps with large amounts of open space - renamed ocean - along with sizeable but disconnected-till-late-game separate landmasses or "planets" - which has some similarities with the multiple-areas-of-a-large-map-but-only-one-viewable idea Koshling described, only with some caveats around things such as ICBM range). But in short, if someone has only modded in Civ3, they will have a lot of Civ4 knowledge to pick up along the way.

As one of the professional programmers who works with Civ3 (I make tools to help make use of what's available to the maximum potential, as Nathiri posted), Blue Monkey is also correct that I'm not familiar enough with the Civ4 requirements - either the game APIs themselves, or C++ as a language for DLL modding - to jump right in. There's also very much a time issue - I don't spend that much time on Civ3 modding these days, between other interests and programming enough on the day job to not necessarily want to after work - so adding an additional project isn't that appealing right now. That said, the basic ideas Koshling described seem to make sense, with the multiple areas of one map in Python, exposing only one of those to the core engine via the C++ interfaces at a time for each of the planets + the interplanetary map, enhancing the AI to process on each map once they're added. Some questions that come to mind are, how would map generation time to handled the first time you access a planet, how would you handle the AI strategy for dealing with these maps (perhaps the biggest one), and what's the proper way to handle transitioning between maps (should it switch as soon as you move a unit between them, or be a manual switch; how do you make sure the player is aware of moves they have on other planets, etc.). It's a really cool idea to be able to travel between planets and play on different ones, and even more so if a newly-discovered planet would have realistic civs on it rather than being empty. Like if Galactic Civilizations II had the detail of Civ at a planetary level, and you didn't conquer whole planets at once but could conquer them incrementally. It's just too big of a project for me to jump into at this time given the limits I'd like to maintain on how much programming I do outside of work. A little of what I do at work outside of work is interesting since I can work on what I want and have freedom to explore what's interesting; too much of it and it starts tipping off work-life balance even if it isn't technically work. Or put another way, if I were a doctor I'd be one who practices medicine as part of my life, rather than one for whom practicing medicine is life.

The one thing that might change it is playing through a C2C game all the way. In the past I've always chosen settings that have too big of a map, or too many turns, or both, to get past the early first millennium AD. The early part was always fun but either I'd hit an MAF (in older versions), or my ambitions would exceed my time to achieve them. So what would some recommended settings be for a game that I could conceivably reach late game in, say, a month or two of moderate play, and with very low risk of crashing due to too high of memory requirements?
 
how would map generation time to handled the first time you access a planet
We'd have to design functions for this. We'd want to make a core system for each map 'type' but then allow a python interactivity... a map script so to speak, that can be selected at setup or later. We'd want to make sure that you could plug in pre-designed maps to fill in for when particular map types are called upon to be generated. But one of the really tricky parts that I don't know if it's really been solved yet (I think it has but I'm not sure) is saving the map so that it doesn't keep having to be re-created from scratch every time. A system for multimaps was designed in a modmod for FFH2 that did just that. You couldn't keep the map from regenerating when you switched maps.

how would you handle the AI strategy for dealing with these maps (perhaps the biggest one)
There's issues here, sure. But it's mostly a matter of creating new unitAIs that fill roles for working with other maps, like transitioning between them, space fleets, things like that. This part actually is well within my capabilities once the mechanics of working with map switches, generation (as you brought up above) and a number of other issues as such are worked out.

what's the proper way to handle transitioning between maps (should it switch as soon as you move a unit between them, or be a manual switch; how do you make sure the player is aware of moves they have on other planets, etc.)
There are a few questions in my mind about how to best resolve this... should units be isolated on each map and the round be segmented by map, units in transition or looking to target a space on another map immediately 'freezing' until that map comes up so the rest of it's activity can be resolved? I'm thinking it's probably not going to work that way. A player may want to try to make it work that way for themselves as best as possible and we could help them with some sorting and reordering of the unit list to not go to another unit on another map until all units on the open map have been checked for orders. But it's probably too restrictive to enforce only one run on a map and not being able to swap between to help with planning. The player really should be able to use some arrows to flip through the different maps imo, and targeting 'rules' for plot selection events might have to get a little more complicated.

The one thing that might change it is playing through a C2C game all the way. In the past I've always chosen settings that have too big of a map, or too many turns, or both, to get past the early first millennium AD. The early part was always fun but either I'd hit an MAF (in older versions), or my ambitions would exceed my time to achieve them. So what would some recommended settings be for a game that I could conceivably reach late game in, say, a month or two of moderate play, and with very low risk of crashing due to too high of memory requirements?
We had some memory leaks that have been repaired and since then we've had a number of players get into the later end of the tech tree. There may be a few really small ones to address yet if someone knows how to track those kinds of things down to a source of a problem... the ones repaired were fixed because a mistake was recognized and we could clear those mistakes up. But I think there's a little more room for improvement if someone knows how to detect and destroy those. That said, once cleared up many systems can just play without issue.

I'm impressed you've already played a game or two of C2C... thanks for your previous sessions!
 
I found it interesting that people from Civ3 and Civ4 responded but people from Civ5 and Civ6 did not.
Apologies, but like Civ 6, Civ 5 really doesn't have the code extremely modable for any Civ5-Civ6 Modders especially concerning the graphic maps(they don't even update the terrain's graphic if you tried it through Civ5's Worldbuilder unlike Civ 4!)
 
The early part was always fun but either I'd hit an MAF (in older versions), or my ambitions would exceed my time to achieve them. So what would some recommended settings be for a game that I could conceivably reach late game in, say, a month or two of moderate play, and with very low risk of crashing due to too high of memory requirements?

Epic (2000 turns) or Marathon (3000 turns) Game Speed or Normal is only 1000 turns and can be played in a couple of weeks. On Normal research does go fast (800 tech to research in 1000 turns) but with ~800 tech you won't reach the end of the tech tree until well past Modern Era. It will give you a good overview of what you can achieve on a slower speed. A Normal game with 8 AI on a Large Non earth map like PerfectMongoose310 with start Everywhere and Break Pangea with Meteors settings makes for a map that is different every game. After a game on Normal with these settings if you find the pace a bit fast then bump up to Epic Game Speed. Once you've got a good feel for how you like it to pace then maybe Marathon at 3000 turns.

But jumping in like you posted on the slowest speed with the most AI is a recipe that can lead to games finishing long before they should imhpo from playing this mod since inception. Or from games that have the options that generate more AI causing the game to MAF. It is after all only a 32 bit engine single core.
 
I am not sure if this is helpful but I found LyTning94's Parallel Maps Mod.

LyTning94's Parallel Maps Mod
https://forums.civfanatics.com/resources/parallel-maps.18961/

I believe that Koshling was working on view-ports while Lytning was working on this.

I hope this helps get multi-maps to be a thing.

EDIT: Also the original thread.
It does help a bit to have that there, yes. From what I gather, we HAVE up to what he did...

C2C doesn't have all the Multiple Maps code, at https://sourceforge.net/projects/parallelmaps/ you find the latest version.

Adding the missing code to C2C would only make sense if someone really finishes it at the same time because it adds some overhead and C2C is far to slow and memory hungry already.
 
C2C doesn't have all the Multiple Maps code, at https://sourceforge.net/projects/parallelmaps/ you find the latest version.

Adding the missing code to C2C would only make sense if someone really finishes it at the same time because it adds some overhead and C2C is far to slow and memory hungry already.
Koshling seemed to be suggesting that a lot of it not lead to being done in python as this parallelmaps mod does as well. And you ARE right that C2C does need to be cleaned up some still so adding more that gets no use (as we have a lot of already) is not wise. However, I wonder if some analysis of this mod as he implemented it would help to illuminate what it is we need to finish the project up to the point that it can start being worked on at a more basic level (such as just developing mapscripting depth from some basic models that can succesfully start and finish the process, and missions to move from one map to another and those kinds of loose ends.)

I also wish that there was a way to hunt down memory leaks. If there is one, I'm not aware of the method. I suspect we do have some still.

Are you suggesting that C2C would simply start experiencing MAFs if the way this mod is done was implemented here?
 
But jumping in like you posted on the slowest speed with the most AI is a recipe that can lead to games finishing long before they should imhpo from playing this mod since inception. Or from games that have the options that generate more AI causing the game to MAF. It is after all only a 32 bit engine single core.

@The all C2C Modders
Thats only because C2C is too extreme it has too much unfinshed content. The turns times take to long, the memory usage is too high for a 32 bit game, there is too much micromanagement and the AI is too weak thats what makes it really boring.

Now it get's really funny because the Multiple Maps talk is back. I admire all the time, creativity and energy you guys put into this mod but if it's not really possible to really play on one map the whole Multiple Maps Thing makes no sense.
 
I was hoping that the game would clear the memory from previous maps and only focus on one at a time so as to be able to manage a very large number of maps at once... that part of the idea has been a little haunting.
 
@The all C2C Modders
Thats only because C2C is too extreme it has too much unfinshed content. The turns times take to long, the memory usage is too high for a 32 bit game, there is too much micromanagement and the AI is too weak thats what makes it really boring.

Now it get's really funny because the Multiple Maps talk is back. I admire all the time, creativity and energy you guys put into this mod but if it's not really possible to really play on one map the whole Multiple Maps Thing makes no sense.

I have to agree in part with this. We really need to get the mod where even on Snail we can consistently get players games into the Modern era. You can do this now with the 2 fastest Game Speeds and somewhat on Marathon. But from Snail on to Eternity this is still such a reach that it's hard to accomplish.

As for Multi-maps........that is above my head.
 
Back
Top Bottom