Pet

A **Pet** is a spirit Animal that can be Trained and nurtured. Some of them appear at the player Sect after a specific amount of days, with others having more manual/active methods of obtainment. They can participate in combat and help the Sect with Miracles.

## Pet Behavior

Pet Behavior can be adjusted with Pet Training.

## Attributes

Pets have main attributes and secondary properties influenced by those attributes, the same way Five Attributes and Properties work for non-pets. Those attributes are: Growth, Intelligence, Core, Spells Qi, Protection, Fatness, Physique and Bless/Curse. Attributes can have a direct influence, like Intelligence, but their influence sometimes also comes from a derivative property (for example, Growth has `GrowPercent` the attribute and `GrowProperty` the property) so be careful with the distinction. To clarify, the property derivative of the attribute will be suffixed with "Prop". Attributes directly influence the pet's properties, sometimes indirectly through their derivative property.

They usually bring advantages through breakpoints, that add points to other attributes, their related property or unlock spells or skills. They're also often consumed by Pet spells.

An important distinction for everything said in this section is to be made for Xianxian and Xiuxiu the linked Panda pets. In their case, XianXian directly starts at the Learning stage, and is the only one growing normally. On the other hand, Xiuxiu benefits from the attributes increases of Xiuxiu except for Intelligence, and has almost no benefit from Attributes growth.

### Growth

Pets have a Growth (maturity, `GrowPercent`) stat that emulates their age. It dictates their appearance, the degree a control the player has over them, their battle stats and the powers they have access to.

#### Maturity stages and increases

It grows naturally every 60s of pet activity and nothing influences it. There are 3 distinct stages:

* Growth < 30: Child stage, earns 1 growth every 1200s (2 in-game days) , 60 days to reach the next stage.
* Growth <100: Learning stage, earns 1 growth every 1200s (2 in-game days), 140 days to reach the next stage.
* Growth >= 100: Mature stage, earns 1 growth in

G
r
o
w
t
h
−
100

2

−
0.2

{\displaystyle \frac{Growth - 100}{2} - 0.2}

days, or in plain text one half day per growth above 100, minus 5 hours.

Note that despite the game calling it a percentage it has no limit, but it has no effect over 100, except for the Panda pets as Xianxian starts at 30 Growth and transmits his growth to Xiuxiu, resulting in Xiuxiu being at max growth when Xianxian reaches 130 growth, which takes 225.1 in-game days from 100 growth.

#### Direct effect

Growth has a derivative property named GrowProp, and it also has a number of effects on other attributes, depending on pet and stage. GrowProp is equal to

G
r
o
w
t
h

10

{\displaystyle \frac{Growth}{10}}

, rounded up with a min of 1 and a max of 10, except for Miao whose GrowProp is 5 at 30-99 Growth and 10 at 100+ growth.

#### Derivative property effect

As explained above, GrowthProp varies between 1 and 10 (0 and 10 for Miao) following the Growth. It has 2 effects:

* Improves the Pet's vision radius by its value
* Improves the movespeed depending on the Pet

### Intelligence

Intelligence (`LingZhi`, also named `LingShouLingZhi`) affects the speed of training and unlocks Pet spells. 50 is required for the pet actions "Help inners", which cover feeding them helpful pills. It is influenced by Pet Training and some pet's Growth bonuses. It varies between 0 and 100.

LsDog
LsFox
LsDragon
LsPhoenix
LsPandaXian
LsXuanWu

### Core

Core (`NeiDan`, also named `LingShouNeiDan`) affects the pet's artifact stats and unlocks Pet spells and special abilities. It is influenced by Physique, the Growth of the pet depending on their race and Pet Training. It varies between 0 and 100.

LsFox
 Yiming
LsPhoenix

### Protection

Protection (`HuTi`, also named `LingShouHuTi`) affects Barrier Power bonus and unlocks some Pet spells. It is influenced by the Growth of the pet depending on their race and Pet Training. It varies between 0 and 100.

LsDog

### Qi

Qi (`QiGan`, also named `LingShouQiGan`) affects Max Qi and unlocks some Pet spells. It is influenced by the Growth of the pet depending on their race and Pet Training. It varies between 0 and 100.

LsFox
LsXuanWu

### Spells

Spells (`ShuFa`, also named `LingShouShuFa`) affects Spell power and Spell Qi costs and unlocks some Pet spells. It is influenced by the Growth of the pet depending on their race and Pet Training. It varies between 0 and 100.

### Bless / Curse

