Page 1 of 2

Problems with scripts [Solved]

Posted: Thu Jul 27, 2017 3:34 pm
by F1ghter16
Sooooo I've had issues with getting custom sides to work (which I still haven't been able to get working) and also doing some other things to customize my custom worlds via the scripts. I think the problem I am having is something along the lines of the changes I am applying are not doing anything or even being regonized. I always save my work and munge everything properly (I think) but nothing works. Any solutions or suggestions?

Re: Problems with scripts

Posted: Thu Jul 27, 2017 3:36 pm
by LitFam
First question I want to ask you how fast is the munge?

Re: Problems with scripts

Posted: Thu Jul 27, 2017 6:34 pm
by F1ghter16
When doing the munge for world creation, it takes the standard time (don't know exactly what that is off-hand). When munging with Common selected, it takes about two and a half minutes on average. Munging everything takes about three to four minutes

Re: Problems with scripts

Posted: Thu Jul 27, 2017 7:02 pm
by LitFam
Ok, that means you have the fix. Double check your units, .req, .odf, .lua again.

Re: Problems with scripts

Posted: Thu Jul 27, 2017 8:12 pm
by F1ghter16
Everything looks like it should. Something that I forgot to mention earlier was that fact that I can't even change skins and such, which is kinda annoying. I'm starting to wonder if it's just my computer system that doesn't like modding.

Re: Problems with scripts

Posted: Thu Jul 27, 2017 8:23 pm
by LitFam
F1ghter16 wrote:Everything looks like it should. Something that I forgot to mention earlier was that fact that I can't even change skins and such, which is kinda annoying. I'm starting to wonder if it's just my computer system that doesn't like modding.
Did you apply the dc to the lua?

For example: ReadDataFile("dc:SIDE\\rep.lvl",

Re: Problems with scripts

Posted: Thu Jul 27, 2017 10:27 pm
by F1ghter16
Yes I have. Do it every single time so I don't know what else to do. I've tried using many, many tutorials but nothing is working.

Re: Problems with scripts

Posted: Fri Jul 28, 2017 2:17 am
by LitFam
Can you post your .lua script please.

Re: Problems with scripts

Posted: Fri Jul 28, 2017 10:14 am
by F1ghter16
I'm kinda new at posting files like a .lua on GameToast, so could you maybe tell me how to do that (hopefully this won't count as a double question)? Once I know how I'll post it right away.

Re: Problems with scripts

Posted: Fri Jul 28, 2017 10:31 am
by LitFam
click the hide button and post your .lua code in it

Example (This .lua code is from my mod)
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
Conquest = ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

-- These variables do not change
ATT = 1
DEF = 2

-- Empire Attacking (attacker is always #1)
CIS = ATT
REP = DEF

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()

AddDeathRegion("death")
AddDeathRegion("death1")
AddDeathRegion("death2")
AddDeathRegion("death3")
AddDeathRegion("death4")

SetProperty ("LibCase1","MaxHealth",1000)
SetProperty ("LibCase2","MaxHealth",1000)
SetProperty ("LibCase3","MaxHealth",1000)
SetProperty ("LibCase4","MaxHealth",1000)
SetProperty ("LibCase5","MaxHealth",1000)
SetProperty ("LibCase6","MaxHealth",1000)
SetProperty ("LibCase7","MaxHealth",1000)
SetProperty ("LibCase8","MaxHealth",1000)
SetProperty ("LibCase9","MaxHealth",1000)
SetProperty ("LibCase10","MaxHealth",1000)
SetProperty ("LibCase11","MaxHealth",1000)
SetProperty ("LibCase12","MaxHealth",1000)
SetProperty ("LibCase13","MaxHealth",1000)
SetProperty ("LibCase14","MaxHealth",1000)

SetProperty ("LibCase1","CurHealth",1000)
SetProperty ("LibCase2","CurHealth",1000)
SetProperty ("LibCase3","CurHealth",1000)
SetProperty ("LibCase4","CurHealth",1000)
SetProperty ("LibCase5","CurHealth",1000)
SetProperty ("LibCase6","CurHealth",1000)
SetProperty ("LibCase7","CurHealth",1000)
SetProperty ("LibCase8","CurHealth",1000)
SetProperty ("LibCase9","CurHealth",1000)
SetProperty ("LibCase10","CurHealth",1000)
SetProperty ("LibCase11","CurHealth",1000)
SetProperty ("LibCase12","CurHealth",1000)
SetProperty ("LibCase13","CurHealth",1000)
SetProperty ("LibCase14","CurHealth",1000)

EnableSPHeroRules()

DisableBarriers("SideDoor1")
DisableBarriers("MainLibraryDoors")
DisableBarriers("SideDoor2")
DisableBarriers("SIdeDoor3")
DisableBarriers("ComputerRoomDoor1")
DisableBarriers("StarChamberDoor1")
DisableBarriers("StarChamberDoor2")
DisableBarriers("WarRoomDoor1")
DisableBarriers("WarRoomDoor2")
DisableBarriers("WarRoomDoor3")
PlayAnimation("DoorOpen01")
PlayAnimation("DoorOpen02")

--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

SetUberMode(1);

end

function ScriptInit()
-- Designers, these two lines *MUST* be first.

SetPS2ModelMemory(4056000)

SetMapNorthAngle(180, 1)
SetMaxFlyHeight(25)
SetMaxPlayerFlyHeight (25)
AISnipeSuitabilityDist(30)

SetMemoryPoolSize("Music", 33)

ReadDataFile("ingame.lvl")

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_macewindu")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_officer",
"cis_inf_sniper",
"cis_inf_droideka",
"cis_hero_darthmaul")

ReadDataFile("dc:SIDE\\rep.lvl",
"dwt_inf_soldier_1",
"dwt_inf_soldier_2",
"dwt_inf_soldier_3",
"dwt_inf_soldier_4",
"dwt_inf_soldier_5",
"dwt_inf_soldier_6",
"dwt_inf_soldier_7",
"dwt_inf_soldier_8",
"dwt_inf_soldier_9",
"dwt_inf_soldier_10",
"dwt_inf_soldier_11",
"dwt_inf_soldier_12",
"dwt_inf_soldier_13",
"dwt_inf_soldier_14")

SetupTeams{

rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = {"dwt_inf_soldier_1",25, 25},
assault = {"dwt_inf_soldier_2",5, 5},
engineer = {"dwt_inf_soldier_4",5, 5},
sniper = {"dwt_inf_soldier_3",5, 5},
officer = {"dwt_inf_soldier_5",1, 1},
special = {"dwt_inf_soldier_6",1, 1},
},

cis = {
team = CIS,
units = 50,
reinforcements = 150,
soldier = {"dwt_inf_soldier_8",25, 25},
assault = {"dwt_inf_soldier_9",5, 5},
engineer = {"dwt_inf_soldier_14",5, 5},
sniper = {"dwt_inf_soldier_10",5, 5},
officer = {"dwt_inf_soldier_11",2, 2},
special = {"dwt_inf_soldier_12",1, 1},
},

}

