Objects appearing in a certain era only? [Solved]
Moderator: Moderators
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Objects appearing in a certain era only? [Solved]
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. 
-
computergeek
- General

- Posts: 770
- Joined: Thu Jun 07, 2007 6:26 pm
- Projects :: Halo Warthog vehicle for SWBF2
- xbox live or psn: No gamertag set
- Location: Far Far away....
Re: Objects appearing in a certain era only?
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

- Posts: 675
- Joined: Wed Nov 12, 2008 9:50 pm
- Projects :: No Mod project currently.
- 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?
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. 
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Objects appearing in a certain era only?
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 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
-
computergeek
- General

- Posts: 770
- Joined: Thu Jun 07, 2007 6:26 pm
- Projects :: Halo Warthog vehicle for SWBF2
- xbox live or psn: No gamertag set
- Location: Far Far away....
Re: Objects appearing in a certain era only?
Look for
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
Code: Select all
ReadDataFile("dc:***\\***.lvl", "***_eli")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
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Objects appearing in a certain era only?
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

- Posts: 770
- Joined: Thu Jun 07, 2007 6:26 pm
- Projects :: Halo Warthog vehicle for SWBF2
- xbox live or psn: No gamertag set
- Location: Far Far away....
Re: Objects appearing in a certain era only?
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?
Make sure that line is referencing the .mrq for your layer
And you saved your .wld after doing the stuff in ZE right?
- Eggman
- 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?
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:
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")- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Objects appearing in a certain era only?
Can't you just use the 'KillObject' function in your luas to remove certain objects from that era?
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: Objects appearing in a certain era only?
Yes you can, I prefer that way and use it alot.Skyhammer_216 wrote:Can't you just use the 'KillObject' function in your luas to remove certain objects from that era?
- Silas
- Captain

- Posts: 481
- Joined: Thu Oct 11, 2007 5:30 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Contact:
Re: Objects appearing in a certain era only?
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
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Objects appearing in a certain era only?
Good call, Silas -- for anyone wanting to learn how, he just pointed out the perfect example of how Pandemic did it.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
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Objects appearing in a certain era only?
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:Teancum wrote:Good call, Silas -- for anyone wanting to learn how, he just pointed out the perfect example of how Pandemic did it.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
Code: Select all
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:TEL\\TEL.lvl", "TEL_headquarters")
SetDenseEnvironment("true")
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: Objects appearing in a certain era only?
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.
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Objects appearing in a certain era only?
Oh, that is interesting, that might be it. Would this be how I load two layers in one script: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.
Code: Select all
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:TEL\\TEL.lvl", "TEL_headquarters")
ReadDataFile("dc:TEL\\TEL.lvl", "TEL_conquest")
SetDenseEnvironment("true")
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?
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: Objects appearing in a certain era only?
You'd need to use the KillObject function as stated above if you don't want another layer.
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Objects appearing in a certain era only?
What is the code for that though? Btw thanks for all the help guysFrisbeetarian wrote:You'd need to use the KillObject function as stated above if you don't want another layer.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Objects appearing in a certain era only?
They already told you. KillObject. Use the Dagobah .lua as a guide (or basically any stock .lua).elfie wrote:What is the code for that though?
- elfie
- Field Commander

- Posts: 931
- Joined: Fri Jan 25, 2008 8:26 pm
- xbox live or psn: no live
- Location: Coruscant, Jedi Temple
- Contact:
Re: Objects appearing in a certain era only?
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.Maveritchell wrote:They already told you. KillObject. Use the Dagobah .lua as a guide (or basically any stock .lua).elfie wrote:What is the code for that though?
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Objects appearing in a certain era only?
Have a look at the Hoth scripts:
KillObject("objectname")
goes inside:
function ScriptPostLoad()
KillObject("objectname")
goes inside:
function ScriptPostLoad()
