Tordarian (Republic ground attack) - Some help needed

Working on a new map? Have a new mod out for swbf2?! Post an announcement of the up-coming release here.

Moderator: Moderators

Tohron

Tordarian (Republic ground attack) - Some help needed

Post by Tohron »

I am in the process of working on Tordairian, where the Republic is attacking a CIS supply base. I've included several screenshots to give you an idea about what it's like.

Supply base overview: http://i82.photobucket.com/albums/j252/ ... llview.jpg

Terrain overview from supply base: http://i82.photobucket.com/albums/j252/ ... hView1.jpg

Terrain overview from ground: http://i82.photobucket.com/albums/j252/ ... errain.jpg

Central mountain: http://i82.photobucket.com/albums/j252/ ... ntain1.jpg

Supply base tower: http://i82.photobucket.com/albums/j252/ ... nTower.jpg

View from inside one tunnel: http://i82.photobucket.com/albums/j252/ ... Tunnel.jpg

Entrance to another tunnel: http://i82.photobucket.com/albums/j252/ ... ryway1.jpg


In the process of making this map, I have encountered several minor problems, and two major ones. I'll go over those first.


ATTEs: I would like to have two ATTEs spawn on the southern portion of my map, but I've had no success so far. My c_con LUA file is included near the bottom of this post. As for the vehicle spawn objects, each one of them has nothing written in the controlzone field, and has rep_walk_atte written in the repatk and hisatk fields, all in imitation of the ATTE spawn on the Geonosis map. Notes: I have gotten fightertanks and a hailfire to spawn successfully, I have NOT modified any data files besides the c_con LUA file (although I know I might need to), all command post data in my LUA is based off command posts in the map, and the result of attempting to add ATTEs has generally been a loading screen crash.


Turrents: I would also like to add a variety of defensive turrents to help protect the supply base. I have gotten the standard laser turrents to spawn, although they start out destroyed (which I would like to change), however, attempting to add other turrents (the hoth dish turrent, and the guided rocket turrent) has caused a loading screen crash. Again, I havn't modified any files besides the c_con LUA one, although I know I might have to.


Minor problems: I would like to change the windows of the Polis Massa hallway to be opaque, I would like to have my map name show up in-game as Tordarian rather than TOR%s_%s (just changing the addme.lua caused the game to freeze), and I would like to add a map description that shows up in-game.


c_con LUA file: Note that all values relating to ATTEs and to problematic turrent IDs have been commented out.



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

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

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_walk_atte",
"rep_hover_fightertank",
"rep_hover_barcspeeder")
ReadDataFile("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_tread_hailfire",
"cis_hover_aat")


ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
-- "tur_bldg_guided_rocket",
-- "tur_bldg_hoth_dishturrent",
"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")


-- 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(2, 3) -- 3x2 (3 pairs of legs)
local weaponCnt = 800
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)
-- SetMemoryPoolSize ("CommandWalker", 2)
SetMemoryPoolSize ("EntityHover", 4)
SetMemoryPoolSize("MountedTurret", 90)

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


The sound section was not included. So with that done, can anyone be of assistance?
drummerzoid1

RE: Tordarian (Republic ground attack) - Some help needed

Post by drummerzoid1 »

WOW, that town part looks promissing, I love the tunnel, keep up the good work
RєÅpér

Post by RєÅpér »

i can't help you out but the map looks awesome
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

I don't know why I didn't ask this before, but are you trying to place ATTE's directly or using the vehicle spawn odf?
t3tine

Post by t3tine »

woaw! good luck, a promising map
Tohron

Post by Tohron »

Teancum wrote:I don't know why I didn't ask this before, but are you trying to place ATTE's directly or using the vehicle spawn odf?
I am trying to place them using the vehicle spawn odf, and the settings for each of them are in imitation of the Geonosis ATTE spawn odf.

Also, just a small question: do the assets for the various worlds include stuff like relevant LUA files? Because I haven't found any myself, but someone seemed to have mentioned a g_con LUA file for Hoth.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

BF2_Tools/Assets/Scripts/HOT
JawaMan

Re: RE: Tordarian (Republic ground attack) - Some help neede

Post by JawaMan »

drummerzoid1 wrote:WOW, that town part looks promissing, I love the tunnel, keep up the good work
^what he said! :D

is there a release date?
BF2-Master
Captain
Captain
Posts: 468
Joined: Thu Mar 02, 2006 7:08 pm

RE: Re: RE: Tordarian (Republic ground attack) - Some help n

Post by BF2-Master »

This map looks pretty sweet. I hope you have Hero Assault, this map looks perfect for a free-for-all!
Tohron

Re: RE: Re: RE: Tordarian (Republic ground attack) - Some he

Post by Tohron »

