Boundaries and Fog

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Boundaries and Fog

Post by EGG_GUTS »

2 quick questions

1. How do I add fog?

2. I know barriers tell AIs where not to go. But what makes it a death zone? and how do you put invisible walls? Becuz yavin billboards you can walk through.

Thanks
Ipodzanyman
Sith
Sith
Posts: 1304
Joined: Fri Feb 03, 2006 12:16 am
Games I'm Playing :: ME3 Demo
Contact:

RE: Boundrys and Fog

Post by Ipodzanyman »

fog is a setting in the sky file, you can edit the parameters........
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Post by EGG_GUTS »

Ok. How would I do that?
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Post by FragMe! »

For question 2
Need to use regions to create death zone Create a region make it the size and shape you want and in type make it deathregion.
For the billboards use the com_inv_col_8, 16, 32 or 64 objects they can be found in the data_xxx/common directory. They are fun to place because until you select them well they're invisible.
Ipodzanyman
Sith
Sith
Posts: 1304
Joined: Fri Feb 03, 2006 12:16 am
Games I'm Playing :: ME3 Demo
Contact:

Post by Ipodzanyman »

EGG_GUTS wrote:Ok. How would I do that?
From one of my maps wrote:SkyInfo()
{
Enable(1);
FogColor(194,197,199);
FogRange(0.5, 600.0);

PS2()
{
NearSceneRange(0.5, 50.0,80.0);
NearSplitScreenRange(0.5, 50.0, 80.0);
FarSceneRange(300.0);
}
XBOX()
{
NearSceneRange(0.5, 60.0, 100.0);
FarSceneRange(1000.0);
NearSplitScreenRange(0.1, 50.0, 80.0);
SplitOptions()
{
FarSceneRange(0.0);
FogRange(5.0, 70.0);
EnableFadeAdjustWithZoom(0);
}
}
PC()
{
NearSceneRange(0.5, 60.0, 100.0);
FarSceneRange(10000.0);


}


}


DomeInfo()
{
Texture("myg1_sky_dome.tga");
Softness(1);
SoftnessParam(60);
DomeModel()
{
Geometry("myg1_sky_dome");
}
}



EnvTexture("");

SkyObject()
{
Geometry("cis_fly_gunship_dome");
NumObjects(4);
Height(90, 160);
VelocityZ(60, 100);
VelocityY(-10, 10);
Distance(350);
InDirectionFactor(0.5);
}

SkyObject()
{
Geometry("rep_fly_gunship_dome");
NumObjects(4);
Height(90, 160);
VelocityZ(60, 100);
VelocityY(-10, 10);
Distance(350);
InDirectionFactor(0.5);
}



-that's all you need.... :wink:
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Post by EGG_GUTS »

Thanks guys that will help alot. One more question. how would I put fog in selective areas only? Not the whole map?
User avatar
Snork
Lieutenant General
Lieutenant General
Posts: 669
Joined: Thu Jun 07, 2007 3:34 pm
Games I'm Playing :: SWBF2 and Minecraft
xbox live or psn: No gamertag set
Contact:

Post by Snork »

Go to the GEO assets. Theres Geo_prop_cloud, Geo_prop_mist and Geo_prop_dust.

Once you get all the files they require, you can place em in your level like objects, and they'll appear ingame.
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Post by EGG_GUTS »

Ok thanks. But I have 2 more questions :P

1. Is the geo prop cloud mist and dust spose to come out all weird in ZE?

2. How would I re-scale it to be bigger? I have to cover a large area around the battle field.
Ipodzanyman
Sith
Sith
Posts: 1304
Joined: Fri Feb 03, 2006 12:16 am
Games I'm Playing :: ME3 Demo
Contact:

Post by Ipodzanyman »

change the odf to make it bigger, and it looks like an arrow in ZE but not ingame..........
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Post by EGG_GUTS »

OK I put 2 death regions and they didn't work I put death region in the region type and every thing. Do I have to put it in the Lua? and what do I put in the odf to make the clouds bigger?
Ipodzanyman
Sith
Sith
Posts: 1304
Joined: Fri Feb 03, 2006 12:16 am
Games I'm Playing :: ME3 Demo
Contact:

Post by Ipodzanyman »

LOOK at the ODF, is it obvious?:
[GameObjectClass]

ClassLabel = "dusteffect"
GeometryName = "geo_prop_cloud.msh"


[Properties]

MinPos = "-300 -20 -300"
MaxPos = "300 60 300"
MinVel = "0 0 0"
MaxVel = "5 1.5 5"
MinSize = "120"
MaxSize = "150"

MinLifeTime = "10"
MaxLifeTime = "15"
Alpha = "0.3"
NumParticles = "80"
MaxDistance = "2500"
Texture = "geo_prop_cloud"
RadiusFadeMin = "250"
RadiusFadeMax = "350"
HeightScale = "0.3"
SpawnSound = ""
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Post by EGG_GUTS »

Oh thanks I didn't look.
YankFan1950

Post by YankFan1950 »

for death regions you need to put this line in the .lua

AddDeathRegion("************") where the *s are the name of your death region also in the second region name in ZE put deathregion
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Post by EGG_GUTS »

