0 of 0

File information

Last updated

Original upload

Created by

kagenocookie

Uploaded by

kagenocookie

Virus scan

Safe to use

Tags for this mod

About this mod

Remove invalid pawn summoning restrictions and control how pawns get sent online

Requirements
Permissions and credits
Donations
This mod contains 3 features relating to online pawn sharing, all of which are separately configurable and can be disabled:
  • Disable clientside pawn validation
  • Use an online equipment set distinct from what your arisen/pawn are actually wearing
  • Sharing custom non-replacer items between players

It has optional automatic integration with Content Editor to allow for custom item IDs to show up, but it is not a requirement.

Installation
Drop into Fluffy mod manager and enable, or manually place the lua file into GAME_DIR/reframework/autorun/.

Disable clientside pawn validation
Remove clientside validations for summoned pawns. With this you can summon virtually any pawn no matter how broken their build may be. No more "Unable to find pawn" when the pawn clearly exists. You can now summon level 1 pawns even if they have maxed out vocation ranks or pawns with cheated stats. Keep in mind that this only affects the receiving side, someone who doesn't use this mod still won't be able to see an invalid pawn.

Note that while I haven't had that happen yet, I can't confirm for sure that it can't crash the game if a received pawn is very wrong, or that the devs won't decide to introduce some sort of serverside checks at some point that I can't do anything about (I don't think there is such a thing right now).

Disabled validations for received pawns
  • disabled stat caps
  • disabled job rank checks (e.g. a lv1 pawn with all maxed vocations is now OK)
  • disabled gift item blacklist; note that probably both the receiver and the sender need to have this mod enabled
  • removed job requirement checks on gear (e.g. if the other player is using No Job Requirements)
  • name checks (should show any name, including foreign ones and those containing any of the 4471 censored words, although I haven't actually verified this in practice yet)


Full validation behavior findings for anyone interested:
Spoiler:  
Show

    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'))


Use a configurable online equipment set
You can customize the items you want to be visible to other players. Can be used as a workaround to make your pawn not naked for other players despite actually using non-replacer custom items, as well as to camouflage whatever you actually have equipped.

Override settings can be configured differently per vocation. For the arisen's equipment, the current equipped weapon when resting is used to determine the vocation instead of their actual vocation (in case of warfarer).

Note that I'm not checking armor compatibility with vocations here, so if you pick an armor that normally isn't valid for the given vocation, it will get blocked for players that don't have No Job Requirements installed and don't have validations disabled. Weapons are filtered out correctly in the list.

Share custom items between other players
This mod lets you make custom items visible online in other player's worlds. This means that if both players have the same non-replacer mods installed, they will see those items just fine. This only works for custom item IDs, changes to existing item styles won't transfer and will appear to the receiver same as they would normally with whatever style is configured for that item.

If a non-replacer item is being sent online, and the other player does not have the same item mod installed, does not allow custom items, or not have this mod, they will still see the pawn, the custom items will just be unequipped. No issues with being hireable or not from what I can tell.


Thanks to Ridog8 for help with testing how everything behaves.

If you like my mods and want to support my work, consider donating.