AddUnitClass(REP,"dwt_inf_soldier_7",1, 1)
AddUnitClass(CIS,"dwt_inf_soldier_13",1, 1)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(1, 0) --
AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponCnt = 210
SetMemoryPoolSize("Aimer", 22)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 250)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 18)
SetMemoryPoolSize("EntitySoundStream", 10)
SetMemoryPoolSize("EntitySoundStatic", 0)
SetMemoryPoolSize("MountedTurret",12)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 375)
SetMemoryPoolSize("SoundSpaceRegion", 38)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 140)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize ("FLEffectObject::OffsetMatrix", 5000)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
SetDenseEnvironment("True")
-- SetMaxFlyHeight(25)
--SetMaxPlayerFlyHeight (25)
AddDeathRegion("DeathRegion1")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

-- Camera Stats
--Tat 1 - Dune Sea
AddCameraShot(0.419938, 0.002235, -0.907537, 0.004830, -15.639358, 5.499980, -176.911179);
AddCameraShot(0.994506, 0.104463, -0.006739, 0.000708, 1.745251, 5.499980, -118.700668);
AddCameraShot(0.008929, -0.001103, -0.992423, -0.122538, 1.366768, 16.818106, -114.422173);
AddCameraShot(0.761751, -0.117873, -0.629565, -0.097419, 59.861904, 16.818106, -81.607773);
AddCameraShot(0.717110, -0.013583, 0.696703, 0.013197, 98.053314, 11.354497, -85.857857);
AddCameraShot(0.360958, -0.001053, -0.932577, -0.002721, 69.017578, 18.145807, -56.992413);
AddCameraShot(-0.385976, 0.014031, -0.921793, -0.033508, 93.111061, 18.145807, -20.164375);
AddCameraShot(0.695468, -0.129569, -0.694823, -0.129448, 27.284357, 18.145807, -12.377695);
AddCameraShot(0.009002, -0.000795, -0.996084, -0.087945, 1.931320, 13.356332, -16.410583);
AddCameraShot(0.947720, -0.145318, 0.280814, 0.043058, 11.650738, 16.955814, 28.359180);
AddCameraShot(0.686380, -0.127550, 0.703919, 0.130810, -30.096384, 11.152356, -63.235146);
AddCameraShot(0.937945, -0.108408, 0.327224, 0.037821, -43.701199, 8.756138, -49.974789);
AddCameraShot(0.531236, -0.079466, -0.834207, -0.124787, -62.491230, 10.305247, -120.102989);
AddCameraShot(0.452286, -0.179031, -0.812390, -0.321572, -50.015198, 15.394646, -114.879379);
AddCameraShot(0.927563, -0.243751, 0.273918, 0.071982, 26.149965, 26.947924, -46.834148);

