磊哥游戏网

巫师3无故报错GCMMT怎么解决

热度:8℃ 游戏攻略 2023-02-23 04:33:46

相信不少人也遇到过这种报错,真的闹心。

如果是使用WitcherScriptMerger 0.6.2的话,这种错误是根本检测不出来

通过四处查找,终于找到了这种报错的缘由。

问题出在r4Game.ws文件上。

在GOG年度版1.3.1游戏原文件中原本是有“GetChosenMainMenuType”等函数的定义的。

位置:E:The Witcher 3 GOGcontentcontent0scriptsgamer4Game.ws

而在WitcherScriptMerger 0.6.2汉化版中,其初始默认的r4Game.ws就缺失了这段“GetChosenMainMenuType”等函数的定义。

位置:E:The Witcher 3 GOGWitcher Script MergerToolswcc_liter4datascriptsgamer4Game.ws

当使用0.6.2版去做mod整合时生成的mod0000_MergedFiles时,其生成的r4Game.ws也就没有“GetChosenMainMenuType”函数的

位置:E:The Witcher 3 GOGModsmod0000_MergedFilescontentscriptsgamer4Game.ws

所以用0.6.2版整合脚本,检测无错(它本身就不包含GetChosenMainMenuType等有些函数的写入),但打开游戏加载脚本时就会出错。

解决方法:

GetChosenMainMenuType函数的定义等缺失部分,在PopulateMenuQueueMainAlways函数和GetNewGameDefinitionFilename函数之间。

1.打开:E:The Witcher 3 GOGModsmod0000_MergedFilescontentscriptsgamer4Game.ws (右键用记事本打开该文件)

2.搜索(Ctrl+F):public function GetNewGameDefinitionFilename() : string

3.在其之前添加:GetChosenMainMenuType等函数的定义,内容如下(内容与E:The Witcher 3 GOGcontentcontent0scriptsgamer4Game.ws中的相同)



private var _mainMenuType : int; default _mainMenuType = -1;

public function GetChosenMainMenuType() : int

{

return _mainMenuType;

}

private function ChooseRandomMainMenuIfNotChosenYet() : int

{

var availableMainMenuTypes : array< int >;

var seed : int;

var index : int;

if ( _mainMenuType > -1 )

{

return _mainMenuType;

}

availableMainMenuTypes.PushBack( 0 );

if (theGame.GetDLCManager().IsEP1Available())

{

availableMainMenuTypes.PushBack( 1 );

}

if (theGame.GetDLCManager().IsEP2Available())

{

availableMainMenuTypes.PushBack( 2 );

}

seed = CalcSeed( theGame );

index = (int)RandNoiseF( seed, availableMainMenuTypes.Size() );

_mainMenuType = availableMainMenuTypes[ index ];

LogChannel(’asd’, "RAND " + seed + " " + index + " " + _mainMenuType );

return _mainMenuType;

}

注意“}”别删,“private var _mainMenuType : int;”前面的Tab符别忘,回车符要有。

改完之后,可以打开E:The Witcher 3 GOGcontentcontent0scriptsgamer4Game.ws,两个文件对比看看格式。

最后,如果没有mod0000_MergedFiles文件夹,比如单个mod的测试,也有相同的错误,上述的方法同样适用

在Mods文件夹下搜索“r4Game.ws”

选择可能引起报错的r4Game.ws,同样地对照E:The Witcher 3 GOGcontentcontent0scriptsgamer4Game.ws来添加缺失部分。

玩家评论
评论
发 布

更多攻略
最新游戏推荐
更多+