View unanswered posts | View active topics It is currently Sat Dec 28, 2024 5:18 pm



Reply to topic  [ 4 posts ] 
 How can i change into another mod spawn 
Author Message

Joined: Mon Jul 18, 2011 12:39 pm
Posts: 1
Reply with quote
Post 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.


Mon Jul 18, 2011 12:45 pm
Profile

Joined: Mon Dec 27, 2010 3:45 am
Posts: 33
Reply with quote
Post 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.


Wed Jul 20, 2011 3:28 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post 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.


Wed Jul 20, 2011 4:00 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Wed Jul 20, 2011 4:07 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.031s | 14 Queries | GZIP : Off ]