Crazy Spatz's Alpha Centauri Mod

But once a war has started, they're perfectly capable of gaining ground once they have a resource advantage; I've seen city-states conquer entire empires if I've weakened them enough. And obviously, if you start gifting tons of units to the city-states, they can roll over the other AIs.

I've not seen a C-S conquer another Civ's city to date (maybe I was just not looking for it?). I'm also kinda leary of trusting humans to supporting or propping up a C-S during a war. I'd rather try to focus on what can be done to make them more self-sufficient (a la more of a Switzerland approach), which I think the sub-set of units your producing is going in the right direction with.

Most of the time you'd be right. A city-state would be a very tough, compact power. If he builds ships, they'll stay near home; if he builds skirmisher units they'll park themselves nearby. But when a war DOES start, I want the city-states to be able to fight back effectively, even if their opponent is on the other side of an ocean, and naval vessels are essential for that.


That'd be interesting to see a flotilla of C-S units on their way to attack a far off power.

I did add a resourceless version of the Plasma Artillery to the city-states. So far so good.
Question: Nomenclature. Right now the five city-state exclusive units are labeled things like "Jury-Rigged Plasma Artillery", but I don't really like that term on reflection. "Primitive" might be more appropriate, but it seems discordant with the fact that we're talking about advanced sci-fi units. So what term would you use to represent the fact that these units are weaker than the norm?

Interesting question. In the military they do have names for certain understrength units. For instance there is the Light Brigade (as in "The Charge of..."), there are Pocket Battleships, and in the initial stages of WW2 the Americans, fearing the British were going to collapse, sold them fighters with the previous generation motors in them (for fear of the newer engines falling into Nazi hands), to which the British refered to these aircraft as Castrated Lightnings. But I'm probably starting to digress.....

In my mod the C-S are going to be the remnants of an alien civilization, and right now my plan is to label their subset of units using god names (Shiva being one). This could change, but the idea here is to invoke an almost mythological sense for these units.

So, there you are, with two different approaches to labeling the C-S units. If neither of these appeal to you, then if you give me some more ideas as to where you'd like to drive it, I can probably come up with some other names that fall into the same vein.

