Page 1 of 2

Bunch 'O' Questions

Posted: Wed Aug 22, 2007 7:10 am
by EGG_GUTS
1. How Do I make spears damage droids?

2. How do I make it so units don't take the CP? ( I tried CTF CP but it decreased the # of units)

Thanks

RE: Bunch

Posted: Wed Aug 22, 2007 7:14 am
by Penguin
edit the spears .odf and change the damageline for droids to 1

theres an odf line for #2, forgot what it was called though, look in the side .odfs for the 'other' sides (ewoks, tuskans/jawas, etc) you'll know it when you see it.

RE: Bunch

Posted: Wed Aug 22, 2007 8:31 am
by Ace_Azzameen_5
Is it
CapturePosts = 0

?

RE: Bunch

Posted: Wed Aug 22, 2007 8:53 am
by Penguin
if that was from the odf then yes.

Posted: Wed Aug 22, 2007 10:30 am
by EGG_GUTS
So I just add that in the ODF of the units? Could I put it in the cis_inf_default so it would work for the whole team? would that work?

Posted: Wed Aug 22, 2007 12:02 pm
by Maveritchell
EGG_GUTS wrote:So I just add that in the ODF of the units? Could I put it in the cis_inf_default so it would work for the whole team? would that work?
If it's an .odf value, and you put it in the default .odf for the whole team, yes, it will affect them all.

Posted: Wed Aug 22, 2007 12:10 pm
by Commander_Cody771
I make my jedi in BF1 capture command posts all of the time, there should be a line: capture command posts= 1 change that to 0. If the line is is not there you have to manually put it in yourself. :D

Posted: Wed Aug 22, 2007 10:07 pm
by BountyHunterV
wait so are you trying to make it so no AI players can capture cps? or nobody at all? cause if its nobody couldn't you just not put a capture region???

Posted: Thu Aug 23, 2007 9:00 am
by EGG_GUTS
Yes but the AI still try to capture it. and just stay by the cp :wink:

Posted: Thu Aug 23, 2007 9:53 am
by t551
Well, the Aigoals are still the same: move to the nearest cp and wait until you get a signal from the game. Capturing is just a by-product of this behavior. You'll probably have to give the AI a deathmatch goal or something.

Re: Bunch 'O' Questions

Posted: Fri Aug 31, 2007 12:30 pm
by EGG_GUTS
What would I add to the odf or LUA so that they would have that goal?

Re: Bunch 'O' Questions

Posted: Fri Aug 31, 2007 12:33 pm
by Teancum
In your lua. Look for AddAIGoal -- change it from Conquest to Deathmatch to change a team's preference. If it's deathmatch they'll just go for other teams.

Can You spot the fault with the locals?

Posted: Fri Aug 31, 2007 2:32 pm
by EGG_GUTS
Ok thanks. :)

EDIT
I'm trying to add locals to my map but there not showing up can anybody spot the fault?