end

Re: Problems with scripts

Posted: Sat Jul 29, 2017 11:30 am
by F1ghter16
Ok, here's what I got right now:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

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


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)

conquest:Start()

EnableSPHeroRules()

end


---------------------------------------------------------------------------
-- 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()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"jdi_demojedi",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")


ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")
AddUnitClass(REP, "jdi_demojedi")

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:VOI\\VOI.lvl", "VOI_conquest")
ReadDataFile("dc:VOI\\VOI.lvl", "VOI_conquest")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end
I decided to use an example side for this round just to make sure I had everything I needed rather than miss a few things.

EDIT
I believe I have found the problem (not solution) with the scripting. It appears that I can't add anything to the original, but if I move stuff around, such as default units already in the .lua, things change, but that's it (I was able to give the rep a droideka, but nothing outside of the pre-set list of units, such as a stormtrooper and such). I don't think it's necessarily something wrong with my scripting abilities, but something internal. So now I need a solution to this narrowed down issue.

Re: Problems with scripts

Posted: Sat Jul 29, 2017 2:17 pm
by ARCTroopaNate
Please post your lua, are you loading the units you're trying to add in addition to setting them up in the setup teams area??

Re: Problems with scripts

Posted: Sat Jul 29, 2017 2:33 pm
by LitFam
He did post the .lua

Re: Problems with scripts

Posted: Sat Jul 29, 2017 2:45 pm
by ARCTroopaNate
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman")

You need this as well if you're going to add the stormtrooper for example, you need to load the unit first (here)

Before actually making it a playable units (Done with setup teams)

Re: Problems with scripts

Posted: Sat Jul 29, 2017 3:30 pm
by F1ghter16
ARCTroopaNate wrote:ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman")

You need this as well if you're going to add the stormtrooper for example, you need to load the unit first (here)

Before actually making it a playable units (Done with setup teams)
I have tried using that recently, but it doesn't work. I think my problems have to do with either BF2 ModTools or BF2 not accepting any changes or additions to the script. I don't know if there's something I need to change or what.



EDIT
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")

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

WookieTeam= 3

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")

EnableSPHeroRules()

--CP SETUP for CONQUEST

cp1 = CommandPost:New{name = "CP1CON"}
cp3 = CommandPost:New{name = "CP3CON"}
cp4 = CommandPost:New{name = "CP4CON"}
cp5 = CommandPost:New{name = "CP5CON"}

conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.con", textDEF = "game.modes.con2", multiplayerRules = true}

conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)

