Impossible Creatures

Impossible Creatures

Not enough ratings
Creating and Loading Single-Player (Campaign) Maps
By the2ndSign
This will be a quick guide explaining how to create your own campaigns and other single-player projects for Impossible Creatures. This guide will assume that you already know how to extract .SGA archives with ModPackager. If you do not, please see my other modding guide before proceeding.
   
Award
Favorite
Favorited
Unfavorite
Creating and saving your maps
This works mostly the same way as creating a multiplayer map, but there are a couple key differences.

Before you even start shaping your map, you should make sure it gets saved as a single-player map instead of multiplayer. This is fairly simple. Navigate to the top of the Mission Editor window and you'll see an option titled "Scenario". Click it and select "Scenario Properties". Change map type to "Single Player Mission". You can type the name of your map under "Map Name" as well, if you want the title of your map to be different from the filename.
After you've done this, you should immediately save your progress. Single-player maps are saved to the directory "Impossible Creatures\Data\Scenarios\SP".* If you've never worked with campaigns before, you'll likely need to create the SP folder yourself.

There's still another step before your campaign will be funtional, however.

--

*If you want your map to be mod-specific, you'll of course need to save it to the Data\Scenarios\SP directory within the mod's folder. Be warned, however, that creating campaigns for user-created mods may cause some nasty issues. It is therefore recommended that you work with either the vanilla game or Insect Invasion.
Making your campaign playable
If you haven't done so already, you'll need to extract ICData.sga with ModPackager. Once extracted, navigate to wherever you extracted the files. Then go to Scenarios\SP and you'll find a peculiar file titled "sigma.camp". This file contains all the relevant titles and file names required in order to load your campaign from the main menu. Copy that file to the directory where you saved your map. You can open it in Notepad or Notepad++. Once opened, you should be greeted by the following:
-- Campaign Name = [[$58001]] ModName = [[Sigma]] Missions = { { name = [[$55000]], mission = [[mission1]], skiptonextmission = 0 }, { name = [[$55002]], mission = [[mission2]], skiptonextmission = 0 }, { name = [[$55004]], mission = [[mission3]], skiptonextmission = 0 }, { name = [[$55006]], mission = [[mission4]], skiptonextmission = 0 }, { name = [[$55008]], mission = [[mission5]], skiptonextmission = 0 }, { name = [[$55010]], mission = [[mission6]], skiptonextmission = 0 }, { name = [[$55012]], mission = [[mission7]], skiptonextmission = 0 }, { name = [[$55014]], mission = [[mission8]], skiptonextmission = 0 }, { name = [[$55016]], mission = [[mission9]], skiptonextmission = 0 }, { name = [[$55018]], mission = [[mission10]], skiptonextmission = 0 }, { name = [[$55020]], mission = [[mission11]], skiptonextmission = 0 }, { name = [[$55022]], mission = [[mission12]], skiptonextmission = 0 }, { name = [[$55024]], mission = [[mission13]], skiptonextmission = 0 }, { name = [[$55026]], mission = [[mission14]], skiptonextmission = 0 }, { name = [[$55028]], mission = [[mission15_NIS6]], skiptonextmission = 1 }, { name = [[$55028]], mission = [[mission15]], skiptonextmission = 0 }, }