BF2-Master wrote:This map looks pretty sweet. I hope you have Hero Assault, this map looks perfect for a free-for-all!
Nope, conquest is the only setting, although I'm planning on doubling the amount of units in-game along with the reinforcements. I think the map's a bit large for hero assault. By the way, I really want to find out the aforementioned things. So far, changing my LUA in accordance with the geonosis map seems to have eliminated one error - but the game now crashes right after the loading "bar" is full. And I still havn't recieved anything at all relating to adding new turrent types, or making the existing type start out intact. Compliments are ok, but I'd prefer if I got a little for help with the problems I'm having.
Tohron

Re: RE: Tordarian (Republic ground attack) - Some help neede

Post by Tohron »

JawaMan wrote:is there a release date?
Not until I get all the problems fixed, I'm afraid. Not to blame you if you don't know what's wrong, but I can't release the map until it is what I want it to be.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

RE: Re: RE: Tordarian (Republic ground attack) - Some help n

Post by Teancum »

Comment out turrets entirely and see what happens.
Tohron

Re: RE: Re: RE: Tordarian (Republic ground attack) - Some he

Post by Tohron »

Teancum wrote:Comment out turrets entirely and see what happens.
I already did a while ago, it worked fine, and I left it that way. Then I uncommented ATTE related lines while changing them to follow what was in the Geonosis LUA file. The memory pool section now reads:

-- Level Stats
ClearWalkers()
SetMemoryPoolSize("EntityWalker", -2)
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 = 800
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)
SetMemoryPoolSize("CommandWalker", 2)
SetMemoryPoolSize ("EntityHover", 4)
SetMemoryPoolSize("MountedTurret", 90)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:TOR\\TOR.lvl", "TOR_conquest")
ReadDataFile("dc:TOR\\TOR.lvl", "TOR_conquest")
SetDenseEnvironment("false")
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

RE: Re: RE: Re: RE: Tordarian (Republic ground attack) - Som

Post by Teancum »

AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

needs to be

AddWalkerType(3, 6) -- 3x2 (3 pairs of legs)
Tohron

Re: RE: Re: RE: Re: RE: Tordarian (Republic ground attack) -

Post by Tohron »

Teancum wrote:AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

needs to be

AddWalkerType(3, 6) -- 3x2 (3 pairs of legs)
Did that, the game plays now, but the ATTEs still arn't showing.
drummerzoid1

RE: Re: RE: Re: RE: Re: RE: Tordarian (Republic ground attac

Post by drummerzoid1 »

how'd you get the polas mossa tunnels to work without the terrain to block them?
Tohron

Re: RE: Re: RE: Re: RE: Re: RE: Tordarian (Republic ground a

Post by Tohron »

drummerzoid1 wrote:how'd you get the polas mossa tunnels to work without the terrain to block them?
The polis massa hangers are able to breach the terrain (zeroeditor only shows it partially though, but it works). Once you're underground, there arn't any problems (besides wanting to make all windows opaque for aesthetic reasons, which is what I want to do).

Any ideas on why the ATTEs still arn't there?
drummerzoid1

RE: Re: RE: Re: RE: Re: RE: Re: RE: Tordarian (Republic grou

Post by drummerzoid1 »

make a control zone!, what you do is "cp#_control" zone goes into the command post properties of a republic command
post. Make note that the # sign will be changed to what ever cp number it actually is. Then create a control zone(region)
that goes over both the vehicle spawn models(the region doesn't have to be over your command post). Next call that region in both sections "cp#_control". Finally in the vehicle spawn properties put the control zone as "cp#" NOT "cp#_control"

What lucas arts did on that level was spawn the ATTE after the level started.
Tohron

Post by Tohron »

Ok, I took another look at the geonosis map: my atte spawns (entitled atte_spawn 1 and atte spawn 2) now are each assigned to their own "invisible_controlzone" objects (entitiled atte_cp1 and atte_cp2) and each has its own control region (atte1_control and atte_2 control). The "invisible_controlzone" objects (which behave like cps) have had the name of their control region entered in, and the vehicle spawns have the name of their "cp" entered in. The game runs, but the ATTEs still don't spawn. Since the spawn time has been set to 0, they would appear immediately if this was working right.
Tohron

Post by Tohron »

It's working! IT'S WORKING!

Okay, now that I'm finished with the Anakin imitation, I can tell you what I was messing up on. Turns out that I forgot to assign the ATTE spawns to the Republic side. See how one little mistake can cause a big problem.

Well, with that done, I just need to get the turrents to spawn intact, and get the non-laser turrents to function (plus a bunch of minor problems). Still, I'm very happy at how far I've came. Thanks for the help, guys!

EDIT: It turns out that the Hoth Dish Turrent spawns fine. Seems that the problem is with the guided rocket turrent.
Post Reply