求BF2单机解锁武器方法
跪求有没有哪位大虾能有BF2直接解锁武器的方法啊?我上服务器实在好卡,只是想在自己机器上过过先进武器的瘾。不知道有没有人能满足一下我这个新兵的心愿?SF
樓下回答 樓下回答 报告,不知道。
单机不用解锁也一样爽。。。 哈哈,我可以给你做个补丁,你把要求另发一个贴出来,详细点 打开你的战地2文件(每个人的安装路径不一样)
路竟是:战地2\python\bf2\stats 这个文件夹 里面找到unlocks文件 用记事本方式打开 文件内容如下:
在这里面找到:“defaultUnlocks = ” 这句话
然后把“0”全部改成“1” 然后保存退出 注意~! 只改正这一句 里面有句跟这句有点相似别改错了~!
最后说明:本方法只用于网上服务器对战(并且服务器武器已解锁而你机器上则没有时),单机和局域网无法使用~~!
import host
import bf2.PlayerManager
from bf2.stats.constants import *
from bf2 import g_debug
# map gamespy item ids to kits
unlockItemMap = {
11 : 0,
22 : 1,
33 : 2,
44 : 3,
55 : 4,
66 : 5,
77 : 6,
88 : 1,
99 : 2,
111 : 3,
222 : 4,
333 : 5,
444 : 0,
555 : 6,
}
sessionPlayerUnlockMap = {}
def init():
# Events
host.registerHandler('PlayerConnect', onPlayerConnect, 1)
if bf2.serverSettings.getUseGlobalUnlocks():
host.registerHandler('PlayerUnlocksResponse', onUnlocksResponse, 1)
# Connect already connected players if reinitializing
for p in bf2.playerManager.getPlayers():
onPlayerConnect(p)
if g_debug: print "Unlock module initialized"
class UnlockSet: pass
def onPlayerConnect(player):
defaultUnlocks =
host.pers_plrSetUnlocks(player.index, defaultUnlocks, defaultUnlocks)
if not player.isAIPlayer():
id = player.index
reconnect = id in sessionPlayerUnlockMap
# always get new unlocks on reconnect/map restart/map change etc
if reconnect:
del sessionPlayerUnlockMap
newUnlockSet = UnlockSet()
newUnlockSet.unlockLevel = {}
for i in range(0, NUM_KIT_TYPES):
newUnlockSet.unlockLevel = 0
sessionPlayerUnlockMap = newUnlockSet
player.unlocks = sessionPlayerUnlockMap
if bf2.serverSettings.getUseGlobalUnlocks():
if player.getProfileId() > 2000:
success = host.pers_plrRequestUnlocks(player.index, 1)
if not success:
if g_debug: print "Failed requesting unlocks"
else:
if g_debug: print "Player %d had no profile id, can't request unlocks" % player.index
if g_debug: print "Added player %d to unlock checking" % (player.index)
def onUnlocksResponse(succeeded, player, unlocks):
if not succeeded:
print "Unlocks request failed for player %d %d: %s" % (player.index, player.getName(), unlocks)
return
# print "Unlocks received for player ", player.getName(), "(",player.index, ") : ", unlocks
# translate gamespy item vector into a kit-based unlock vector handled by game
kitUnlocks =
for item in unlocks:
if item in unlockItemMap:
kitUnlocks] = 1
if g_debug: print "Kit unlocks: ", kitUnlocks
#We do not yet support giving different unlocks to different teams
host.pers_plrSetUnlocks(player.index, kitUnlocks, kitUnlocks) LS那个只是强制解罢了,可以给LZ做个既有普通武器又能解缩的
只是想体验一下最高级的狙击步枪
我只是想体验一下比较好的狙击步枪,新兵用的M24两三枪才打死一个人,有辱一弹一命的狙击手的尊严。 原帖由 381145057 于 2007-1-3 23:02 发表我只是想体验一下比较好的狙击步枪,新兵用的M24两三枪才打死一个人,有辱一弹一命的狙击手的尊严。
这话应该说你而不是说枪准确点! 原帖由 =|HERO|=zwl 于 2007-1-3 10:12 发表
打开你的战地2文件(每个人的安装路径不一样)
路竟是:战地2\python\bf2\stats 这个文件夹 里面找到unlocks文件 用记事本方式打开 文件内容如下:
在这里面找到:“defaultUnlocks = ” 这句话
然后把 ...
1.41貌似行不通了
页:
[1]