Objects appearing in a certain era only? [Solved]

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

User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Objects appearing in a certain era only? [Solved]

Post by elfie »

Is it possible to make destructable command posts appear only in a certain era and not the other era? Would this be possible even if the eras had the same mode(conquest)? Would it also be possible to have the regular command posts from one era not show up in another era that also has the same mode(conquest)? If this can be done, then how? Thanks in advanced. :D
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Objects appearing in a certain era only?

Post by computergeek »

Make a new layer in ZE for the special era that you want the objects to appear in. You will then need to make it's .mrqs and update the word's req. Look at adding a ctf era to see what files need to be changed for the new layer. You then change the era's lua to read that layer
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 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: Watching your PC over your shoulder. No, the other sholder....

Re: Objects appearing in a certain era only?

Post by Master_Ben »

You could also do something along the same lines: creating a new world (aka world2) w/out the cp's and reference that in the era's lua. This would take up a lot of space though, I think. :runaway:
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Objects appearing in a certain era only?

Post by elfie »

computergeek wrote:Make a new layer in ZE for the special era that you want the objects to appear in. You will then need to make it's .mrqs and update the word's req. Look at adding a ctf era to see what files need to be changed for the new layer. You then change the era's lua to read that layer
Okay, got the first part with the .mrqs and I updated the .req, but what do I do to make the lua read the layer?
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Objects appearing in a certain era only?

Post by computergeek »

Look for

Code: Select all

    ReadDataFile("dc:***\\***.lvl", "***_eli")
under the memory pools
The "***_eli" part is your layer's name

Follow this tutorial to get your new layer working
Although it is for a hunt mode, you can use it for what you need
I am testing this right now. If it works I'll tell you exactly what I did
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Objects appearing in a certain era only?

Post by elfie »

Yeah, I did what you said and followed the tutorials, computergeek, but for some reason the game mode loads, but there are no AI! I am the only person spawning on the map. That seems to happen a lot when I change that line in the lua. Also, I got this error in my munge log which I don't have a clue what it means:

Code: Select all

ERROR[configmunge ]:Input file option $copy: recursive ! must be followed by wildcard. [continuing]
ERROR[configmunge of]:Input file of does not exist. [continuing]
   2 Errors    0 Warnings
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Objects appearing in a certain era only?

Post by computergeek »

I don't understand that munge log error, but can you post your BFront2.log?
Make sure that line is referencing the .mrq for your layer
And you saved your .wld after doing the stuff in ZE right?
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: Objects appearing in a certain era only?

Post by Eggman »

What did you name the layer in ZE, and could you post the section of the .lua you changed? You may have just made a typo in one of them.

As an example, I have a map with different objects in the GCW era. The layer name is "gcwconquest," and in the .lua I have this line:

Code: Select all

    ReadDataFile("dc:MAP\\MAP.lvl", "MAP_gcwconquest")
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Objects appearing in a certain era only?

Post by Sky_216 »

Can't you just use the 'KillObject' function in your luas to remove certain objects from that era?
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Objects appearing in a certain era only?

Post by Aman/Pinguin »

Skyhammer_216 wrote:Can't you just use the 'KillObject' function in your luas to remove certain objects from that era?
Yes you can, I prefer that way and use it alot.
User avatar
Silas
Captain
Captain
Posts: 481
Joined: Thu Oct 11, 2007 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Objects appearing in a certain era only?

Post by Silas »

Dagobah i think does that. There's a crashed clone ship i believe as well as the x-wing in the map. You could try looking for soemthing in the luas maybe. Just another option
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: Objects appearing in a certain era only?

Post by Teancum »

Silas wrote:Dagobah i think does that. There's a crashed clone ship i believe as well as the x-wing in the map. You could try looking for soemthing in the luas maybe. Just another option
Good call, Silas -- for anyone wanting to learn how, he just pointed out the perfect example of how Pandemic did it.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Objects appearing in a certain era only?

Post by elfie »

Teancum wrote:
Silas wrote:Dagobah i think does that. There's a crashed clone ship i believe as well as the x-wing in the map. You could try looking for soemthing in the luas maybe. Just another option
Good call, Silas -- for anyone wanting to learn how, he just pointed out the perfect example of how Pandemic did it.
That way might be easier. The layer thing seems to be creating problems. I don't believe it is a typo, but I will show you my lua:

Code: Select all

  SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:TEL\\TEL.lvl", "TEL_headquarters")
    SetDenseEnvironment("true")
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Objects appearing in a certain era only?

Post by Frisbeetarian »

Is that the only layer that the mode needs? You said that you have different layers for different modes, does this mean that you only set up a layer for each mode, or did you include a common layer for the modes as well? If so, that layer needs to be loaded also.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Objects appearing in a certain era only?

Post by elfie »

Frisbeetarian wrote:Is that the only layer that the mode needs? You said that you have different layers for different modes, does this mean that you only set up a layer for each mode, or did you include a common layer for the modes as well? If so, that layer needs to be loaded also.
Oh, that is interesting, that might be it. Would this be how I load two layers in one script:

Code: Select all

    SetSpawnDelay(10.0, 0.25)
    ReadDataFile("dc:TEL\\TEL.lvl", "TEL_headquarters")
    ReadDataFile("dc:TEL\\TEL.lvl", "TEL_conquest")
    SetDenseEnvironment("true")
Also guys, I know for sure it is not a typo, because I copy and pasted the layer name directly from Zeroeditor. If this doesn't work than I will try that Dagobah lua function. I will test this out now...

EDIT:
Hmm, now it loads with all the AI, but the CPs are still there because in order for it to work I needed conquest. Is there a way I can keep the conquest mode loaded but simply remove the cps just from that one game mode without needing yet another layer?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Objects appearing in a certain era only?

Post by Frisbeetarian »

You'd need to use the KillObject function as stated above if you don't want another layer.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Objects appearing in a certain era only?

Post by elfie »

Frisbeetarian wrote:You'd need to use the KillObject function as stated above if you don't want another layer.
What is the code for that though? Btw thanks for all the help guys :D
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Objects appearing in a certain era only?

Post by Maveritchell »

elfie wrote:What is the code for that though?
They already told you. KillObject. Use the Dagobah .lua as a guide (or basically any stock .lua).
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Objects appearing in a certain era only?

Post by elfie »

Maveritchell wrote:
elfie wrote:What is the code for that though?
They already told you. KillObject. Use the Dagobah .lua as a guide (or basically any stock .lua).
I tried searching for "killobject", "kill", and "object" in the dagobah lua already and there was nothing there. Is it something simple like "function killobject com_bldg_controlzone"? I'm just not sure what it is really, because I know luas are fairly complex with codes and such.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Objects appearing in a certain era only?

Post by AceMastermind »

Have a look at the Hoth scripts:
KillObject("objectname")
goes inside:
function ScriptPostLoad()
Post Reply