Also, I played a test game last night. (New change: in the tech tree, the points where a tech improves the yield of an improvement? It actually shows the icon for that improvement now. Same goes for the road and railroad movement increases; no more star icon for those.


Awesome! :goodjob: The more immersion, the better!

I encountered a bug in this: he didn't regenerate. The Wild Nessus Worm has the same promotions as the regular, and so should have regenerated 10-11 HP every turn, but it just didn't happen; I ended up whittling his health down from a distance with artillery and a rushed needlejet. So it looks like barbarians don't get a true "turn" in the usual sense, and I'll have to find some other way to handle this. (Some .lua change that says that at the start of MY turn, all barbarian psi units heal?)

As a workaround (or test) give them the Medic promotion and see if they heal then? Depending on what happens, this may tell how the coding has been set up regarding Barbs not healing.


D
 
but if you compare to vanilla, they don't heal. for example, hit a barb at a camp. the tooltip shows they get a fortification bonus, and fortifying lets you heal, but barbs don't regenerate

Okay, but is there some way to fix that? Is there a flag in GlobalDefines.xml of "barbs don't heal" that I can turn off? (I'm not at home so I can't check.) Because healing barbarians is a pretty integral part of the whole mindworm thing.

Also, I came to two conclusions this morning (I played a little before work):
1> The Jump Gate (T22 building) needs a lot more oomph. What I WANT it to do, to keep from overlapping with the Bulk Matter Transmitter, is to make it so that if you build a Jump Gate in a city, you can now work tiles 4 hexes away instead of being limited to 3 to represent the idea that with the invention of a local gate network, people will move out into suburbs while still being able to get downtown in minutes.
This isn't as broken as it sounds; by the time you get this thing going, you'll have switched to an almost purely specialist-based economy. So this'd really only help you work that resource tile that's just outside your reach.

2> I'm the Grinch. More specifically, I think the world is too happy, and it needs to stop.
I'd wanted population growth to be a major impediment to happiness. The problem is that you'll end up stacking so much happiness on that it just isn't an issue any more. Even if you get beaten to every world wonder, you get:
+8 from two resources (Neutronium and Information)
+1 from each Empath specialist (and you get a free one with the Empath Guild)
+3 per Hologram Theater, +2 per Centauri Preserve, +1 per Habitation Dome or Hybrid Forest
-1 per Genejack Factory or Children's Creche
and there are two new SPs that add Happiness, but only one of them (Eudaimonia, +10) is actually new; the other's the effect of the old Planned Economy.

Even without the per-empire boosts of resources and such, the per-city happiness is a net +6 even before Empaths are brought in, and that's not including the fact that with the increased time and money in these eras you'll be more able to make the existing +happy buildings. Likewise, you'll have more SPs, and that means you'll have unlocked more of the happiness-boosting policies. To make things worse, I nearly always pick Piety over Rationalism just for the culture-boosting effects and the difficulty of getting early Happiness, so in the future eras I'm often running +100 happiness once I pick up most of the world wonders.

So the question is, what can I do about this?
I've been looking at doing a few of the following:
> Increasing the unhappiness from population. It's currently 1.0 for normal citizens and 1.34 in occupied cities. I want to change this to 1.2 and 1.6 at first; for a size 20 city (the norm in most future eras) that's an additional 4 unhappiness per city, assuming you haven't taken any SPs or built Wonders that reduce per-pop unhappiness. (I could go as far as -1.5/-2.0, which'd be 10 unhappiness extra for a size 20. Of course, this'd make India REALLY strong.)
> Adding -1 Happiness to more buildings, like I did the Genejack and Creche. For instance, citizens won't be too happy about a Gravity Shield bubble enclosing their city (remember the Simpsons Movie?), especially if they liked living in the suburbs outside the bubble, and it'd give me an excuse to jack up the defense rating even further. Or the Robotic Assembly Plant, if workers don't like robots taking their jobs. So I could put a -1 on each of those; people would still want to build them anyway, but now it'd help trim off a bit of the excess happiness. (Maybe the Perimeter Defense, too?)
> Decreasing the base happiness for certain luxuries. Why does Silver add the same 5 happiness that Gold and Gems do? So I could see dropping Silver's benefit, for instance. So you might end up having a few "tiers" of luxuries.
> And why do luxuries like Spices or Cotton, extremely valuable in ancient times, still hold the same luxury value in the modern eras? Pepper used to be worth its weight in gold, now it's something you get in a can at the grocery store.
While I can't easily code this in XML, I'd like to see some sort of decay on this; when you hit various eras the mundane luxuries could start to be worth less, until by transcendence they're almost worthless. (Say, -1 at the starts of the Renaissance, Nuclear, Fusion, and Transcendence eras to all luxuries, min. +1?) If that was in, I'd want to go back and increase a bunch of other happiness things to compensate, along with increasing the base happiness of most luxuries. (Combine this with the previous point; Gold might start at +7 and end at +3, Silver +6 down to +2, Cotton might start at +4 and hit the +1 minimum in the Fusion era.)

Side note: if you build the Statue of Liberty, all of the specialists in your empire will claim that they're generating one happiness. They're not actually adding happiness, and it's a display bug in the .lua I imported from an outside project, but I'm still tracking it down.
 
I've not seen a C-S conquer another Civ's city to date (maybe I was just not looking for it?).

I saw it happen a few times in an early unmodded Civ5 game I played. Rome had been taking a beating from three sides, and a militaristic city-state they were at war with snuck in and captured two of their cities (one of which was Rome itself!). Others have reported the same; there's one good succession game on this site that had the same thing happen.
It's just that in most games, CSs are basically there to get crushed. They don't have the same production as a regular civ, they won't have the same happiness (only one or two luxuries with no way to trade for more), and they won't have most strategics. One of the reasons I wanted to do this was to give them a fighting chance, because I've found that, BY FAR, the easiest way to win now is diplomatic. It's trivial to bribe the city-states into alliances when you have incomes of hundreds of GP per turn, and the only way then to guarantee stopping an AI diplomatic win is to either buy them all up first, or kill a few off.

I'm also kinda leary of trusting humans to supporting or propping up a C-S during a war.

Oh, I wasn't suggesting that that become the accepted strategy. Just that I've done it; give a City-State a few Giant Death Robots and just sit back and watch. If you can do this then you're perfectly capable of doing it yourself, really.
Although, I HAVE gifted combat units to city-states before. I played a game a few days ago where I was attacking the Mongols and one of my CS allies was on the far side of their empire. While I was winning handily on my side, the CS was getting beaten up on the far side, and I couldn't get to them; the problem was, as I mentioned before, the CS only had Laser Infantry (last resourceless combat unit) while being attacked by Skimmers and such. So hopefully the change I made in the jury-rigged unit will help here, but even so, you might still want to do this occasionally if your ally is getting beaten up before you can get there.

As a workaround (or test) give them the Medic promotion and see if they heal then? Depending on what happens, this may tell how the coding has been set up regarding Barbs not healing.

That's basically what the Regeneration I promotion already is. It's the "always heal" effect of March/Repair/Air Repair, linked with the three "+1 healing in this hex" effects of Medic (three effects because it's a different entry depending on whether you're in friendly, neutral, or enemy territory), just without the Medic's ability to help adjacent allies. So clearly this effect is unique to the Barbarian faction, because I know it works fine when I build one of my own.
(Actually, the Nessus has Regeneration II, which is +9 instead of +1 so that it'll heal fully every turn. The Troll also has that, and I think the Isle of the Deep too. But the rest is the same.)
 
Okay, but is there some way to fix that? Is there a flag in GlobalDefines.xml of "barbs don't heal" that I can turn off? (I'm not at home so I can't check.) Because healing barbarians is a pretty integral part of the whole mindworm thing.

there might be a define for it. there's a unit function ' CanHeal( plot ) ' and for barbs it returns false, so you'd think there's a plot somewhere they can heal on. maybe barb owned territory

although this bit of lua will work

Spoiler :
Code:
function barbarians ()

	local barbid = 63;
	local player = Players[ barbid ];

	if ( player:IsTurnActive() and player:IsAlive() and player:IsBarbarian() ) then

		for unit in Players[ 63 ]:Units() do
			if ( unit:IsHurt() ) then
				print( unit:GetName() .. " at x: " .. unit:GetX() .. ", y: " .. unit:GetY() .. " is hurt (unitid: " .. unit:GetID() .. ")" );
				unit:SetDamage( 0, barbid );
			end
		end
	end
end
Events.SerialEventGameDataDirty.Add( barbarians );

of course it will heal all barbs, you'll have to add some checks for those special healing ones
 
Okay, I put some of that city-state stuff on the back burner tonight. What I did manage to get working: TERRAFORMING.

Workers of all types can now plant forests and jungles once you hit Replaceable Parts. They pop up immediately after you finish the build; I was actually thinking instead of making a "tree farm" improvement that eventually turns into a forest after a few turns, but that'll wait for now.

Labor Mechs and Formers can also now raise or lower hills once you hit Ecological Engineering (which is a prerequisite for the Former's tech anyway, but not the Labor Mech's). Unfortunately, while the stats are changed, the display won't change until the next time you reload the game. (There's apparently no forced redraw.) But that seems a small price to pay.

Formers can do a full Terraform action once they're built: snow turns to tundra, tundra turns to plains, deserts turn to grassland. I might also give them the ability to change coast tiles to grassland and vice versa, but I really don't know what that'd do to the game since it'd now be possible to have deep ocean border land with no Coast tiles in between.
As with the hill thing, it doesn't change how the map looks until the next time you reload.

------------

I also found a really strange thing that works in my favor. If you take a standard land unit, like an infantry, and give it DOMAIN_AIR but make no other changes, you get a unit that moves normally with its standard movement rate, but auto-returns to its home city at the end of the turn (but since it has Range=0, the rebase command does nothing). Also, that "normal" movement can be on land or sea; you're not locked out of one of the two terrain sets. In other words, it's a lot like the aircraft in SMAC, except for the rebasing thing.

But if you also give it a Range, you get a very different scout unit; click anywhere on the map within that range, and the unit moves there (but ends its movement there, no moving around), but pops back to its home city at the end of the turn. Put a visibility promotion on the unit, and it'll spot foes near wherever it goes.
In other words, it's the Recon mission aircraft are supposed to have, except it actually works. And when I put the Range up to 99, I got a working Geosynchronous Survey Pod, exactly what I'd wanted.

----
You'll be able to see both of these for yourselves when I release the next version. v.0.06. Probably tomorrow night.

Just one question to anyone who knows Lua:

I want to check to see if a tile has a specific Improvement on it. A crude way to do this would be
local imptype = plot:GetImprovementType();
if(imptype == 21) then
but this sort of hardcoding is a bad idea, since it'd make it impossible to combine this with anyone else's mods. So I want it, instead, to check by name, say comparing GameInfo.Improvements[imptype].Type against the specific Improvement's name, say "IMPROVEMENT_BUILD_FOREST". But that doesn't work for some reason. Any ideas? (Is it the +1 indexing thing again?)
 
I also found a really strange thing that works in my favor. If you take a standard land unit, like an infantry, and give it DOMAIN_AIR but make no other changes, you get a unit that moves normally with its standard movement rate, but auto-returns to its home city at the end of the turn (but since it has Range=0, the rebase command does nothing). But if you also give it a Range, you get a very different scout unit; click anywhere on the map within that range, and the unit moves there (but ends its movement there, no moving around), but pops back to its home city at the end of the turn. Put a visibility promotion on the unit, and it'll spot foes near wherever it goes.
In other words, it's the Recon mission aircraft are supposed to have, except it actually works. And when I put the Range up to 99, I got a working Geosynchronous Survey Pod, exactly what I'd wanted.

I think this would be extremely handy during playtesting: simply assign yourself a free one of these, and then you can zoom in anywhere on the map to see whats going on at a specific moment. I think this would especially come in handy for playtesting your new updates for terraforming, as you can now see if (and especially how) the AIs are utilizing your new terraforming options as you can save a game every so often, then go back and compare terrain features to see if any of them have been mod’d, and if so how the AIs went about it.
Regardless, good stuff that, and I look forward to playing with this unit.

Okay, I put some of that city-state stuff on the back burner tonight. What I did manage to get working: TERRAFORMING.
Workers of all types can now plant forests and jungles once you hit Replaceable Parts.
Labor Mechs and Formers can also now raise or lower hills once you hit Ecological Engineering (which is a prerequisite for the Former's tech anyway, but not the Labor Mech's). Unfortunately, while the stats are changed, the display won't change until the next time you reload the game.
Very nice approach to these items! Couple questions on this:

1) My first thought here is that I see human players utilizing this to enhance/ optimize their specialized cities, whereas the AIs don’t understand this concept. Do you consider these items something that can be exploited by human players?
2) Previously I thought you’d said your mod is an add-on to the end of the game, and that it is intended for those who start in the ancient era and want to play further than the base game allows (or did I misinterprete you here?). If so then I would imagine all of the terrain has been terraformed by this point in the game (i.e. by the time of Ecological Engineering and Replaceable Parts), so how does the AI handle changing terrain already improved?
That's basically what the Regeneration I promotion already is. It's the "always heal" effect of March/Repair/Air Repair, linked with the three "+1 healing in this hex" effects of Medic (three effects because it's a different entry depending on whether you're in friendly, neutral, or enemy territory), just without the Medic's ability to help adjacent allies. So clearly this effect is unique to the Barbarian faction, because I know it works fine when I build one of my own.
So I think what this is implying is that in the SDK heal subroutine there is a line somewhere near the beginning which simply states “if Barb then exit” without healing the Barb unit(s) on a turn by turn basis. Does this sound correct?