conquest.OnStart = function(self)
conquest.goal1 = AddAIGoal(REP, "Defend", 30, "gatepanel")
conquest.goal2 = AddAIGoal(CIS, "Destroy", 30, "gatepanel")
conquest.goal3 = AddAIGoal(CIS, "Destroy", 10, "woodl")
conquest.goal4 = AddAIGoal(CIS, "Destroy", 10, "woodc")
conquest.goal5 = AddAIGoal(CIS, "Destroy", 10, "woodr")
conquest.goal6 = AddAIGoal(REP, "Defend", 10, "woodl")
conquest.goal7 = AddAIGoal(REP, "Defend", 10, "woodc")
conquest.goal8 = AddAIGoal(REP, "Defend", 10, "woodr")
end

conquest:Start()

--Gate Stuff --
BlockPlanningGraphArcs("seawall1")
BlockPlanningGraphArcs("woodl")
BlockPlanningGraphArcs("woodc")
BlockPlanningGraphArcs("woodr")
DisableBarriers("disableme");

SetProperty("woodl", "MaxHealth", 15000)
SetProperty("woodl", "CurHealth", 15000)
SetProperty("woodr", "MaxHealth", 15000)
SetProperty("woodr", "CurHealth", 15000)
SetProperty("woodc", "MaxHealth", 15000)
SetProperty("woodc", "CurHealth", 15000)
SetProperty("gatepanel", "MaxHealth", 1000)
SetProperty("gatepanel", "CurHealth", 1000)


OnObjectKillName(PlayAnimDown, "gatepanel");
OnObjectRespawnName(PlayAnimUp, "gatepanel");
OnObjectKillName(woodl, "woodl");
OnObjectKillName(woodc, "woodc");
OnObjectKillName(woodr, "woodr");
OnObjectRespawnName(woodlr, "woodl");
OnObjectRespawnName(woodcr, "woodc");
OnObjectRespawnName(woodrr, "woodr");
end

function PlayAnimDown()
PauseAnimation("thegateup");
RewindAnimation("thegatedown");
PlayAnimation("thegatedown");
ShowMessageText("level.kas2.objectives.gateopen",1)
ScriptCB_SndPlaySound("KAS_obj_13")
SetProperty("gatepanel", "MaxHealth", 2200)
-- SetProperty("gatepanel", "CurHealth", 50000)
-- PlayAnimation("gatepanel");
--SetProperty("gatepanel", "MaxHealth", 1e+37)
--SetProperty("gatepanel", "CurHealth", 1e+37)


-- Allowing AI to run under gate
UnblockPlanningGraphArcs("seawall1");
DisableBarriers("seawalldoor1");
DisableBarriers("vehicleblocker");

end

function PlayAnimUp()
PauseAnimation("thegatedown");
RewindAnimation("thegateup");
PlayAnimation("thegateup");


-- Allowing AI to run under gate
BlockPlanningGraphArcs("seawall1");
EnableBarriers("seawalldoor1");
EnableBarriers("vehicleblocker");
SetProperty("gatepanel", "MaxHealth", 1000)
SetProperty("gatepanel", "CurHealth", 1000)

end

function woodl()
UnblockPlanningGraphArcs("woodl");
DisableBarriers("woodl");
SetProperty("woodl", "MaxHealth", 1800)
-- SetProperty("woodl", "CurHealth", 15)
end

function woodc()
UnblockPlanningGraphArcs("woodc");
DisableBarriers("woodc");
SetProperty("woodc", "MaxHealth", 1800)
-- SetProperty("woodc", "CurHealth", 15)
end

function woodr()
UnblockPlanningGraphArcs("woodr");
DisableBarriers("woodr");
SetProperty("woodr", "MaxHealth", 1800)
-- SetProperty("woodr", "CurHealth", 15)
end

function woodlr()
BlockPlanningGraphArcs("woodl")
EnableBarriers("woodl")
SetProperty("woodl", "MaxHealth", 15000)
SetProperty("woodl", "CurHealth", 15000)
end

function woodcr()
BlockPlanningGraphArcs("woodc")
EnableBarriers("woodc")
SetProperty("woodc", "MaxHealth", 15000)
SetProperty("woodc", "CurHealth", 15000)
end

