Modding questions [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

Post Reply
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Modding questions [Solved]

Post by CalvaryCptMike »

Okay first:
Does anyone have the piece of code for auto turret detection via Lua? I used the search function and couldn't really find it. I'm talking about the Lua code that detects when you drop an auto turret ( or powerup ) and then the Lua does something.

Second:
Will loading TONS of units into memory make the game less stable? For instance, if I loaded up like, all the units of all the sides but only used 6 units split between two sides would that slow/crash the game? :?

Third: Just out of curiosity, is chewbacca's bag/purse thing he wears an extra bone in his skeleton? Or is it cloth/tentacle, I looked for those and didn't see so I'm assuming it's an animated bone.
Last edited by CalvaryCptMike on Tue May 31, 2011 6:34 pm, edited 2 times in total.
User avatar
sim-al2
2nd Lieutenant
2nd Lieutenant
Posts: 412
Joined: Mon Jul 06, 2009 10:26 pm
Projects :: Mapping on occasion
Games I'm Playing :: SWBFII + MW4 + SC4
Location: In the cockpit of some vehicle...

Re: Modding questions ( Plenty of them )

Post by sim-al2 »

CalvaryCptMike wrote: Second:
Will loading TONS of units into memory make the game less stable? For instance, if I loaded up like, all the units of all the sides but only used 6 units split between two sides would that slow/crash the game? :?
Well it might cause problems depending on the complexity of the units but those of similar complexity to the stock probably won't. This begs the question though, why would you do that though? Only loading the units you will use is much more efficient.
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: Modding questions ( Plenty of them )

Post by CalvaryCptMike »

sim-al2 wrote:
CalvaryCptMike wrote: Second:
Will loading TONS of units into memory make the game less stable? For instance, if I loaded up like, all the units of all the sides but only used 6 units split between two sides would that slow/crash the game? :?
Well it might cause problems depending on the complexity of the units but those of similar complexity to the stock probably won't. This begs the question though, why would you do that though? Only loading the units you will use is much more efficient.
Okay wait, how would the complexity of the unit matter and what does that even mean? The reason is I had an idea and had no real way of testing it, I guess I could just do it and see if it crashes but since my computer is so fast I wouldn't know if it made it laggy or not etc... I was hoping someone just knew off the top of their head. :roll:
User avatar
sim-al2
2nd Lieutenant
2nd Lieutenant
Posts: 412
Joined: Mon Jul 06, 2009 10:26 pm
Projects :: Mapping on occasion
Games I'm Playing :: SWBFII + MW4 + SC4
Location: In the cockpit of some vehicle...

Re: Modding questions ( Plenty of them )

Post by sim-al2 »

Ok then...

I meant that loading for example 18 classes with HD textures and weapons (a bit extreme but just for example) could cause memory overruns if you map was already complex, but it's probably unlikely for that to occur. I'm just curious to your idea as it seems wasteful to be loading data (unit textures and whatnot) if your not using it, but from your reply I guess you have another idea in mind...
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: Modding questions ( Plenty of them )

Post by CalvaryCptMike »

sim-al2 wrote:could cause memory overruns
Ok so is it safe to say we're not sure? :?
Btw thx for the quick replies.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Modding questions ( Plenty of them )

Post by THEWULFMAN »

CalvaryCptMike wrote:Okay first:
Does anyone have the piece of code for auto turret detection via Lua? I used the search function and couldn't really find it. I'm talking about the Lua code that detects when you drop an auto turret ( or powerup ) and then the Lua does something.

Second:
Will loading TONS of units into memory make the game less stable? For instance, if I loaded up like, all the units of all the sides but only used 6 units split between two sides would that slow/crash the game? :?

Third: Just out of curiosity, is chewbacca's bag/purse thing he wears an extra bone in his skeleton? Or is it cloth/tentacle, I looked for those and didn't see so I'm assuming it's an animated bone.
1ST
OnCharacterDispenseControllableTeam

2ND
Why do that in the first place?

3RD
Its a tentacle like aayla's lekku and the wookie dreads.
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: Modding questions ( Plenty of them )

Post by CalvaryCptMike »

THEWULFMAN wrote: 1ST
OnCharacterDispenseControllableTeam

2ND
Why do that in the first place?

3RD
Its a tentacle like aayla's lekku and the wookie dreads.
1st ? that isn't much to go by but ok. :?
2nd, plzzzz just answer the question :runaway:
3rd, *looks at ODF, DUHHH must have missed when I looked earlier. :faint:
thx wulf.
User avatar
sim-al2
2nd Lieutenant
2nd Lieutenant
Posts: 412
Joined: Mon Jul 06, 2009 10:26 pm
Projects :: Mapping on occasion
Games I'm Playing :: SWBFII + MW4 + SC4
Location: In the cockpit of some vehicle...

Re: Modding questions ( Plenty of them )

Post by sim-al2 »

CalvaryCptMike wrote:
sim-al2 wrote:could cause memory overruns
Ok so is it safe to say we're not sure?
CalvaryCptMike wrote: 2nd, plzzzz just answer the question
:? Why not just try it? It probably will be fine if you don't go nuts or happen to have one of those Genosis uber maps new modders seem to love, but don't hold me to it.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Modding questions ( Plenty of them )

Post by THEWULFMAN »

CalvaryCptMike wrote:
THEWULFMAN wrote: 1ST
OnCharacterDispenseControllableTeam

2ND
Why do that in the first place?
1st ? that isn't much to go by but ok. :?
2nd, plzzzz just answer the question :runaway:
1st: You didnt ask for a script chunk doing something, you asked what the code was. If you had asked what you needed it to be used for, I would have tried to make the script chunk

2nd, If you wont answer me I cant help you. There is NO reason to ever load more than you need, especially, jedi/sith(units that have a melee weapon). You should NEVER load more than you need, so I ask again, why do it in the first place.
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: Modding questions ( Plenty of them )

Post by CalvaryCptMike »

1st, oh sorry if I wasn't clear enough, I was asking for the code chunk. :oops:
2nd, well, I didn't try it for myself because I thought maybe a veteran modder just knew that the exe said something about that how too many would crash it, slow it etc... Thx though, it seems like it's not a good idea.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Modding questions ( Plenty of them )

Post by Fiodis »

THEWULFMAN wrote:OnCharacterDispenseControllableTeam
I don't know about that, but OnCharacterDispenseControllable(player, controllable) is what you have in the stock documentation, and it always worked for me.
CalvaryCptMike wrote:I used the search function and couldn't really find it.
Had you checked the documentation first? You should always do that.
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: Modding questions ( Plenty of them )

Post by CalvaryCptMike »

:eek: haha, didn't think to look in the docs, that was silly. Thanks guys! You've answered my questions for now! :mrgreen:
Post Reply