D
 
So I want it, instead, to check by name, say comparing GameInfo.Improvements[imptype].Type against the specific Improvement's name, say "IMPROVEMENT_BUILD_FOREST". But that doesn't work for some reason. Any ideas? (Is it the +1 indexing thing again?)
GameInfo.Improvements[index] = a table of the improvement (info for each column or select * from improvements) not a direct value, so its that table that has to be indexed

Code:
> print ( GameInfo.Improvements[ 1 ].Type )
 IMPROVEMENT_BARBARIAN_CAMP

for imp in GameInfo.Improvements() do
	print ( imp.Type )
	print ( imp.ArtDefineTag )
	print ( imp.RiverSideMakesValid )
end
 
GameInfo.Improvements[index] = a table of the improvement (info for each column or select * from improvements) not a direct value, so its that table that has to be indexed

I thought that's what I'd done. As I said, I used
GameInfo.Improvements[imptype].Type
where imptype = 20, 21, 22, etc. for my new improvements. (And yes, it checks for the -1 first.) The .Type should have returned "IMPROVEMENT_BUILD_PLANT_FOREST". And yet, the == fails. (Incidentally, where are you typing this Print command to see that?)
I also tried seeing if there was an analogue for TerrainTypes.TERRAIN_DESERT, which is what I check against when terraforming. Something like ImprovementTypes.IMPROVEMENT_TERRAFORM. But that didn't work either.
 