Munge Log Says there's a bracket missing but I don't see it.
Hidden/Spoiler:
[quote]C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\BON\BONc_con.lua:133: unexpected symbol near ` '
ERROR[scriptmunge scripts\BON\BONc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\BON\BONc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\BONc_con.req]:Expecting bracket, but none was found.
File : munged\pc\bonc_con.script.req(1)...

ucft <--
ERROR[levelpack mission\BONc_con.req]:Expecting bracket, but none was found.
File : munged\pc\bonc_con.script.req(1)...

ucft <--

2 Errors 0 Warnings

WARNING[terrainmunge world1\BON.TER]:ReduceTerrainTextureUsage: corner discontinuity at (48,56)
0 Errors 1 Warnings

[/quote]
Lua
Hidden/Spoiler:
[quote]
--
-- 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"}



--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: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("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",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rocketeer",
"cis_inf_OOM-9",
"cis_inf_droideka",
"cis_inf_pilot",
"cis_hero_darthmaul",
"cis_hover_aat",
"cis_hover_stap")

ReadDataFile("dc:SIDE\\gun.lvl",
"gun_inf_rider",
"gun_inf_defender",
"gun_inf_jar",
"gun_inf_soldier")

ReadDataFile("dc:SIDE\\infantry.lvl",
"gun_inf_militiagung",
"gun_inf_officer",
"gun_inf_spearist")

ReadDataFile("dc:SIDE\\vehicles.lvl",
"cis_hover_mtt",
"gun_walk_kaadu")

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

SetupTeams{
rep = {
team = REP,
units = 175,
reinforcements = 650,
soldier = { "gun_inf_soldier",25, 40},
assault = { "gun_inf_defender",22, 26},
engineer = { "gun_inf_rider",30, 35},
sniper = { "gun_inf_spearist",25, 30},
officer = {"gun_inf_militiagung",25, 30},
special = {"gun_inf_officer",10, 14},

},
cis = {
team = CIS,
units = 175,
reinforcements = 500,
soldier = { "cis_inf_rocketeer",100, 163},
special = { "cis_inf_droideka",10, 12},
}
}

SetHeroClass(CIS, "cis_inf_OOM-9")
SetHeroClass(REP, "gun_inf_jar")

SetTeamName (3, "locals")
AddUnitClass (3, "cis_inf_pilot", 6,10)
SetUnitCount (3, 10)
AddAIGoal(3, "Deathmatch", 100)

SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
SetTeamAsFriend(DEF,3)
SetTeamAsFriend(3,DEF)

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 12) -- 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)
AddWalkerType(1, 14) -- 1x2 (14 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("CommandHover", 4)
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:BON\\BON.lvl", "BON_conquest")
ReadDataFile("dc:BON\\BON.lvl", "BON_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

[/quote]
Thanks

Re: Can You spot the fault with the locals?

Posted: Fri Aug 31, 2007 2:38 pm
by GolfBulb
QAs we talked about on Xfire i still say you have to dd the CP 3 inthe lua, even if its non captuable, maybe.... jsut dont get it a control region adn you should be okay,

Bunch 'O' Questions

Posted: Fri Aug 31, 2007 2:43 pm
by EGG_GUTS
I've done this before you don't need a capture region. But I did add a control region....Could that be causing it?

Which leads to another question..

Can I give locals vehicles? And If I can do I but it in localdef spot on the vehicle spawn?

Re: Can You spot the fault with the locals?

Posted: Fri Aug 31, 2007 3:46 pm
by Teancum
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\BON\BONc_con.lua:133: unexpected symbol near ` '
ERROR[scriptmunge scripts\BON\BONc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\BON\BONc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\BONc_con.req]:Expecting bracket, but none was found.
File : munged\pc\bonc_con.script.req(1)...

ucft <--
ERROR[levelpack mission\BONc_con.req]:Expecting bracket, but none was found.
File : munged\pc\bonc_con.script.req(1)...

ucft <--

2 Errors 0 Warnings
Whenever you see the first error (about common\scripts\BON\BONc_con.lua:133) it means you messed up somewhere in your lua. (The two errors below it are just saying it couldn't munge the lua correctly) The number is the line number where the error occured. So open it in Notepad, then hit CTRL + G (GoTo) and type 133. This is where you'll end up:

SetTeamName (3, "locals")
AddUnitClass (3, "cis_inf_pilot", 6,10)
SetUnitCount (3, 10)

Those three lines have a space before (3, so they're causing an error. They should be:

SetTeamName(3, "locals")
AddUnitClass(3, "cis_inf_pilot", 6,10)
SetUnitCount(3, 10)

Any time you see an Expecting Bracket error, see if there's an error above it, usually that's the problem.

Re: Can You spot the fault with the locals?

Posted: Fri Aug 31, 2007 3:51 pm
by EGG_GUTS
Thanks, Tean second time you helped me today :P

Re: Can You spot the fault with the locals?

Posted: Fri Aug 31, 2007 4:03 pm
by Teancum
EGG_GUTS wrote:Thanks, Tean second time you helped me today :P
Anytime bro.

Re: Can You spot the fault with the locals?

Posted: Fri Aug 31, 2007 4:18 pm
by EGG_GUTS
Dam, I don't get it they are still not spawning and I still get that munge log problem and I literally see nothing wrong.

Re: Can You spot the fault with the locals?

Posted: Fri Aug 31, 2007 4:25 pm
by Hebes24
Is it the same problem or a different one? Post the mungelog again.