mirror of
https://github.com/opentibiabr/canary
synced 2026-08-16 06:26:09 -04:00
Add Expert PvP world type and combat rules This commit adds Expert Open PvP support to Canary as an explicit world type through worldType = expert-pvp. The implementation introduces a dedicated ExpertPvp component for Expert specific combat, relation, field, movement, collision, and marking rules. Existing combat, spell, tile, player, game, and protocol code remain as thin integration points, while the Expert PvP decisions live under src creatures players components pvp. This keeps the new behavior isolated from the existing world types and avoids spreading Expert PvP specific rules across unrelated systems. The existing PvP world type handling was also clarified. retro-pvp is now the explicit Retro Open PvP value, while pvp remains supported as a compatibility alias for retro-pvp. no-pvp and pvp-enforced remain outside the Expert PvP decision path. Main world type changes • Adds worldType expert-pvp • Makes retro-pvp the explicit Retro Open PvP config value • Keeps pvp as a compatibility alias for retro-pvp • Changes the default config value from pvp to retro-pvp • Removes the old toggleServerIsRetroPVP config option • Updates Lua helpers so IsRetroPVP reads the world type string • Adds IsExpertPVP for Lua scripts • Keeps no-pvp and pvp-enforced behavior outside the Expert PvP component The ExpertPvp component centralizes relation classification and decision making for the new world type. It evaluates PvP mode, actor and target relation, combat action type, field ownership, side effects, player collision, and viewer specific situation marks. The component covers relations such as self, access players, party allies, guild allies, war enemies, direct attackers, protected ally attackers, direct targets, skulled targets, neutral players, monsters, player summons, and NPCs. Main Expert PvP rules included • Dove mode behavior • White Hand behavior • Yellow Hand behavior • Red Fist behavior • Direct combat decisions • Rune target decisions • Area spell decisions • Summon combat decisions • Field step decisions • Field damage decisions • Player walkthrough decisions • Pathfinding probe decisions • Viewer specific field visual decisions • Viewer relative creature situation marks Combat integration now asks ExpertPvp before allowing Expert PvP relevant actions. This applies to direct attacks, runes, aggressive area spells, mana and health combat, conditions, dispels, default combat actions, and field damage. When Expert PvP handles an action, it can allow or block the action and apply the correct side effects. These side effects include fight state, PZ lock behavior, skull actions, square feedback, and unjustified kill tracking where applicable. Secure mode behavior is handled through the Expert PvP relation rules instead of the older broad secure mode check. This allows secure mode retaliation without applying unjustified protection zone locks in cases where the Expert PvP relation allows the response. Magic Wall and Wild Growth now carry Expert PvP cast time context. When Expert PvP is enabled, these fields are created as safe field variants and receive owner context so the server can evaluate relation dependent behavior later. Magic Wall and Wild Growth changes • Stores the field owner context when the rune is cast • Stores the owner PvP mode at cast time • Tracks owner targets and attackers at cast time • Uses safe visual field items as the base item in Expert PvP • Resolves viewer specific appearance through protocol serialization • Evaluates collision and pathfinding from the field context • Evaluates field stepping side effects through ExpertPvp • Prevents Expert PvP owned safe fields from being removed like regular no-pvp safe fields • Keeps normal no-pvp behavior for non Expert PvP worlds Tile and pathfinding logic now consult ExpertPvp for Expert owned fields. This allows Magic Wall and Wild Growth to appear or behave differently depending on the viewer and the PvP relation, while still using the existing movement and tile query paths as the final authority. Player walkthrough and body blocking were updated so Expert PvP can decide whether a player can walk through another player outside legacy safe zones. Party, guild, war, attacker, protected ally, and target relations are used to keep collision behavior aligned with Expert PvP hand modes. PvP situation tracking was added so player relations can affect persistent creature marks. The server can now send viewer relative creature marks for the current client profile and refresh visible marks when relevant state changes. Situation mark updates happen when needed for events such as party changes, guild changes, attacked player tracking, player removal, and visible relation changes. Protocol changes • Adds ExpertPvpModeByte as a protocol feature flag • Enables Expert PvP mode byte support for the Tibia 11.00 profile • Keeps Tibia 11.00 on the verified four byte Set Tactics layout • Keeps current 15.25 on its verified three byte tactics layout • Defaults unsupported profiles safely to Dove mode • Avoids appending speculative PvP mode bytes to the current 15.25 profile • Sends Expert PvP controls only when the protocol profile supports them • Sends viewer relative creature marks only through supported packet layouts The current 15.25 profile keeps its verified tactics payload layout and does not receive a speculative extra PvP byte. This prevents client desync or crash risk. Unsupported profiles are forced safely to Dove when Expert PvP is enabled but the protocol cannot represent the mode. Player state now includes a dedicated PvP component. The selected Expert PvP mode is stored on the player and persisted to the database. Persistence and database changes • Adds PlayerPvp component • Adds player getPvpMode and setPvpMode support • Saves expert_pvp_mode during player save • Loads expert_pvp_mode during player load • Adds players.expert_pvp_mode to schema.sql • Bumps database version to 59 • Adds migration 59 for the players.expert_pvp_mode column • Skips the migration safely if the column already exists Lua API support was expanded so scripts can inspect PvP state and attach field context where needed. Lua API changes • Adds Player getPvpMode • Adds Player hasAttacked • Adds Item setExpertPvpFieldContext • Updates generated Lua API documentation • Updates Magic Wall and Wild Growth scripts to attach Expert PvP field context The PR also updates blessing and death loss behavior to use the new Retro PvP world type detection instead of the removed toggleServerIsRetroPVP config. This keeps existing Retro PvP behavior while moving the decision to the explicit world type model. Additional behavior covered • Party relation handling • Guild relation handling • War enemy relation handling • Skull relation handling • Aggressor relation handling • Protected ally relation handling • Field ownership behavior • Viewer specific field visuals • Body blocking and player collision • Situation marks and persistent creature marks • Defensive PZ lock behavior • Secure mode retaliation behavior • Blessing cost and Twist of Fate behavior under Retro PvP detection Out of scope • Frag sharing • player_kills.weight schema changes • Debug commands • Unrelated PvP features • Broad behavior changes to existing world types Documentation and tests • Adds Expert PvP implementation roadmap documentation • Adds Expert PvP porting plan documentation • Links the new documentation from the systems overview • Documents the behavioral contract • Documents the implementation roadmap • Documents the in game regression matrix • Adds Expert PvP unit coverage • Adds protocol profile coverage for Expert PvP mode support • Adds regression scenarios for all world types Validation performed • Built canary target • Built canary_ut target • Built canary_it target • Expert PvP and protocol profile tests passed with 49 of 49 tests • Full unit binary passed with 311 of 311 tests • Integration binary passed with 40 of 40 tests • Manual scenarios were exercised during implementation • Tested secure mode retaliation • Tested defensive PZ lock behavior • Tested Magic Wall and Wild Growth cast time relations • Tested viewer specific visuals and collision • Tested situation marks Test configuration • Platform Windows x64 • Compiler Microsoft Visual C plus plus 19.44 • Protocol coverage Tibia 11.00 and current 15.25 profiles Known validation note Two isolated CTest invocations terminated during global teardown after their test bodies passed. The same behavior reproduces on the main baseline. Running the unit suite in one process passes all 311 tests. Overall this commit adds Expert Open PvP as a gated world type with dedicated relation based combat and field rules. It keeps existing world types protected from Expert PvP behavior, persists the selected PvP mode, supports protocol safe PvP mode handling, updates Lua APIs and documentation, and adds regression coverage for the new rules.
688 lines
28 KiB
Text
688 lines
28 KiB
Text
-- Core settings
|
|
-- Note: If you want to use datapack folder canary (custom), put only "data-canary"
|
|
-- If you want to use the global datapack folder, put "data-otservbr-global"
|
|
-- If "useAnyDatapackFolder" is set to true then you can choose any datapack folder for your server
|
|
useAnyDatapackFolder = false
|
|
dataPackDirectory = "data-otservbr-global"
|
|
-- Don't change this unless you know what you're doing
|
|
coreDirectory = "data"
|
|
generateLuaApiDocs = true
|
|
luaApiDocsOutputDirectory = "docs/lua-api"
|
|
|
|
-- Set log level
|
|
-- It can be trace, debug, info, warning, error, critical, off (default: info).
|
|
-- NOTE: It will only be valid after the server starts up and only display logs with level higher or equal the one set.
|
|
-- NOTE: Debug and trace logs are only available if compiled in debug mode.
|
|
logLevel = "info"
|
|
|
|
--- Toggles the server's maintenance mode.
|
|
-- When enabled, it restricts user access and indicates maintenance operations.
|
|
-- @field [parent=#global] #boolean toggleMaintainMode false by default, set to true to enable maintenance mode.
|
|
toggleMaintainMode = false
|
|
--- Message displayed during maintenance mode.
|
|
-- Should inform the expected downtime or resumption details succinctly.
|
|
-- @field [parent=#global] #string maintainModeMessage an empty string by default, set a custom message if needed.
|
|
maintainModeMessage = ""
|
|
|
|
-- Combat settings
|
|
-- NOTE: valid values for worldType are: "expert-pvp", "retro-pvp", "pvp", "no-pvp" and "pvp-enforced"
|
|
-- NOTE: "pvp" is kept as a compatibility alias for "retro-pvp"
|
|
-- NOTE: removeBeginningWeaponAmmunition: spears, arrows, bolt have endless ammo (allows training for paladins)
|
|
-- NOTE: refundManaOnBeginningWeapons: wand of vortex and snakebite refund mana used (allows training for mages)
|
|
-- NOTE: loginProtectionTime in MS
|
|
worldType = "retro-pvp"
|
|
hotkeyAimbotEnabled = true
|
|
protectionLevel = 7
|
|
pzLocked = 60 * 1000
|
|
removeChargesFromRunes = true
|
|
removeChargesFromPotions = true
|
|
removeWeaponAmmunition = true
|
|
removeWeaponCharges = true
|
|
removeBeginningWeaponAmmunition = true
|
|
refundBeginningWeaponMana = false
|
|
timeToDecreaseFrags = 24 * 60 * 60 * 1000
|
|
whiteSkullTime = 15 * 60 * 1000
|
|
stairJumpExhaustion = 2 * 1000
|
|
experienceByKillingPlayers = false
|
|
expFromPlayersLevelRange = 75
|
|
dayKillsToRedSkull = 3
|
|
weekKillsToRedSkull = 5
|
|
monthKillsToRedSkull = 10
|
|
redSkullDuration = 1
|
|
blackSkullDuration = 3
|
|
orangeSkullDuration = 7
|
|
loginProtectionTime = 10 * 1000
|
|
|
|
cleanProtectionZones = false
|
|
|
|
-- Connection Config
|
|
-- NOTE: allowOldProtocol enables supported non-current protocol profiles registered by the server.
|
|
-- NOTE: maxPlayers set to 0 means no limit
|
|
-- NOTE: MaxPacketsPerSeconds if you change you will be subject to bugs by WPE, keep the default value of 25,
|
|
-- It's recommended to use a range like min 50 in this function, otherwise you will be disconnected after equipping two-handed distance weapons.
|
|
ip = "127.0.0.1"
|
|
allowOldProtocol = true
|
|
bindOnlyGlobalAddress = false
|
|
loginProtocolPort = 7171
|
|
gameProtocolPort = 7172
|
|
-- Set legacy game ports to 0 to auto-select the next available ports after
|
|
-- gameProtocolPort while avoiding loginProtocolPort and statusProtocolPort.
|
|
legacy1100GameProtocolPort = 0
|
|
legacy860GameProtocolPort = 0
|
|
statusProtocolPort = 7171
|
|
maxPlayers = 0
|
|
serverName = "OTServBR-Global"
|
|
serverMotd = "Welcome to the OTServBR-Global!"
|
|
statusTimeout = 5 * 1000
|
|
replaceKickOnLogin = true
|
|
maxPacketsPerSecond = 25
|
|
maxPlayersOnlinePerAccount = 1
|
|
maxPlayersOutsidePZPerAccount = 1
|
|
|
|
-- Packet Compression
|
|
-- Minimize network bandwith and reduce ping
|
|
-- Levels: 0 = disabled, 1 = best speed, 9 = best compression
|
|
packetCompressionLevel = 6
|
|
|
|
-- Depot Limit
|
|
freeDepotLimit = 2000
|
|
premiumDepotLimit = 10000
|
|
depotBoxes = 20
|
|
|
|
-- Item and containers limit
|
|
-- NOTE: 'maxContainerDepth' defines the maximum depth to which containers can be nested
|
|
-- NOTE: 'maxInboxItems' defines the maximum items allowed in inbox, set to 0 for limit it to uint32_t max limit (4.294.967.295)
|
|
maxItem = 5000
|
|
maxContainer = 500
|
|
maxContainerDepth = 200
|
|
maxInboxItems = 0
|
|
maxExivaWhitelist = 100
|
|
|
|
-- Player base critical
|
|
-- NOTE: 0.05 means 5%
|
|
playerBaseCriticalChance = 0.05
|
|
-- NOTE: 0.1 means 10%
|
|
playerBaseCriticalDamage = 0.1
|
|
|
|
-- Weapon Proficiency
|
|
weaponProficiencyMaxLevels = 10
|
|
weaponProficiencyMaxPerksPerLevel = 6
|
|
-- NOTE: weaponProficiencyGainMultiplier scales all Weapon Proficiency XP gain.
|
|
-- NOTE: 1.0 = normal progression, 2.0 = 2x faster, 0.5 = half speed, 0 = disabled.
|
|
-- NOTE: values below 1.0 reduce XP; values above 1.0 increase XP.
|
|
-- For full documentation see: https://github.com/opentibiabr/canary/blob/main/docs/systems/weapon-proficiency.md
|
|
weaponProficiencyGainMultiplier = 0.33
|
|
|
|
-- Animus Mastery - SoulPit (Get more info in: https://github.com/opentibiabr/canary/pull/3230)
|
|
-- NOTE: animusMasteryMaxMonsterXpMultiplier is the maximum experience the multiplier can be.
|
|
-- NOTE: animusMasteryMonsterXpMultiplier is the monster experience multiplier that has the animus mastery unlocked.
|
|
-- NOTE: animusMasteryMonstersXpMultiplier is the multiplier for each 'animusMasteryMonstersToIncreaseXpMultiplier' monsters that
|
|
-- the player has the animus mastery unlocked.
|
|
-- NOTE: animusMasteryMonstersToIncreaseXpMultiplier is the amount of monster to increase the experience multiplier by 'animusMasteryMonstersXpMultiplier'.
|
|
animusMasteryMaxMonsterXpMultiplier = 4.0
|
|
animusMasteryMonsterXpMultiplier = 2.0
|
|
animusMasteryMonstersXpMultiplier = 0.1
|
|
animusMasteryMonstersToIncreaseXpMultiplier = 10
|
|
|
|
-- Augments System (Get more info in: https://github.com/opentibiabr/canary/pull/2602)
|
|
-- NOTE: the following values are for all weapons and equipments that have type of "increase damage", "powerful impact" and "strong impact".
|
|
-- To customize the percentage of a particular item with these augment types, please add to the item "augments" section on items.xml as the example above.
|
|
-- NOTE: The values represent percentage.
|
|
-- NOTE: augmentIncreasedDamagePercent = value between 1 and 100 (damage percent to increase. ex: 5 = 5%, 50 = 50%)
|
|
-- NOTE: augmentPowerfulImpactPercent = value between 1 and 100 (damage percent to increase. ex: 10 = 10%, 100 = 100%)
|
|
-- NOTE: augmentStrongImpactPercent = value between 1 and 100 (damage percent to increase. ex: 7 = 7%, 70 = 70%)
|
|
augmentIncreasedDamagePercent = 5
|
|
augmentPowerfulImpactPercent = 7
|
|
augmentStrongImpactPercent = 10
|
|
|
|
-- Prey system
|
|
-- NOTE: preyRerollPricePerLevel: Price multiplier in gold coin for rerolling prey list.
|
|
-- NOTE: preySelectListPrice: Price to manually select creature on list and to lock prey slot.
|
|
-- NOTE: preyBonusRerollPrice: Price to manually reroll bonus type and to enable automatic reroll.
|
|
-- NOTE: preyBonusTime: Time in seconds that players will have of prey bonus.
|
|
-- NOTE: preyFreeRerollTime: Time in seconds that players will have to wait to get a new free prey list.
|
|
preySystemEnabled = true
|
|
preyFreeThirdSlot = false
|
|
preyRerollPricePerLevel = 200
|
|
preySelectListPrice = 5
|
|
preyBonusRerollPrice = 1
|
|
preyBonusTime = 2 * 60 * 60
|
|
preyFreeRerollTime = 20 * 60 * 60
|
|
|
|
-- Task hunting system
|
|
-- NOTE: taskHuntingLimitedTasksExhaust: Time to wait to select a new creature on the task hunting slot after claiming the reward.
|
|
-- NOTE: taskHuntingRerollPricePerLevel: Price multiplier in gold coin for rerolling task hunting list.
|
|
-- NOTE: taskHuntingFreeRerollTime: Time in seconds that players will have to wait to get a new free task hunting list.
|
|
taskHuntingSystemEnabled = true
|
|
taskHuntingFreeThirdSlot = false
|
|
taskHuntingLimitedTasksExhaust = 20 * 60 * 60
|
|
taskHuntingRerollPricePerLevel = 200
|
|
taskHuntingSelectListPrice = 5
|
|
taskHuntingBonusRerollPrice = 1
|
|
taskHuntingFreeRerollTime = 20 * 60 * 60
|
|
|
|
-- Forge system
|
|
-- NOTE: forgeAmountMultiplier, amount dusts multiplies of influenced monsters, default 3
|
|
-- NOTE: forgeMinSlivers, min slivers from influenced monsters
|
|
-- NOTE: forgeMaxSlivers, max slivers from influenced monsters
|
|
-- NOTE: forgeInfluencedLimit, limit of influenced monsters that will be created in interval type and time
|
|
-- NOTE: forgeFiendishLimit, limit of diabolic monsters that will be created in interval type and time, less than forgeInfluencedLimit
|
|
-- NOTE: forgeFiendishIntervalType: "hour", "minute" or "second"
|
|
forgeMaxItemTier = 10
|
|
forgeCostOneSliver = 20
|
|
forgeSliverAmount = 3
|
|
forgeCoreCost = 50
|
|
forgeMaxDust = 225
|
|
forgeFusionDustCost = 100
|
|
forgeConvergenceFusionDustCost = 130
|
|
forgeTransferDustCost = 100
|
|
forgeConvergenceTransferCost = 160
|
|
forgeBaseSuccessRate = 50
|
|
forgeBonusSuccessRate = 15
|
|
forgeTierLossReduction = 50
|
|
forgeAmountMultiplier = 3
|
|
forgeMinSlivers = 3
|
|
forgeMaxSlivers = 7
|
|
forgeInfluencedLimit = 300
|
|
forgeFiendishLimit = 4
|
|
forgeFiendishIntervalType = "hour"
|
|
forgeFiendishIntervalTime = "1"
|
|
|
|
ruseChanceFormulaA = 0.0307576
|
|
ruseChanceFormulaB = 0.440697
|
|
ruseChanceFormulaC = 0.026
|
|
|
|
onslaughtChanceFormulaA = 0.05
|
|
onslaughtChanceFormulaB = 0.4
|
|
onslaughtChanceFormulaC = 0.05
|
|
|
|
momentumChanceFormulaA = 0.05
|
|
momentumChanceFormulaB = 1.9
|
|
momentumChanceFormulaC = 0.05
|
|
|
|
transcendenceChanceFormulaA = 0.0127
|
|
transcendenceChanceFormulaB = 0.1070
|
|
transcendenceChanceFormulaC = 0.0073
|
|
|
|
amplificationChanceFormulaA = 0.4
|
|
amplificationChanceFormulaB = 1.7
|
|
amplificationChanceFormulaC = 0.4
|
|
|
|
transcendenceAvatarDuration = 7000
|
|
|
|
-- Bestiary & Bosstiary system
|
|
-- NOTE: bestiaryKillMultiplier, multiplier value of monster killed, default 1
|
|
-- NOTE: bosstiaryKillMultiplier, multiplier value of boss killed, default 1
|
|
bestiaryKillMultiplier = 1
|
|
bosstiaryKillMultiplier = 1
|
|
bestiaryRateCharmShopPrice = 1.0
|
|
boostedBossSlot = true
|
|
boostedBossLootBonus = 250
|
|
boostedBossKillBonus = 3
|
|
|
|
-- Hazard system
|
|
toogleHazardSystem = true
|
|
hazardCriticalInterval = 2000
|
|
hazardCriticalChance = 750
|
|
hazardCriticalMultiplier = 25
|
|
hazardDamageMultiplier = 200
|
|
hazardDefenseMultiplier = 0
|
|
hazardDodgeMultiplier = 85
|
|
hazardPodsDropMultiplier = 87
|
|
hazardPodsTimeToDamage = 2000
|
|
hazardPodsTimeToSpawn = 4000
|
|
hazardExpBonusMultiplier = 2
|
|
hazardLootBonusMultiplier = 2
|
|
hazardPodsDamage = 5
|
|
hazardSpawnPlunderMultiplier = 25
|
|
|
|
-- Loyalty system
|
|
loyaltyEnabled = true
|
|
loyaltyPointsPerCreationDay = 1
|
|
loyaltyPointsPerPremiumDaySpent = 0
|
|
loyaltyPointsPerPremiumDayPurchased = 0
|
|
loyaltyBonusPercentageMultiplier = 1.0
|
|
|
|
-- Custom PvP system
|
|
-- NOTE: Rate is additive percent for each level and applied multiplicative to totalDamage
|
|
-- NOTE: Damage multipliers for each vocation are adjusted in data/XML/vocations.xml
|
|
pvpRateDamageTakenPerLevel = 0.0 -- recommended to start with 0.1
|
|
pvpRateDamageReductionPerLevel = 0.0 -- recommended to start with 0.1
|
|
pvpMaxLevelDifference = 0
|
|
|
|
-- Wheel of destiny system
|
|
-- NOTE: set wheelSystemEnabled = false to disable the wheel of destiny
|
|
-- NOTE: only the wheel points are modified, all other data is on the client executable and cannot be modified
|
|
wheelSystemEnabled = true
|
|
wheelPointsPerLevel = 1
|
|
-- NOTE: monkQuestTotalShrines uses the same completion threshold used by the server storage check.
|
|
monkQuestTotalShrines = 11
|
|
wheelMonkQuestBonus = 10
|
|
|
|
-- Gem Atelier
|
|
wheelAtelierRotateLesserCost = 125000
|
|
wheelAtelierRotateRegularCost = 250000
|
|
wheelAtelierRotateGreaterCost = 500000
|
|
|
|
wheelAtelierRevealLesserCost = 125000
|
|
wheelAtelierRevealRegularCost = 1000000
|
|
wheelAtelierRevealGreaterCost = 6000000
|
|
|
|
-- Familiar system
|
|
-- NOTE: the time will be divided by 2 to get half the value, the familiar lasts 15 minutes by default and the cooldown of the spell is 30 minutes
|
|
-- Only change it here if you know what you are doing or to make testing easier with familiars
|
|
familiarTime = 30
|
|
|
|
partyAutoShareExperience = true
|
|
-- partyShareRangeMultiplier: the range of the party share experience, default 3/2 (1.5)
|
|
partyShareRangeMultiplier = 1.5
|
|
partyShareLootBoosts = false
|
|
partyShareLootBoostsDimishingFactor = 0.7
|
|
|
|
-- Tibiadrome concoctions
|
|
tibiadromeConcoctionCooldown = 24 * 60 * 60 -- 24 hours
|
|
tibiadromeConcoctionDuration = 60 * 60 -- 1 hour
|
|
tibiadromeConcoctionTickType = "online" -- "online" | "experience"
|
|
|
|
-- NOTE: Access only for Premium Account
|
|
onlyPremiumAccount = false
|
|
|
|
-- Customs
|
|
-- NOTE: depotChest, the non-stackable items will be moved to the selected depot chest(I - XVIII).
|
|
-- NOTE: autoBank = true, the dropped coins from monsters will be automatically deposited to your bank account.
|
|
-- NOTE: toggleGoldPouchAllowAnything will allow players to move items or gold to gold pouch
|
|
-- NOTE: toggleGoldPouchQuickLootOnly will ONLY allow quickloot to move items to gold pouch
|
|
-- NOTE: toggleTravelsFree will make all travels from boat free
|
|
-- NOTE: buyAolCommandFee will add fee when player buy aol by command (!aol), active changing value more than 0 (fee value. ex: 1 = 1gp aol will be 50001)
|
|
-- NOTE: buyBlessCommandFee will add fee when player buy bless by command (!bless), active changing value between 1 and 100 (fee percent. ex: 3 = 3%, 30 = 30%)
|
|
-- NOTE: teleportPlayerToVocationRoom will enable oressa to teleport player to his/her room vocation
|
|
-- NOTE: toggleReceiveReward = true, will enable players to choose one of reward exercise weapon by command !reward
|
|
-- NOTE: randomMonsterSpawn = true, will enable monsters from the same spawn to be randomized between them, thus making a variable hunt
|
|
-- NOTE: enablePlayerPutItemInAmmoSlot = true, will enable players to put any items on ammo slot, more used in custom shopping system
|
|
-- NOTE: startStreakLevel will make a reward streak level for new players who never logged in
|
|
-- NOTE: if showLootsInBestiary is true, will cause all loots to be shown in the bestiary even if the player has not reached the required number of kills
|
|
-- NOTE: minTownIdToBankTransferFromMain blocks towns less than defined from receiving money transfers
|
|
-- NOTE: enableSupportOutfit enable GODS and GMS to select support outfit (gamemaster, customer support or community manager)
|
|
depotChest = 4
|
|
autoLoot = false
|
|
autoBank = false
|
|
toggleGoldPouchAllowAnything = false
|
|
toggleGoldPouchQuickLootOnly = false
|
|
toggleTravelsFree = false
|
|
buyAolCommandFee = 0
|
|
buyBlessCommandFee = 0
|
|
teleportPlayerToVocationRoom = true
|
|
toggleReceiveReward = false
|
|
randomMonsterSpawn = false
|
|
lootPouchMaxLimit = 2000
|
|
quickLootMaxCorpses = 30
|
|
storeInboxMaxLimit = 2000
|
|
enablePlayerPutItemInAmmoSlot = false
|
|
startStreakLevel = 0
|
|
showLootsInBestiary = false
|
|
minTownIdToBankTransferFromMain = 4
|
|
enableSupportOutfit = true
|
|
|
|
-- NOTE: stashMoving = true, stow an container inside your stash
|
|
-- NOTE: stashManageAmount = max items add/remove from stash at once
|
|
stashMoving = false
|
|
stashManageAmount = 100000
|
|
|
|
-- Teleport summon
|
|
-- Set to true will never remove the summon
|
|
teleportSummons = false
|
|
|
|
-- NOTE: true will allow the /reload command to be used
|
|
-- NOTE: Using this script might cause unwanted changes
|
|
-- This script forces a reload in the entire server, this means that everything that is stored in memory might stop to work properly and/or completely, this script should be used in test environments only
|
|
allowReload = false
|
|
|
|
-- Stamina in Trainers
|
|
staminaTrainer = false
|
|
staminaTrainerDelay = 5
|
|
staminaTrainerGain = 1
|
|
-- Stamina in PZ
|
|
staminaPz = false
|
|
staminaOrangeDelay = 1
|
|
staminaGreenDelay = 5
|
|
staminaPzGain = 1
|
|
-- Max players allowed on a dummy.
|
|
maxAllowedOnADummy = 1
|
|
|
|
-- Save interval per time
|
|
-- NOTE: toggleSaveInterval: true = enable the save interval, false = disable the save interval
|
|
-- NOTE: toggleSaveAsync = true, will enable save async (experimental), not recommended for use in production
|
|
-- NOTE: saveIntervalType: "minute", "second" or "hour"
|
|
-- NOTE: toggleSaveIntervalCleanMap: true = enable the clean map, false = disable the clean map
|
|
-- NOTE: saveIntervalTime: time based on what was set in "saveIntervalType"
|
|
toggleSaveAsync = false
|
|
toggleSaveInterval = true
|
|
saveIntervalType = "hour"
|
|
toggleSaveIntervalCleanMap = true
|
|
saveIntervalTime = 1
|
|
|
|
-- Imbuement
|
|
toggleImbuementShrineStorage = false
|
|
toggleImbuementNonAggressiveFightOnly = false
|
|
|
|
-- Free quests
|
|
-- Add quest access to player when logging in
|
|
-- NOTE: Only quests that are in the "freequests.lua" script table will work
|
|
-- toggleFreeQuest = enable/disable the system
|
|
-- freeQuestStage = if you add more quests to the table, change this value to run freeQuest again
|
|
toggleFreeQuest = false
|
|
freeQuestStage = 1
|
|
|
|
-- Deaths
|
|
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
|
|
-- death penalty formula. For the old formula, set it to 10. For
|
|
-- no skill/experience loss, set it to 0.
|
|
deathLosePercent = -1
|
|
leavePartyOnDeath = false
|
|
|
|
-- Houses
|
|
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
|
|
-- NOTE: set houseBuyLevel to 0 to disable the min level purchase functionality.
|
|
--[[ NOTE: The togglehouseTransferOnRestart setting controls whether house transfers/leave are true/false upon server restart.
|
|
• When set to true, the transfers will only occur during a server restart.
|
|
Setting this to false may pose risks; if a house is abandoned and contains a large number of items on the floor, those items will be transferred to the player's depot instantly.
|
|
• This could potentially freeze the server due to the heavy operation. It's advised to keep this setting enabled (true) to minimize risks.
|
|
]]
|
|
-- NOTE: When toggleCyclopediaHouseAuction = true, the !buyhouse commmand does not work.
|
|
-- Periods: daily/weekly/monthly/yearly/never
|
|
-- Base: sqm,rent,sqm+rent
|
|
toggleCyclopediaHouseAuction = true
|
|
daysToCloseBid = 7
|
|
housePriceRentMultiplier = 0.0
|
|
housePriceEachSQM = 1000
|
|
houseRentPeriod = "monthly"
|
|
houseRentRate = 1.0
|
|
houseOwnedByAccount = false
|
|
houseBuyLevel = 100
|
|
housePurchasedShowPrice = false
|
|
houseLoseAfterInactivity = 30 -- days; 0 = never
|
|
onlyInvitedCanMoveHouseItems = true
|
|
togglehouseTransferOnRestart = true
|
|
|
|
-- Item Usage
|
|
timeBetweenActions = 200
|
|
timeBetweenExActions = 1000
|
|
|
|
-- Push
|
|
-- NOTE: pushDelay: interval for every push
|
|
-- NOTE: pushDistanceDelay: delay for every distance push
|
|
-- NOTE: pushWhenAttacking: true = enable the push during attack, false = disable the push during attack
|
|
pushDelay = 1000
|
|
pushDistanceDelay = 1500
|
|
pushWhenAttacking = false
|
|
|
|
-- Map
|
|
-- Note: Set mapName without .otbm at the end.
|
|
-- Note: If toggleDownloadMap is set to false, the mapDownloadUrl will not be used.
|
|
-- Note: If a map with the same name already exists in the world folder, the map will not be downloaded, even if toggleDownloadMap is set to true.
|
|
toggleDownloadMap = true
|
|
mapDownloadUrl = "https://github.com/opentibiabr/canary/releases/download/v3.6.1/otservbr.otbm"
|
|
mapName = "otservbr"
|
|
mapAuthor = "OpenTibiaBR"
|
|
|
|
-- Party List limitations
|
|
-- max distance in which players in party list are visible
|
|
-- NOTE partyListMaxDistance set to 0 means no limit
|
|
partyListMaxDistance = 30
|
|
|
|
-- Custom Map
|
|
-- NOTE: toggleMapCustom set to true will load all maps in custom map folder
|
|
toggleMapCustom = true
|
|
|
|
-- Market
|
|
-- NOTE: marketRefreshPricesInterval (in minutes, minimum is 1 minute)
|
|
-- NOTE: set it to 0 for disable, is the time in which the task will run updating the prices of the items that will be sent to the client
|
|
marketOfferDuration = 30 * 24 * 60 * 60
|
|
marketRefreshPricesInterval = 30
|
|
premiumToCreateMarketOffer = true
|
|
checkExpiredMarketOffersEachMinutes = 60
|
|
maxMarketOffersAtATimePerPlayer = 100
|
|
|
|
-- MySQL
|
|
mysqlHost = "127.0.0.1"
|
|
mysqlUser = "root"
|
|
mysqlPass = "root"
|
|
mysqlDatabase = "otservbr-global"
|
|
mysqlDatabaseBackup = false
|
|
mysqlPort = 3306
|
|
mysqlSock = ""
|
|
passwordType = "sha1"
|
|
|
|
-- NOTE: memoryConst: This is the memory cost for the Argon2 hash algorithm. It specifies the amount of memory that the algorithm will use when calculating a hash.
|
|
--The memory cost is measured in units of KiB (1024 bytes). A higher memory cost makes the algorithm more resistant to brute-force and hash-table attacks, but also consumes more memory.
|
|
-- NOTE: temporaryConst: This is the time cost for the Argon2 hash algorithm. It specifies the amount of computational time that the algorithm will spend when calculating a hash.
|
|
--A higher time cost makes the algorithm more secure but also slower.
|
|
-- NOTE: parallelism: This is the parallelism factor for the Argon2 hash algorithm. It specifies the number of parallel threads that the algorithm will use when calculating a hash.
|
|
--In general, a higher level of parallelism can make the algorithm faster on systems with multiple CPU cores, but it can also increase memory usage.
|
|
-- NOTE: These settings have to be the same on the site and server.
|
|
memoryConst = "1<<16"
|
|
temporaryConst= 2
|
|
parallelism = 2
|
|
|
|
-- Session Auth
|
|
authType = "password" -- 'session' | 'password'
|
|
resetSessionsOnStartup = false
|
|
|
|
-- Misc.
|
|
-- NOTE: experienceDisplayRates: set to false to ignore exp rate or true to include exp rate
|
|
-- NOTE: disableLegacyRaids: set to true to disable legacy XML raids
|
|
allowChangeOutfit = true
|
|
toggleMountInProtectionZone = false
|
|
freePremium = false
|
|
kickIdlePlayerAfterMinutes = 15
|
|
maxMessageBuffer = 4
|
|
toggleLearnSpells = true
|
|
emoteSpells = false
|
|
allowWalkthrough = true
|
|
coinPacketSize = 25
|
|
coinImagesURL = "http://127.0.0.1/images/store/"
|
|
classicAttackSpeed = false
|
|
showScriptsLogInConsole = false
|
|
luaStartupLoadTelemetry = false
|
|
luaScriptBytecodeCache = true
|
|
luaScriptBytecodeCachePath = "cache/lua-bytecode"
|
|
luaScriptDebugHook = false
|
|
luaScriptDebugHookInterval = 30000
|
|
-- time to suppress negative conditions after being affected by them (ms)
|
|
minDelayBetweenConditions = 0
|
|
-- configure maximum value of critical imbuement
|
|
criticalChance = 10
|
|
inventoryGlowOnFiveBless = false
|
|
adventurersBlessingLevel = 21
|
|
skulledDeathLoseStoreItem = false
|
|
experienceDisplayRates = true
|
|
disableLegacyRaids = false
|
|
disableMonsterArmor = false
|
|
|
|
-- Dispatcher fairness budgets. Changes apply after config reload.
|
|
creatureWalkTasksPerPass = 128
|
|
walkParallelTasksPerPass = 8
|
|
creatureAsyncTasksPerBucket = 16
|
|
deferredGameplayTasksPerPass = 16
|
|
dispatcherSliceDurationMs = 2
|
|
workerCompletionsPerPass = 64
|
|
-- Adaptive budgets enter constrained mode at the SLO and emergency mode at the higher threshold.
|
|
dispatcherSloMs = 50
|
|
dispatcherEmergencyMs = 100
|
|
-- Worker count and queue capacity are fixed at startup and require a restart.
|
|
-- Zero worker threads selects the hardware-aware default; hosts with up to two CPUs run inline.
|
|
-- Capacity may be lowered but is hard-capped at 2048 outstanding request/completion tokens.
|
|
monsterComputeThreads = 0
|
|
monsterComputeQueueCapacity = 2048
|
|
minElementalResistance = -200
|
|
maxElementalResistance = 200
|
|
maxDamageReflection = 200
|
|
|
|
-- Benchmark-only monster stress flags. Keep disabled in production.
|
|
-- monsterPerfTestForceActive prevents logical idle even without players or targets nearby.
|
|
-- Under bounded scheduler overload, distant background monsters may still receive reduced cadence until a player sees them.
|
|
-- monsterPerfTestFriendlyFire lets hostile non-summon monsters target each other and prefer random target selection.
|
|
monsterPerfTestForceActive = false
|
|
monsterPerfTestFriendlyFire = false
|
|
|
|
-- Chain system
|
|
-- NOTE: combatChainDelay: set to minimum 50 miliseconds
|
|
toggleChainSystem = false
|
|
combatChainDelay = 50
|
|
combatChainTargets = 5
|
|
combatChainSkillFormulaAxe = 0.9
|
|
combatChainSkillFormulaClub = 0.7
|
|
combatChainSkillFormulaSword = 1.1
|
|
combatChainSkillFormulaFist = 1.1
|
|
|
|
-- Livestream system
|
|
-- NOTE: set livestreamExperienceMultiplier to 1.0 to disable the experience bonus.
|
|
-- NOTE: set livestreamMaximumViewers to 0 for no global viewer limit.
|
|
-- NOTE: use livestreamPremiumMaximumViewers or a positive livestreamMaximumViewers value to restrict viewer counts.
|
|
livestreamExperienceMultiplier = 1.15
|
|
livestreamMaximumViewersPerIP = 2
|
|
livestreamMaximumViewers = 10
|
|
livestreamPremiumMaximumViewers = 20
|
|
livestreamCasterMinLevel = 200
|
|
|
|
-- Global server Save
|
|
-- NOTE: globalServerSaveNotifyDuration in minutes
|
|
globalServerSaveNotifyMessage = true
|
|
globalServerSaveNotifyDuration = 5
|
|
globalServerSaveCleanMap = false
|
|
globalServerSaveClose = false
|
|
globalServerSaveShutdown = true
|
|
globalServerSaveTime = "06:00:00"
|
|
|
|
-- Sort loot by chance, most rare items drop first
|
|
-- it is good to be setted when you have a higher
|
|
-- rateLoot to avoid losing all rare items when
|
|
-- the corpse size is less than the total of loots
|
|
-- the monster can drop
|
|
sortLootByChance = false
|
|
|
|
-- Rates
|
|
-- NOTE: rateExp, rateSkill and rateMagic is used when 'rateUseStages = false' - or a fallback only
|
|
-- To configure rates see file data/stages.lua
|
|
-- lowLevelBonusExp works up to level 50
|
|
rateUseStages = false
|
|
lowLevelBonusExp = 50
|
|
rateExp = 1
|
|
rateSkill = 1
|
|
rateLoot = 1
|
|
rateMagic = 1
|
|
rateSpawn = 1
|
|
|
|
-- Killing in the name of Quest
|
|
rateKillingInTheNameOfPoints = 1
|
|
|
|
-- Today regeneration condition over an loop every 1 second,
|
|
-- So values which should regenerated less then 1 second or won't will work
|
|
rateHealthRegen = 1.0
|
|
rateHealthRegenSpeed = 1.0
|
|
rateManaRegen = 1.0
|
|
rateManaRegenSpeed = 1.0
|
|
rateSoulRegen = 1.0
|
|
rateSoulRegenSpeed = 1.0
|
|
|
|
rateSpellCooldown = 1.0
|
|
rateAttackSpeed = 1.0
|
|
rateOfflineTrainingSpeed = rateAttackSpeed
|
|
rateExerciseTrainingSpeed = rateAttackSpeed
|
|
|
|
-- Monster rates
|
|
rateMonsterHealth = 1.0
|
|
rateMonsterAttack = 1.0
|
|
rateMonsterDefense = 1.0
|
|
|
|
-- Npc rates
|
|
rateNpcHealth = 1.0
|
|
|
|
-- Boss rates
|
|
rateBossHealth = 1.0
|
|
rateBossAttack = 1.0
|
|
rateBossDefense = 1.0
|
|
|
|
bossDefaultTimeToFightAgain = 20 * 60 * 60 -- 20 hours
|
|
bossDefaultTimeToDefeat = 20 * 60 -- 20 minutes
|
|
|
|
-- Monsters
|
|
defaultRespawnTime = 60
|
|
deSpawnRange = 2
|
|
deSpawnRadius = 50
|
|
|
|
-- Stamina
|
|
staminaSystem = true
|
|
|
|
-- Scripts
|
|
warnUnsafeScripts = true
|
|
convertUnsafeScripts = true
|
|
|
|
-- Startup
|
|
-- NOTE: defaultPriority only works on Windows and sets process
|
|
-- priority, valid values are: "normal", "above-normal", "high"
|
|
defaultPriority = "high"
|
|
startupDatabaseOptimization = true
|
|
|
|
-- Status server information
|
|
ownerName = "OpenTibiaBR"
|
|
ownerEmail = "opentibiabr@outlook.com"
|
|
url = "http://docs.opentibiabr.com/"
|
|
location = "South America"
|
|
|
|
-- Sends Discord webhook notifications on startup, raids and shutdown.
|
|
-- The URL layout is https://discord.com/api/webhooks/:id/:token
|
|
-- Leave empty if you wish to disable.
|
|
discordWebhookURL = ""
|
|
discordSendFooter = true
|
|
discordWebhookDelayMs = 1000
|
|
|
|
-- Vip System (Get more info in: https://github.com/opentibiabr/canary/pull/1063)
|
|
-- NOTE: set vipSystemEnabled to true to enable the vip system functionalities (this overrides premium checks)
|
|
-- NOTE: vipBonusExp = 0 is deactivated, active changing value between 1 and 100 (percent xp bonus to gain. ex: 3 = 3%, 30 = 30%)
|
|
-- NOTE: vipBonusLoot = 0 is deactivated, active changing value between 1 and 100 (percent loot bonus to gain. ex: 3 = 3%, 30 = 30%)
|
|
-- NOTE: vipBonusSkill = 0 is deactivated, active changing value between 1 and 100 (percent skill bonus to gain. ex: 3 = 3%, 30 = 30%)
|
|
-- NOTE: vipAutoLootVipOnly = activates only vip to get automatic loot, config 'autoLoot' need to be enabled, for this config works
|
|
-- NOTE: vipStayOnline = when this config is activated, players vip will not be kicked after 'kickIdlePlayerAfterMinutes' config
|
|
-- NOTE: vipFamiliarTimeCooldownReduction = the minutes that will be debited from the familiar time cooldown for vip accounts, use 0 to deactivate the reduction (the default maximum value is 15, but it is calculated automatically)
|
|
-- examples: The default config 'familiarTime' is 30, this value is divided by 2 (15 minutes familiar and 15 minutes to cooldown)
|
|
-- If you use 'vipFamiliarTimeCooldownReduction = 10' the vip players will have only, in this case, 5 minutes of cooldown.
|
|
-- If you use 'vipFamiliarTimeCooldownReduction' greater than half of 'familiarTime', it will get the highest possible value, in this case 15
|
|
-- NOTE: GainCoin function, please configure script: data-otservbr-global/scripts/globalevents/vip/online_coins.lua
|
|
-- NOTE: GainToken function, please configure script: data-otservbr-global/scripts/globalevents/vip/online_tokens.lua
|
|
vipSystemEnabled = false
|
|
vipBonusExp = 0
|
|
vipBonusLoot = 0
|
|
vipBonusSkill = 0
|
|
vipAutoLootVipOnly = false
|
|
vipStayOnline = false
|
|
vipFamiliarTimeCooldownReduction = 0
|
|
vipKeepHouse = false
|
|
|
|
-- NOTE: set rewardChestCollectEnabled to true to enable the reward collect system
|
|
-- NOTE set rewardChestMaxCollectItems max items per collect action
|
|
rewardChestCollectEnabled = true
|
|
rewardChestMaxCollectItems = 200
|
|
|
|
-- Metrics
|
|
--- Prometheus
|
|
metricsEnablePrometheus = false
|
|
metricsPrometheusAddress = "0.0.0.0:9464"
|
|
|
|
--- OStream
|
|
metricsEnableOstream = false
|
|
metricsOstreamInterval = 1000
|
|
|
|
-- OTC Features
|
|
-- NOTE: Features added in this list will be forced to be used on OTCR
|
|
-- These features can be found in "modules/gamelib/const.lua"
|
|
OTCRFeatures = {
|
|
enableFeature = {
|
|
101, -- g_game.enableFeature(GameItemShader)
|
|
102, -- g_game.enableFeature(GameCreatureAttachedEffect)
|
|
103, -- g_game.enableFeature(GameCreatureShader)
|
|
118 -- g_game.enableFeature(GameWingsAurasEffectsShader)
|
|
},
|
|
disableFeature = {
|
|
}
|
|
}
|