1) My first thought here is that I see human players utilizing this to enhance/ optimize their specialized cities, whereas the AIs don’t understand this concept. Do you consider these items something that can be exploited by human players?

Depends. Forests are pretty neutral in terms of power; for one thing, the Lumbermill is one of the last Improvements to get "upgraded" in this mod. (It's T19; only the Fishing Boat and Camp get any boosts at T20, and both of those already had earlier boosts at T15 and T16, respectively.) So you might actually lose more than you gain by building these; they're really more like a flat-terrain Mine.

And on a related note, I'm shuffling some of the improvement upgrades. Farms were +P, I'm changing that to +G. Mines were +2 research, I'm splitting that into +P and +R. Why? Because Mines had become superfluous; Farms were generally +2F +1P, trading posts +2G +1P, and here's the Mine giving +1P and some research. These are the three improvements that don't require a resource or feature (lumbermill), so they can directly compare. Obviously the Mine was still the best choice if there was a resource that needed it, but other than that?
So now the Farm will be +2F +1G, the Trading Post +2G +1P, and the mine +2P +1R. Closing the circle would either require the mine to be +food, or add a fourth "regular" improvement that adds +2 research, +1 food. Some sort of research lab terrain; hmm, I'm thinking the Kelp Farm from SMAC for water tiles... that might actually work.

2) Previously I thought you’d said your mod is an add-on to the end of the game, and that it is intended for those who start in the ancient era and want to play further than the base game allows (or did I misinterprete you here?).

No, that's still the general idea, although for testing purposes I'm obviously violating that. Realistically, I'm just aiming to have the game be playable as long as you start no later than Industrial. Late-era starts are this mad dash for Wonders, or all-out assaults using units the opponent has no hope of defending against. So they're decent for testing, but lousy for fun.

If so then I would imagine all of the terrain has been terraformed by this point in the game (i.e. by the time of Ecological Engineering and Replaceable Parts), so how does the AI handle changing terrain already improved?

I'm assuming by "terraformed" you mean "improved", and you're right, nearly every tile should be improved by this point. The short answer is that I'm betting the AI CAN'T handle this, because the UNITAI_WORKER probably has no comprehension of this entire setup. I'll do what I can to adjust this. And it should evaluate this the same way it does any other potential improvement: if the revised yield is more desirable than the existing tile, no problem. The fact that the forest will eventually get a lumbermill isn't actually a problem, because the actual mechanism is this:
> The Build action creates the "Build Forest" improvement on the terrain.
> Every time an improvement is created, the Terraform.lua script checks to see if the just-built improvement is of type IMPROVEMENT_BUILD_FOREST. (There are four blocks in this LUA file; one for BUILD_JUNGLE, one for RAISE_LOWER_HILLS, and one for TERRAFORM. The logic is similar for all.)
> If it is, then destroy the improvement and add the Forest terrain feature to the tile.
> Jungle is nearly identical. Hills has an if check that toggles PlotType.PLOT_HILLS with PlotType.PLOT_LAND. Terraform changes TerrainType to a new value. But they're all based on creating a temporary Improvement and then deleting it when you alter the terrain.
(Side effect: this always destroys the improvement currently on the terrain, if any.)
So if the AI uses only yields to assess, then the simple solution is to give the Build_Forest improvement (the thing that lasts for a split-second before being deleted) the yield of a forest plus a lumbermill. If that's better than the improvement currently on a tile, the AI should consider the change.
(Obviously, this is speculative)

But really, the "advanced" terraforming isn't much of an issue, because it comes so late in the game; by the time you build a Former, the game's basically over. It's only the forest/jungle planting that could actually matter, and as I said above, it's not a substantial advantage to the player if the AI never uses this.

So I think what this is implying is that in the SDK heal subroutine there is a line somewhere near the beginning which simply states “if Barb then exit” without healing the Barb unit(s) on a turn by turn basis. Does this sound correct?

That's what I'm guessing. I'm looking into patching this by hand to force Barb Psi units to heal, along the lines of the previous suggestions; other than the Nessus Worm they all heal at the same rate, and the Nessus was a bit too overpowered for barbs anyway so I'm okay with toning down its regeneration for them.
 
you have to make sure the string you use in the " GameInfo.Improvements[imptype].Type == string " is correct. if 1 == 1 it will always return true, it can't fail.

where to type print, it's in the tuner's console, when the game is running. you cant expect to run any kind of lua without having the tuner running :)

and the TerrainTypes table is the same kind of thing

