I'm going to submit my entry for the content contest: Caught in the Crossfire II alpha. Gameplay-wise, there's still a lot of work to be done, particularly on the AIs, as well as balancing. Also, the AI code is Sirbomber's work, and as he's the judge, it wouldn't be proper for the entry to be judged based on it. What I'm really submitting it for is for the various hacks, code patches, and general code I made for the mission, including:
- Highly modified Blight behavior. The Blight is now invisible until the Microbe Detection tech is researched. Infected tiles are now passable as well. In addition, vehicle infection works completely differently now. Rather than just blowing up upon infection, vehicles can live up to 100 marks at night time, and about ~5 marks during full daylight. If they leave infected terrain during this grace period, they will self-destruct (this behavior will need some tweaking as vehicles have a tendency to pathfind one tile outside of the Blight, which makes it annoying to deal with). After the grace period, vehicles will be transferred to an AI player. Infected combat vehicles will attack the player; other infected vehicles will attempt to leave the map. Infected vehicles that are unable to complete their current action will self-destruct after 250 marks (this is done in case infected vehicles get stuck, so they don't waste space in the unit array for the rest of the game). Infected vehicles do not spread the Blight at this point, but that may be subject to change.
- Fully randomized resource (beacons, fumaroles, etc.) placement. The random placement is done per "section" of the map such that each section is guaranteed to receive at least a certain number of resources. All resources will only be placed where it is possible to build a mine/GeoCon on them. Most beacons and magma vents are placed only where at least two smelters can be built next to them. Other beacons are purposefully placed where no smelters can be built near them; however, they tend to be high-yield.
- New method for handling beacon invisibility. This feature should be familiar to you from the original Caught in the Crossfire mission made by Mcshay. As before, scouts must "see" them within their sight range (upgrades are accounted for) in order to reveal them. Robo-surveyors can now discover beacons as well, although they are less efficient than scouts due to their speed and lack of sight range upgrade. Another new addition is that launching the EDWARD satellite will reveal all mining beacons. I have also made a patch so that, when a player launches EDWARD, the beacons will be surveyed for their allies so long as the alliance stays. Beacons revealed by a player will only be visible to that player and their allies so long as the alliance holds, rather than being revealed for all players. Beacons revealed by a player can be "revealed" again by their allies should they come within the sight range of one of their scouts or robo-surveyors, they survey them, or they build a mine on them; this is important if the alliance dissolves.
- Earthworkers may now build walls right next to lava or infected tiles. The bug where earthworkers are unable to build walls in a 3x3 area around where another earthworker is already in the process of building a wall has been fixed. As a side effect of these changes, walls can be built right next to any structure as well. I'll need to come up with a way to fix that.
- Earthworkers in the process of building walls are now invulnerable and cannot be EMP'ed. This stops the invisi-perma wall bug. Tube building behavior is unchanged.
- Dual-turret panthers. After researching the appropriate tech, all panthers built afterwards will have dual turrets, like tigers do. This will need balance tweaking as it is currently making tigers redundant. This is based on source code posted by Hooman a long time ago, with a lot of modifications.
- Allies' structure docks will no longer damage your units.
- When the mission ends in a victory or failure, a cutscene is played, provided the player has the cutscene .avi files. The mission will not end in a victory if all other players quit, as it would normally do.
- Having an active DIRT causes all structures connected to it to slowly regenerate HP. If the damage prevented is 25%, the structure will regen 4 HP/mark; if 17.75%, regen is 2 HP/mark, and if 12.5%, regen is 1 HP/mark.
- Fixed the "food stores are plentiful" message bug.
- Added a method that allows certain structures that would normally spontaneously explode to not do so. You can see this with the advanced lab where the Blight starts.
- Evacuation module requires 400 colonists, and removes 400 colonists from your population when launched.
- The HookHelper library I wrote. It's nothing complex like hooking libraries such as Detours are, it simply allows making all these code hooks and patches, and then undoing all of them when the mission ends, much easier. An older version of this was committed with the disasterless mod source code to the SVN a while back.
Source code relevant to the above things is included. (Yes, that means not all of the source code for the mission is there.) The OP2Units.h file was mostly BlackBox's work (though it used mostly information in the OllyDbg comment file and the internal data notes, both of which Hooman made either in part or fully). Some parts were scavenged from ForcedExports. The rest was either written by myself using Hooman's OllyDbg comments, his internal data notes, and a bit of my own reverse engineering work. More or less all of the included source code is dependent on HFL. You'll need to compile the version on the SVN which includes some fixes I made rather than the pre-compiled version BlackBox posted a while back.
Some of the source is a little messy. The whole thing is still a WIP, remember. Also, the random resources code was something I had written a couple years back and made some modifications to recently, so you'll probably find that that's the messiest. I think the OP2Types header files are somewhat messy and convoluted as well. This is actually why I've been interested in developing ForcedExports myself a bit lately.
You'll need Visual Studio 2005 or later to compile it. This is due to my use of __thiscall function declarations and pointers. It will not compile with Code::Blocks.
For the rest of you just trying it out, here's what's missing from the mission in terms of gameplay:
- A working Plymouth AI. When it is completed, it will also have a resource base at the middle right area of the map; meaning, you won't be able to evacuate straight to there from the start in the final version.
- "Proper" AIs. The AI code that is there, and that will be made for the Plymouth AI soonish (maybe), is just filler. A more elegant AI is slowly being worked on, but it's going, well, slowly.
- Balancing and tweaking. The AIs need work. The Blight speed needs work. The rate at which the Blight destroys microbe walls needs work. A significant increase in the cost of all starship components is planned, but not implemented at all yet. I'm not fully happy with where Microbe Detection sits in the tech tree (for now, you can research it as soon as you build an advanced lab). Need to rebalance panthers and tigers due to the dual-turret panther tech. Etc.
- I've planned a couple other code patches, but they are either not developed at all at this point or they are in their infancy.
- And yes, I realize OP2's pathfinder doesn't like anything about this map. For the players, it's annoying. For the AIs, it tends to break them. I'm going to try and find a solution, but I doubt it will involve much in the way of changes to the map, as there'd have to be a lot, to the point where the mission would no longer play as intended.
- May need to adjust lava paths.
- Maybe some other small misc. things.
The gameplay is fairly similar to the original Caught in the Crossfire (CCF). The Blight starts at mark 20. You have until mark 300 to evacuate before your starting base gets infected. You should be researching all the basic lab techs during your 300 mark grace period. You'll need to use scouts (or robo-surveyors) to discover mining beacons until you have launched the EDWARD satellite. You'll have both the Blight and the AI (AIs later) to contend with as you are building a starship. The map is partitioned, unlike CCF's. You'll need to evacuate from partition to partition throughout the mission as the Blight spreads. Launching the Evacuation Module = victory.
Primary
submission (again, this only involves the code patches and whatnot) credits:
Arklon.
Secondary credits:
BlackBox, Hooman - the OllyDbg comment file, internal data notes, parts of the OP2Types headers, HFL, original version of the dual-turret panther code which mine is based on, etc.
Mission credits:
Arklon - most code.
Sirbomber - AI code.
CK9, Arklon - map. (Mostly CK9, I just added details and changed some cliffs around.)
BlackBox, Hooman - same as above (OllyDbg, HFL, etc), although they didn't directly help with the mission.