function woodrr()
BlockPlanningGraphArcs("woodr")
EnableBarriers("woodr")
SetProperty("woodr", "MaxHealth", 15000)
SetProperty("woodr", "CurHealth", 15000)
end

function ScriptInit()
-- Designers, these two lines *MUST* be first!
StealArtistHeap(800 * 1024)
SetPS2ModelMemory(3535000)
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(70)

ReadDataFile("sound\\kas.lvl;kas2cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"cis_inf_droideka",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"all_inf_ep3_officer",
"rep_hero_yoda",
"rep_inf_deathclone",
"rep_hover_fightertank",
"rep_fly_cat_dome",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\pms.lvl",
"rep_inf_deathclone")
ReadDataFile("SIDE\\cis.lvl",
"cis_tread_snailtank",
"cis_inf_rifleman",
-- "cis_fly_gunship_dome",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hover_stap",
"cis_inf_officer",
-- "cis_walk_spider",
"cis_hero_jangofett",
"cis_inf_droideka")
ReadDataFile("SIDE\\wok.lvl",
"wok_inf_basic")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_beam",
"tur_bldg_recoilless_kas")

SetupTeams{

rep={
team = REP,
units = 29,
reinforcements = 150,
soldier = {"rep_inf_ep3_rifleman",10, 25},
assault = {"rep_inf_ep3_rocketeer",1, 4},
engineer = {"rep_inf_ep3_engineer",1, 4},
sniper = {"cis_inf_droideka",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = {"rep_inf_ep3_jettrooper",1, 4},


},

cis={
team = CIS,
units = 29,
reinforcements = 150,
soldier = {"cis_inf_rifleman",10, 25},
assault = {"cis_inf_rocketeer",1, 4},
engineer = {"cis_inf_engineer",1, 4},
sniper = {"cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = {"cis_inf_droideka",1, 4},
}
}

SetHeroClass(REP, "rep_hero_yoda")

SetHeroClass(CIS, "cis_hero_jangofett")

AddUnitClass(REP, "rep_inf_deathclone")

SetTeamName(3, "locals")
SetTeamIcon(3, "all_icon")
AddUnitClass(3, "wok_inf_warrior",2)
AddUnitClass(3, "wok_inf_rocketeer",2)
AddUnitClass(3, "wok_inf_mechanic",1)

SetUnitCount(3, 5)
AddAIGoal(WookieTeam, "Deathmatch", 100)
SetTeamAsFriend(ATT,3)
SetTeamAsFriend(3,ATT)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 6) -- 4 droidekas (special case: 0 leg pairs)
AddWalkerType(1, 0) --
-- AddWalkerType(2, 2) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponCnt = 230
SetMemoryPoolSize("Aimer", 70)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 220)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityHover", 11)
SetMemoryPoolSize("EntityLight", 40)
SetMemoryPoolSize("EntityCloth", 58)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntitySoundStream", 3)
SetMemoryPoolSize("EntitySoundStatic", 120)
SetMemoryPoolSize("MountedTurret", 15)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 300)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 512)
SetMemoryPoolSize("TentacleSimulator", 8)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:KA1\\kas2.lvl", "kas2_con")
SetDenseEnvironment("false")

SetMaxFlyHeight(65)
SetMaxPlayerFlyHeight(65)

-- Birdies
SetNumBirdTypes(1)
SetBirdType(0,1.0,"bird")

-- Fishies
SetNumFishTypes(1)
SetFishType(0,0.8,"fish")

-- Local Stats
--SetTeamName(3, "locals")
--SetTeamIcon(3, "all_icon")
--AddUnitClass(3, "wok_inf_warrior", 3)
--AddUnitClass(3, "wok_inf_rocketeer", 2)
--AddUnitClass(3, "wok_inf_mechanic", 2)
--SetUnitCount(3, 7)
--SetTeamAsEnemy(3,DEF)
--SetTeamAsFriend(3,ATT)

-- Sound

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "wok_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
AudioStreamAppendSegments("sound\\global.lvl", "wok_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\kas.lvl", "kas")
OpenAudioStream("sound\\kas.lvl", "kas")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetAmbientMusic(REP, 1.0, "rep_kas_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_kas_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_kas_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_kas_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_kas_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_kas_amb_end", 2,1)

