View unanswered posts | View active topics It is currently Thu Apr 25, 2024 12:44 am



Reply to topic  [ 6 posts ] 
 Making or modifying an Activites.ini 
Author Message
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Making or modifying an Activites.ini
(Not sure if this should go in support or whatever)

Alrighty, so you have a mod and you want to fight against it. That is entirely possible for anyone, you need not have any great skill in coding.

There is one gigantic rule you must remember and follow. You cannot, under any circumstances, call (make a reference to) an actor, weapon, craft, or whatever, without first loading it. This means, somewhere along your logic chain, that you must have "IncludeFile = Mod.rte/Actor.ini" before you call "AddInventory = AHuman CopyOf = Actor".

Now, for purposes of this article we will be using a mod called simply "Mod.rte". Replace the word "Mod.rte" in this tutorial with your chosen mod, such as "AAL.rte" or "Kloveska.rte", though most mods nowadays already have activities packaged with them.

To begin, let's go through how to enable a pre-made activities.ini packaged with a mod.

Part one, you want to disable the basegame activities. Decide whether you want to keep campaign missions or not. If you do not mind losing the ability to play the campaign missions, simply put "//" before the IncludeFile line in Missions.rte/Index.ini referring to Activities.ini.
If you want to keep the missions, you will have to do a little more work.
In Missions.rte/Activities.ini, place a "/*" before the line "AddActivity = GABaseDefense", then a "*/" after the last line in the file. This will remove the skirmish activities while preserving your missions.

Now, part two. This may not be necessary, but check in your Mod.rte/Index.ini for an IncludeFile line for its Activities.ini. It may be commented out (a "//" to the left of the IncludeFile line). If it is, uncomment it (remove the "//"). This will enable the mod activities, and you're done.

Now we're going to be creating our own Activities.ini for mods that do not include them.
For starters, disable the basegame activites as described above. Then, copy Missions.rte/Activities.ini, and paste it into "Mod.rte". Before we do anything more, add a line to Mod.rte/Index.ini including the new activities.ini. This should look something like "IncludeFile = Mod.rte/Activities.ini".
To begin to modify your new activities, open the file up and remove the "AddActivity = GAScripted" blocks. You do not need them. Then, remove all the " AddAttackerSpawn = ACDropShip" or "AddAttackerSpawn = ACRocket" blocks. You are going to replace them with the mod's parts. So, your file should look something like this when you're done.
Code:
AddActivity = GABaseDefense
   PresetName = Skirmish Defense
   SceneName = Grasslands
   TeamCount = 2
   PlayerCount = 1
   TeamOfPlayer1 = 0
   TeamOfPlayer2 = 1
   FundsOfTeam1 = 10000
   FundsOfTeam2 = 10000
   CPUTeam = 1
   Difficulty = 3
   SpawnIntervalEasiest = 20000
   SpawnIntervalHardest = 8000

You can modify the "FundsOfTeamX" lines to change the amount of starting gold. There is a limit, but I do not know it exactly, so I will say that you should keep it to 200000 or lower.

Now, to actually add some spawns. You will need to do a little bit of diving in the mod's inis. To add spawns, look for something like "AddActor = AHuman (nextline tab) PresetName = Actor". This means that an actor called "Actor" can be used in your activities. AddActor = ACrab, AddActor = ACDropShip, AddActor = ACRocket, AddDevice = HDFirearm, AddDevice = TDExplosive, and AddDevice = HeldDevice are all things you can spawn in your activities. Copy down their PresetNames, as well as the data type (the thing after AddDevice =).
A basic spawn block.
Code:
   AddAttackerSpawn = ACDropShip
      CopyOf = Dropship
      AddInventory = AHuman
         CopyOf = Actor
         AddInventory = HDFirearm
            CopyOf = Gun

This is saying that you want a dropship with a presetname of "Dropship" to be loaded with an actor, "Actor", equipped with a gun "Gun. You can add all the "AddInventory" blocks you want, though usually most people keep it to about two guns and a digger and a grenade, if that.
Continue to add "AddAttackerSpawn" blocks until you are satisfied with your dastardy creation. Then, save it and start up Cortex.

One of three things can happen here. More, actually, but these are the three I'm specifically going over here.
1. Cortex will start up and everything will work fine.
-Solution: Survive your newly created onslaught.
2. Cortex will start up, but when you select a difficulty in skirmish mode it will crash. Boo!
-Solution: Make sure your activities is loaded in the mod's index.
3. Cortex will not start up and give an error, about not being able to find "Actor" or something of that sort. Boo!
-Solution: Make sure you copied down the data types and PresetNames of all the objects you want to load.

If you get an error that is not one of the above, post in Support. With plenty of details as to exactly what went wrong.

And that's it. One step closer to modding in Cortex. Congratulations if you got it. If you didn't, carefully check your work.


Sat Mar 21, 2009 4:51 am
Profile
User avatar

Joined: Sun Aug 31, 2008 5:22 pm
Posts: 156
Location: Finland
Reply with quote
Post Re: Making or modifying an Activites.ini
Very good tutorial I think. :smile:

Could be stickied.


Sat Mar 21, 2009 1:57 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Making or modifying an Activites.ini
Put it on the Wiki, since it's more up-to-date than mine.


Sun Mar 22, 2009 6:32 am
Profile
User avatar

Joined: Tue Mar 24, 2009 10:47 pm
Posts: 7
Reply with quote
Post Re: Making or modifying an Activites.ini
man nice post!
i have AAL mod and i want to modify this, i need this mod without units (robots etc) to play only with modules, weapons and normal humans ^^

this is .index, how i modify?

Image

help


Tue Mar 24, 2009 11:06 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Making or modifying an Activites.ini
Grif wrote:
Put it on the Wiki, since it's more up-to-date than mine.

Done. I replaced my older version, since it's basically the same thing.


Wed Mar 25, 2009 2:07 am
Profile
User avatar

Joined: Tue Mar 24, 2009 10:47 pm
Posts: 7
Reply with quote
Post Re: Making or modifying an Activites.ini
dont work, game crash :(


Wed Mar 25, 2009 5:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.061s | 13 Queries | GZIP : Off ]