Page 1 of 1

using dc in the lua file for readdatafile...complications

Posted: Sat Aug 06, 2005 8:32 pm
by jediokram
My previous attempts at maps (using the origianl zeroeditor -not bf pro)...have been made without the dc script...the units worked ok....now i tried to use the dc part...i've copied all the odf, msh, files into their respective folders...and the req files also, however i'm not too sure where to put them, so i left them at the menu where you cna pick to go into the odf or msh...etc...folders...

something is wrong as when i try to load my level (after cleaning, munging, and putting my mod folder into the addon folder for the game...

any ideas?...here is the beginning part of my lua...

thanks in advance
>>>>>>>>>>here is the lua<<<<<<<<

---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()
-- Empire Attacking (attacker is always #1)
local REP = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2

AddMissionObjective(CIS, "red", "level.try2.objectives.1");
AddMissionObjective(CIS, "orange", "level.try2.objectives.2");
AddMissionObjective(CIS, "orange", "level.try2.objectives.3");
AddMissionObjective(REP, "red", "level.try2.objectives.1");
AddMissionObjective(REP, "orange", "level.try2.objectives.2");
AddMissionObjective(REP, "orange", "level.try2.objectives.3");




ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
-- "rep_inf_basic",
"rep_inf_clone_trooper",
-- "rep_inf_clone_pilot",
-- "rep_inf_clone_sharpshooter",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_battledroid",
-- "cis_inf_battledroid_inf",
-- "cis_inf_battledroid_av",
-- "cis_inf_battledroid_sniper",
-- "cis_inf_assault",
"cis_inf_countdooku",
"cis_inf_droideka");

SetAttackingTeam(ATT);

-- Republic Stats
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",16)
-- AddUnitClass(REP, "rep_inf_jedimale",1)
-- AddUnitClass(REP, "rep_inf_clone_pilot",3)
-- AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
-- AddUnitClass(REP, "rep_inf_clone_commander",1)
SetHeroClass(REP, "rep_inf_macewindu")

-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
-- AddUnitClass(CIS, "geo_inf_geonosian",5)
AddUnitClass(CIS, "cis_inf_battledroid",15)
-- AddUnitClass(CIS, "cis_inf_battledroid_av",2)
-- AddUnitClass(CIS, "cis_inf_battledroid_sniper",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")

-- Attacker Stats
SetUnitCount(ATT, 70)
SetReinforcementCount(ATT, 200)
-- AddBleedThreshold(ATT, 31, 0.0)
-- AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 0.75)
AddBleedThreshold(ATT, 10, 1.5)
AddBleedThreshold(ATT, 1, 3.0)

-- Defender Stats
SetUnitCount(DEF, 70)
SetReinforcementCount(DEF, 200)
-- AddBleedThreshold(DEF, 31, 0.0)
-- AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 0.75)
AddBleedThreshold(DEF, 10, 1.5)
AddBleedThreshold(DEF, 1, 3.0)

-- Local Stats
-- SetTeamName(3, "locals")
-- AddUnitClass(3, "gam_inf_gamorreanguard",3)
-- SetUnitCount(3, 3)
-- SetTeamAsEnemy(3, ATT)
-- SetTeamAsEnemy(3, DEF)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 4) -- Droidekas
AddWalkerType(1, 4) -- number of leg pairs, count
AddWalkerType(2, 0)
-- SetMemoryPoolSize("EntityHover", 12)
-- SetMemoryPoolSize("EntityFlyer", 5)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("MountedTurret", 22)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:try2\\try2.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
--SetMaxFlyHeight(90)
--SetMaxPlayerFlyHeight(90)

RE: using dc in the lua file for readdatafile...complicati

Posted: Sat Aug 06, 2005 8:39 pm
by CarbineImpulse
dc part refers to downloadable content.. It'll get what you request from the sides folder. There could be a conflict ion your script because you've got the side names the same as the normal ones for the game. are you trying to add new sides? Saturn V has a great tutorial all about dealing with adding and modding sides etc on his site.

If you just want the regular teams on the map then there is no need to amend anything, BFBuilder will sort it for you.

hope that is of some help :)

Posted: Sat Aug 06, 2005 8:55 pm
by Delta_57_Dash
ReadDataFile("dc:SIDE\\rep.lvl",
-- "rep_inf_basic",
"rep_inf_clone_trooper",
-- "rep_inf_clone_pilot",
-- "rep_inf_clone_sharpshooter",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_battledroid",
-- "cis_inf_battledroid_inf",
-- "cis_inf_battledroid_av",
-- "cis_inf_battledroid_sniper",
-- "cis_inf_assault",
"cis_inf_countdooku",
"cis_inf_droideka");
Change to

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_?",
"cis_inf_countdooku",
"cis_inf_droideka");

look through the req files and find the one that is like cis_inf_basicbattledroid and put that where I have cis_inf_?