SetVictoryMusic(REP, "rep_kas_amb_victory")
SetDefeatMusic (REP, "rep_kas_amb_defeat")
SetVictoryMusic(CIS, "cis_kas_amb_victory")
SetDefeatMusic (CIS, "cis_kas_amb_defeat")

SetOutOfBoundsVoiceOver(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

SetAttackingTeam(ATT)


--Kas2 Docks
--Wide beach shot
AddCameraShot(0.977642, -0.052163, -0.203414, -0.010853, 66.539520, 21.864969, 168.598495);
AddCameraShot(0.969455, -0.011915, 0.244960, 0.003011, 219.552948, 21.864969, 177.675674);
AddCameraShot(0.995040, -0.013447, 0.098558, 0.001332, 133.571289, 16.216759, 121.571236);
AddCameraShot(0.350433, -0.049725, -0.925991, -0.131394, 30.085188, 32.105236, -105.325264);



-- GOOD SHOTS --
-- Gate to Right


--Kinda Cool --

AddCameraShot(0.163369, -0.029669, -0.970249, -0.176203, 85.474831, 47.313362, -156.345627);
AddCameraShot(0.091112, -0.011521, -0.987907, -0.124920, 97.554062, 53.690968, -179.347076);
AddCameraShot(0.964953, -0.059962, 0.254988, 0.015845, 246.471008, 20.362143, 153.701050);

-- OLD --

-- AddCameraShot(0.993669, -0.099610, -0.051708, -0.005183, 109.473549, 34.506077, 272.889221);
-- AddCameraShot(0.940831, -0.108255, -0.319013, -0.036707, -65.793930, 66.455177, 289.432678);


end
Here's my most recent .lua with a custom side titled "rep_inf_deathclone". I'm using Kashyyk as my modded world for this one. As far as I can tell, everything looks correct, so that's why I'm a little lost and annoyed.

Re: Problems with scripts

Posted: Sat Jul 29, 2017 5:36 pm
by ARCTroopaNate
You're trying to call for units that don't exist, there is no all_inf_ep3_officer in the rep side and there is no cis_inf_droideka in the rep side.

The top section is where you load units from side folders, the unit you're calling for has to exist in that side folder.

The game can't load something that doesn't exist, if you want to use the stormtrooper, you have to call him from the imp side, like I showed in the post above.

The setup teams section is where you determine which units are selectable for each team, if you wanted to add the imperial stormtrooper to that (after calling him from the imp side folder), you could do this to add him to the rep side AddUnitClass(REP, "imp_inf_rifleman")

Re: Problems with scripts

Posted: Sat Jul 29, 2017 6:58 pm
by F1ghter16
ARCTroopaNate wrote:You're trying to call for units that don't exist, there is no all_inf_ep3_officer in the rep side and there is no cis_inf_droideka in the rep side.

The top section is where you load units from side folders, the unit you're calling for has to exist in that side folder.

The game can't load something that doesn't exist, if you want to use the stormtrooper, you have to call him from the imp side, like I showed in the post above.

The setup teams section is where you determine which units are selectable for each team, if you wanted to add the imperial stormtrooper to that (after calling him from the imp side folder), you could do this to add him to the rep side AddUnitClass(REP, "imp_inf_rifleman")
I understand all that and have tried creating many different mods doing the things you've mentioned, but to no avail. If I try to change even the most simplest of things, such as skins, it all stays the same, no matter what.

Re: Problems with scripts

Posted: Sat Jul 29, 2017 8:11 pm
by LitFam
My friend bill is having the same problem.

Re: Problems with scripts

Posted: Sat Jul 29, 2017 10:33 pm
by F1ghter16
LitFam wrote:My friend bill is having the same problem.
Well, glad to hear that it's not just me. If anyone has a solution to this, I would love to hear it. I really want to make my own mods, but right now it seems like I can't. The best I can do right now is give the rep a droideka, which isn't very impressive.

Re: Problems with scripts

Posted: Sun Jul 30, 2017 9:23 am
by GAMEDOGSHIPMENT
After reading this, some clarification is needed here. Here are just some of the things you can use to fix your issue because loads of things can be your issue under that description so I'm just gonna go through all that might help, and wrap all that everyone else mentioned, also its a good way check for future.

(This is a bit confusing on what exactly type of side modification you trying to do but..)
Okay from what I get if...

1)
You are trying to add a completely different side then you need the side req file, req file for each odf used, the odfs, in odfs the mesh, effects and animation is called in the odf file, and the .msh files are attached with their TGA textures and .option file.

