Linked Turrets

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!

Linked Turrets

Post by EGG_GUTS »

Ok I've read Xwingguy's tut and I still don't really under stand could some one help a.k.a Dumb it down for me?
Xwingguy wrote: LinkedFrigate =
{
TurretList = nil, --List of turret names that must be destroyed when the Frigate is destroyed
Frigate = nil, --Name of the frigate (duh)
Do I put the list of frigates and turrets in my map on that part?

I completely don't understand this...
Xwingguy wrote:If you know how to make linkedTurrets or linkedShields, well it's pretty much the same. Here's the key facts:

You must specify TurretList which is the names of the turrets on a certain frigate in the form of an array as shown.

You must specify Frigate which is the name of the certain frigate as shown below.

Code: Select all

	--imp Frigates
	local impfrig1list = {"imp_bldg_frig_turbo", "imp_bldg_frig_turbo1", 
					"imp_bldg_frig_turbo2", "imp_bldg_frig_turbo3",
					"imp_bldg_boxturret8", "imp_bldg_boxturret10",
					 "imp_bldg_boxturret9" }
	ImpFrigate1 = LinkedFrigate:New{TurretList = impfrig1list, Frigate = "imp-frigate"}
	ImpFrigate1:Init()

	--all Frigates
	local allfriglist= {"all_bldg_frig_turbo", "all_bldg_frig_turbo1", 
					"all_bldg_frig_turbo2", "all_bldg_frig_turbo3",
					"all-frigtur1", "all-frigtur2", "all-frigtur3", 
					"all-frigtur4", "all-frigtur5",
					"all-frigtur6", "all-frigtur7", "all-frigtur8"}
	AllFrigate = LinkedFrigate:New{TurretList = allfriglist, Frigate = "all-frigate"}
	AllFrigate:Init()
And for this do I put the oringinal "LinkedDestroyables" Lua back in?
Xwingguy wrote:Rename the LinkedDestroyables.lua that you just modified to "LinkedFrigate" (without quotes).

Cut this file and paste it into data_???\Common\Scripts
[/quote][/quote]

I that's all

Thanks
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 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: Building a railway to Coruscant
Contact:

Re: Linked Turrets

Post by trainmaster611 »

I know someone has also posted this somewhere else but for the sake of making everything easier, just add an explosion radius to the frigate_exp.odf
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Linked Turrets

Post by MercuryNoodles »

No, don't put anything in the LinkedFrigate lua. Your frigate and turret list go in your map's lua.

Also, LinkedFrigate is supposed to be a new lua, not a replacement for LinkedDestroyables.
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!

Re: Linked Turrets

Post by EGG_GUTS »

MercuryNoodles wrote:No, don't put anything in the LinkedFrigate lua. Your frigate and turret list go in your map's lua.

Also, LinkedFrigate is supposed to be a new lua, not a replacement for LinkedDestroyables.
Did you do the linking yet for your space map?
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Linked Turrets

Post by MercuryNoodles »

Actually, I haven't needed the LinkedFrigate lua. I don't use that many turrets, at least, not yet. What does that have to do with this?
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!

Re: Linked Turrets

Post by EGG_GUTS »

MercuryNoodles wrote:Actually, I haven't needed the LinkedFrigate lua. I don't use that many turrets, at least, not yet. What does that have to do with this?
Because if you were I was wondering if you could to post your Lua as a reference to help me. :wink:
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Linked Turrets

Post by MercuryNoodles »

Well, after a little digging, I think the tut wasn't made for beginners. I'll see if I can explain.

1) Go to data_***/Common/Scripts. You need to make a new lua containing the LinkFrigate stuff. Instead of following the crazy instructions, just make a new text file, paste the script contents, and use Save As to name the new file "LinkedFrigate.lua". Confirm the save. (Never, ever just use "save", unless you're purposely overwriting something. Even then, I wouldn't get into the habit of doing that.)

2) Go to data_***/Common, and open the mission.req file. Add "LinkedFrigate" under "script", just like the others. Save it.

3) Open your space map's common lua, and add ScriptCB_DoFile("LinkedFrigate") at the top, with the other lines like it. (ScriptCB_DoFile("setup_teams"))

4) In the same lua, setup the frigate and turret list under function SetupTurrets(). It should go like this:

Code: Select all

local randomturretlistname = {"turret1", "turret2"}
randomfunctionname = LinkedFrigate:New{TurretList = randomturretlistname, Frigate = "ZEfrigatename"}
randomfunctionname:Init()
As should be obivious, you want to put all of your frigate linkage stuff between the "function setupTurrets()" and "end" lines. By "end", I mean the one below "function SetupTurrets" with no spaces before it. Don't break up any other function/end pairings between these two lines.

5)Save, munge, enjoy. Have a cookie. :P

Granted, I'm not at all an expert, but I believe that should be close enough to the mark, and hopefully less confusing.
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!

Re: Linked Turrets

Post by EGG_GUTS »

So how do I tell it which turret is on which frigate?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Linked Turrets

Post by AceMastermind »

First get some paper and a pen, then launch ZE and go into Object edit mode and click on each turret and write down it's name and which frigate it is on.
Post Reply