棋子共享设置

棋子共享设置

移除无效的pawn召唤限制,并控制pawn如何被发送到线上

此模组包含 3 项与在线随从共享相关的功能,均可单独配置并可禁用:
[list]
[]禁用客户端随从验证
[
]使用与你的觉醒者/随从实际穿戴不同的在线装备套装
[]在玩家之间共享自定义的非替换物品
[/list]
它可选择性地自动集成 [url=https://www.nexusmods.com/dragonsdogma2/mods/1031]Content Editor[/url],以便显示自定义物品 ID,但这[b]并非必需[/b]。

[size=5][b]安装
[/b][/size]拖入 Fluffy 模组管理器并启用,或手动将 lua 文件放入 [b]GAME_DIR/reframework/autorun/[/b]。

[size=5][b]禁用客户端随从验证[/b][/size]
移除对召唤随从的客户端验证。有了它,你可以召唤几乎任何随从,无论其构筑多么离谱。不再出现随从明明存在却提示“无法找到随从”的情况。即使随从满级职业等级却只有 1 级,或拥有作弊属性,你现在也能召唤它们。请记住,这仅影响接收方,不使用此模组的人仍然无法看到无效随从。

请注意,虽然我尚未遇到这种情况,但我无法确认如果收到的随从非常异常时不会导致游戏崩溃,也无法确认开发者将来不会决定引入某种我无能为力的服务器端检查(我认为目前不存在这种东西)。

[size=3][b]对收到的随从禁用的验证[/b][/size]
[list]
[
]禁用属性上限
[]禁用职业等级检查(例如,1 级随从所有职业满级现在也可以)
[
]禁用礼物物品黑名单;请注意,可能接收方和发送方都需要启用此模组
[]移除装备的职业要求检查(例如,如果其他玩家使用了 [url=https://www.nexusmods.com/dragonsdogma2/mods/51]No Job Requirements[/url])
[
]名称检查(应能显示任何名称,包括外文名称以及包含 4471 个被审查词中任意一个的名称,不过实际上我尚未验证这一点)
[/list]

供有兴趣者参考的完整验证行为发现:[spoiler]
local t_validator = sdk.find_type_definition('app.PawnRentalValidator')

-- disabling this should in theory allow any foreign names to show up irrelevant of the owner's game language or censored words
disable_validation_void(t_validator:get_method('validationName'))
disable_validation_void(t_validator:get_method('validationNickname'))
disable_validation_void(t_validator:get_method('validationOwnerNickname'))

-- verifies gift items exist and are valid and allowed; unsure if upload or download side validation
disable_validation_void(t_validator:get_method('validationPresentItem'))

-- let the arisen be whatever, it doesn't matter whatsoever
disable_validation_void(t_validator:get_method('validationArisenJobInfo'))

-- I think this is only called when sending a pawn off
-- removes the reward item if !isValidationPawnQuestItemCommon, it's not in the _OrderItemNumDict, or is in the reward blacklist (_NgOrderItemId, _NgOrderItemCategory)
disable_validation_void(t_validator:get_method('validationDeliveredPawnQuest'))

-- this one mostly just checks that the equip item IDs match the WeaponID or armor style enums in the pawn share payload
-- utterly useless except for making custom items more effort to share
disable_validation_bool(t_validator:get_method('isValidationEquipEqualWeponAndMeta'), true)

-- checks each stat individually and if any of them are above the _StatusCap value for the level range, it's invalid
disable_validation_bool(t_validator:get_method('validationStatus'))

-- this one's interesting, it limits the amount of vocations that can be maxed based on the character's level
-- <lv10: at most 1 vocation can be rank 5 or 6, and none can be >= 7
-- <lv20: at most 4 vocations can be maxed out
-- >=lv20: no limits
disable_validation_bool(t_validator:get_method('isValidationJobRank(app.Character.JobEnum[], System.Int32, app.OnlineRentalJobBuildData)'))

-- this one just checks for nulls and then calls the above isValidationJobRank for both arisen and pawn, can leave it as is
-- disable_validation_bool(t_validator:get_method('isValidationJobRank(app.ContextWriterOnline)'))

-- fails if the item does not exist or has _Attr flags Cash or Rim
-- or if it's on the gift blacklist (_ValidatorConfig._NgRewardItemId.Contains(id))
-- if it's weapon/armor, then it checks RewardEquipItemMaxNum with item num
-- if it's not, checks the value of non-weapon/non-armor items against the limit in RewardItemNumDict, or if there's no entry there, item sell price * amount < RewardLimitGold
-- one type of berry (raspberry I think) has a special case of value being treated as 10x for some reason
disable_validation_bool(t_validator:get_method('isValidationRewardItem'), true)

-- by disabling this one we can end up with a weaponless pawn if somehow they mismatched the equipment, which is not ideal but ehh, let the player deal with that
disable_validation_bool(t_validator:get_method('isValidationCanEquip'))

-- not hooking this one because it's the root validator, we wanna still keep some of them working as normal
-- disable_validation_void(t_validator:get_method('validationPlaydata'))

-- pawn quests expire after 29 days, keeping this as is since they probably stopped playing at that point ¯\
(ツ)

-- disable_validation_bool(t_validator:get_method('isPawnQuestExpired'))

-- no point in hooking this, it just ensures the number of item slots is correct
-- disable_validation_void(t_validator:get_method('validationEquipElements'))

-- these ones we could disable, but they might break the pawn behavior so I'd rather just leave them enabled anyway
-- disable_validation_void(t_validator:get_method('validationPawnJobInfo'))
-- disable_validation_bool(t_validator:get_method('isValidationJobEnum'))

-- verifies the quest IDs contained in the ULongs, it seems to also store the quest context state in here so probably best to just leave it
-- disable_validation_void(t_validator:get_method('validationKnowledge'))

-- we probably don't need this
-- it checks if time limit was set (PawnQuestSetTime), as well as checking the quest item same as isValidationRewardItem() does
-- disable_validation_void(t_validator:get_method('validationPawnQuest'))

-- no need to disable (just calls allowJob, canEquip, equipEqual, jobRank)
-- disable_validation_bool(t_validator:get_method('isValidationMyPawnUploadData'))
[/spoiler]

[size=5][b]使用可配置的在线装备套装[/b][/size]
你可以自定义希望其他玩家看到的物品。这可以作为变通方法,让你的随从在其他玩家眼中不裸体,尽管你实际使用了非替换的自定义物品,同时也能伪装你实际装备的任何物品。

覆盖设置可以按职业分别配置。对于觉醒者的装备,休息时当前装备的武器会用于确定职业,而不是其实际职业(针对幻术师的情况)。

请注意,我在这里没有检查护甲与职业的兼容性,因此如果你选择的护甲通常对给定职业无效,那么对于未安装 No Job Requirements 且未禁用验证的玩家,它会被屏蔽。武器在列表中会被正确过滤掉。

[size=5][b]在其他玩家之间共享自定义物品[/b][/size]
此模组让你可以在其他玩家的世界中在线显示自定义物品。这意味着如果双方玩家都安装了相同的非替换模组,他们就能正常看到这些物品。这仅适用于自定义物品 ID,对现有物品样式的更改不会传输,接收方看到的将与该物品配置的任何样式正常显示一样。

如果非替换物品被发送到在线环境,而其他玩家没有安装相同的物品模组、不允许自定义物品,或没有此模组,他们仍然会看到随从,只是自定义物品会被卸下。据我所知,在是否可雇佣方面没有问题。


感谢 [url=https://next.nexusmods.com/profile/Ridog8]Ridog8[/url] 帮助测试各种行为表现。

如果你喜欢我的模组并想支持我的工作,可以考虑[url=https://ko-fi.com/shadowcookie]捐赠[/url]。