FYI: A LUA Script Can Be No Larger Than 50KB

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
xwingguy

FYI: A LUA Script Can Be No Larger Than 50KB

Post by xwingguy »

Topic.

Just another ceiling I bumped my head on.
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by Xavious »

really? didn't know that.
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: FYI: A LUA Script Can Be No Larger Than 50KB

Post by Teancum »

What's a standard LUA weigh in at?
Rekubot
Jedi
Jedi
Posts: 1080
Joined: Wed Apr 05, 2006 12:34 pm
Projects :: No Mod project currently.
Games I'm Playing :: Shadow Complex
xbox live or psn: Rekubot
Location: UK

Post by Rekubot »

Around 9.11kb. So it shouldn't be too big of a problem as long as you are careful enough.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by [RDH]Zerted »

The biggest Lua in the mod tools is 148KB ( ifs_missionselect_pcmulti.lua ). There are a number of other ones that are larger than 50KB too.
I would say the average is 10-15KB.
What error message are you getting?
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by Xavious »

[RDH]Zerted wrote:What error message are you getting?
i don't think he's stating an error.
MasterSkywalker
Major
Major
Posts: 501
Joined: Mon Apr 17, 2006 1:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by MasterSkywalker »

^He do gets an error, thats what the whole thread is about :P
xwingguy

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by xwingguy »

If your gamemode script is larger than 50 KB it causes a fatal error "Could not read @#$g_con" etc.
MasterSkywalker
Major
Major
Posts: 501
Joined: Mon Apr 17, 2006 1:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by MasterSkywalker »

I do wonder how can you get your @#$g_con.lua get so big?
darthpingu

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by darthpingu »

space...
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: Re: RE: FYI: A LUA Script Can Be No Larger Than 50KB

Post by [RDH]Zerted »

No, I just tried it with a 54KB gamemode script. It munged fine. You've got an error in one of your lines.

Make sure you have @#$g_con.req in bf2_modtools\TEMPLATE\Common\mission
Make sure you have @#$g_con.lua in bf2_modtools\TEMPLATE\Common\scripts\@#$

Visual Munge uses these templates to generate the files for each custom map. @#$ gets replaced with your map's ID. Search through your luas and reqs to make sure all the @#$ have been replaced.
Post Reply