Communitas map script

No problem. It's cool to see that replacing terrain textures isn't too difficult. SQL looks so powerful yet so simple... I think I'm going to try making my own SQL mods soon, I've only ever used XML and a tiny bit of Lua.

Shame about the farm bug though. I hope Firaxis eventually gets around to fixing that.
 
No problem. It's cool to see that replacing terrain textures isn't too difficult. SQL looks so powerful yet so simple... I think I'm going to try making my own SQL mods soon, I've only ever used XML and a tiny bit of Lua.

Shame about the farm bug though. I hope Firaxis eventually gets around to fixing that.

Atolls were easy since the mesh files were flat and were only placeholders for the texture files. Here are some links for some sql stuff.

Also, on the civfanatics podcast they had with some of the devs, they mentioned that a fix was in the works. Though the crash has been around for years so who knows.
 
Wow!

@stackpointer it looks like you found a way to do what I thought could be done. :goodjob:

Now, question. Is this changing the graphic for ALL 'atolls' or have you made a NEW terrain/feature in addition to the existing?
Also. Isn't all this extra work for the sake of a couple of :c5food: & :c5production: yields a bit of overkill.

@Thalassicus
I know my idea to just make it a land tile changes the flavour of what you are trying to do. It just occurred to me though that all that is happening is we are moving the boundary between 'low yield' and 'good yield' tiles.

When the maps are generated the option 'Sea Level' is basically a way of determining how many tiles will be useful (landmass) and how many are less useful (Seas)

Placing an 'atoll' next to the coast is just tricking the map to make 1 more 'good yield' tile. Now the 'low yield' tiles have just moved 1 tile further away.

Still, if everyone is happy and the map is suffering from the pox. I'm fine with it.

Let's move onto bigger fish.
 
Wow!

@stackpointer it looks like you found a way to do what I thought could be done. :goodjob:

Now, question. Is this changing the graphic for ALL 'atolls' or have you made a NEW terrain/feature in addition to the existing?
Also. Isn't all this extra work for the sake of a couple of :c5food: & :c5production: yields a bit of overkill.

This adds textures for the already existing resource type "ART_DEF_FEATURE_ATOLL" and will work on existing maps without modifications on the maps. I also deleted the original five atoll textures but we could keep those in without any effort. We can add as many atoll textures as we want at different scales without much effort since I completed the framework and the only thing left is some simple image editing to make those textures.

We may want to hold off on this until the fall patch though, since it is low priority and high complexity.
 
I just fired up a terra communitas map, and used the in-game editor mod to look at it. Like 80% of the city states were on the new world continent. That seems silly.

Any chance we could get an option that puts the native american civs on the new world?
 
This modifies the textures for the already existing resource type "ART_DEF_FEATURE_ATOLL" and will work on existing maps without modifications on the maps. I also deleted the original five atoll graphics but we could keep those in without any effort. We can add as many atoll graphics and we want at different scales without much effort since I completed the framework and the only thing left is some simple image editing to the png files.

So that means there is no yield difference for 'atolls' & 'isles'. Or if any change to one is made then the other is affected also. Additionally the tooltip will still provide info as for 'atolls'. Not a big thing, but nonetheless.

At least now the jarring graphical issue will be minimized. Progress.

I can't help thinking though it seems like a lot of work over such a minor yield change.
That's just me though. I don't like change just because we CAN change something. And if we do change it I like my Is dotted and my Ts crossed.

Again. Kudos to you.
 
So that means there is no yield difference for 'atolls' & 'isles'. Or if any change to one is made then the other is affected also. Additionally the tooltip will still provide info as for 'atolls'. Not a big thing, but nonetheless.

At least now the jarring graphical issue will be minimized. Progress.

I can't help thinking though it seems like a lot of work over such a minor yield change.
That's just me though. I don't like change just because we CAN change something. And if we do change it I like my Is dotted and my Ts crossed.

Again. Kudos to you.

We could make a separate feature for atolls vs isles but then the map script would have to reference the new feature (that would only exist in Communitas) and I'm not sure we want to go there since Thal wanted to keep the map modular from Communitas. I believe Thal's plan is to replace all references to atolls to isles eventually? There is no difference between isles and atolls since atolls are just a placeholder for isles until they are completely replaced?
 
I just fired up a terra communitas map, and used the in-game editor mod to look at it. Like 80% of the city states were on the new world continent. That seems silly.

Any chance we could get an option that puts the native american civs on the new world?

I was actually just about to pop my head in here and suggest something similar, though different.

I love the size increase the terra option gives. I also love having most of the civs start on one continent. That said, I did say 'most'.

After playing a few games on the terra setting, I wanted to suggest a third option, somewhere in between continents/everywhere and old world/terra.

Use the terra script for an enlarged map, however, set it so that the majority of civs start on the largest continent ('eurasia'); let's say 80%. The last 20% of civs are then split between 'the americas' and 'africa'. This way there is still a new world, but it can also be populated by more than just city states.

