Ok i need a reminder on all the steps that need to be taken in order to add a mode such as c_eli. I've done this, and I think i have skipped something.
Posted: Fri Jan 19, 2007 9:21 pm
by Elmo
This is alot... but this was a chat with Schizo i had over Xfire about doing what you want to do... It's long, but Im sure it will help... (it's a conversation)
Hidden/Spoiler:
[quote][20:40] ˚ﻛςђίzø˚: all you really need to do is rename my BOSc_eli to BOMc_eli (i'm assuming BOM is your Mod ID)
[20:40] [GT-B] Elmo: yeah
[20:40] ˚ﻛςђίzø˚: then go into the LUA, and scroll down to the section where it calls for the layers
[20:44] ˚ﻛςђίzø˚: and replace the two lines that are there with the ones you just copied
[20:44] ˚ﻛςђίzø˚: so that the lines in the eli LUA are the same exact things as the ones in your conquest LUA
[20:44] [GT-B] Elmo: ok
[20:45] ˚ﻛςђίzø˚: so that when you do that, the eli LUA will use the regular conquest layer when in-game, so it's essentially just a regular conquest mode
[20:45] [GT-B] Elmo: ok
[20:45] [GT-B] Elmo: so now what?
[20:45] ˚ﻛςђίzø˚: do you have Majin's sides, or has he not sent them to you yet?
[20:45] [GT-B] Elmo: nope...
[20:45] [GT-B] Elmo: in a few weeks
[20:46] ˚ﻛςђίzø˚: well, you can't really do much in terms of sides in that case at this point
[20:46] ˚ﻛςђίzø˚: but when you get the sides
[20:46] ˚ﻛςђίzø˚: then up where all my sides are set up and everything
[20:46] ˚ﻛςђίzø˚: just set up Majin's sides that he sends to you the same way, with the different names and such
[20:46] ˚ﻛςђίzø˚: you know how to set them up, correct?
[20:47] [GT-B] Elmo: no
[20:48] [GT-B] Elmo: Im not experienced with that
[20:48] ˚ﻛςђίzø˚: well, i can help you when you get the actual sides
[20:48] [GT-B] Elmo: I'm very much a newbie still
[20:48] ˚ﻛςђίzø˚: but until then we can't really do much
[20:48] [GT-B] Elmo: But ok
[20:48] ˚ﻛςђίzø˚: so until Majin actually sends you the sides you won't be able to play the assault game mode
[20:48] [GT-B] Elmo: yeah ok
[20:48] ˚ﻛςђίzø˚: unless you just use the sides from your regular conquest
[20:48] [GT-B] Elmo: nah not yet
[20:49] ˚ﻛςђίzø˚: if you just want to test it out and see if the assault mode works at least, then you can always simply copy the side sections and stuff from your conquest LUA into your assault LUA
[20:49] ˚ﻛςђίzø˚: but since we're done with the LUA editing
[20:49] ˚ﻛςђίzø˚: now we need to go and make it so that the game will actually know whether to call for the LUA or not
[20:49] [GT-B] Elmo: ok
[20:50] ˚ﻛςђίzø˚: so now, go back a few folders so as you're in your data_ModID/Common folder
[20:50] [GT-B] Elmo: ok
[20:50] ˚ﻛςђίzø˚: do you see a file named "mission"?
[20:50] [GT-B] Elmo: yes
[20:50] ˚ﻛςђίzø˚: open that
[20:50] [GT-B] Elmo: k
[20:50] ˚ﻛςђίzø˚: and look at the very bottom section
[20:51] ˚ﻛςђίzø˚: it should have something like this
[20:51] ˚ﻛςђίzø˚: REQN
{
"lvl"
"BOSg_con"
"BOSc_con"
}
[20:51] ˚ﻛςђίzø˚: or whatever your world has at the moment
[20:51] ˚ﻛςђίzø˚: do you see the lines i'm talking about?
[20:51] [GT-B] Elmo: In the mission folder ? :S
[20:51] ˚ﻛςђίzø˚: no
[20:51] ˚ﻛςђίzø˚: the mission file
[20:51] [GT-B] Elmo: OH
[20:51] [GT-B] Elmo: ok
[20:51] ˚ﻛςђίzø˚: REQ file
[20:51] [GT-B] Elmo: i see
[20:51] [GT-B] Elmo: now
[20:51] [GT-B] Elmo: I see it
[20:52] ˚ﻛςђίzø˚: open the REQ file and go down to the bottom so you see those lines
[20:52] ˚ﻛςђίzø˚: paste what your file says
[20:52] [GT-B] Elmo: k
[20:52] [GT-B] Elmo: to where?
[20:52] ˚ﻛςђίzø˚: just to show me
[20:52] [GT-B] Elmo: ok
[20:52] ˚ﻛςђίzø˚: paste it so i can see
[20:52] [GT-B] Elmo: the hwole hting?
[20:52] ˚ﻛςђίzø˚: no, just the section that i'm talking about
[20:52] [GT-B] Elmo: REQN
{
"lvl"
"BOMg_con"
"BOMc_con"
}
}
[20:52] ˚ﻛςђίzø˚: okay
[20:53] ˚ﻛςђίzø˚: so now
[20:53] ˚ﻛςђίzø˚: you want to tell the game to call for your BOMc_eli LUA, correct?
[20:53] [GT-B] Elmo: yes
[20:53] ˚ﻛςђίzø˚: so what do you think we're going to do
[20:53] [GT-B] Elmo: i want to get rid of GCW too
[20:53] ˚ﻛςђίzø˚: you don't need to worry about it in this folder
[20:53] [GT-B] Elmo: add BOMc_eli
[20:53] ˚ﻛςђίzø˚: we'll get rid of GCW later
[20:53] ˚ﻛςђίzø˚: but yeah, we're going to add BOMc_eli
[20:53] [GT-B] Elmo: ok
[20:54] ˚ﻛςђίzø˚: so now, right underneath "BOMc_con"
[20:54] [GT-B] Elmo: yeah i did
[20:54] ˚ﻛςђίzø˚: add a line that says "BOMc_eli"
[20:54] ˚ﻛςђίzø˚: okay
[20:54] [GT-B] Elmo: i did
[20:54] [GT-B] Elmo:
[20:54] ˚ﻛςђίzø˚: now save the file
[20:54] ˚ﻛςђίzø˚: and close it
[20:54] [GT-B] Elmo: ok
[20:54] ˚ﻛςђίzø˚: now go into the mission folder
[20:54] ˚ﻛςђίzø˚: you should see a bunch of REQ files
[20:54] [GT-B] Elmo: yeah
[20:55] ˚ﻛςђίzø˚: do you see the REQ file named BOMc_con, or whatever
[20:55] [GT-B] Elmo: yes
[20:55] ˚ﻛςђίzø˚: what you want to do, is make a copy of thayt
[20:55] ˚ﻛςђίzø˚: *that
[20:55] [GT-B] Elmo: ok
[20:55] ˚ﻛςђίzø˚: and rename it to BOMc_eli
[20:55] ˚ﻛςђίzø˚: then, after you rename the copy (make sure not to replace the original)
[20:55] ˚ﻛςђίzø˚: open it up
[20:56] ˚ﻛςђίzø˚: it should look like this
[20:56] ˚ﻛςђίzø˚: ucft
{
REQN
{
"config"
"cor_movies"
}
REQN
{
"script"
"BOSc_con"
}
}
[20:56] ˚ﻛςђίzø˚: following me so far?
[20:56] [GT-B] Elmo: yes
[20:56] [GT-B] Elmo: i did that
[20:56] ˚ﻛςђίzø˚: i just want to make sure you're keeping up, because this can be complicated at times
[20:57] [GT-B] Elmo: yeah]
[20:57] ˚ﻛςђίzø˚: so then you see in the newly renamed BOMc_eli file, it's still calling for BOMc_con
[20:57] [GT-B] Elmo: lots more to od?
[20:57] [GT-B] Elmo: do*
[20:57] [GT-B] Elmo: yeah
[20:57] ˚ﻛςђίzø˚: so obviously you're going to rename the BOMc_con line in the REQ to BOMc_eli
[20:57] ˚ﻛςђίzø˚: now we only have one more thing to do
[20:57] [GT-B] Elmo: yeah
[20:57] [GT-B] Elmo: Ok
[20:57] ˚ﻛςђίzø˚: now go back to your data_ModID directory
[20:58] [GT-B] Elmo: ok
[20:58] ˚ﻛςђίzø˚: now go into the addme folder
[20:58] [GT-B] Elmo: k
[20:58] ˚ﻛςђίzø˚: and now open the addme file
[20:58] ˚ﻛςђίzø˚: now when you're editing this file, be VERY CAREFUL
[20:59] ˚ﻛςђίzø˚: because this is really sensitive; the smallest mistake will make the entire game crash while loading (not just loading the map; the game will crash on startup)
[20:59] [GT-B] Elmo: oh
[20:59] ˚ﻛςђίzø˚: so just follow exactly what i say
[20:59] ˚ﻛςђίzø˚: you should see a line that looks sort of like this
[20:59] ˚ﻛςђίzø˚: yours might also have the era_g = 1 stuff too
[21:00] ˚ﻛςђίzø˚: you want to delete GCW, right?
[21:00] [GT-B] Elmo: yeah
[21:00] [GT-B] Elmo: where is that line?
[21:00] ˚ﻛςђίzø˚: it's kind of near the middle
[21:00] ˚ﻛςђίzø˚: it's the big long line
[21:00] [GT-B] Elmo: ok i see it
[21:00] ˚ﻛςђίzø˚: do you see the part that says "era_g = 1,"?
[21:01] [GT-B] Elmo: yeah
[21:01] ˚ﻛςђίzø˚: delete that part out, but ONLY that part
[21:01] ˚ﻛςђίzø˚: delete the comma as well
[21:01] [GT-B] Elmo: ok
[21:01] [GT-B] Elmo: done
[21:01] ˚ﻛςђίzø˚: and make sure you only leave one space between the stuff that was before and after it as well
[21:01] [GT-B] Elmo: yep
[21:01] ˚ﻛςђίzø˚: okay, so now GCW won't show up on the map list
[21:02] [GT-B] Elmo: ok... what about mode con g =1 or what ever?
[21:02] ˚ﻛςђίzø˚: now we want to tell the game to call for our assault mode
[21:02] ˚ﻛςђίzø˚: you don't need to worry about that
[21:02] [GT-B] Elmo: ok
[21:02] [GT-B] Elmo: yes?
[21:02] ˚ﻛςђίzø˚: just telling it to ditch the GCW era completely, it'll automatically ignore anything to do with GCW, so don't worry about any lines that may call for the GCW conquest
[21:02] ˚ﻛςђίzø˚: so now, to add our assault mode
[21:02] ˚ﻛςђίzø˚: go to the end of that line
[21:02] [GT-B] Elmo: ok...
[21:03] ˚ﻛςђίzø˚: what's the last piece before the closing bracket?
[21:03] [GT-B] Elmo: a comma
[21:03] ˚ﻛςђίzø˚: no, the mode
[21:03] [GT-B] Elmo: Mode_con_c
[21:03] [GT-B] Elmo: =1 *
[21:03] ˚ﻛςђίzø˚: okay
[21:03] ˚ﻛςђίzø˚: so now, right after the comma of that line
[21:03] ˚ﻛςђίzø˚: do a single space
[21:03] [GT-B] Elmo: ok
[21:04] ˚ﻛςђίzø˚: and then type mode_eli_c = 1,
[21:04] ˚ﻛςђίzø˚: don't forget the comma
[21:04] ˚ﻛςђίzø˚: and make sure there's no space between the comma and closing bracket
[21:04] [GT-B] Elmo: done
[21:04] ˚ﻛςђίzø˚: now show me that line you just edited
[21:04] ˚ﻛςђίzø˚: the whole line
[21:04] ˚ﻛςђίzø˚: just so i can make sure it'll be fine
[21:06] ˚ﻛςђίzø˚: so now, your new game mode should show up[/quote]
Ok... just forget the part with the adding the conquest in the eli mode in the LUA... and BOM is my letter name
Edit: and forget getting rid of the GCW mode if you want it
Posted: Fri Jan 19, 2007 9:54 pm
by SBF_Dann_Boeing
Hmmm i have done all that...
take a look at my scripts
RVTc_eli.lua
Hidden/Spoiler:
[quote]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--
---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()
AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end
---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo
ReadDataFile("ingame.lvl")
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2
[quote]--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)
-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\RVT\\data\\_LVL_PC\\core.lvl")[/quote]
Posted: Fri Jan 19, 2007 10:03 pm
by Elmo
Sure that's your Addme script?
Heres mine:
Hidden/Spoiler:
[quote]--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)
-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\BOM\\data\\_LVL_PC\\core.lvl")
[/quote]
Mine's alot different than yours!
Posted: Fri Jan 19, 2007 10:38 pm
by SBF_Dann_Boeing
ooops that was the mission req
this is my addme lua
Hidden/Spoiler:
[quote]--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)
-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\RVT\\data\\_LVL_PC\\core.lvl")[/quote]
Posted: Fri Jan 19, 2007 10:44 pm
by Elmo
Looks fine to me... did you try even try assault?
Make sure you have a LUA for it named ***c_eli with all the appropriate parts... included...
I think your Addme script is ok
everything in your mission script is ok..
It looks like you have everything... IF Asault doesn't work i dont know what's wrong.
Posted: Fri Jan 19, 2007 11:44 pm
by SymbolS
way off topic: Elmo, how do you have 1,200 posts for only being here 3 months lol
Posted: Fri Jan 19, 2007 11:47 pm
by Elmo
SymbolS wrote:way off topic: Elmo, how do you have 1,200 posts for only being here 3 months lol
Not the first time anyone asked
I'm just very active and have alot of time on my hands... (plus I admit i spammed when i first joined ) LOL...
Posted: Sat Jan 20, 2007 12:45 am
by SBF_Dann_Boeing
yea i've been on for over a year and i dont even have half the posts u have o.0
anyway c_eli does not work, it crashes mid-load. g_eli works. Can someone else take a look?
LUA error?
Posted: Sat Jan 20, 2007 1:01 am
by AceMastermind
SBF_Dann_Boeing wrote:Hmmm i have done all that...
take a look at my scripts
RVTc_eli.lua
Hidden/Spoiler:
[quote]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--
---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()
AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end
---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo
ReadDataFile("ingame.lvl")
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2
yes but that is there on purpose so it can just read from the conquest layer. this works in gcw so i don't see why this wouldn't work in cw.
EDIT
now i'm getting an error reported in the BFront2.log
Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #1 to `AddUnitClass' (number expected, got nil)
stack traceback:
[C]: in function `AddUnitClass'
(none): in function `ScriptInit'
There seems to be an error surrounding the AddUnitClass part of the setup teams. I'll try removing it and see what happens
EDIT2
ok i have finally found the problem:
AddUnitClass(ALL,"rep_hero_quinlan", 1,2)
i forgot to change "ALL" to "REP" in this and the other AddUnitClass