Disabling Award Weapons via the LUA

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
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Disabling Award Weapons via the LUA

Post by AQT »

How would I disable award weapons via the lua? I did a few searches and couldn't find a straightforward answer. Thanks.
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Disabling Award Weapons via the LUA

Post by computergeek »

Code: Select all

ScriptCB_SetPlayerAwardsEnabled 
Maybe this might help
I looked here
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Disabling Award Weapons via the LUA

Post by AQT »

I've already tried that with a (0) following it but it didn't work. Thanks for the help though.
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Disabling Award Weapons via the LUA

Post by computergeek »

Maybe changing it to

Code: Select all

ScriptCB_SetPlayerAwardsDisabled 
might help?
I'll keep trying some things and if I get something that works I'll tell you
In the mean time check out the link I posed and see if you can find something
*Edit*
If you want to get rid of the points system all together, thus taking out the awards, look at the points.lua in the scripts folder
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

if not __POINTS_LUA__ then
__POINTS_LUA__ = 1

--------------------------------------------------------------------------------
-- Format: { point_gain = number }, --// description
-- Notes: number should between [-128, 127]
-- If you need to ADD/REMOVE items, please ask programmer to change accordingly
-- enum PointStatT in PlayerStats.h
--------------------------------------------------------------------------------
Player_Stats_Points = {

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

}

ScriptCB_SetPlayerStatsPoints( Player_Stats_Points )
Player_Stats_Points = nil

end --if not __POINTS_LUA__
Just changing them all to zero should work (I'm testing right now)
*Edit 2*
Just tested ingame, but it seemed to have no effect. I'm not sure why though....
Maybe the points.lua needs to be loaded in the conquest lua
Zerted we need you!
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Disabling Award Weapons via the LUA

Post by AQT »

computergeek wrote:

Code: Select all

ScriptCB_SetPlayerAwardsDisabled 
I tried that with a (1) following it and it still doesn't work. Yeah, we definately need Zerted.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Disabling Award Weapons via the LUA

Post by Frisbeetarian »

The points.lua has to do with giving points, not when the points are used to get award weapons. It should be noted that award weapons are handled outside of the Lua (they are handled via the weapon ODFs), but also that they are handled through medals. If there's a function to disable medals, that's where you'll want to look.
Post Reply