2)
If you are JUST using stock sides or other modders sides and simply adjusting them then...

As mentioned above by LitFam and ARCTroopaNate you load the proper stock/custom side in your sides folder...
LitFam wrote:
F1ghter16 wrote:Everything looks like it should. Something that I forgot to mention earlier was that fact that I can't even change skins and such, which is kinda annoying. I'm starting to wonder if it's just my computer system that doesn't like modding.
Did you apply the dc to the lua?

For example: ReadDataFile("dc:SIDE\\rep.lvl",
Then you need to assign the odf the ReadDataFile of your sides, lets say you have a sides foler "MOD" then you would load it under the ReadDataFile("dc:SIDES\\MOD.lvl", --YOU make one if it does not exist
ARCTroopaNate wrote:ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman")

You need this as well if you're going to add the stormtrooper, for example, you need to load the unit first (here)

Before actually making it a playable unit (Done with setup teams)
Here is another example of the above...
Hidden/Spoiler:
[code] ReadDataFile("dc:SIDE\\rep.lvl", --this is an example of a rep folder in your custom sides folder(basically a copy and paste)
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder",
"rep_fly_gunship",
"rep_fly_gunship_sc",
"YOUR_UNIT_ODF_HERE",
"YOUR_VEHICLE_ODF_HERE")

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat",
"cis_fly_droidgunship")
--Below is the way you load stock assets from the "allience" folder, so things like rebel units, snowspeeders and x-wings are there
ReadDataFile("SIDE\\all.lvl", --This is a stock side that is loaded from your data no custom sides folder will be needed
"all_fly_snowspeeder")

ReadDataFile("dc:SIDE\\YOURSIDENAMEFOLDER.lvl",
"YOUR_CUSTOM_UNIT_ODF_HERE",
"YOUR_CUSTOM_VEHICLE_ODF_HERE")



ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")[/code]
3)
After that IF they are units make sure they are selectable in your setupteams section...
Hidden/Spoiler:
SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 300,
soldier = { "rep_inf_ep3_rifleman",1, 2000},
assault = { "rep_inf_ep3_rocketeer",1, 400},
engineer = { "rep_inf_ep3_engineer",1, 400},
sniper = { "rep_inf_ep3_sniper",1, 400},
officer = {"rep_inf_ep3_officer",1, 400},
special = { "YOUR_UNIT_ODF_HERE",1, 400},

},
cis = {
team = CIS,
units = 40,
reinforcements = 300,
soldier = { "cis_inf_rifleman",1, 2000},
assault = { "cis_inf_rocketeer",1, 400},
engineer = { "cis_inf_engineer",1, 400},
sniper = { "cis_inf_sniper",1, 400},
officer = {"cis_inf_officer",1, 400},
special = { "cis_inf_droideka",1, 400},
}
4)
As quoted by ARCTroopaNate, you cannot simply add units that are not in the folder of such side or have names that dont actually exist as a ODF file in your Sides/odf. Result is a crash or file wont appear in game.
ARCTroopaNate wrote:You're trying to call for units that don't exist, there is no all_inf_ep3_officer in the rep side and there is no cis_inf_droideka in the rep side.

The top section is where you load units from side folders, the unit you're calling for has to exist in that side folder.

The game can't load something that doesn't exist, if you want to use the stormtrooper, you have to call him from the imp side, like I showed in the post above.

The setup teams section is where you determine which units are selectable for each team, if you wanted to add the imperial stormtrooper to that (after calling him from the imp side folder), you could do this to add him to the rep side AddUnitClass(REP, "imp_inf_rifleman")
Personally, I think the step bellow is the issue you are having

