Scripted effect · The Royal Court files
create_artifact_animal_hide_effect
create_artifact_animal_hide_effect = { ANIMAL = … HUNTER = … LEGENDARY = … OWNER = … }game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 479 (187 lines). Parameters: $ANIMAL$, $HUNTER$, $LEGENDARY$, $OWNER$.
create_artifact_animal_hide_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 479 of its file. A call passes 4 parameters: ANIMAL, HUNTER, LEGENDARY and OWNER. The game's script calls it in 25 places, among them … Deer (event tgp_japan_yearly_events.1110), … Gift (event pet_animal.3080) and …: Day of Sorrow (event pet_animal.0199). Patch 1.20.1.2, from game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.
What it does
scope:owner:If
One of these
NOT = { exists = var:animal_type }or
Animal type is none
Then
- 1 of 2 things will happen:
- 80%:
hunt_activity_standard_game_effect = { PROVINCE = scope:hunter.location HUNTER = scope:hunter }
- 20%:
hunt_activity_dangerous_game_effect = { PROVINCE = scope:hunter.location }
- 80%:
hidden_effect_new_object = { … }
• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists
“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.
The script as written (120 lines of game script)
create_artifact_animal_hide_effect = {
# Get the character the artifact is being made for.
$OWNER$ = { save_scope_as = owner }
$HUNTER$ = { save_scope_as = hunter }
save_scope_value_as = { name = legendary value = $LEGENDARY$ }
scope:owner = {
set_variable = { name = animal_type value = $ANIMAL$ days = 5 }
if = {
limit = {
OR = {
NOT = { exists = var:animal_type }
var:animal_type ?= flag:none
}
}
random_list = {
8 = {
hunt_activity_standard_game_effect = { PROVINCE = scope:hunter.location HUNTER = scope:hunter }
}
2 = {
hunt_activity_dangerous_game_effect = { PROVINCE = scope:hunter.location }
}
}
}
}
if = {
limit = { exists = scope:adventurer }
scope:adventurer = { save_scope_as = creator }
}
else = {
scope:hunter = { save_scope_as = creator }
}
hidden_effect_new_object = {
# Get artifact quality, wealth, and materials
animal_artifact_wealth_quality_effect = yes
get_animal_hunt_location_effect = yes
scope:location = { add_to_list = artifact_material_sources }
if = {
limit = {
OR = {
hunt_hide_big_trigger = { VARIABLE = scope:owner.var:animal_type }
AND = {
exists = scope:animal_hide_size
scope:animal_hide_size = flag:big
}
}
}
if = {
limit = {
NOT = { exists = scope:animal_hide_size }
}
save_scope_value_as = { name = animal_hide_size value = flag:big }
}
scope:owner = {
create_artifact = {
name = artifact_animal_hide_big_name
creator = scope:creator
description = placeholder
visuals = large_animal_hide
type = animal_hide_big
modifier = artifact_placeholder_modifier
wealth = scope:wealth
quality = scope:quality
save_scope_as = newly_created_artifact
}
scope:newly_created_artifact = {
# Set grandeur
add_scaled_artifact_modifier_grandeur_big_effect = yes
# Set prestige
add_scaled_artifact_modifier_prestige_effect = yes
}
}
}
else = {
if = {
limit = {
NOT = { exists = scope:animal_hide_size }
}
save_scope_value_as = { name = animal_hide_size value = flag:small }
}
scope:owner = {
create_artifact = {
name = artifact_small_hide_name
creator = scope:creator
description = placeholder
visuals = small_animal_hide
type = animal_hide
modifier = artifact_placeholder_modifier
wealth = scope:wealth
quality = scope:quality
save_scope_as = newly_created_artifact
}
scope:newly_created_artifact = {
if = {
limit = {
has_artifact_feature = animal_hide_type_cat
exists = scope:owner.var:story_cycle_cat_name
}
set_variable = {
name = pet_name
value = scope:owner.var:story_cycle_cat_name
}
}
else_if = {
limit = {
has_artifact_feature = animal_hide_type_dog
exists = scope:owner.var:story_cycle_dog_name
}
set_variable = {
name = pet_name
value = scope:owner.var:story_cycle_dog_name
}
}
# Set grandeur
add_scaled_artifact_modifier_grandeur_small_effect = yes
# Set prestige
add_scaled_artifact_modifier_minor_prestige_effect = yes
}
}
}
scope:newly_created_artifact = {As written in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.
The first 120 of its 187 lines; the rest is in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt from line 479.
Where it is used
Every place in common/, events/ and history/ that calls create_artifact_animal_hide_effect.
Character interactions (1)
- Bestow Artifact
Events (19)
- … Deer
tgp_japan_yearly_events.1110 - … Gift
pet_animal.3080 - …: Day of Sorrow
pet_animal.0199 - …: Day of Sorrow
pet_animal.1199 - A Beautiful Specimen
hunt.5003 - A Beautiful Specimen
hunt.8001
13 more
- A Cumbersome Gift
hold_court.6140 - Cornered
nomad_events.0110 - Felling a Beast
hunt.4005 - Hawking Meat
bp3_journey.1400 - Inspiration Realized
fund_inspiration.1001 - Mandala Ritual: Beasts in the …
tgp_east_asia_mandala_task_contract_events.4800 - Passing Like Fire
migration_events.1050 - The Real Hunt
tour_grounds_events.1016 - … … Hide
debug.323 - … … Hide
debug.324 - … … Hide
debug.325 - Lorem ipsum dolor sit amet, consectetur adipiscing elit.
debug.9620 - Lorem ipsum dolor sit amet, consectetur adipiscing elit.
debug.9621
Scripted effects inside an event file (1)
- feast_default_2013_pelt_creation_effect
Source: game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.