Spoiler :
Code:
> for key, types in pairs(TerrainTypes) do print( key, types ) end
 InGame: TERRAIN_DESERT	2
 InGame: NO_TERRAIN	-1
 InGame: TERRAIN_PLAINS	1
 InGame: TERRAIN_OCEAN	6
 InGame: TERRAIN_TUNDRA	3
 InGame: TERRAIN_GRASS	0
 InGame: TERRAIN_HILL	8
 InGame: NUM_TERRAIN_TYPES	9
 InGame: TERRAIN_MOUNTAIN	7
 InGame: TERRAIN_COAST	5
 InGame: TERRAIN_SNOW	4
 
you have to make sure the string you use in the " GameInfo.Improvements[imptype].Type == string " is correct. if 1 == 1 it will always return true, it can't fail.

Pretty sure I had the string correct. I'll post the code when I get home. The only headache I have is that I keep typing "eq" instead of "==" when using strings, because I do a lot of PERL work. And != instead of ~=, that sort of thing. But I fixed all of those sorts of errors long ago.

I've tried something like this in a previous block of lua code, and it didn't work there either; in that case, there was no explicit string matching, I was just trying to write a block of code that would take the Improvement type the tech tree was displaying a yield update for, figure out which Build type matched that Improvement type, and then use the Build's icon. I think the logic was sound, but it just didn't work. It'd claim that there were no matches.

where to type print, it's in the tuner's console, when the game is running. you cant expect to run any kind of lua without having the tuner running :)

Strange, I've been using the .lua in the mod just fine without running anything extra. But that would help for debugging other stuff as I go. I'm going to try doing all the event stuff tonight and see what happens. And if I can get it to do the matching I mentioned earlier, that'll help a bit as well.

and the TerrainTypes table is the same kind of thing

No, I got that. The Terrain part works just fine. What I meant was, is there an ImprovementTypes table with a similar construction, or do those tables only exist for the "pre-game" stuff like Terrain types and Plot types? And do these automatically update if I add a new Terrain/Improvement/whatever, or am I going to have to hack another .lua table file like the one for worker actions to get it to recognize the new entry?

And here's another question on a different topic:
In the core game, all of the sound files are stored as .mp3s. I have a hundred or so audio files I want to add to the mod; sound bites for the new techs and wonders mostly, but also some attack sounds and such for the new units. (These are all taken directly from the SMAC directories, so anyone else will be able to create their own package.)
So the question is, does Nexus have a way to pack these all up into a single package file, or am I going to have to add them all individually by hand through ModBuddy? The fact that the core game's files were loose instead of in a package is discouraging.
And on a related note, is there an .lua index file for those, that translates the AS2D_WHATEVER entry into the .mp3 filename, again along the lines of that worker button file? There are just so many files that it's hard to keep straight.
 
yeah coming out of work with perl and into lua those kind of syntax things happen. and then going back to perl and the lua syntax creeps up in there when typing stuff ;)

as for the tuner its not necessary... what i mean is that with it you'll have a much better idea what the lua is doing, its for debugging plain and simple. the console takes your own script you type in and execute it, much like a shell for example. an extremely useful tool. i usually have the tuner open for lua stuff, and a sqllite browser open for the xml stuff

and there's a lot of tables available, but i dont think there's one for improvements. afaik these are built from the db when the game starts. TerrainTypes is the same as GameInfo.Terrains(), with the exception that gameinfo also has all the other column values whereas TerrainTypes only has the id and Type

as for nexus and sounds, i don't know anything about those
 
Yes it is. But the way I understand it, this sort of thing generally falls under the "Fair Use" clause; we're not profiting from it, we're not trying to supersede the original or reduce its commercial value, and there's a practical limit to the quantity of material that mods can use from the original work. (As I said from the start, this isn't even close to a full conversion; for one thing, it's not set on Alpha Centauri.) I'll switch to a more original name for the final mod before I upload it, too; suggestions are welcome.

Obviously Firaxis has a say in the matter, but there have been SMAC-related mods in previous Civ games as well. I'm using FAR less of the original game than, say, the Civ4 Planetfall mod. I won't be providing the sound/video assets; if you have your own copy of SMAC you'll be able to just copy the files over yourself. (And if you don't have a copy of SMAC, what's wrong with you?) So all I've used from the original game, so far, are a few tech/building icons, some civilopedia quotes, and the names of various techs/buildings (most of which are real-world concepts).

Now, the big problem would be if Firaxis decides they want to make their own SMAC expansion for Civ5, like they did with Colonization for Civ4, because then they could argue that AC-related mods could reduce its value. And if they do that, then I'd be first in line to buy it. But until then...
 
Okay, I got the Lua compatibility problem solved, so I've just posted v.0.06 to the first post; before the fix, this mod wouldn't be compatible with any that added new Improvements; it's still somewhat incompatible in that merging the action button icon lists has to be done. And it uses Ingame.xml, so that's more merging. But the functionality of the rest should be fine.
The big features (tech tree icons, terraforming, and resourceless units for city-states and barbarians) have already been discussed and the rest are minor balance changes. I was hoping to have figured out how to award the Centauri Ecology tech for this version, but I haven't quite got it there yet. (The problem is that it's supposed to trigger when the spaceship launches, not when some building is created.) So v.0.07 will probably be Sunday-ish, and I hope to have a lot of the missing Wonder effects implemented by then.

