shell.req question

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
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 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: Atlanta, GA xfire=myers73 IngameName=mYers

shell.req question

Post by myers73 »

well, according to my munge log my shell.req is missing a bracket...

munge log
Hidden/Spoiler:
ERROR[levelpack shell.req]:Expecting bracket, but none was found.
File : munged\pc\user_script_4.script.req(1)...

ucft <--
ERROR[levelpack shell.req]:Expecting bracket, but none was found.
File : munged\pc\user_script_4.script.req(1)...

ucft <--
[continuing]
2 Errors 0 Warnings
shell.req
Hidden/Spoiler:
[code]
ucft
{

REQN
{
"script"
"user_script_4"
}
}

[/code]
what im munging, seems to be what is actually missing the bracket...
Hidden/Spoiler:
[code]
print("user_script_4: Entered")

--attempt to take control of (or listen to the calls of) the ScriptPostLoad function
if ScriptPostLoad then
print("user_script_4: Taking control of ScriptPostLoad()...")

--check for possible loading errors
if us1_ScriptPostLoad then
print("user_script_4: Warning: Someone else is using our us1_ScriptPostLoad variable!")
print("user_script_4: Exited")
return
end

--backup the current ScriptPostLoad function
us1_ScriptPostLoad = ScriptPostLoad

--this is our new ScriptPostLoad function
ScriptPostLoad = function()
print("user_script_4: ScriptPostLoad(): Entered")

--only do these changes when in SP
--if we wanted them done in MP too, we should check to make sure that we are the server's host: ScriptCB_GetAmHost()
if not ScriptCB_InMultiplayer() then
--if ScriptCB_GetAmHost() then
--build the FakeConsole list
ff_rebuildFakeConsoleList()

--do the FakeConsole commands we want to happen each time a new map starts (when ScriptPostLoad() is normally called)
--
--
ff_DoCommand( "Lock Vehicles" ) --prevents everyone from entering vehicles (not good on space maps...
for i=1,table.getn(uf_classes) do
SetClassProperty(uf_classes, 'MaxHealth', 240)
Player_Stats_Points = {

{ point_gain = 2 }, --// PS_GLB_KILL_AI_PLAYER = 0,
{ point_gain = 5 }, --// PS_GLB_KILL_HUMAN_PLAYER,
{ point_gain = 5 }, --// PS_GLB_KILL_HUMAN_PLAYER_AI_OFF,
{ point_gain = -10 }, --// PS_GLB_KILL_SUICIDE,
{ point_gain = -15 }, --// PS_GLB_KILL_TEAMMATE,
--//
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_INFANTRY_VS_VEHICLE,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_LIGHT_VS_HEAVY,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_LIGHT_VS_MEDIUM,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_HEAVY_VS_LIGHT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_HEAVY_VS_MEDIUM,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_MEDIUM_VS_LIGHT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_MEDIUM_VS_HEAVY,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_ATAT,
{ point_gain = -5 }, --// PS_GLB_VEHICLE_KILL_EMPTY,
--//
{ point_gain = 2 }, --// PS_GLB_HEAL,
{ point_gain = 2 }, --// PS_GLB_REPAIR,
--//
{ point_gain = 10 }, --// PS_GLB_SNIPER_ACCURACY,
{ point_gain = 12 }, --// PS_GLB_HEAVY_WEAPON_MULTI_KILL,
{ point_gain = 5 }, --// PS_GLB_RAMPAGE,
{ point_gain = 7 }, --// PS_GLB_HEAD_SHOT,
{ point_gain = 15 }, --// PS_GLB_KILL_HERO,
--//
--// // conquest
{ point_gain = 12 }, --// PS_CON_CAPTURE_CP,
{ point_gain = 9 }, --// PS_CON_ASSIST_CAPTURE_CP,
{ point_gain = 4 }, --// PS_CON_KILL_ENEMY_CAPTURING_CP,
{ point_gain = 2 }, --// PS_CON_DEFEND_CP,
{ point_gain = 2 }, --// PS_CON_KING_HILL,
--//
--// // capture the flag
{ point_gain = 2 }, --// PS_CAP_PICKUP_FLAG,
{ point_gain = 5 }, --// PS_CAP_DEFEND_FLAG,
{ point_gain = 15 }, --// PS_CAP_CAPTURE_FLAG,
{ point_gain = 5 }, --// PS_CAP_DEFEND_FLAG_CARRIER,
{ point_gain = 10 }, --// PS_CAP_KILL_ENEMY_FLAG_CARRIER,
{ point_gain = -15 }, --// PS_CAP_KILL_ALLY_FLAG_CARRIER,
--//
--// // assault
{ point_gain = 0 }, --// PS_Diet Dr. Pepper_DESTROY_ASSAULT_OBJ,
--//
--// // escort
{ point_gain = 1 }, --// PS_ESC_DEFEND,
--//
--// // defend
{ point_gain = 1 }, --// PS_DEF_DEFEND,

}
ScriptCB_SetPlayerStatsPoints( Player_Stats_Points )

--end




--clear the FakeConsole table to save memory
gConsoleCmdList = {}
end

--make sure to forward the method call to the real ScriptPostLoad, so the game can function normally
us1_ScriptPostLoad()
print("user_script_4: ScriptPostLoad(): Exited")
end

print("user_script_4: Have control of ScriptPostLoad()")
else
print("user_script_4: Warning: No ScriptPostLoad() to take over")
print("user_script_4: Exited")
return
end

print("user_script_4: Exited")
[/code]
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: shell.req question

Post by Teancum »

Shell is only used for the menus anyways - you probably want to put that into ingame.req, common.req or core.req. Try a manual clean, then re-munge and see if you get a more detailed munge log error.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 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: Atlanta, GA xfire=myers73 IngameName=mYers

Re: shell.req question

Post by myers73 »

I am munging a user_script_* following Zerted's v1.3 docs
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: shell.req question

Post by [RDH]Zerted »

No, munged\pc\user_script_4.script.req is missing a bracket and cannot be packed into the lvl being defined by shell.req.

Doing a full, manual clean and then remunging will tell you the real error. I think it will say you're missing an end. Your for i=1,table.getn(uf_classes) do needs to end sometime. It would be best if it happened before you changed the point values. There is no reason to change the point values for every class added to the game. Changing them once is enough.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 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: Atlanta, GA xfire=myers73 IngameName=mYers

Re: shell.req question

Post by myers73 »

you were right, it was missing an "end". also, are some of the lines in the points table not recognized by the game? I set the line about headshots by sniper and regular headshot to more poitns than the regular kill, but same ol points as a foot shot. Or would this only be on humans in multiplayer?
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: shell.req question

Post by [RDH]Zerted »

Yeah, I don't know if all the point values work or not, but you need to keep all the point lines.
Post Reply