Mobile Cities

Padmewan

King
Joined
Nov 26, 2003
Messages
748
Location
Planet
One concept we've kicked around in our mod is the possibility of one of our lifeforms (our version of religion) to evolve from cyborgs into a massive living machine-city. Tied to this lifeform is its tendency to completely strip the land around it in a non-sustainable way (strip mines that generate huge value but decline over time).

One idea that could extend this concept would be that these cities can pick up and move. That would make these lifeforms essentially locusts.

(I could also see this concept in fantasy mods -- floating cities -- or even in prehistory mods -- nomadic people).

Anyway, I'm interested in feedback on how this might work in terms of gameplay and AI implementation. My very basic thoughts were:

1. Have a unit that the AI builds for production. Maybe it's only available when the terrain around is completely terraformed to "useless" (via some kind of feature count or bonus or something).

2. When the unit is built, the city's current stats are transfered to a holding location (prolly the unit itself) and then destroyed.

3. The unit then behaves like a settler: it looks for the ideal place to settle. Because its old terrain is now worthless, it won't settle there.

4. Upon settling, the data of the old city is transferred to the new one.


The above all seems doable, but I"m not sure how it might play out. By mid-late game most good areas are already settled, tho maybe at that point the AI would settle (no pun intended) for a mediocre location better than its starting point. Also, perhaps this particular civ is so virulent that it destroys rather than conquers other civs, leaving plenty of open space for settling.


Feedback? Thoughts? I'm more interested in gameplay and mechanics than code, though the latter would be great if the idea itself seems viable!
 
I think it's a very interesting idea, although it seems like it would be overpowered. Still, I'm not sure what you mean by this statement:
Also, perhaps this particular civ is so virulent that it destroys rather than conquers other civs, leaving plenty of open space for settling.
Care to explain?
 
Perhaps in Python it's coded so that anytime this type of civ captures another city, that city is automatically razed (it has to be done in Python because leaderhead AI doesn't change mid-game and it also has to be imposed on human players).

In SMAX, the alien civilizations couldn't really capture human bases; when they do, the base drops to 1 pop point and all the other pop "flee" in colony pods (usually easily destroyed by the conquerer. very sad).

That would kinda keep this from being overpowering, plus the fact that you've now destroyed your previous terrain of any value whatsoever. On top of this we can throw all sorts of diplomacy penalties, etc... Also this thing should only really be built after the tiles are totally wrecked, or else the AI will really screw it up.
 
what if instead of settlers you had the option of a nomad who could build a nomadic city(cultural border is alaways fat cross, does not generate culture or food)?
 
I like this idea. I guess that it would be quite easy to do in python. if you Don't have any programming experience then I might try to do this for you, but I warn you, I have a lot of other things to do first so it might be a few weeks before i get to it.
 
Lord Olleus, that would be awesome if you have time to tackle this!

The hard parts will be (a) balancing it, and (b) making sure the AI doesn't constantly do it over and over again. The latter will probably need to be coded in some other way. Per our specific implementation we would want to tie the ability to build this unit to all tiles in the fat cross being destroyed, but AFAIK the only terrain-related prereq's for a unit (or building) is related to resources, not terrain or features.
 
lol. you seem to have beet me into madness Padmewan.
I was thinking of doing a hungry-city-chronicles (children's book about cties that move around eating each other) scenario, but it would haev to go so far into C++ I gave it up in favour of my space mod.

Good luck is all I can say :)
 
How about not settling the city at all but allowing it to move continiously? One would of course need a unit, but could link the citys location to that unit. The Unit could be very slow moving so something like 1 tile all 3 to 5 Turns. If a new UNIT_AI is coded for that Unit the AI won't screw it up too. The appearance of the moving Unit could be linked to a building that must be built in the City.

The AI would check if there would be an advantage to moving the city one plot in each of the eight possible directions (considering other cities of it own as well, borders of foreign civilizations and maybe terrain it wants to reach someday). If there is no better terrain available (or not much better terrain) it would simply leave the city in place.

As Cities could be moved towards other borders one would need to modifiy the value of "Our close Boders Spark tension" diplomatic modifiers so that AIs, that are threatened to be culturally destroyed by cities that come closer, will attack the aggressive city wandering civilization.
 
Pretty awesome, Chalid! The major changes you're suggesting from the original are (a) The unit moves at less than 1 tile/turn (is that possible in XML alone?) and (b) The city is destroyed/instantiated every time the unit make a real move into a new tile.
chalid said:
The AI would check if there would be an advantage to moving the city one plot in each of the eight possible directions (considering other cities of it own as well, borders of foreign civilizations and maybe terrain it wants to reach someday). If there is no better terrain available (or not much better terrain) it would simply leave the city in place.
In fact, I suspect that if the unit moves VEEEERRRRYYY SLLLLOOOOOWWWWLLLLY :) we wouldn't even need new AI if the sequence were:

1. Destroy city.
2. Move the unit.
3. Instantiate the city.

If the existing square is the best square, the city will stay put.

===

@dalek_master: One variant of this I thought of is that a Borg city could, as its final act (a final building that requires every other building to be built) to become an almost-unstoppable super-unit whose sole purpose is to attack the nearest city and "consume" it. As a "life-cycle" it would then probably start over or else this civ would be unstoppable -- or maybe it keeps a % of its original buildings based on % damage suffered in the attack. Is that anything like what you're describing?
 
Hmm the AI would most probably be needed to decide where to move the city as the function that searches for the best plot to place a settlers is quite limited. Especially when considering that other cities might be moving themselves and the strict frame that is given now to the placement of cities.

I would not even destroy the city but simple relocate it. When using the possibilities given by the code that one would be much easier and nicer than destroying and rebuilding. Might be that moving would be even possible with python. If not it could be made possible with very little additional code.

Giving a movement smaller 1 could be easily done via python. For example give the unit a promotion Movement_in_3_turns that gives -X to movement. Next turn the Unit gets the Promotion Movement_in_2_turns and so on until it finally gets Movement_now and the cycle begins again.
 
Chalid said:
Hmm the AI would most probably be needed to decide where to move the city as the function that searches for the best plot to place a settlers is quite limited. Especially when considering that other cities might be moving themselves and the strict frame that is given now to the placement of cities.

I would not even destroy the city but simple relocate it. When using the possibilities given by the code that one would be much easier and nicer than destroying and rebuilding. Might be that moving would be even possible with python. If not it could be made possible with very little additional code.
I am starting with the assumption that AI coding is annoying and difficult.

Therefore the only reason I suggest destroying the city first is that it allows the AI to consider the square the city already is sitting on as the best square. (In the context of the mod I'm describing, this civ has a tendency to terraform its surroundings into garbage... This means that after many turns the squares it's sitting on will no longer be optimal.) This also assumes that killing the city won't cause an immediate boundary shift, which you seem to imply, or else the city would screw itself out of its current location.

Of course, if we could control it so that this "crawler" unit doesn't get built until the terrain is actually wrecked, that's another story. Alternatively, it might be possible to mod the AI to consider all squares regardless of annoying details like existing cities and boundaries?

I don't know if the AI has handlers for when a civ has 2 settlers and therefore possible collisions. I do know that AI workers never work the same tile for this reason: they will probably undo each other's work. (This is a major advantage for human players). Anyway, if it does, then city collisions would be minimized, unless EVERY civ on the map has mobile cities. But I think we want these mobile cities to be special, both to minimize collisions and to make them extra-scary. (Possible the crawler units are also limited to some number per civ).
 
Chalid said:
I would not even destroy the city but simple relocate it.... Might be that moving would be even possible with python. If not it could be made possible with very little additional code.
A very quick glance shows that at least from CyCity there is no SetPlot method. However, maybe there is a different function/method at the map level.

Chalid said:
Giving a movement smaller 1 could be easily done via python. For example give the unit a promotion Movement_in_3_turns that gives -X to movement. Next turn the Unit gets the Promotion Movement_in_2_turns and so on until it finally gets Movement_now and the cycle begins again.
This is a helpful suggestion; thanks!
 
I think this is a great idea. I like to original idea of having a city destroyed, then unit created from it like a settler and removing. This balances the advantage of moving a city to greener pastures with the turns spent as a unit that can't produce anything. And if it can be made to move really slowly... then even better. However, I would be worried about exploits on this ability...

For one, will culture (or PSI or whatever the equivalent is going to be called) be at the same level in the new city? If so, then you could move your high culture cities to the outer edges of your empire and thereby easliy eat up your neighbor's territory. While it makes sense because this is exactly what the borg would do, it does present a balancing problem in the game. Maybe culture should take a big hit (though not go down to 0 like a conquered city) and population should be reduced a bit when moved as well.

As for the unit the city becomes, I like the idea of two possible units: a high-defense settler that can resettle elsewhere but not attack, and a high-offense city-eater that can't become a city again unless it takes an opponent's city. Maybe someone will do a decent sand-crawler model. That would be ideal for these units.
 
Also that "settler camp" mentioned today on the main page as a CIV:Warlords feature sounds a lot like what you want to attempt.
 
Main page? What's that? :confused:

:lol: Hah, I kill me!

Good idea, will look... I'm sure us modders are both anticipating and dreading the expansion pack...
 
Top Bottom