Data Realms Fan Forums
http://45.55.195.193/

How can i change into another mod spawn
http://45.55.195.193/viewtopic.php?f=4&t=24597
Page 1 of 1

Author:  Aldur [ Mon Jul 18, 2011 12:45 pm ]
Post subject:  How can i change into another mod spawn

Hello i wanted to know how can i change spawn in Cortex Command. I tried to use mod manager by SneakMan but i don t know to add for example UniTec to list in that manager. There are only classic items. I can use UniTec normaly in game but i don t know how to spawn them. Please help.

Author:  god froggy [ Wed Jul 20, 2011 3:28 am ]
Post subject:  Re: How can i change into another mod spawn

This thread does smell of fail after all!

What is actually the problem if you say "you can use them normally in game but you cannot spawn them"? Images etc would be helpful.

Author:  CaveCricket48 [ Wed Jul 20, 2011 4:00 am ]
Post subject:  Re: How can i change into another mod spawn

Spawns are now managed by the Lua files that run activities/gamemodes, and the mod manager only could change the spawns when the activities were ini driven.

So, the program is outdated.

Author:  Duh102 [ Wed Jul 20, 2011 4:07 am ]
Post subject:  Re: How can i change into another mod spawn

god froggy wrote:
This thread does smell of fail after all!

Yes, posting when you don't know what he's talking about is pretty fail-y.

Original poster, what you're looking for is help in changing the activities for the game modes. In each game mode (the .lua files are in Base.rte\Scenes\Script), there will be code to spawn actors and craft. In the SkirmishDefense.lua script, it's near the bottom, it looks like this:
Code:
         local actor = {};
         for x = 0, math.ceil(math.random(3)) do
            local y = math.random();
            if y > 0.05 then
               actor[x] = CreateAHuman(self.AList[math.random(#self.AList)]);
               actor[x].Team = self.CPUTeam;
               actor[x].AIMode = Actor.AIMODE_BRAINHUNT;
               actor[x]:AddInventoryItem(CreateHDFirearm(self.WList[math.random(#self.WList)]));
               actor[x]:AddInventoryItem(CreateHDFirearm("Medium Digger"));
            else
               actor[x] = CreateACrab("Dreadnought");
               actor[x].Team = self.CPUTeam;
               actor[x].AIMode = Actor.AIMODE_BRAINHUNT;
            end
         end


Now this references two lists, named WList and AList. Those are near the top, and contain the names of everything it can spawn. They look like this (cut off for readability:
Code:
self.WList = { "Grenade Launcher", "Blaster", [...]
self.AList = { "Mia", "Dafred", "Dimitri", [...]



All you have to do to add things (or at least I think so, I have not done it in this version of Cortex Command) is to insert their PresetNames into the respective lists; devices go into the WList, guns and the like, and actors go into the AList, bodies.


This may not apply to the other scripts, you'll have to search for code similar to what's in SkirmishDefence and reverse engineer it a little to find out where it has a list of spawnables.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/