Skip to main content

Turning Off Pet Talk

Turning Off Pet Talk

Note: Server-side only. No client change needed, so it works for every player right away.

Overview

Pets post lines in players' common chat. This edit adds an on/off switch to petbedge.lua. When the switch is off, pets stop talking, but their mood, belly and other stats keep updating as normal.

File locations

Client Server
– script/petbedge.lua (same folder as petbedge_interface.lua)

What needs to be changed

File / location Notes
petbedge.lua, above PetBedge_Talk_Entrance (around line 260) Add the switch PET_TALK_ENABLED
petbedge.lua, inside PetBedge_Talk_Entrance Replace one return line with three lines

How it works

  1. The game server calls PetBedge_Talk_Entrance every so often for each summoned pet.
  2. That function calls PetTalk (in petbedge_interface.lua). PetTalk does two jobs:
    • Upkeep: updates mood (happiness), rating, size, star, the max HP fix and the extra skill slot.
    • Talk: picks a line for the pet to say, or returns "say nothing".
  3. The edit lets PetTalk run as normal so the upkeep still happens. Then, if the switch is off, it throws the line away and returns 0,0,0,-1. That's the game's own "say nothing" value.
Value returned Meaning
pet_tid, 0, msg, 0 Pet says line msg
0, 0, 0, -1 Pet says nothing

Warning: Don't skip PetTalk. If the function returns 0,0,0,-1 without calling PetTalk first, belly and mood stop working (seen in testing).

Editing the file

  1. Back up petbedge.lua.
  2. Open it and find function PetBedge_Talk_Entrance.
  3. On a new line above the function, add the switch.
  4. Inside the function, replace the return PetTalk(...) line with the three new lines.
  5. Save and restart the server.

Original

function PetBedge_Talk_Entrance(pet_tid,pet_item,pet_ess,is_summon)
	--宠物说话
	local pet = {};
	PetBedge_InnerInit(pet_tid,pet_item,pet_ess,pet);
	return PetTalk(pet_tid,pet,is_summon);
	--return pet_tid,channel_id,msg_id,emote
end

Changed

PET_TALK_ENABLED = false   -- pet talk: true = on, false = off (restart the server after changing)

function PetBedge_Talk_Entrance(pet_tid,pet_item,pet_ess,is_summon)
	--宠物说话
	local pet = {};
	PetBedge_InnerInit(pet_tid,pet_item,pet_ess,pet);
	local r1, r2, r3, r4 = PetTalk(pet_tid,pet,is_summon);   -- pet upkeep still runs
	if PET_TALK_ENABLED == false then return 0,0,0,-1; end   -- talk off: the game's own "no talk" value
	return r1, r2, r3, r4;
	--return pet_tid,channel_id,msg_id,emote
end

Warning: Leave PetBedge_Emote_Entrance (the function right below) in place. It handles pet emotes. It's easy to delete it by accident when pasting.

Tip: Text after -- is a note and is ignored by the game. If the Chinese notes come out garbled after pasting, it's harmless. To avoid it, keep the file's original lines and paste only the new English lines. The file uses Chinese (GBK) encoding.

Turning talk on or off

Setting Result
PET_TALK_ENABLED = false Pets don't talk. Upkeep still runs.
PET_TALK_ENABLED = true Pets talk as normal.

Change the value, save, restart the server.

What it doesn't cover

  • Level-up lines come from a different function (PetLevelUp), so pets still speak when they level up.
  • Pet emotes (PetBedge_Emote_Entrance) are not affected.
  • It turns talk off, it doesn't make it rarer.

Unconfirmed: why some pets talk nonstop

In PetTalk, normal idle talk is a small random chance (about 0.5–5% per check). But if pet:QueryData(1) > 0, the pet talks on every check with no random roll. This may be the real cause of the nonstop chatter. Not tested yet.

Final check

  • [ ] Summon a pet and wait a few minutes. No pet lines in chat.
  • [ ] Belly and mood still change over time.
  • [ ] Pet emotes still work.
  • [ ] No new errors in the server log.
  • [ ] Set the switch to true, restart, and check pets talk again.

Rollback: put the backed-up petbedge.lua back and restart.


Credit: edit by Amongades, checked against petbedge.lua and petbedge_interface.lua for Ether Saga.