5)
STOCK SIDE VERY IMPORTANT: if you are copying the sides from stock assets and you are copying the side you want let's say "rep", you must also copy the "common" folder that is also in your stock sides folder like so...
Image

In the end in your custom sides, you must have both common and the "rep" folder (or whatever folder u used) like so....
Image

NOTE THE ADDRESS IN THOSE IMAGES, ONE IS FROM YOUR STOCK ASSETS (FIRST ONE) THE SECOND ONE IS IN YOUR MODS SIDES FOLDER

6)
And a side note, some adjustments require more memory so make sure the pool memory is enough for each entity from the following list...

By: AceMastermind
Thread link = http://www.gametoast.com/viewtopic.php?p=469068#p469068

In the code below you simply check your BFront2.log from your dev mod tools which pools might cuz crashes or simply says that it refuses to load if there is not enough memory.

Then grab the one that has low memory and either if its there bump it up, or create a new one by taking the one in the list below and putting this under the poolsize section...

Code: Select all

 SetMemoryPoolSize("From Below List", 600)
Hidden/Spoiler:
[code]AcklayData
ActiveRegion
Aimer
AmmoCounter
Asteroid
BaseHint
ClothData
Combo
Combo::Attack
Combo::Condition
Combo::DamageSample
Combo::Deflect
Combo::State
Combo::Transition
CommandFlyer
CommandHover
CommandWalker
ConnectivityGraphFollower
EnergyBar
EntityBuildingArmedDynamic
EntityCarrier
EntityCloth
EntityDefenseGridTurret
EntityDroid
EntityDroideka
EntityFlyer
EntityHover
EntityLight
EntityMine
EntityPortableTurret
EntityRemoteTerminal
EntitySoldier
EntitySoundStatic
EntitySoundStream
EntityTauntaun
EntityWalker
FlagItem
FLEffectObject::OffsetMatrix
LightFlash
MountedTurret
Music
Navigator
Obstacle
Ordnance
OrdnanceTowCable
ParticleEmitter
ParticleEmitterInfoData
ParticleEmitterObject
ParticleTransformer::ColorTrans
ParticleTransformer::PositionTr
ParticleTransformer::SizeTransf
PassengerSlot
PathFollower
PathNode
PathRequest
PowerupItem
RedOmniLight
ShieldEffect
SoldierAnimation
SoundSpaceRegion
TentacleSimulator
Timer
TreeGridStack
UnitAgent
UnitController
Weapon


Memory pools with dev notes:
SetMemoryPoolSize("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize("Combo::Attack",150) -- should be ~8-12x #Combo
SetMemoryPoolSize("Combo::Condition",256) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize("Combo::Deflect",64) -- should be ~1x #combo
SetMemoryPoolSize("Combo::State",256) -- should be ~12x #Combo
SetMemoryPoolSize("Combo::Transition",75) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityFlyer", 6) -- to account for rocket upgrade
SetMemoryPoolSize("EntityFlyer", 9) -- 3xATST + rocket upgrade
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("OrdnanceTowCable", 4) -- need extra for wrapped/fallen cables
SetMemoryPoolSize("OrdnanceTowCable", 40) -- !!!! need +4 extra for wrapped/fallen cables !!!!
SetMemoryPoolSize("OrdnanceTowCable", 8) -- NEED +4 EXTRA CABLES FOR WRAPPED/FALLING CABLES !!!![/code]
Link to mod tools (QUESTION 4) = http://www.gametoast.com/viewtopic.php?f=27&t=13806

7)
Lastly, check out (If you did not) two great videos by jedimoose32 (GREAT GUY) that explains a lot on creating custom sides if that's what you are trying to do.
Here are the two videos on sides it may come of use if you have not seen these yet...

CUSTOM SIDES:



STOCK SIDES:


8)
And the last help from my end, I am making videos explaining how to edit stock and create custom sides so if you cannot get them to work you can check out back in a bit and check out new video tutorials they might help you out I will try to go over most major concepts.(I will update this with a link if I wont forget XD)
Here is the link to the channel if you want to see it in a week or two.

https://www.youtube.com/channel/UCrsvR2 ... freload=10

Other than that I got nothing unless I can actually see all your Lua and folder hierarchy.