v.0.06, dated 11/25
> On the tech tree, the techs where an improvement’s yield is improved now use the black-and-white Build icon for that improvement instead of the default star.
> On the tech tree, the techs where a route’s movement is increased now use the black-and-white Build icon for that route type instead of the default star.
> On the tech tree, the techs where a new unit promotion unlocks now indicate this with the default star.
> Four new worker actions were added:
At Fertilizer (Renaissance Era), Workers (and all of their successors) gain the ability to plant forests and jungles.
At Ecological Engineering (Fusion Era), Labor Mechs and Formers gain the ability to create or remove hills. This destroys any improvements on that hex. (Graphics do not update until you reload.)
Formers (Nanotech Era) have the unique ability to terraform land: Snow turns to Tundra, Tundra turns to Plains, Desert turns to Grassland.
> The Living Refinery now requires one of the three resources to be found locally. The player would obviously do this already, but there was nothing stopping the AI from being stupid.
> Barbarians can’t build any future units, except for the four Psi units and the Laser Infantry. I’m not sure how they’d make Psi units without omnicytes, though; probably not, since they seem to stop at Laser Infantry and Destroyers.
> City States can’t build any Titans (or non-titan Nanotech-era satellite units) except for the Nessus Worm.
> New unit: Secondhand Stealth Ship. Same unit class, only available to city-states, no resources, but 35 ranged instead of 40, 6 moves instead of 7, and 45 attack instead of 50. Cost 500 instead of 600.
> New unit: Secondhand Plasma Artillery. Same unit class, only available to city-states, 35 combat instead of 40, 50 ranged instead of 60. Cost 700 instead of 800.
> New unit: Secondhand Vertol. Same unit class, only available to city-states, no resources, but 6 moves instead of 7 and 55 attack instead of 60. Cost 500 instead of 600.
> New unit: Secondhand Needlejet. Same unit class, only available to city-states, no resources, but 14 range instead of 16 and 80 attack instead of 90. Cost 900 instead of 1000.
> New unit: Secondhand Gravtank. Same unit class, only available to city-states, no resources, but 80 attack instead of 90. Cost 900 instead of 1000.
> New units: Wild Mind Worms, Wild Isle of the Deep, Wild Chiron Locusts, Wild Nessus Worm. Same stats as the originals, but no resource requirement. Only available to the Barbarian civ.

> The Barbarian and Minor civs cannot build the new Wonders.
> Former loses the Hovering Unit promotion and gains the All Terrain promotion, which will eventually allow it to move across water as well.
> The four SS parts obsolete at Centauri Ecology. That way, if you start in a late era (getting the tech for free) the AI doesn’t waste time building components that do nothing.
> Previously, the orbital weapons and Needlejet were classified as Bombers. I’ve created two new UnitCombatTypes; the Multirole type now combines the features of the bombers and fighters, while the Orbital type is more like a siege unit in terms of promotions (vs Open and vs Rough instead of by unit type).
> Bombers and Needlejets can now use the Soporific Gas promotion. Orbital weapons can take the EMP promotion, although the Ion Cannon starts with that and the Geosynch and Subspace Generator deal no damage, so it’s pretty much just Death Ray.
> The Empath, when building a Monolith, now has a placeholder icon instead of a blank box.
> Build costs for Longevity Vaccine (1300) and Clinical Immortality (1400) were backwards.
> Changed the increments used on the game speeds. It now spends 50% more turns at the early speeds (when you might have 40 years per turn), but reduces the increment to compensate. The result is that starts in a given era should still start you at approximately the right year. It’s still 1000 extra turns on Marathon (normally 1500), 750 on Epic (normally 750), 500 on Standard (normally 500), and 320 on Quick (330 normally). The years have been adjusted for starts in all eras on Standard pace; other game speeds will have the correct numbers of turns but the years might not match up well.
> The Geosynchronous Survey Pod is now an Air unit without the <immobile> flag. The upshot of this is that the unit rebases, moves from its home city, and then snaps back to it at the end of each turn.
> (Crazy Spatz) The core game is 2+1.0*pop unhappiness per city, 5+1.34*pop per captured city. I’d previously increased the constants to 4 and 8. I’ve moved them back down to 3 and 6, but also upped the variables from 1.0/1.34 to 1.2/1.6. The break-even point is 5 population; larger cities will need to make more happiness-boosting buildings, or your empire will need to acquire more luxuries.
> Eudaimonia (SP) was supposed to unlock at Planetary Networks, but I’d left it at Centauri Empathy by accident.
> Instead of +2 research at Graviton Theory, Mine improvements now get +1 production at Nuclear Fission and +1 research at Graviton Theory.
> Instead of +1 production at Centauri Ecology, Farms now get +1 research there.
> The Gravity Shield now adds –1 Happiness but has its defense increased to 30.
> The Robotic Assembly Plant now adds –1 Happiness.
> The Monolith (created by the Great Empath) uses the artwork intended for the African “landmark” improvement (while the actual Landmark only uses the European style).
 
Okay, to whoever already downloaded it (there was one person), the v.0.06 that went up first had one very minor bug:
For debugging purposes, I'd divided the build times for the four new terraforming actions by 100. So normally, they're supposed to take 1000 for the plant forest/jungle, 2000 for raise/lower hills, and 3000 for terraform. (That means 10, 20, and 30 turns divided by the usual era dependencies; for reference, most of the Pasture/Plantation/etc. type stuff is 500-700.) But instead, they were set to 10, 20, and 30 instead, meaning all would complete in one turn; great for debugging, not very balanced for play.

There's a revised version in the first post.
 
really doesnt matter this is just a mod no one is profiting, if anything it makes more people aware of SMAC and thats a good thing

+1 :goodjob:

And of course there is Maniac's Civ 4 Planetfall mod which utilizes some of SMAC's material, and no one has objected to that.

Spatzimaus said:
But really, the "advanced" terraforming isn't much of an issue, because it comes so late in the game; by the time you build a Former, the game's basically over. It's only the forest/jungle planting that could actually matter, and as I said above, it's not a substantial advantage to the player if the AI never uses this.

Thats an awful lot of work on your part for what essentially is amounting to an afterthought in your mod. Or is this why your calling it "Crazy Spatz's Mod", cuz your just crazy like that? :crazyeye:

Another thought I've had is that you are really the trailblazer here in regards to ciV sci-fi mods, as yours is one of the first, and one of the most advanced to date. Question: do you see your mod in this role in that your mod is providing a plethora of examples for other sci-fi modders (like myself) to utilize in the future (pun intended)?

Anyways, back to being more on-topic: because Barbs in ciV become less numerous as the game goes on, but because you want the game to mimic SMACX in that Fungal Blooms occur more often in the later game, have you looked into what coding controls this aspect? I've only seen an XML parameter which is associated with distance between camps, so I am assuming that the coding involving Barb camps dieing out over time is associated with SDK instead, and am kinda hoping its coded in such a way that the "polarity can be reversed" so to speak in that its a relatively simple tweak to the code. Any thoughts from your end on this?

I've DL'd your latest updates and will try to get to this evening. Am also hoping to shortly start to look more intently into what your doing with the XML and LUA for each of these aspects, so that I can start providing better feedback in this regards as well.

Edit:

> Changed the increments used on the game speeds. It now spends 50% more turns at the early speeds (when you might have 40 years per turn), but reduces the increment to compensate. The result is that starts in a given era should still start you at approximately the right year. It&#8217;s still 1000 extra turns on Marathon (normally 1500), 750 on Epic (normally 750), 500 on Standard (normally 500), and 320 on Quick (330 normally). The years have been adjusted for starts in all eras on Standard pace; other game speeds will have the correct numbers of turns but the years might not match up well.

