Crazy Spatz's Alpha Centauri Mod

I've just Had One of my cites demand neutronium.

since it dosent reaveal until MUCH later on, maybe you could stop making it a luxury?

Luxuries don't work that way. Adding happiness to a resource automatically adds it to the list of possibilities, although for some reason cities will never demand non-map resources like Information or Ambrosia. The game doesn't actually care whether you classified it as a Luxury or not. (Very sloppy programming.)

Don't worry about it. If you go into the city screen, you'll notice that it's not ACTUALLY demanding neutronium. In the version you have, when a city demands a luxury with a tech prerequisite (i.e., neutronium), it'll immediately reset the demand to nothing, so that you can't get stuck like that; you'll still get the demand popup, but nothing beyond that. In the upcoming version, I have the city also then try to pick a new resource; if it picks Neutronium again, it'll reset on the following turn and try again, and so on. I'm still trying to test that part to make sure it works like I think it does. If it works, then I might try to figure out how to override the UI part to not give that popup.
 
Okay, the new version will be fairly soon. Unfortunately, there's some bad news, and I NEED feedback to resolve it:

SDI doesn't work.

It literally does nothing. I tested this by moving it to Agriculture, settings its interception rate to 90%, setting the cost to 5 hammers, and then giving myself ten atomic bombs. Every one got through.

Apparently, the <NukeInterception> tag isn't connected to anything after all, and neither is the ChangeNukeInterception Lua function that ties to it. The game stores nuke interception in the active database, so you can retrieve it to find out what kind of defenses everyone has against nukes, but it doesn't apply it to actual nuke attacks. Every nuke gets through, no matter how high you set the number. I get more disappointed with these programmers by the day...

I can write a Lua function that intercepts nukes the hard way, by killing the unit before the combat starts (which I've confirmed DOES work to stop the attack, while still causing the target to hate you just as much). The problem is simple: there's no way to know where a nuke is targeted. That information just isn't being passed to RunCombatSim, so I have no way to figure out WHICH civ's nuke defense to use.

So I thought up a way around that: Add the nuke interception ratings of every major civ at war with the launching civ. After all, if America and England were at war with Russia and the Russians launched a nuke at England, America wouldn't just sit back and let it past; they'd shoot it down with their orbital defenses, because the enemy of my enemy... is my enemy's enemy, no more, no less. But they'd still shoot it down.

I'd have to curve it somehow to keep the number from getting too out of control, but it SHOULD work. I'll see if I can get something functional for the next version. But the question is, does this sound like a decent compromise? In a one-on-one war it'll work correctly (and this'll let you protect allied city-states as well), in an all-out war things'll get averaged a bit.
 
So if your killing the nuke before it hit it will do NO damage right? So this option is an all or nothing option? Do you have any contact with the devs? If you dont I would at least try, maybe you can get some answers to alot of questions you have. I would at least try. Oh btw, I had to stop playing my last game as it was crashing way too much. I got to the Apollo program but it never gave me the option to build it. So that meant I couldnt build the spaceship parts. So I started over.

To be clear, the "Spaceship Victory" condition is necessary for the projects that lead to that tech, but "winning" that victory doesn't actually win the game.

I think you meant to say the "Science Victory" I have set this option in this game but only time will tell if I can build the Apollo program.

Chaotic Law
 
So if your killing the nuke before it hit it will do NO damage right? So this option is an all or nothing option?

Right, but nuke interception always was all-or-nothing. To be clear, this is separate from the nuke defense rating of the Military Base, Perimeter Defense, and Gravity Shield; those reduce the amount of damage that a city takes from a nuke attack, but do nothing to protect nearby units. Those buildings still work just fine; this particular bug affects the Manhattan Project, SDI, and Orbital Defense Pods.

Do you have any contact with the devs?

None at all. There was a thread on this board of bugs that the devs had supposedly paid attention to for a while, but considering how many of the very simple bugs were NOT fixed in the patch that just came out, I don't have high hopes for fixes on their end.

I think you meant to say the "Science Victory" I have set this option in this game but only time will tell if I can build the Apollo program.

It's stored internally as VICTORY_SPACE_RACE. I tend to think in terms of the internal mechanisms, because I spend so much time there. But yes, it's the same thing; the Apollo Program and all of the spaceship parts need to have that enabled.
 
Luxuries don't work that way. Adding happiness to a resource automatically adds it to the list of possibilities, although for some reason cities will never demand non-map resources like Information or Ambrosia. The game doesn't actually care whether you classified it as a Luxury or not. (Very sloppy programming.)

Don't worry about it. If you go into the city screen, you'll notice that it's not ACTUALLY demanding neutronium. In the version you have, when a city demands a luxury with a tech prerequisite (i.e., neutronium), it'll immediately reset the demand to nothing, so that you can't get stuck like that; you'll still get the demand popup, but nothing beyond that. In the upcoming version, I have the city also then try to pick a new resource; if it picks Neutronium again, it'll reset on the following turn and try again, and so on. I'm still trying to test that part to make sure it works like I think it does. If it works, then I might try to figure out how to override the UI part to not give that popup.

I get it. i just checked and it's asking for furs now.
 
I'm having very slow turn loads followed by a repetitive crash in the end of the industrial era.(whenever i restart the same thing happens)

Is there a way to fix this?
 
I'm having very slow turn loads followed by a repetitive crash in the end of the industrial era.(whenever i restart the same thing happens)

Is there a way to fix this?

I have no idea what's causing it, and I'm not seeing those crashes in my own games. It's possible that something in this last patch screwed it up; I haven't played a full game since the patch, because I've been too busy working on the SDI fix.

A crash at the end of the Industrial Era could be a number of things. That's when the four new national wonders are unlocked, it's when the GP improvements get boosted, and most importantly, the start of the Nuclear is where you gain the ability to plant forests and jungles. We've known for a while now that the terraforming options, since they require deleting an improvement, are prone to crash issues (and that's not my mod, you get that when replacing a trading post with a mine or something), but it might depend on your machine's stats.

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

And on that note, I want to mention the SDI change. I've got two basic options I'm considering. In both cases, the calculated chance of interception is modified by nuke type: Atomic Bombs multiply by 1.5, Nuclear Missiles by 1.0, Planet Busters by 0.5, and Subspace Generators by 0. Since there's no way to tell who the intended target of a nuke is, I'm calculating the percentages for each major (non-city-state) civ at war with the launching civ, and modifying their average in one of the following ways:

A> STRAIGHT AVERAGE
Manhattan Project adds 20%, SDI adds 40%, ODPs add 4%x10, total 100%.
I'd simply take the average of the enemy civs' values, dividing the total value by N.
PRO: Easy to calculate. Absolute caps (PBs would never have more than a 50% chance of failure, pre-SDI civs would never go above 30% chance vs Atomic Bombs). Noticeable effect with even partial defenses in a 1-on-1 war.
CON: Abuseable; if I'm at war with you and want to nuke you, I simply declare war on a civ that I know has no nuke defenses, and it reduces your chances of defending yourself by half.

B> DIMINISHING AVERAGE
Manhattan Project adds 10%, SDI 30%, ODPs add 2%x10, total 60%. Same type multipliers as before. (ODPs also reduce the damage dealt by orbital beam weapons by 5%, so don't think that this'd make them too weak to build.)
The difference is, instead of dividing the sum by N, I instead multiply it by (N+1)/(2*N).
That is, if you're at war with 1 civ, the total is multiplied by 1.0. Against two civs, it's times 0.75, meaning 1.5 times the average. Three civs is 2.0 times their average, four is 2.5 times the average, and so on.
So while a single civ with MP and SDI would have a 40% chance of intercepting, if you're at war with four civs that all have that, you'd hit 100% for Nuclear Missiles.
PRO: It's a lot harder to weaken a civ's nuke defenses by declaring war on someone else this way.
CON: There are no absolute caps any more. If you're at war with 9 civs at once (which'd be stupid, but work with me), and they've all built the Manhattan Project, you'd see a 50% interception rate for Nuclear Missiles and 75% for Atomic Bombs. And it'd be possible to reach a 100% interception rate against Planet Busters if at least four civs are involved, despite their 0.5 multiplier. Conversely, attacking a single civ at a time would give you a fairly good chance of getting nukes through, because that one civ's defenses would be too weak by itself.

The logic is that while you'd pool your defenses, each civ would defend its own territory first and foremost, so only a fraction of the benefit from SDI and ODPs and such would apply to your allies. This'd really penalize civs that declare wars on several civs at once (i.e., players), and give you motivation to make peace with those remnant civs that are no longer a threat.

C> LIKE B, BUT WITH CAPS
It wouldn't be hard to modify B to include a few hard-set caps, like saying that Planet Busters can never have more than a 50% chance of being intercepted no matter how stacked the defenses are. (75% for Nuclear Missiles, 90% for Atomic Bombs?) This'd also allow for some minimum caps as well, where a 1-on-1 war sees a boost to both sides (say, +10% for the Manhattan Project and +10% for SDI?)

As you can guess from the way I phrased this, B is what I have in there now (or it will be, once I set the values back to their non-debug versions; right now, SDI has a 90% interception rate and a cost of 5 hammers, and unlocks at Agriculture...). Obviously, the balance on it's a bit flaky. The bigger problem is simply one of UI; I'm trying to code up some way for the game to tell you when a nuke is intercepted, and I'm also trying to figure out a good way to express this system in the Civilopedia and/or help texts. If you thought explaining the spaceship/Breakout was difficult, this is going to be nuts.
But it does the essentials: weapons get intercepted without dealing damage, and that's the important part. The math is just me fine-tuning the system to have the sort of balance I'd like.

Thoughts?
 
Okay, as you may have noticed I didn't post a new version this weekend. I'm hoping for tonight or tomorrow, but I'm really swamped at work and spent most of the weekend there working on something I needed for today. (Remember a couple weeks ago when I said that I was going to be busy with real life for a month or so? Yeah, this is that.)

While I could upload what I have now of the mod, I never like posting something that I haven't actually played even a partial game of, and as you can see from the above post the nuke logic is definitely going to need a major balance pass. As will the Happiness changes (working Empaths, negative-happy buildings). So while I won't say that this new version will be unstable (which'd imply crashes and such), it WILL skew a lot of the existing balances, hence the delay.
 
Is Wall Street one of your National Wonders? If so I cant seem to build it in my capital. I can build it other cities but not there. I have EVERY other building already built that I can build. LOL. The requirements are Stock Exchange and Workshop. I have both of those. Any ideas?

Chaotic Law
 
The requirements are Stock Exchange and Workshop. I have both of those. Any ideas?

I guess I left it out of the help text, but there's one more limit: Wall Street, the Red Cross, the Three Gorges Dam, and Hollywood are mutually exclusive, just like how the nuke plant and solar plant are. So no city can have more than one of those four.

This was necessary to prevent a few OCC-style abuses with the large multipliers, where you'd just want to put all of these in your capital thanks to its higher population, resource, and Palace bonuses. And I kind of liked the idea in general, to where these national wonders would be used to specialize your major cities. So to take the US as an example, you'd have L.A. as the culture-specialized city with Hollywood (obviously), New York as the gold-specialized city with Wall Street (duh), Chicago as the industry-specialized city with the Three Gorges Dam, and maybe Atlanta as the health/research center with the Red Cross (see also: CDC).

Originally there was going to be a fifth one, set a bit earlier than the others (I was intending to use the Magna Carta for this, at Navigation) that'd be more of an all-around boost (like boosting the food yield of the generic Citizen specialists), which'd be ideal for Washington. I dropped that, but I've been toying with adding the KGB (or CIA, in this case) to that mutual exclusion group, and THAT would fit perfectly into the capital. But for now, I've left it at just the main four in the lockout group, all of which are at comparable tech levels.

One of the fun aspects of this was that I'd originally forgotten to lock city-states from building these. So one quarter of the city-states were building Hollywood, and getting a culture boost and a free luxury. One quarter were building the Three Gorges Dam, and getting a massive production boost and a free teamwork promotion for all units. One quarter were building the Red Cross, and getting a massive research boost (which, with the right policy they'd give to their ally) and a defensive promotion for all units. And finally, one quarter were building Wall Street and getting a gold boost... and one unit of every strategic, which they'd then give to their ally. Effectively, this changed the game from three city-state types to 12. Suddenly, I found myself hoping that my C-S allies would build a Wall Street, so that I could get one more unit of Uranium, and it became almost as important as whether they were Maritime or Militaristic.
I've disabled that for now, because it was pretty unbalanced; when I made the original secondary effects I hadn't considered what they'd do for city-states, so Hollywood is much weaker than Wall Street for them. But the other thing holding me back is that there's no easy way to tell which one a city-state has built; the uncertainty might be kind of nice (bribe a city-state, and then be surprised by which effect it has), but it'd be better if there was some distinct graphical indicator on the terrain, like the graphics for the various Wonders. (Actually, I might just do that. So if you see a city-state with Stonehenge, you'll know it has Hollywood, and so on.)
 
Hmmm, well that sucks in the one city challenges. Or does the one city challenge make it so you can build them all. Well Normally I have 1 city which may or may not be my capital be my main builder. I only build units from this city to make sure I get all the bonuses for my units. It sucks I cant get the medic upgrade in that group. Oh well. I guess I can do with out... :cry:
 
Hmmm, well that sucks in the one city challenges. Or does the one city challenge make it so you can build them all.

Nope, sorry. The mutual exclusion logic isn't affected by OCC settings; the only thing that overrides is the global limit on number of national wonders per city set in GlobalDefines (which is -1, meaning unlimited anyway). So you'll have to pick one. Generally speaking, I'm guessing the most common choice for OCC is probably going to be Wall Street; not because it's the strongest, but because it comes one tech level before the others (T11, instead of T12). Plus, the free strategics would be really handy for a city without a huge footprint (at most 91 hexes).

Well Normally I have 1 city which may or may not be my capital be my main builder. I only build units from this city to make sure I get all the bonuses for my units. It sucks I cant get the medic upgrade in that group.

Normally I'll have at least three cities with the full military training suite, generally my biggest cities (because when you need an army, you'll need it FAST, which means multiple cities with high production). So my capital usually gets Hollywood, my production city gets the Three Gorges (and therefore the Teamwork promotion), my research-oriented city would get the Red Cross (and its Medic), and Wall Street will go to whatever's left over. While Medic is useful to have, it's not an every-unit thing, so it's not too bad to put it in a secondary military city.
 
FYI, for Combat Engineers, you need to turn off the flag for building Jungles and Forests when that tile already had it. This is the farthest I have gotten with your mod. Just finished the Apollo Program. Oh another FYI, you might want to tell others that the only way for this mod to fully work is to have the Science Victory turned on. There are alot of people out there who dont play with all the victory conditions.

Chaotic Law
 
FYI, for Combat Engineers, you need to turn off the flag for building Jungles and Forests when that tile already had it.

You can't.

Believe me, I've tried, because I didn't want the AI to get stuck in a loop where he builds on one square over and over. But forests and jungles are features, not improvements, and you can't tell a worker to NOT build on a feature. (You can set an improvement to only work on a certain Feature, like the Lumbermill, but you can't pass in NO_FEATURE or FEATURE_NULL to that table, because XML doesn't work that way.)
There is one workaround I've thought of: you can tell a worker to not build this on an existing Improvement. I could then make the "Plant Forest" automatically place a lumbermill on the newly-created Forest tile, and "Plant Jungle" automatically place a trading post. Since the tiles would now have improvements on them, the AI would be incapable of getting stuck in a loop. But this'd have other balance headaches, not the least of which is that if you can't build on top of other improvements, you'd have no way to plant forests and jungles in the first place since your entire empire will be improved by that point. And this wouldn't stop the AI from placing a Plant Forest on a naturally existing unimproved Forest.

I've tried to mitigate this issue by playing with the yields a bit, so the AI is pretty good about this. But I can't remove it.

Oh another FYI, you might want to tell others that the only way for this mod to fully work is to have the Science Victory turned on.

I'm looking to see if I can decouple it from the science victory in the first place, without breaking the rest of the mod. The alternate possibility is that I'll simply remove the toggle for Science Victory from the setup screen and effectively force it to be on, possibly replacing it with a toggle for the Transcendence Victory (although I'm leaning towards leaving that always on as well).
 
Ok, well I see you have thought that through. You keep surprising me. I keep thinking, oh he missed this... but no... you didnt. I am beginning to see that we are jut slowly double checking your work. lol
Couldnt you go at it from the other end and make it so you can build the Apollo Program regardless of Victory conditions? As of right now I have Science, Domination and Transcendence turned on.

Chaotic Law
 
I am beginning to see that we are jut slowly double checking your work.

Don't underestimate that part. It's very easy to miss mistakes in your own work. I used to work as a programmer, though, and my biggest job skill was the ability to keep track of all the little details in a project like this, so I generally don't have too many really horrible game-breakers, but there'll always be a few minor things that slip through.

The main thing I need people for is simply volume of balance feedback; I just can't play enough full games to really evaluate the balance of the various buildings and units and such. I try and eyeball it, and in most cases I think the balance has worked out pretty well, but there will always be a few things I get wrong (like the starting turn numbers for eras, hence my perennial request). For instance, take Psi units; from what people have said, they just aren't worth using. I'd like to change that, so I've tweaked a lot of things about them, but I still can't be sure they're worth the investment, because my personal playstyle favors mobility and combined arms assaults, while the psi units are designed for solitary raiding and harassment.

Or just look at the last few posts: people confused about the KGB, people confused about Wall Street, and so on. These tell me where I need to add more documentation; since I made the mod I obviously know what all of these things do, but a new user will point out where I need to make things clearer. For instance, look at the nuke discussion in my previous few posts, and tell me if someone who plays this mod without reading this thread would have any clue what's going on.

Couldn't you go at it from the other end and make it so you can build the Apollo Program regardless of Victory conditions?

That's my hope, that I could just remove the <VictoryPrereq> line and be done with it. The problem is that the Victory Progress UI might freak out about that a bit, if there's no longer anything linked to the space race win, and I REALLY want that UI to still work for it. Also, I couldn't just decouple the Apollo Program project from the space victory, I'd also need to do the same for the four SS part projects.
I'm going to try this tonight, after I finish my changes to the nuke interception logic, and if it works then I'll post the new version today or tomorrow (depending on how late I have to stay at work tonight).
 
Well so far I have made pretty good peace with the other Civs. I am inot the digital era and I have my Capital city building all the Spaceship parts as I research them, meanwhile all my othewr cities that are finished building buildings are focused on research in hoped I can get to SDI (yes I know it broken). Hey if I added another mod that removes Nukes would that break this mod?

Chaotic Law
 
Hey if I added another mod that removes Nukes would that break this mod?

Probably not. I was careful to set the Lua code in the right direction for that; for some things, it checks the type name of the attacking unit, and if it matches "UNIT_ATOMIC_BOMB" then it does X. Or one part simply checks NukeDamageLevel (1 for A-bomb/Subspace, 2 for nuke/PB), so if no units have nonzero values for that then nothing will happen.
If you were to delete the atomic bomb unit, then it would simply never trigger those bits of logic. I don't THINK I have anything that explicitly looks for GameInfoTypes.UNIT_ATOMIC_BOMB or something along those lines, but I can check later.

If you want to disable all of the normal nukes, the easier thing to do would just be to disable the Manhattan Project by setting its cost to -1. This'll prevent the Atomic Bomb, Nuclear Missile, and Planet Buster from being built, but NOT the Subspace Generator (since that requires SDI instead). So you'd want to set SDI to -1 as well.

Of course, removing those units entirely throws off a lot of other balance bits. The AI works off Flavor values, and so will still think those techs are just as valuable as before, when they'd give very little now. And of course, Uranium; with no nuke units and no GDR, you'd use it all for nuke plants.

I'd say, wait to see the effects of the new version's nuke defense code. If nukes are still unbearable afterwards, then disable them.
 
I was just thinking about it. These games are pretty long. I just got 2 nukes thrown at me from Japan. Luckily I had most of my units far away but I lost a couple of jets.

Ok, I am pretty deep in discovering your mod in all its coolness. But I have 1 major issue. Also I know this is biased. So as I was looking over the units and tech that come with all the SMAC stuff. I noticed that the former is at the very end. So here are my thoughts. Kill the Golem and the Labor Mech and give the former where you give Golem if not earlier.... BUT... hear me out (I can see those thoughts killing my idea before it is read) Slowly give former abilities to mod stuff as the tech go on. Just like in the SMAC game.

So like this...

Former Level 1: Can do all regular worker stuff but no maintenance cost. I would make this a new unit and do not let a worker upgrade.

Former Level 2: As above but can plant Forests and Jungles.

Former Level 3: As Level 1 and 2. Gains hover. No movement penalties.

Former Level 4: As 1, 2 and 3. Can turn Plains into Grasslands and Vice versa.

Former Level 5: As 1, 2 , 3 and 4. Can turn Hills into Plains or Grasslands and Vice versa. You can make this option go through the terrain steps. I think its Tundra, Plains, Grasslands, Hills... something like that.

Anyway, you get the idea. I feel that way as in SMAC you can get the former early but it wont be all powerful.

Hey will you be able to do boreholes?

So what do you think??

Chaotic Law
 
Hey thats cheating... How come Golems cant help workers????

Also I dont see anywhere where the Omnicytes are listed. So I dont know how many I have.

Chaotic Law
 
Top Bottom