The attribute Bless / Curse (`Justice`, also named `LingShouJustice)` is akin to the Alignment for non-npc pets. It is modified by how much they are encouraged to do actions. It varies between -50 and 50.

Pets taking these actions or being in a situation which can trigger them does not matter, only their attitude towards them matter. For example, Huajuan has a high natural propensity to "Defecate by my bed", which evaluate to "Sometimes" and a -2 Justice score. A player would have to first build a Pet's Bed to be able to modify that action, and thus change the Justice value associated to it.

#### Activity influences depending on behaviour frequency

Actions are categorized into 3 groups, bad, neutral and good.

* Any attack, even enemies
* Move any corpse
* Butcher
* Feed Laxative
* Eat Shit
* Defecate anywhere but the spot
 * Move inconscious people
* Pilfer Items / Search bodies
 * Organize items
* Cut wood
* Mine
* Irrigate / Urinate on plant
* Cure Frostbite
* Cure Heatstroke
* Increase Heat Resistance (Refresh)
* Increase Cold Resistance (Furnace)
* Join in the fun
* Heal Injury
* Feed Euphoria Pill
* Feed Sprout Pill
* Feed Purity Pill
* Feed Spirit Stone
* Feed Spirit Crystal
* Defecate on the Spot

#### Direct effect

Justice has a derivative property JusticeProp, which varies between -2 and +2:

 35
 25
 -25
 -35

It also has a direct effect on the appearance of the pet. In the example below, the values are for justice at -50, -25, 0, 25 and 50 from left to right.

It also affects Food Nutrition and the spells of the MiaoDLC pet:

While the changes seem about neutral, the limit of nutrition values at 100 and the depletion of Attributes gain as the nutrition values lowers means the optimal is probably to keep at Miao around -25 justice and switch between the two before and after feeding time.

#### Derivative property effect

JusticeProp affects the following properties:

* Spell power bonus: bonus if JusticeProp is negative
* Artifact power bonus: bonus if JusticeProp is negative
* Barrier Power Bonus: bonus if JusticeProp is positive

### Fatness

The attribute Fat (`Fat`, also named `LingShouFat`) affects the pet's base movespeed and high values give a large flat boost to its max amount of Qi through its derivative property. It is influenced by the food eaten and some activities when they're finished. It varies between -250 and 250.

*See: Pet\_Training#Food\_Nutrition*

#### Activity influences

Only 2 activities have an effect on Fatness, depending on the chosen behavior for them:

* The "eating frequency" action removes 1 fat if the action frequency is "never" (I only eat when I'm starving) or "rare" (I eat when I'm very hungry), and adds 1 if it's "sometimes" (I eat when I start to get hungry) and "often" (I eat when I get even a little hungry)
* Organize items removes 1 fat if it's encouraged at all (anything but never)

It is relatively easy to influence Fatness through food only, so actions shouldn't be encouraged or discouraged based on that.

#### Direct and derivative property effect

Fatness has an effect on the movespeed of the pet, its flat Max Qi and its spell cooldown reduction. As the bonus Max Qi reaches high values high fatness is very desirable in the early game. At specific values it also affects the Spell Cooldown Bonus property, reducing the time between Battle Spells (this property is also not bugged in the pet case)

### Physique

The attribute Physique (`Stronger`, also named `LingShouStronger`) either applies a malus to Spell Qi Cost Bonus at low values, a small boost to Movespeed at intermediate value and a significant boost to Core at high values. It is influenced by the food eaten and some activities when they're finished. It varies between -250 and 250.

*See: Pet\_Training#Food\_Nutrition*

#### Activity influences

Only 2 activities have an effect on Physique, depending on the chosen behavior for them:

* Train Core adds 1 Physique if it's encouraged at all (anything but never)
* Train Spell adds 1 Physique if it's encouraged at all (anything but never).

#### Direct property effect

There's no derivative property for Physique.

 200
 150
 -150
 -200

## Properties

Properties are set by attributes or property-derivative attributes and govern most of the actual battle stats of the pets. Properties that aren't mentioned are inherited from the Animal race.

* Minimum Temperature Tolerance: -30°C for all pets
* Maximum Temperature Tolerance: 150°C for all pets.
* Vision Radius: 10 + GrowthProp
* Nutrition: 1 for all pets but MiaoDLC, affects the nutrition value taken when Eating. See Miao's case in The Bless/Curse section.
* Food need multiplier: 1 for all but MiaoDLC, same as above.
* Water need multiplier: 1 for all but MiaoDLC, same as above.
* Max Qi
	+ 20000
	∗
	(
	1
	−
	D
	i
	s
	t
	u
	r
	b
	e
	d
	Q
	i
	)
	Q

	i
	2

	∗
	300
	F
	a
	t
	P
	r
	o
	p
	∗
	500000

	{\displaystyle 20000\*(1-DisturbedQi) + Qi^2\*300+FatProp\*500000}

	, where Qi is the Qi Attribute, DisturbedQi is linked to the "Disturbed Qi" Immortal constraint and equal to 0.7 if active, 0 otherwise.

XianxianDLC , XiuxiuDLC and MiaoDLC:

20000
∗
Q
i
D
i
s
t
u
r
b
e
d
Q

i
2

∗
300
∗
1.5
F
a
t
P
r
o
p
∗
500000

{\displaystyle 20000\*QiDisturbed + Qi^2\*300\*1.5+FatProp\*500000}

. This means they have more Max Qi with the "Disturbed Qi" contraint active and is a bug.

* Barrier Power Bonus
	+ 0.1
	0.5
	∗
	P
	r
	o
	t
	e
	c
	t
	i
	o
	n
	∗
	(
	1
	0.2
	∗
	J
	u
	s
	t
	i
	c
	e
	P
	r
	o
	p
	)

	{\displaystyle 0.1 + 0.5\*Protection\*(1 + 0.2\*JusticeProp)}

	 as extra percentage (`addP`). This means a Blessed pet has more Barrier Power.
	+ Huajuan:

	0.1
	0.7
	∗
	P
	r
	o
	t
	e
	c
	t
	i
	o
	n
	∗
	(
	1
	0.2
	∗
	J
	u
	s
	t
	i
	c
	e
	P
	r
	o
	p
	)

	{\displaystyle 0.1 + 0.7\*Protection\*(1 + 0.2\*JusticeProp)}
	+ MiaoDLC:

	0.2
	0.7
	∗
	P
	r
	o
	t
	e
	c
	t
	i
	o
	n
	∗
	(
	1
	0.2
	∗
	J
	u
	s
	t
	i
	c
	e
	P
	r
	o
	p
	)

	{\displaystyle 0.2 + 0.7\*Protection\*(1 + 0.2\*JusticeProp)}
* Artifact Power Bonus: The base value is

L
o
o
s
e
C
o
r
e
∗

C
o
r
e
∗
(
1
−
0.2
∗
J
u
s
t
i
c
e
P
r
o
p
)

200

{\displaystyle LooseCore\*\frac{Core\*(1-0.2\*JusticeProp)}{200}}

 as extra percentage (`AddP`), where LooseCore is linked to the "Loose Core" Immortal constraint and equal to 0.75 if active, 1 otherwise. This means a cursed pet has stronger artifact power. A multiplier is then applied depending on the pets:
	+ Most pets: 30
	+ Qin Muxue: 40
	+ Yiming: 36
	+ MiaoDLC: 15
	+ XianxianDLC and XiuxiuDLC: due to a bug, Pandas have 0 Bonus artifact power if the "Loose Core" Immortal constraint is **not** active, and

	4.5
	∗

	C
	o
	r
	e
	∗
	(
	1
	−
	0.2
	∗
	J
	u
	s
	t
	i
	c
	e
	P
	r
	o
	p
	)

	200

	{\displaystyle 4.5\*\frac{Core\*(1-0.2\*JusticeProp)}{200}}

	 if it is.
* Artifact Qi Recovery Bonus:

C
o
r
e
1

{\displaystyle Core+1}

as extra percentage (`AddP`).
* Artifact Max Qi bonus:

2
∗
C
o
r
e

{\displaystyle 2\*Core}

 as extra percentage (`AddP`).
* Artifact Fly Speed Bonus:

10
∗
C
o
r
e

2000

{\displaystyle \frac{10\*Core}{2000}}

as extra percentage (`AddP`).
* Artifact Turn Speed Bonus:

10
∗
C
o
r
e

2000

{\displaystyle \frac{10\*Core}{2000}}

as extra percentage (`AddP`).
* Artifact Attack speed
	+ 0.004
	∗
	C
	o
	r
	e

	{\displaystyle 0.004\*Core}

	as % Cooldown reduction
	+ Yiming:

	0.006
	∗
	C
	o
	r
	e

	{\displaystyle 0.006\*Core}
* Spell Power Bonus:
	+ (
	1
	−
	0.2
	∗
	J
	u
	s
	t
	i
	c
	e
	P
	r
	o
	p
	)
	∗

	S
	p
	e
	l
	l

	s
	2

	50

	{\displaystyle (1- 0.2 \* JusticeProp)\*\frac{Spells^2}{50}}

	 as extra percentage (`AddP`). This means a cursed pet has more powerful spells.
	+ Changhai , XianxianDLC and XiuxiuDLC:

	1.2
	∗
	(
	1
	−
	0.2
	∗
	J
	u
	s
	t
	i
	c
	e
	P
	r
	o
	p
	)
	∗

	S
	p
	e
	l
	l

	s
	2

	50

	{\displaystyle 1.2\*(1- 0.2 \* JusticeProp)\*\frac{Spells^2}{50}}
* Spell Cooldown Reduction:
	+ 0 <= Fatness < 20: 50% cooldown reduction
	+ 20 <= Fatness < 50: 25% cooldown reduction (this only concerns Battle Spells).
* Spell Qi Cost Reduction:

S
p
e
l
l
s

10

{\displaystyle \frac{Spells}{10}}

 as percentage
* Movespeed base
	+ (
	4.5
	G
	r
	o
	w
	P
	r
	o
	p
	∗
	1.4
	)
	∗
	(
	1
	−
	F
	a
	t
	∗
	0.0005
	)

	{\displaystyle (4.5+GrowProp\*1.4)\*(1-Fat\*0.0005)}
	+ XiuxiuDLC:

	1
	3

	∗
	(
	4.5
	G
	r
	o
	w
	P
	r
	o
	p
	∗
	1.4
	)
	∗
	(
	1
	−
	F
	a
	t
	∗
	0.0005
	)

	{\displaystyle \frac{1}{3}\*(4.5+GrowProp\*1.4)\*(1-Fat\*0.0005)}
	+ Yiming:

	(
	4.5
	G
	r
	o
	w
	P
	r
	o
	p
	∗
	1.1
	)
	∗
	(
	1
	−
	F
	a
	t
	∗
	0.0005
	)

	{\displaystyle (4.5+GrowProp\*1.1)\*(1-Fat\*0.0005)}
	+ MiaoDLC:

	0.72
	G
	r
	o
	w
	P
	r
	o
	p
	∗
	0.33

	{\displaystyle 0.72+GrowProp\*0.33}
* Movespeed bonus
	+ Learning Growth stage (except MiaoDLC ): +50%
	+ Mature Growth stage (except MiaoDLC ): +100%
	+ -250 < Fatness < -201: +50%
	+ -200 < Fatness < +149: +25%
	+ 150 < Fatness < 199: -40%
	+ 200+ Fatness: -70%
	+ -150 < Physique < +149: +25%

## One Pet Limit

Only one pet can be active at a time[1]. To swap between pets, or resurrect a dead pet, their respective summoning building needs to be built and "activated." This process takes 3 days, during which any existing pet will disappear and no pet will be active in the Player Sect.

## Mods

### MultiPet

MultiPet (Mod) allows you to have as many pets active as you want. Simply adopting new pets won't work; you need to build their statues and activate them. [Steam Workshop LINK]

#### ModLoaderLite (Dependency)

MultiPet depends on ModLoaderLite (Mod). [Steam Workshop LINK].

**Note:** ModLoaderLite must be above MultiPet in the Mod Manager.

## References

1. ↑ 1.0 1.1 `Settings/Property/LsProperty.xml`
2. ↑ `Settings/LingShou/Extra/extrap.xml`
3. ↑ `XiaWorld.LingShouMgr.LoopInterval`

& `XiaWorld.Npc.LsStep_FromMgrStep()`
4. ↑ `XiaWorld.Npc.LsIncreaseGrowth()`
5. ↑ `Settings/LingShou/Extra/extrap.xml [MaxV] & XiaWorld.LsRacePropertyExtra.Find()`
6. ↑ 6.0 6.1 Typos in `Settings/LingShou/Extra/extrap.xml` means those stats are not correctly set.
7. ↑ `Settings/LingShou/Justice/Justice.txt`
8. ↑ `XiaWorld.LingShouMgr.GetJustice()`
9. ↑ `XiaWorld.PropertyMgr._GetMathemathicValue(MathematicValue value, Npc npc, Dictionary<string, MathematicVarDef> vars)` for details on the `Varpipes` nodes
10. ↑ Has a minValue which is never applied as `_GetMathematicaProperty()` ignores it in `XiaWorld.PropertyMgr`.