I find that continents always splits the civs near equally, which means it's harder to get both crowded borders and new colonies.

Also, the new 'isle' graphics seem very promising. It will certainly help with the atoll everywhere spam. :3

-----------------------------
Edit: Answered my own question about map size. Managed to generate a 176x112 continents style map. Time to see how long before it crashes! :D

After thought addition: Editing these numbers should allow me to specify map size, correct? Or, is there another setting deeper in that I would need to adjust to, say, generate a terra sized map using a continents start, or even just further increase the map to (for example) 180x96, like some custom made earth maps.

Is it possible to generate a map that large using a script?

Code:
	local worldsizes = {
		[GameInfo.Worlds.WORLDSIZE_DUEL.ID] = {40, 24},
		[GameInfo.Worlds.WORLDSIZE_TINY.ID] = {56, 36},
		[GameInfo.Worlds.WORLDSIZE_SMALL.ID] = {66, 42},
		[GameInfo.Worlds.WORLDSIZE_STANDARD.ID] = {80, 52},
		[GameInfo.Worlds.WORLDSIZE_LARGE.ID] = {104, 64},
		[GameInfo.Worlds.WORLDSIZE_HUGE.ID] = {128, 80}
		}
	if Map.GetCustomOption(6) == 2 then
		-- Enlarge terra-style maps
		worldsizes = {
		[GameInfo.Worlds.WORLDSIZE_DUEL.ID] = {52, 32},
		[GameInfo.Worlds.WORLDSIZE_TINY.ID] = {64, 40},
		[GameInfo.Worlds.WORLDSIZE_SMALL.ID] = {84, 52},
		[GameInfo.Worlds.WORLDSIZE_STANDARD.ID] = {104, 64},
		[GameInfo.Worlds.WORLDSIZE_LARGE.ID] = {128, 80},
		[GameInfo.Worlds.WORLDSIZE_HUGE.ID] = {152, 96}
		}
	end
 
We could make a separate feature for atolls vs isles but then the map script would have to reference the new feature (that would only exist in Communitas) and I'm not sure we want to go there since Thal wanted to keep the map modular from Communitas. I believe Thal's plan is to replace all references to atolls to isles eventually? There is no difference between isles and atolls since atolls are just a placeholder for isles until they are completely replaced?

My thoughts exactly. Let's not make anything major if we can avoid it.

Did not know atolls were going to be completely replaced!:eek:
 
For Terra, ideally for me:

1) One continent is empty but for City States, some Natural Wonders (not in CS) and more strategic ressources. If possible, some unique luxuries as well (clumped together so to allow settling for them')
2) The largest continent (Eurasia) houses ~75% of the civs, while another one (Africa) the rest.
3) Raises Naval and Expansionism Values by 3-5 and lower war values by 1-2 across the board for all leaders.

Point 3 requires the mod, not the map of course, but I'd say it would be important to make the AI a) go explore and b) not devolve the game to a 'crowded pangaea war game'.

Regarding the atolls -> isles thing, isn't that supposed to be for the mod only anyways (and preferably for after the fall patch). After all, it's just a graphics update...
 
I just fired up a terra communitas map, and used the in-game editor mod to look at it. Like 80% of the city states were on the new world continent. That seems silly.

Any chance we could get an option that puts the native american civs on the new world?

You can easily adjust the percentage of CS's on other continents than the starting one. Just edit this code line within "communitas.lua" (using notepad++):

Code:
mglobal.offshoreCS		= 0.75	--Percent of citystates assigned to uninhabited regions

But I recommend using the original setting for a game or two. I was sceptical as well, but it makes sense. I'm pretty sure Thal generated several test maps to find a good solution.

Regarding your second wish, I'm pretty sure that's hard to implement (I'd estimate at least 10 hours) and it's questionable how many people would choose this option. You can play real-world maps, however!
 
For Terra, ideally for me:

1) One continent is empty but for City States, some Natural Wonders (not in CS) and more strategic ressources. If possible, some unique luxuries as well (clumped together so to allow settling for them')
2) The largest continent (Eurasia) houses ~75% of the civs, while another one (Africa) the rest.
3) Raises Naval and Expansionism Values by 3-5 and lower war values by 1-2 across the board for all leaders.

Point 3 requires the mod, not the map of course, but I'd say it would be important to make the AI a) go explore and b) not devolve the game to a 'crowded pangaea war game'.

Regarding the atolls -> isles thing, isn't that supposed to be for the mod only anyways (and preferably for after the fall patch). After all, it's just a graphics update...

Pretty much. As it stands now, Terra maps usually end up as a pangea, since I never really see the AI go elsewhere. Maybe a city on an island chain close to the start, but that's about it.

Anyways -- that's probably more related to the mod than the script.
 
