Armorattus Valoricus (#1675)

* Rat and armor

Added rat mob and rat armor.
Slightly changed interaction popup system to allow for both picking up
and hugging interaction. This adds an "Interact" item to context menu of
interactable (huggable) objects.
Trying to make it in a way that allows for more pets to be added later.

* Rat ghost role

Rat:
- added ghost role with descriptions and rules
- added hand
Rat armor:
- added crafting recipe

* Ghost role, armor and adjustments

Added:
- Ghost role spawner for rat

Changed:
- AI-controlled rat will now retaliate if attacked
- Rat is now a bit slower
- Playable humanoid races can no longer wear rat armor

Removed:
- Rat's hand because it leads to unwanted interactions
- Rat will no longer stabilize the demiplane, so it will collapse if rat
is the only player-controlled entity left. This is done because without
a hand rat cannot leave the demiplane on it's own

* Armor cost, Rat hunger, Rat ghostrole
Tweaks and Fix
Added:
- Rat's hunger level is now visible when examining it
Changed:
- Rat gets hungry slower than before. When starving it takes less damage and slows
  down by less amount
- Rat ghostrole prototype moved to it's own directory
Fixed:
- Rat armor physical composition now makes sense and costs exactly like
  it's ingredients

* fixing the rat armor composition... again

* Armor and HP tweaks

Changed:
- Lowered protection values given by rat armor to lower the price
- Increased crafting price for rat armor from 2 iron ingots to 6. A lot
of wasted material for such delicate work I suppose.
- Increased rat's HP by 10 to counter armor changes

* Removed interaction
Reverted InteractionPopupSystem and deleted interaction texts for rat

* Updated licenses and authorships of sprites

* fixed license and removed interaction from rat prototype

* Fixed armor looking wrong in rat's dead state

* Removed unnecessary images from rat.rsi

* Removed IronSmelting skill requirment since currently smith is removed

* Rat's size changed from Tiny to Normal to reflect how bigass this rat really is

---------

Co-authored-by: Nim <128169402+Nimfar11@users.noreply.github.com>
This commit is contained in:
4g10w
2025-09-10 11:31:44 +03:00
committed by GitHub
parent fdbdfd896a
commit e6695858cb
19 changed files with 270 additions and 3 deletions

View File

@@ -6,3 +6,7 @@ cp14-ghost-role-information-description-lurker = A spirit of night and hunger th
cp14-ghost-role-information-name-raid-undead = Undead raid
cp14-ghost-role-information-description-raid-undead = Lead the attack on the city by the forces of the dead. Destroy the demiplane communication crystal at any cost.
cp14-ghost-role-information-name-rat = Rat
cp14-ghost-role-information-description-rat = An honorable rat. Relieve tavernkeep of their extra food or join the adventurers as an armored squire.

View File

@@ -2,4 +2,6 @@ cp14-ghost-role-information-rules-demiplane = You are the [color=red]demiplane a
cp14-ghost-role-information-rules-free = You are a [color=yellow]free antagonist[/color]. You can do whatever you want, as long as it doesn't result in widespread destruction and mass deaths. You do not remember your past life, and you are absolutely [color=red]NOT[/color] allowed to remember, say, the name, appearance, etc. of your previous character.
cp14-ghost-role-information-rules-raid = You are a [color=red]member of the raid[/color]. Your task is to sneak into the heart of the city and destroy the demiplane communication crystal. You can fulfill your goal by any means necessary. You do not remember your past life, and you are absolutely [color=red]NOT[/color] allowed to remember, say, the name, appearance, etc. of your previous character.
cp14-ghost-role-information-rules-raid = You are a [color=red]member of the raid[/color]. Your task is to sneak into the heart of the city and destroy the demiplane communication crystal. You can fulfill your goal by any means necessary. You do not remember your past life, and you are absolutely [color=red]NOT[/color] allowed to remember, say, the name, appearance, etc. of your previous character.
cp14-ghost-role-information-rules-pet = You are a [color=yellow]free neutral agent[/color]. Being a smart creature, you can do whatever you want, as long as it fits your animal behavior. Befriend the people or get in a pack with other animals. While you're not an antagonist per se, you can still do minor crimes like theft and can defend yourself if attacked.

View File

@@ -6,3 +6,6 @@ cp14-ghost-role-information-description-lurker = Дух ночи и голода
cp14-ghost-role-information-name-raid-undead = Рейд нежити
cp14-ghost-role-information-description-raid-undead = Возглавьте атаку на город силами мертвых. Уничтожьте кристалл связи с демипланами любой ценой.
cp14-ghost-role-information-name-rat = Крыса
cp14-ghost-role-information-description-rat = Крыса чести. Избавьте тавернщиков от тяжести лишней еды или присоединитесь к группе авантюристов в роли бронированного оруженосца.

View File

@@ -2,4 +2,6 @@ cp14-ghost-role-information-rules-demiplane = Вы - [color=red]антагони
cp14-ghost-role-information-rules-free = Вы - [color=yellow]свободный антагонист[/color]. Вы можете делать все что хотите, если это не приводит к масштабным разрушениям и массовым смертям. Вы не помните вашу прошлую жизнь, и вам абсолютно [color=red]НЕ[/color] разрешается помнить, скажем, имя, внешность и т.д. вашего предыдущего персонажа.
cp14-ghost-role-information-rules-raid = Вы - [color=red]участник рейда[/color]. Ваша задача - пробраться в сердце города и уничтожить кристалл связи с демипланом. Вы можете выполнять свою цель любыми способами. Вы не помните вашу прошлую жизнь, и вам абсолютно [color=red]НЕ[/color] разрешается помнить, скажем, имя, внешность и т.д. вашего предыдущего персонажа.
cp14-ghost-role-information-rules-raid = Вы - [color=red]участник рейда[/color]. Ваша задача - пробраться в сердце города и уничтожить кристалл связи с демипланом. Вы можете выполнять свою цель любыми способами. Вы не помните вашу прошлую жизнь, и вам абсолютно [color=red]НЕ[/color] разрешается помнить, скажем, имя, внешность и т.д. вашего предыдущего персонажа.
cp14-ghost-role-information-rules-pet = Вы - [color=yellow]свободный нейтральный агент[/color]. Являясь умным существом, вы вольны действовать как хотите, если это вписывается в поведение животного. Подружитесь с людьми или сбейтесь в стаю с другими животными. Хоть вы и не являетесь антагонистом, вы всё ещё можете совершать мелкие преступления типа краж и защищаться, если потребуется.

View File

@@ -0,0 +1,23 @@
- type: entity
id: SpawnPointGhostRat
name: ghost role spawn point
description: A ghost role for a rat
suffix: Rat
categories: [ ForkFiltered ]
parent: MarkerBase
components:
- type: GhostRole
name: cp14-ghost-role-information-name-rat
description: cp14-ghost-role-information-description-rat
rules: cp14-ghost-role-information-rules-pet
allowMovement: true
raffle:
settings: default
- type: GhostRoleMobSpawner
prototype: CP14MobRat
- type: Sprite
sprite: Markers/jobs.rsi
layers:
- state: green
- sprite: _CP14/Mobs/Pets/rat.rsi
state: rat

View File

@@ -0,0 +1,116 @@
- type: entity
id: CP14MobRat
parent: CP14SimpleMobBase
name: rat
description: An adorable rat. You see valor in it's eyes fit for a squire.
categories: [ ForkFiltered ]
components:
- type: HTN
rootTask:
task: RuminantHostileCompound
- type: NpcFactionMember
factions:
- CP14PeacefulAnimals
- type: NPCRetaliation
attackMemoryLength: 30
- type: Sprite
drawdepth: SmallMobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
sprite: _CP14/Mobs/Pets/rat.rsi
state: rat
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeCircle
radius: 0.2
density: 8
mask:
- SmallMobMask
layer:
- SmallMobLayer
- type: Tag
tags:
- CP14Rat
- type: Item
size: Normal
- type: CanEscapeInventory
baseResistTime: 1
- type: Speech
speechSounds: Squeak
speechVerb: SmallMob
allowedEmotes: ['Squeak']
- type: Vocal
sounds:
Male: Mouse
Female: Mouse
Unsexed: Mouse
- type: ReplacementAccent
accent: mouse
- type: Appearance
- type: MobThresholds
thresholds:
0: Alive
40: Critical
50: Dead
- type: FireVisuals
sprite: Mobs/Effects/onfire.rsi
normalState: Mouse_burning
- type: CombatMode
- type: MeleeWeapon
angle: 0
animation: WeaponArcBite
damage:
types:
Piercing: 8
- type: MovementSpeedModifier
baseWalkSpeed : 3
baseSprintSpeed : 6
- type: DamageStateVisuals
states:
Alive:
Base: rat
Critical:
Base: rat_dead
Dead:
Base: rat_dead
- type: Bloodstream
bloodMaxVolume: 50
bloodReagent: CP14BloodAnimal
- type: Thirst
thresholds:
OverHydrated: 150
Okay: 100
Thirsty: 50
Parched: 25
Dead: 0
baseDecayRate: 0.04
- type: Hunger
thresholds:
Overfed: 50
Okay: 25
Peckish: 10
Starving: 5
Dead: 0
baseDecayRate: 0.03 # hungry hungry rats
starvationDamage:
types:
Cold: 0.1
Bloodloss: 0.1
starvingSlowdownModifier: 0.9
- type: ExaminableHunger
- type: Strippable
- type: UserInterface
interfaces:
enum.StrippingUiKey.Key:
type: StrippableBoundUserInterface
- type: InventorySlots
- type: Inventory
speciesId: CP14Rat
templateId: CP14Rat
- type: Puller
needsHands: false
- type: CP14NightVision
- type: Climbing

View File

@@ -0,0 +1,29 @@
- type: entity
parent: CP14ClothingOuterClothingBase
id: CP14RatArmor
name: rat armor
description: A sturdy armor, suit for a noble rat squire
components:
- type: Sprite
sprite: _CP14/Clothing/PetArmor/rat_armor.rsi
- type: Clothing
sprite: _CP14/Clothing/PetArmor/rat_armor.rsi
unequipDelay: 1
- type: Tag
tags:
- CP14RatWearable
- PetOnly
- type: Armor
modifiers:
coefficients:
Blunt: 0.7
Slash: 0.55
Piercing: 0.7
Heat: 0.9
- type: ClothingSpeedModifier
walkModifier: 0.9
sprintModifier: 0.9
- type: PhysicalComposition
materialComposition:
CP14Iron: 60

View File

@@ -53,6 +53,9 @@
uiWindowPos: 2,2
strippingWindowPos: 2,1
displayName: Armor
blacklist:
tags:
- PetOnly
- name: cloak
slotTexture: cloak
slotFlags: CLOAK

View File

@@ -53,6 +53,9 @@
uiWindowPos: 2,2
strippingWindowPos: 2,1
displayName: Armor
blacklist:
tags:
- PetOnly
- name: cloak
slotTexture: cloak
slotFlags: CLOAK

View File

@@ -59,6 +59,9 @@
uiWindowPos: 2,1
strippingWindowPos: 2,3
displayName: Armor
blacklist:
tags:
- PetOnly
- name: cloak
slotTexture: cloak
slotFlags: CLOAK

View File

@@ -0,0 +1,20 @@
- type: inventoryTemplate
id: CP14Rat
slots:
- name: outerClothing
slotTexture: suit
slotFlags: OUTERCLOTHING
uiWindowPos: 0,1
strippingWindowPos: 1,1
displayName: Armor
whitelist:
tags:
- CP14RatWearable
# Little rat cloak might be cute idk
# - name: cloak
# slotTexture: cloak
# slotFlags: CLOAK
# uiWindowPos: 0,2
# strippingWindowPos: 1,2
# displayName: Cloak

View File

@@ -440,4 +440,15 @@
stack: CP14IronBar
count: 1
result: CP14IronBuckle
resultCount: 5
resultCount: 5
- type: CP14Recipe
id: CP14RatArmor
tag: CP14RecipeAnvil
category: Armor
craftTime: 4
requirements:
- !type:StackResource
stack: CP14IronBar
count: 6
result: CP14RatArmor

View File

@@ -40,6 +40,12 @@
- type: Tag
id: CP14Rabbit
- type: Tag
id: CP14Rat
- type: Tag
id: CP14RatWearable
- type: Tag
id: CP14Pig

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

View File

@@ -0,0 +1,21 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by TheShuEd (Discord)",
"size":
{
"x": 32,
"y": 32
},
"states":
[
{
"name": "icon"
},
{
"name": "equipped-OUTERCLOTHING",
"directions": 4
}
]
}

View File

@@ -0,0 +1,21 @@
{
"version": 1,
"license": "CC-BY-NC-SA-3.0",
"copyright": "Created by infrared_baron",
"size":
{
"x": 32,
"y": 32
},
"states":
[
{
"name": "rat",
"directions": 4
},
{
"name": "rat_dead",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB