Crazy Spatz's Alpha Centauri Mod

The terraforming options have been temporarily disabled. (That's why I said this in big bold letters at the start of this thread, and I've put it at the top of the patch notes for the past two versions.)

I removed the terraforming in v.0.19, to see if it was responsible for the crashes people had been reporting. Since too few people gave feedback on the crash rates, I had no choice but to leave it disabled for v.0.20. The next version (v.0.21) will probably have a new, very different terraforming system in place that doesn't rely on a Serial Event. However, that version will be at least a week away, probably more.

So for now, there's no Plant Forest, Plant Jungle, Raise/Lower Hills, Deep Mine, or Terraform actions.

Yes, I remember it now when you say it.

The game is crashing maybe every 70th turn.
 
Notes against the .20 build:

1. When I launched the spaceship I wasn't at war with anyone. The very next turn Siam declared war on me and launched an attack into my domain. On my next turn I went to attack the aggressor Siamese, and I got a prompt asking if I wanted to declare war.

2. Concerning the landlocked destroyer: don't know how that occured. It was definately there, as it intercepted my incoming aircraft.

3. Concerning the "late to the party" pic: every turn that the infantry was there, two of the infantry squad came running across the terrain, lined up, then attacked the city! :lol:

4. Found the "aquatic spaceship launch" relatively amusing, as I'd never seen that before.

Good game so far today: survived onslaughts from two civs, to include several waves of nuclear bombs and missiles. Will post more later, but thought I'd give a heads up on item one above.


D
 

Attachments

  • Landlocked destroyer.jpg
    Landlocked destroyer.jpg
    25.5 KB · Views: 228
  • late to the party.jpg
    late to the party.jpg
    27.7 KB · Views: 238
  • Aquatic spaceship launch.jpg
    Aquatic spaceship launch.jpg
    35.8 KB · Views: 263
1. When I launched the spaceship I wasn't at war with anyone. The very next turn Siam declared war on me and launched an attack into my domain. On my next turn I went to attack the aggressor Siamese, and I got a prompt asking if I wanted to declare war.

I'm not going to deny responsibility for this one, because it's WAY too coincidental that this happens right at the point in the game where I'm screwing around with peace treaties in Lua. But I looked at the code, and I just don't see how it COULD be doing what you described. The logic isn't very complex: when any player launches a ship, it gets his Team number. The game then loops over all teams in the game; if they're currently at war with the Team in question, and the other team isn't a Barbarian, then it executes the Team:MakePeace() function.
(The whole "team" thing is really annoying, by the way. Techs and treaties are done by team, while everything else is by player...)

Ooh, something I just thought of; do peace treaties go both ways, internally? That is, if I change Teams[1]:MakePeace[2], then Team 1 is no longer at war with Team 2, but does it automatically do the reverse as well, or do I also need to add a Teams[2]:MakePeace[1]? Obviously, war and peace declarations in the UI do this, but I'm not quite so sure about Lua hacked peace. I should test that.

So, to try to track this down, I'd like to know a couple things:
1> Had Siam launched their own spaceship? Had anyone other than you launched, at all?
2> Had you ever been at war with Siam previously? (It COULD be similar to the Open Borders bug, and the game just didn't correctly register you as being at peace with them.)

Now, I'm considering tossing that block of code out entirely. The idea I'm toying with is a true World Peace; as soon as ANY civ launches a ship, the planet enters a state of permanent peace (literally using the Permanent War/Peace flags to try to prevent any wars from being declared). I'm not sure whether Barbarians would count for this; I'd probably keep them at war with everyone.

This lockout would end at the Breakout; while you'd have to start up your wars again the hard way, it'd at least be possible again. I wasn't going to do this previously, when the Breakout's timing was very random, but now that it's basically hard-coded into a 10-30 turn window, I think this idea would work better. And I kind of like the idea of not allowing any fighting for a couple decades, while everyone's going through Golden Ages and rebuilding.

2. Concerning the landlocked destroyer: don't know how that occured. It was definately there, as it intercepted my incoming aircraft.

I've seen things like that before. My guess is that the destroyer was in someone's territory when an Open Borders ended or a border expanded onto its hex, which snapped it back to the nearest "safe" hex. I'd then guess that the dev responsible for this particular mechanism used the wrong IsWater flag so it's thinking a river hex was a valid spot. (Since coastal cities are designed to allow ships inside, it'd snap to the city hex if it was nearby.)
I actually am having a very similar problem in this mod now. Spore Towers are only supposed to spawn Isles of the Deep if they're coastal, which is convenient since their distribution skews towards the coasts. But I've seen inland towers spawning them lately, and I think it happens when they're on rivers. On the plus side, they won't stay landlocked; at the start of the next turn they'll snap to the nearest valid hex; in the case of my Isles, this ends up with a bunch of them spawning off the nearest coast point. (It's also very similar to how my Geosynchronous Survey Pods work. They're Air units without the Immobile flag, so they can do two move actions per turn and then snap back to their starting point. The game only checks to see if a unit is where it's supposed to be at the end of each turn, and if it's not, it uses some primitive logic to move it to a valid spot.)

4. Found the "aquatic spaceship launch" relatively amusing, as I'd never seen that before.

It's very rare, but the game allows it. No matter which city you build the Apollo in, the launch animation will happen in your capital. When a capital is captured, the new capital will be whatever city has the highest population (and that IS his capital). So if you've got an aquatic city with a lighthouse and a few food resources (I count three in that screenshot, plus a land hex), it could easily qualify, especially if the civ is Siam and he's befriended a few Maritimes.

Of course, this sucks for the launching civ, because trying to get spaceship parts TO the capital would be a major problem. But then again, if you've lost so many cities that your capital is a remote island, then you've got worse concerns than losing the space race.
 
After a bit of further testing, it looks like the Terraforming event will have to be rebuilt from scratch. I'm trying to get it ready for the next version, and if it works, I'll remove the old event code.

The logic will now go like this:
> See if any civ has reached the Nuclear Era. If not, don't bother with anything else.
> Loop over every hex on the map.
> If the hex has an Improvement on it, check the type.
> If it's one of my terraforming-specific Improvements, then replace it with the appropriate Feature or Terrain type.

That's the basics. But on the bright side, the "loop over every hex" is so overhead-intensive that I can now afford to make the rest of it a bit more intricate than before. For instance, instead of planting a Forest and *poof* it's a fully-productive Forest, one idea was to plant a Tree Farm instead. The Tree Farm is an Improvement and has less yield than a Forest, but each turn has a chance (say 20%) of growing into a full-sized Forest. (Since it's an Improvement, this means you couldn't put a Lumbermill on the tile until it was a full Forest.)
The only headaches:
1> I'm not sure how I'd stop the AI from trying to replace the Tree Farm with a different Improvement before it's done, since the Tree Farm would be guaranteed to have a lower yield than the other Improvements at that era. It was tough enough just getting the AI to consider the current forest/jungle plant actions worthwhile at the moment it made them, this'd be much worse.
2> Since it'd be sticking around for a few turns, I'd need to find an appropriate graphic instead of having all six actions use a Manufactory for a placeholder you'd never see. The easiest would be to have it look like a Forest or Jungle already, but I'd prefer something a bit more noticeable. One thought was to find a workable "organic" resource (Incense, Spice, etc.) and have it look like those.
(One other thing I thought of was to combine the Plant Forest and Plant Jungle into a single Plant Tree Farm, and have the result depend on which type of terrain you're on. But this'd make it practically impossible to get the yields right on the placeholder.)

The same would apply to Deep Mining. It'd create an Improvement on the hex, the Deep Mine (probably look like an Offshore Platform, if I can get that to work right; failing that I'll use a Well graphic). Each turn there's a chance the Deep Mine would finish pulling a resource to the surface, and when it does, it'd automatically replace itself with the appropriate resource-harvesting Improvement (Mine or Quarry). The biggest problem, again, would be making sure the AI doesn't try to demolish it before it finishes.

The Monolith would work like planting a Tree Farm, except that it'd have a 100% chance to add its Feature at the end of the turn, and it wouldn't remove the Improvement. Because it keeps the Improvement, this one has no graphical issues.

The headaches would be with the Raise/Lower Hills and Terraform options. I'm not sure what sort of placeholder graphic I could use on the map, and those already have a graphical issue in that they won't display until you reload the game.
 
I looked at the code, and I just don't see how it COULD be doing what you described.

I replayed the turn, and you are right. After my spaceship launches and on the same turn Siam attacked me. Then at the beginning of my next turn peace is declared. So the Siamese got in a free shot before the enforced peace.

D
 
After my spaceship launches and on the same turn Siam attacked me.

Yeah, this is unfortunate. The only way the trigger works is to check at the start of the active player's turn, so the AIs get one last turn in before the event triggers. I could change that to trigger on the END of the active player's turn (where you'd be able to "tie" with an AI that you've just seen launch by launching your own), but I'm not sure how I'd trigger the notifications.

So it looks like the situation will remain where the AIs all get a turn between when you launch a ship and when you get the rewards. And if they launch during that turn, it's declared a tie and you both get the "launched first" bonus. (Which sort of makes sense.)

As for the peace thing, yes, that allows the AI to have a 1-turn war, but it also allows you to declare a war and grab a city or two right before peace is enforced, without having to deal with the counterattack. (Except for that one turn I mentioned.) Now, if you think you're going to get more than just a straight peace offer, it's in your best interests to make peace before it's forced on you. But if the AI launches a ship and suddenly you're forced into peace with them, you'll get nothing. (Of course, right now you can just re-declare, but I'm looking to change that.)
 
Interesting game that just finished up: I won the space race, however couldn't keep the tech lead over the French and Siamese. And they kept beating me to all the Wonders! :mad: I finally put my three largest cities on Research and left it at that. Till the bombs started dropping, that is.....

Observations from this game:

1. An LoC can cross a river without a movement penalty, but gets penalized for attacking across a river. Why is that?

2. Included a pic of the EMP promotion: nice. :cool:

3. Earlier in this game I survived several rounds of nuclear bombs and missiles from the Iriquois and the Siamese. This time the Siamese came at me with a Planetbuster to start (see "After one Planetbuster"). Completely wiped out my Army Group Centre, and the Siamese were poised to launch their legions into the breach in my defenses.

4. I responded with my Nuclear Missile and completely wiped out the Siamese invading force. We were both then devolving very quickly into the prophetic statement of "If the Third World War is fought with nuclear weapons, then the Fourth World War will be fought with sticks and stones". I didn't have a lot of strategic resources to begin with, and after that I was left with building pretty much just Laser Infantry.

5. The Siamese nuked Berlin after that, and still had a large nuclear arsenal at their disposal. I decided to bow out at that point.

6. So, lesson learned in this game is that nuclear weapons are better to give than receive, and the sooner, the better! :nuke:

D
 

Attachments

  • After one Planet Buster.JPG
    After one Planet Buster.JPG
    48.5 KB · Views: 189
  • Before the bombs started dropping.JPG
    Before the bombs started dropping.JPG
    63.2 KB · Views: 173
  • EMP Promotion.JPG
    EMP Promotion.JPG
    97.2 KB · Views: 216
  • My retaliation.JPG
    My retaliation.JPG
    48.8 KB · Views: 194
  • The aftermath.JPG
    The aftermath.JPG
    59.8 KB · Views: 227
  • The handwriting on the wall.JPG
    The handwriting on the wall.JPG
    47.7 KB · Views: 163
Till the bombs started dropping, that is.....

That's a good motto in general.

1. An LoC can cross a river without a movement penalty, but gets penalized for attacking across a river. Why is that?

The Amphibious promotion (which lets you cross rivers, removes the combat penalty for attacking across rivers, and removes the -50% penalty for attacking from embarkation) isn't the same as the Flat Movement Cost promotion. Most of my future units have the latter but not the former. The way the game makes rivers work is that crossing them adds +10 MP to the cost of the destination tile, but the 1 MP promotion sets it back down to 1 regardless.

2. Included a pic of the EMP promotion: nice. :cool:

Yeah, it's a handy one to have. Soporific is the reverse, handling the "soft" unit types. Neither affects Psi units or Titans, though, so their utility diminishes a bit as the game gos on. (Trance is for Psi, and there's deliberately no anti-Titan promotion.) But during the Fusion era, these are really valuable.

There are still some coloration issues on the icon, but that's minor.

6. So, lesson learned in this game is that nuclear weapons are better to give than receive, and the sooner, the better! :nuke:

The usual way to deal with nukes is to have enough long-range bombardment (especially stealth bombers) and highly-mobile units (gunships, vertols). Find the city they're based in, throw all of your air power at it until it has 1 HP, and conquer it in a single turn with the gunship. When a city is conquered, all air units in it (including nukes) are automatically destroyed. So even if the opponent retakes the city, you're probably only out one gunship and he's lost his nukes (and 3/4 the population of the city, and over half of its buildings).
Obviously this is harder on a Pangaea-type map, where you'll have a long border and so the bombs might be based in any number of cities. But it's still possible because the AI doesn't deliberately disperse his nukes. And also, it obviously doesn't help with the first turn of a war, when the AI surprises you by nuking three cities. On a continents map, if he can't reach your home cities with his bombs, then you're usually safe because the AI doesn't nuke his own territory to prevent you from getting a beachhead.

This is part of why I gave the Planet Buster infinite range. I wanted that tactic to stop working after a while, because it was just too effective. I also wanted to make nukes be interceptible by fighters, but that hasn't happened yet. The unknown here is that I have three buildings that are SUPPOSED to reduce the effects of nuke weapons on a city. They won't protect units in the field, though, and I'm not sure what happens to units in the city.

I may just have to code in some sort of SDI. It shouldn't be hard, actually, because I can just add it to my existing check of RunCombatSim (start of combat event); if the attacker is a nuke and X happens, then there's a Y% chance the nuke is destroyed without doing anything. If I do this, then I'd also wanted to make the Planet Buster more powerful. Originally I was going to add a Singularity Missile in the late Nanotech that would be even MORE powerful, but there was no easy way to code that in XML so I tossed the idea.
 
Are you going to be able to add the original voices for the alpha game into civ 5?

I've tried. Adding custom sounds to a Civ5 mod is NOT easy. I've got the sounds picked out and ready to go, in MP3 format, but getting them to actually play in-game is a major issue; there's a lot more that needs to be edited if you want to integrate these sorts of changes.

Also, note that while I'll try to make it possible to use these sounds, I will NOT provide the MP3 files myself. Once it's working, those of you who own SMAC will just need to copy your own versions into the correct directory. (Same goes for Wonder movies, if I can ever get THOSE working.) It's a copyright issue thing; yes, I use the tech/building icons from SMAC and copy some civilopedia text, but sounds and movies are another level that I'd rather not get into.
For people who don't own SMAC and don't want to spend a couple bucks to buy it, I'm pretty sure you can find the files in... other places. (Hint: "Planetfall".)

------------------
On an unrelated note, I got the Doppelganger unit working last night. It's the second-to-last unit I was considering adding (the final one being the Sea Former, if I add Kelp Farms; I'm leaning towards just using Work Boats and/or giving that to the naval vessels), and I'm just tweaking the balance on it now. It's a VERY different dynamic than I've used so far, with the player trying to pick opponents based on who has the good promotions to steal.
So, when the next version goes live, I'll need a lot of feedback on it. Also, to make room for it (at Retroviral Engineering), a few other things had to move; Clinical Immortality is now at Ethical Calculus, Ascetic Virtues is at Homo Superior, and the Academy boost moved to Intellectual Integrity. (I couldn't resist that one.) I'm in the process of fixing that.

Also, it looks like Terraforming will be back in in the next version. It'll work slightly differently than before; I've held off on the Tree Farm idea, so right now it just changes to a full forest/jungle/whatever at the end of the current turn. That's required finding better graphics for the placeholders (no more Manufactories), and there've been a couple minor glitches there I'm still working out.