It didn't work can you see what I did wrong :(

Here's My Lua and pic of ZE
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")

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

--tell the game to load our loading image
ReadDataFile("dc:Load\\common.lvl")

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

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

SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)

ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_rifleman",
"all_hero_chewbacca")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_officer",
"rep_inf_ep2_jettrooper",
"rep_inf_ep3_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep3_jettrooqer")

ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_sniper",
"imp_hero_emperor",
"imp_inf_dark_trooper")

ReadDataFile("dc:SIDE\\pha.lvl",
"pha_inf_elite")

ReadDataFile("dc:SIDE\\jed.lvl",
"jed_knight_02")

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_hero_grievous",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\gt.lvl",
"jed_master_guru")

ReadDataFile("dc:SIDE\\GAM.lvl",
"gam_inf_gamorreanguard")

ReadDataFile("dc:SIDE\\geo.lvl",
"gen_inf_geonosian")

ReadDataFile("dc:SIDE\\snw.lvl",
"snw_inf_wampa")

ReadDataFile("dc:SIDE\\elmo.lvl",
"elmo_inf_trooper")


--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]

--ReadDataFile("SIDE\\snw.lvl", "snw_inf_wampa")

SetupTeams{
hero = {
team = ALL,
units = 40,
reinforcements = -1,
soldier = { "all_inf_rifleman",5,8},
assault = { "rep_inf_ep2_jettrooper", 5,8},
engineer= { "jed_master_guru", 5,8},
sniper = { "rep_inf_ep2_rocketeer", 5,8},
officer = { "rep_inf_ep3_rifleman", 5,8 },
special = { "elmo_inf_trooper", 5,8},
},
}

AddUnitClass(ALL,"pha_inf_elite",5,8)
AddUnitClass(ALL,"imp_inf_sniper",5,8)

SetupTeams{
villain = {
team = IMP,
units = 40,
reinforcements = -1,
soldier = { "rep_inf_ep3_officer", 5,8},
assault = { "gam_inf_gamorreanguard",5,8},
engineer= { "snw_inf_wampa", 5,8},
sniper = { "cis_hero_jangofett", 5,8},
officer = { "cis_hero_grievous", 5,8},
special = { "imp_inf_dark_trooper", 5,8},

},
}

AddUnitClass(IMP,"imp_hero_emperor",5,8)
AddUnitClass(IMP,"rep_inf_ep3_jettrooqer",5,8)

SetTeamName (3, "desertlocals")
AddUnitClass (3, "jed_knight_02", 10,15)
SetUnitCount (3, 8)
AddAIGoal(3, "Deathmatch", 100)

SetTeamName (4, "giantinsects")
AddUnitClass (4, "geo_inf_geonosian", 10,15)
SetUnitCount (4, 9)
AddAIGoal(4, "Deathmatch", 100)

SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)
SetTeamAsEnemy(4,3)
SetTeamAsEnemy(3,4)
SetTeamAsEnemy(4,ATT)
SetTeamAsEnemy(ATT,4)
SetTeamAsEnemy(4,DEF)
SetTeamAsEnemy(DEF,4)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- 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)

AddDeathRegion("deathregion")
AddDeathRegion("deathregion1")

local weaponCnt = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:GT1\\GT1.lvl", "GT1_eli")
SetDenseEnvironment("false")

-- Sound Stats

ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")

SetAmbientMusic(ALL, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "imp_tat_amb_middle", 1,1)
-- SetAmbientMusic(IMP, 0.1, "imp_tat_amb_end", 2,1)

SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "imp_tat_amb_victory")
SetDefeatMusic (IMP, "imp_tat_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")

SetAttackingTeam(ATT)

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end

Image

Thanks
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

deathregion lines at the bottom of ScriptPostLoad

Post by AceMastermind »

Try putting your AddDeathRegion lines at the bottom of the function ScriptPostLoad section under EnableSPHeroRules() in your LUA.
I have it done this way on a testmap and it works fine.

Code: Select all

function ScriptPostLoad()

    EnableSPHeroRules()

    AddDeathRegion("deathregion")
    AddDeathRegion("deathregion2")
    
 end
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Post by EGG_GUTS »

Thanks Ace. But only one is working. For some weird reason. Does anyone know why the other one isn't?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

deathregion summary

Post by AceMastermind »

Here are some conclusions of my DeathRegion testing.

You can create deathregions in any layer in ZE.
Go into Region Edit mode and create a region, you can leave it the default name if you want or call it deathregion, the name in the Class Properties box is the name that is used to reference in the LUA, hence:
AddDeathRegion("deathregion")

I never could get a single group of deathregions to work from 1 group name, so when creating another deathregion, click on "New Region", then "New Group", give it the DeathRegion prefix just as we did above, except this time just add a 1 at the end, so it looks like this in the class properties box:
deathregion1
this is the name that will be used as reference for your second deathregion in the LUA, hence:
AddDeathRegion("deathregion1")

And if you add more just keep following the steps above for the same as the second one except name them:
deathregion3
deathregion4
and so forth in the class properties for your deathregions.

then munge and play your map and walk into them and watch yourself die.
Post Reply