I haven't tried Terra maps, but I find in BNW in general that the AI becomes much more aggressive from second wave colonization from ~the industrial era, including to offshore islands.

I suspect one thing slowing real intercontinental colonization is that embarked units move so slowly that it takes them forever to get across to a new continent.
 
@albie_123
Yeah, these are just quick test graphics to see if we can get it working. The final art will look much better I assure you. :)

@stackpointer
Yay you got it working! :goodjob:

You don't need to submit on github; the research you've done should be enough for me to get this in. It's unfortunate it requires ReloadLandmarkSystem. Maybe we should wait to do extensive artwork for these until (if) Firaxis fixes the farm crash bug... otherwise we'd just do a lot of work to run into the wall of that crash problem.

@Dorevai, Qwynn
This shows a typical Terra-Communitas layout below, where 5 of the 16 citystates are in the new world. There's a lot of randomness so you might see different results in some games. It mainly depends on how large the biggest continent is.

It might be difficult to create a midground between Terra and Continents styles. The "biggest continent" or "start everywhere" options are rather hard-coded in AssignStartingPlots.lua. I looked through it for a while, but after a few hours trying to decipher it I gave up and moved on to other tasks. I think it would take a lot of work to write a new placement algorithm.

glj9.jpg


@Qwynn
Yes, those options you found control map sizes. You can modify them to whatever you like; the game should adapt okay. :)

@ExpiredReign
The alternative to isles is fish, which are harder to balance because their yields change more throughout the game. Isles are easier to balance archipelagos because their yields are constant. I also think they look nice, giving it a sense of smaller isles mixed in with the big ones.

@mitsho
Terra-style land formation changes AI behavior. Here's what I did for the Communitas map:
Spoiler :
Code:
if Map.GetCustomOption(6) == 2 then

    -- Biggest continent placement
    if largestLand:GetNumTiles() < 0.25 * Map.GetLandPlots() then
        print("AI Map Strategy - Offshore expansion with navy bias")
        Map.ChangeAIMapHint(4+1)

    else
        print("AI Map Strategy - Offshore expansion")
        Map.ChangeAIMapHint(4)
    end

elseif largestLand:GetNumTiles() < 0.25 * Map.GetLandPlots() then
    print("AI Map Strategy - Navy bias")
    Map.ChangeAIMapHint(1)

else
    print("AI Map Strategy - Normal")
end

@Ahriman
You have a good point about embarked units. Would it make sense to give an embarked movement bonus in the Exploration tree? This would help settle islands in normal Continents-style maps too.
 
Would it make sense to give an embarked movement bonus in the Exploration tree?
I'd add one to the Exploration tree (the policy that currently gives a great admiral and faster naval movement is weak, but would be much more powerful if it also effected embarked units), but I'd consider adding a +1 movement to compass tech as well.

We could also consider reverting the England bonus (+15xp is really pretty dull, it doesn't give you anything you can't easily get from other sources, whereas the movement bonuses are harder to get) and maybe making the great lighthouse also effect embarked units.

Polynesia and/or Denmark could also potentially get a bonus.

Faster embarked units might also help the AI do intercontinental invasions, which it is a bit weak at.
 
I'd say a bit of extra embarked speed can't be bad, though on Compass already? The speeds should compare to the current ship speeds after all. Great Admirals definitely can get a speed bump in the industrial era to bring them up to speed though.

If I look at the map displayed above, it's a pity that Mongolia and Germany don't start on that other continent just left of the starting one. That decreases the room available to the civs again by a big part. I gather that's not possible. Would a workaround be possible that 'connects' these smaller continents with a one tile row either at the north or south pole (depending on where the continents lie, here in the North)

Regarding the Map-dependent change in AI_strategies. That's interesting, I'm looking around a bit now to see what the exact numbers are here. In any case I feel only a naval_bias is not enough, direct aggression should probably be toned down a bit as well.. ;)
 
I'd say a bit of extra embarked speed can't be bad, though on Compass already?
Yes. 2 speed on embarked units is pretty useless. Remember that at that point in the game, the slow ships are 3 movement and the fast ships are 4.

In the current game, IIRC you only get to speed 3 in the Renaissance (when ships are speed 4-5) and speed 4 in the industrial era.
 
Terra maps are crowded with barbs, too. I think the embarked speed boost is a great idea, but I fear it's often the Barbs that keep them from expanding better.

BTW, the AI was pretty effective at settling in the new world in previous versions. It's not that it never worked! I remember that by the industrial era often only crappy spots were left.
 
@mitsho
It's difficult to write code to connect bodies of land or water. The human mind is amazing, and learns how to find patterns like this by the time we're toddlers. We can just look at two continents and go, "land should be there." We're instinctively calculating complex pathfinding algorithms in our head without realizing it. I'd like to be able to do things like this in code, but it would take substantial time to accomplish.
 
Back
Top Bottom