I added one new rule that turned out to be kind of fun: all newly-created units get the Rookie promotion (-25% in all combat, but x2 XP) until AFTER their first combat. Once you've survived a single fight, it goes away. (Originally I'd just have it remove at the end of the first turn, but this way's more interesting.) So one fight where you're relatively weak, but if you survive it you'll get enough XP to probably get another Promotion.
I mention this now because I want to explain: this wasn't done for fun. As it turns out, the SerialEventUnitCreated event (which I use to award the bonus XP for the Psi, Titan, Troll, and Ranger units) triggers when a unit is created... but it also triggers when the unit embarks, disembarks, the game is loaded, and possibly when an air unit does anything. So things were breaking pretty badly. You'd build a Ranger, get 30 bonus XP, then move it into the water and get another 30. Come out of the water, get another 30. You see the problem.

I added in a simple check to see if the unit was created on the current turn, which solved most of the problem, but it was still abuseable; you'd just make sure to move these units into the water on the first turn, triggering the embarkation, and you'd gain double the bonus XP. But with the Rookie promotion, I can now tell whether I've triggered the UnitCreated event yet (if the unit has the promotion OR was made on a previous turn, then I know not to give the XP again).
I still came up with two other ways to abuse the latest system, one involving the Move After Attacking promotion and the other involving reloading savegames after you did the first fight with each unit. I might be able to add another check to limit these, but at this point it's pretty robust. I'm really more worried about the AI triggering things accidentally, because seriously, if the player wants to cheat he has FireTuner.
 
Anything in particular you really need feedback on?

Also, any ideas when we'll start seeing some new models?
 
Anything in particular you really need feedback on?

Same list as usual.

Number of crashes. How many? What era are you in when they start being common? What era are you in when they become unbearable?

Relative balance of units. Do you find yourself not using the Psi units? How about the Powersuit units? Do Vertols die too easily? Are the Ranger and Troll too late in the tree for something with that little raw power?

Relative balance of Buildings and Wonders. Are there any Wonders you just don't find to be worth building (like the Weather Paradigm before that last patch)? Are there any that are so overpowered that getting it puts the game into Easy mode?

Resource distribution. Is there enough Iron? Coal? Oil? Aluminum?

Gold and Happiness. Do you have problems staying above 0 on both? At what point in the game do you not have a problem with either?