Just started a game on Industrial/ Standard and noted that it now takes approximately 50+ turns to research my first tech (previously it was a manageable 20-ish turns which very quickly ramped down as cities grew and facilities were built). Question: is this an intended side-effect of the above change (or an intended side-effect of another change you've made?)?

D
 
By the way, I did an Ancient Era start last night, and I have to say, the change I made to population happiness has a HUGE impact. 2+1/pop was easily manageable, 3+1.2/pop has been crippling since my starting area was short on luxuries but had plenty of strategics. And I kind of like it; there's now a major motivation not to expand too much, which really seems to level the playing field with the AI.

But I could use more feedback on this specific point. Is it too much? (One change I've been considering for a while is changing the Temple from +3 culture to +1 happiness and +2 culture. If you play as Egypt and make Burial Tombs, you can see how critical that early-game happiness can be.) Thoughts?

Thats an awful lot of work on your part for what essentially is amounting to an afterthought in your mod. Or is this why your calling it "Crazy Spatz's Mod", cuz your just crazy like that? :crazyeye:

A little from column A, a little from column B. Don't get me wrong, I want the AI to do this, and I've found a way to make it actually do so; Improvements have a Flavor table, it's just that the core game didn't use it, leaving them all set at 0. So I gave my new actions some flavors (production for forests, research for jungle, tile improvement for terraform). That didn't quite seem to do it, but then I tried something new: giving the temporary Improvement some pluses. It actually seemed to work; I'd start to get my new actions as the suggested builds when I moved to a new hex; presumably, the AI is using the same logic.
The only real problem is that this looks bad to a player; they see a "Plant Forest" action that says "+2 production", when in fact it's not giving +2 production. And that worries me about the AI, because it could get into a loop: if it decides planting a forest is the best action on a spot, but the resulting forest doesn't give it the production it's expecting (since there's no lumbermill on it yet), would it just repeat the process over and over again?

But even if it never works, I'd still consider this to be a decent use of time, in that it's helped me learn some aspects of the .lua coding in a way that's very easy to test (since a Transcendence start gives you 4 combat engineers).

Another thought I've had is that you are really the trailblazer here in regards to ciV sci-fi mods, as yours is one of the first, and one of the most advanced to date. Question: do you see your mod in this role in that your mod is providing a plethora of examples for other sci-fi modders (like myself) to utilize in the future (pun intended)?

Not really. I wanted to get something out first mainly as a motivating tool for myself; I have a job, I have other hobbies, I have other video games I play. If someone else already had a fairly complete future-era mod out, then I probably couldn't convince myself to spend the time to make the mod I wanted, and Civ5 would get shelved as soon as I got tired of the core game. That's what happened in Civ4; I'd planned out this mod in extensive detail, but I was busy writing my PhD thesis at the time and couldn't devote any real time to it. By the time I was free, there were plenty of other good mods out there, like Planetfall. So why bother? I'd play those other mods a few times, and then I was done.

Anyways, back to being more on-topic: because Barbs in ciV become less numerous as the game goes on, but because you want the game to mimic SMACX in that Fungal Blooms occur more often in the later game, have you looked into what coding controls this aspect?

It looks I'm going to brute-force it using .lua. At the start of each player's turn, it'll check to see if they have launched the spaceship. If so, do a random draw; a small percent of the time (5-10?), create a new Spore Tower (immobile unit) in their territory on a tile not containing a unit, destroying whatever improvement was already there (and probably replace it with City Ruins or something), and spawn a Wild Mind Worm in an adjacent tile. Assuming that there's randomization in .lua, the only headache is the check for the spaceship; it'd be easy enough to check for the Centauri Ecology tech instead, but I'll need that spaceship check for other things already (like, say, awarding Centauri Ecology in the first place).

And then on the Barbarian civ's turn, check all surviving Towers in their unit list. Give each, say, a 20% chance to spawn a Mind Worm, a 10% chance of a Chiron Locust, and a 5% chance of a Nessus Worm each turn. I'm not sure what to do about Isles of the deep, though; I could check to see if the tower is coastal and if so spawn it in a water hex nearby, but the other possibility is to create a special naval version of the Tower with a different spawn table (just Isles and Nessus Worms).

I've only seen an XML parameter which is associated with distance between camps, so I am assuming that the coding involving Barb camps dieing out over time is associated with SDK instead,

Actually at least part of it is in the Eras.xml file. Each era has a "NoBarbUnits" and "NoBarbCities" entry, governing the appearance of random wandering barbs and camps, I think. Currently, the first goes to true in the Industrial and the second in the Modern. Starting in a later era will put still barb camps on the map, but it won't make new ones once you've cleared them.
I'd boosted that to Nuclear and Digital, but then last night after I posted v.0.06, I just set them all to false all the way through to the end. So leaving uninhabited areas on your continent is dangerous even in the last few eras; but really, any civ that can't hold off the occasional attack with gravtanks and orbital weapons really deserves to die.
The bigger problem is that it's probably hard-coded in the source code that Barbs don't spawn inside visible territory. That lua code above seems like an easy way to get around that limitation, but we'll see.

Am also hoping to shortly start to look more intently into what your doing with the XML and LUA for each of these aspects, so that I can start providing better feedback in this regards as well.

Well, the XML is nearly done, but I'm digging into the .lua now to see what can be done with the missing events and wonder pieces. My absolute top priority is getting the spaceship to give the player Centauri Ecology. Everything else is minor in comparison; as soon as I get that working, this'll be stable enough that I'll start thinking about publishing it through the mod browser.

Just started a game on Industrial/ Standard and noted that it now takes approximately 50+ turns to research my first tech (previously it was a manageable 20-ish turns which very quickly ramped down as cities grew and facilities were built).

Unfortunate but kind of intended. You see, that 50+ turns sounds horrible, but the problem is that if you started at 20ish for the first tech, then once you got to, say, the Fusion Era, new techs would come every 1-2 turns despite their increased costs. The era-based cost discount seems to apply evenly, so adjusting one of those numbers adjusts the others. I'm trying to find a good balance on this.
What's mainly causing it is the ratio of the tech costs. In an Ancient era start, your first few techs are dirt cheap and then it ramps up nicely, but in an Industrial start, you're starting on a plateau of sorts, where the cost of your first tech is nearly as much as the next dozen.
I think another part of the problem is that +research buildings provide too much. Look at gold; the buildings provide +25%, +33%, +40%, that sort of thing. But research? 50* (the Library), 50, 50, and 100. (That's why I set the Research Lab back down to 50.) And normally, bonuses are purely additive (so +25% and +40% gives you +65%, not x1.75), but the Library's effect is multiplied by the others. So research adds up FAST as cities develop. In an Industrial start, you'll get free Libraries in your cities, but no Universities, Public Schools, or Research Labs (for reference, Universities are given in any Fusion Era start or later). Universities will be a high priority for you, and so your research rate will increase quickly.
And then there's an issue of population. An Industrial Start only gives you size 3 cities, but you should be getting a free Granary and Aqueduct in each city, so with the tech-boosted Farms you should be able to grow cities very quickly. (Especially if you use your starting cash to bribe a Maritime.) A player who reaches Industrial the long way will have much larger cities at first.
(The solution for this might be to bump up the city starting sizes for later eras. Currently, Renaissance is the first era with ANY extra population, starting at size 2, Industrial is 3, Nuclear is 4, and so on up to 8 for Transcendence. But if I started the boosting an era earlier, then Industrial cities would start at 4 pop, which is a big jump in research rate.)

The real question is, how long does the SECOND tech take to get? After all, the first twenty turns will be spent just placing cities, developing the terrain, connecting the cities, and building the essential city structures that weren't automatically provided for you (like that University). So I don't really see it as a problem that you wouldn't get a tech during THOSE turns, but once it's all stabilized, what's the pace? After 50 turns, your cities should be a decent size and you'd have Universities, so at that point I'd think you'd be on the normal progression track. But yes, that means a dead time at the start.

If this seems like too much of a problem, it's easy enough to hack in .lua; if you haven't researched a tech yet, double your beaker rate each turn. As you research the first few, decrease the boost, so that once you get to about the fifth or sixth tech you're at the normal rate. It's sort of similar to the Tech Diffusion mod, so it shouldn't be too hard.

And for reference: in the core game, starting at the Industrial era (or later) makes all techs cost only 20% of their listed amounts. Renaissance is 33%, Medieval is 50%, Classical 67%. It's a huge dropoff, which only makes sense if you think of an industrial start as being an "endgame" start where your cities will never have time to reach full size.
In my mod, it's currently 80% Classical, 70% Medieval, 65% Renaissance, 60% Industrial, 55% Nuclear, 50% Digital, 45% Fusion, 40% Nanotech and Transcendence.
 
Top Bottom