For now, I suggest deleting all entries past mission 1, so that you're left with this (do not delete the final closing bracket):
-- Campaign Name = [[$58001]] ModName = [[Sigma]] Missions = { { name = [[$55000]], mission = [[mission1]], skiptonextmission = 0 }, }
(It isn't a required step, but I like to do it, as it eliminates clutter.)

Now, edit the file so that it looks like this:
-- Campaign Name = [[Your Name Here]] ModName = [[Sigma]] Missions = { { name = [[Your Name Here]], mission = [[Map Filename]], skiptonextmission = 0 }, }

Obviously, replace "Your Name Here" and "Map Filename" with the title of your campaign, title of your mission, and the file name of the map, respectively. You can leave "ModName" as is. When you want to add another mission, simply copy the entry for mission one and edit accordingly. Once again, leave the final closing bracket alone.

If you're creating this campaign for the vanilla game, you'll want to rename the file so that it doesn't overwrite the original IC campaign. You can name it anything you like, as long as it still contains the .CAMP extension. If you're creating the campaign for a mod, this step likely won't be necessary, but it's a good habit to get into regardless.

Now, launch IC and select "Campaign" from the main menu. If you did all the steps correctly, you should see your campaign in the list, either alone or alongside the standard IC campaign. You should now be able to play it.

That's all there is to making a playable campaign! Continue on to the next section for some tips and tricks.
Tips, tricks, and other information
This section contains information you can use to spice up your campaign, as well as some things you should know while mapping. The section assumes you are at least somewhat familiar with the use of triggers in the Mission Editor. This section may be expanded upon as I think of more tips.

Win/Lose Conditions
In single-player maps, players do not automatically lose when their Lab is destroyed. If you want any of the players to fail the mission upon losing their Lab, you'll need to create an appropriate trigger. In fact, any win or lose conditions beyond "destroy all enemy structures" will need to be manually specified with triggers.

Loading Screens
If you want to make your loading screens look like those of the original campaign, with the mission name and short description, there's a neat little .LUA file you can add to your directory. You'll need to have extracted Engine.sga with ModPackager in order to access this file. Navigate to where you exracted the archive and enter the Scenarios\SP directory. Open the folder titled "loading" and you'll see a file titled "mission1.lua" at the top. Copy this file to the loading folder of your own campaign. Open the file to see this tiny script:
title = 55000; desc = 55001;

Simply change the string numbers to the desired title and description of your mission. Or, if you'd rather use modtext.dll, replace them with your own strings. Then save the file with the filename of your mission.

Adding Objectives
What's a campaign mission without objectives to complete? Adding objectives to a map is fairly simple, but will require some edits to the game's text files. If you're unfamiliar with text editing in IC, please see section 2 of my introductory modding guide (link in description).

You'll start by opening up the Trigger Wizard in the Mission Editor. Set your condition like you usually would for any other trigger. Now, we need the action that adds an objective to the mission. Scroll through the list until you find the action called "Objective, create primary obj". You'll be greeted by this dialogue:

Since this is presumably the first objective of the mission, click on the first "number" button and type in the number 1. Now, this is where the text editing comes in. Navigate to the locale folder of the mod your campaign is for and load up modtext.dll with your preferred resource editor. You'll need to find an empty string to enter your objective into. I recommend creating a new string table at the end of the file and using that. Choose an empty string and type in your objective. Now, save the file (if you're using ResourceHacker, you'll need to press "compile script" before saving). Keep the file open. Now, go back to the trigger and enter the string number of your objective under both "short-desc" and "tip" (the next two "number" buttons). Click "OK". Don't click "Finish" yet.

Even after creating the objective, it will still be disabled until the trigger to activate it fires. So, we need to turn it on. Click on "New" to select another action. This time, we want "Objective, set objective state". Under "number", enter the number of your Objective, which should be 1. Then click on "objectivestate" and select "Incomplete". Click "OK" and then "Finish". If you've done everything right, the objective should appear when you load up your mission, and you'll be greeted by a Henchmen reminding you that there are new objectives.

That's all well and good, but there's still one problem: there's no way to complete your objective! This is simple enough to fix though. Go back to the Trigger Wizard and choose the condition you want for completing your objective. Then, for the action, once again choose "Objective, set objective state". Type in "1" for the number again, then change the state to "Complete". Now your objective is fully functional. It's enabled and can be completed. Note that, if you like, you can also turn the objective back off if desired or set up a fail state.

Lastly, if you want to create a secondary objective instead of a primary one, the process is exactly the same. You just need to select "Objective, create secondary obj" as your action.