Pacing. On what turn number do you enter each era? On what turn number do you COMPLETE each era? (Don't count Centauri Ecology for the Nuclear Era for this one.)

Also, any ideas when we'll start seeing some new models?

No earlier than May 13th, 2011, and probably significantly later than that.
Why that date? Simple. It's NASA's deadline for astrophysical data archive proposal grants. (Everyone knows that.)

Sure, if someone else makes the models, of course it could be sooner. But no one is, which means I need to learn the intricacies of Blender for myself, and that takes TIME. And until that date, time is not something I'm going to have a lot of, because let's face it, Civ5 is NOT my top priority in life. So I'm aiming for sometime in June for unit models at this point. Could be earlier, could be later.
 
What programs do you use to make unit models? I could take a crack at it assuming its something I can just download.

Times one of the few things I have right now and ive been thinking about learning how to program anyway.
 
What programs do you use to make unit models? I could take a crack at it assuming its something I can just download.

At least initially, I'm just going to convert Civ4 units over to Civ5's format. The tutorial for that is in this thread in the References section. According to that thread, you need Blender, Python, a graphics program that can handle DDS files, and a few custom-made scripts.

I've got most of the Civ4 unit files I'll need saved to my computer, so it's just going to be a matter of time converting them. There'll be a few units I'll have to work a little to convert, but for now I'll skip those.

Also, I intend to recycle a few unit models in Civ5 for now. For instance, initially, I probably will leave the Bolo as an Ironclad (just change the scale), leave the Gravship as a Battleship (just change the z-value), leave the Combat Mech as the Giant Death Robot (but fork the attack animation to work for ranged attacks as well), and have the Labor Mech be three scaled-down versions of the Giant Death Robot in formation. These I could do now, really, but I want to wait until I can get more done at once.
 
Oh, ok.

Might I ask though, what do you plan to do with your Mindworm/Nessusworm/etc graphics wise?
Would you have to start from scratch?
 
Might I ask though, what do you plan to do with your Mindworm/Nessusworm/etc graphics wise?

Steal from the Civ4 Planetfall mod, most likely.

Actually, for the Nessus Worm I was planning to use a Sandworm model from Dune. Because seriously, how could I NOT? (It's a very well-done model.)

I have models for most of the rest, mostly from the Civ4 customization forum on this site. I'll try and make up a list of what I do and don't have on hand.
 
I know I am coming into this really late, but as far as the terraforming thing goes. How does the game change a swamp into a grassland with your worker? Is that the technique that your using? Looking forward to your next update. Waiting for you to put terraforming back in. Oh, any idea when the next update will be? Thanks.

Chaotic Law
 
How does the game change a swamp into a grassland with your worker?

Well, it doesn't do anything with swamps, because Marsh is a feature that you've been able to clear since the Ancient era. The possible changes are:
Snow -> Tundra
Tundra -> Plains
Desert -> Grassland
plus the separate ability to create or destroy hills.

Second, the base Worker doesn't do any terraforming. Only the Former (Nanotech-era Titan unit) can change terrain types. Workers can't do any of the five terraforming actions; Combat Engineers can only plant forests and jungles; Labor Mechs can also raise/lower hills and make Deep Mines, and Formers can do all five. (The only other Worker unit, the Golem, can't do any of these at all.)

Is that the technique that you're using?

The technique is this:
> Player creates an improvement named, for instance, "Plant a Forest".
> When it finishes construction, this triggers a Lua event that adds a Forest feature and removes the improvement.

The "triggers a Lua event" is the hard part. The event I'd been using, SerialEventImprovementCreated, is unfortunately unworkable for this since it only triggers if/when the active player (you) SEES the tile in question, which means when the AI would plant a forest it'd sit there as an Improvement for centuries. I believe this was the source of some of the crashes.

I've now changed it to a standard end-of-turn event. It's not as pretty, because now you'll actually SEE the improvement in question, and it's much more of a resource hog now to scan the entire map. But on the bright side, it might improve the crashes. And it's easily expandable into a true Tree Farm mechanism if I ever decide to go further.

I'm working tonight on a way to improve this algorithm, so that it'll only scan the whole map if it already knows there's one out there somewhere. This is still a little awkward, in that you'll have some turns that take longer between turns than others, but unless you're playing on a Huge map it's only a few seconds extra.

Oh, any idea when the next update will be?

When it's done? (Seriously, it's been five days since the last one.)

The next version definitely won't be until after this weekend, and even then it might be delayed a bit further. Weekends are, after all, when I have the most time to actually work on the mod. I mean, I haven't even had time to play a full game of the LAST version since I released it. (I got partway through one game and realized there was a massive bug with the new version of the Monolith, so I'm going to have to start over. No, it's not a bug in the version I gave you, it's part of the terraforming change I made immediately after.)

I have a standing rule not to release a version until I've actually PLAYED it, and since the last version I've added the new Terraforming code, the Doppelganger unit, the Rookie promotion (massive fix to the OnUnitCreated event's bugs), and a whole slew of minor tweaks of all kinds. So it needs a bit more internal testing.

Also, I have to finish my taxes and write a NASA funding proposal, so I can't spend all weekend playing either. The fact is, I'm not going to have a whole lot of spare time until mid-May, especially during the weeks. Until then, updates will not happen very often; probably closer to two weeks per version than one week, especially if I try to get into the 3D modeling part of things.
 
Wow, now thats an answer. Very impressive. I have yet to try any versions as I just found out about this mod. I am a terraforming nut so when you have finished I will be trying it out. But my statement about the worker changing the March to a Grassland (from the game mechanic point of view) Isnt that changing the tile from 1 type to another? Just wondering.

Chaotic Law
 
Back
Top Bottom