initial commit

This commit is contained in:
2021-10-24 15:36:18 -04:00
commit b9a5a8fe23
11982 changed files with 220468 additions and 0 deletions

View File

@@ -0,0 +1,222 @@
criterion "Isaghanim" "classname" "npc_dota_boss_aghanim" weight 5 required
criterion "IsEnemyaghanim" "targetclassname" "npc_dota_boss_aghanim" weight 5 required
criterion "IsAllyaghanim" "nearby_ally" "npc_dota_boss_aghanim" weight 5 required
criterion "IsBossIntro" "announce_event" "boss_intro" weight 5 required
criterion "IsBested" "announce_event" "bested" weight 5 required
criterion "IsLaugh" "announce_event" "laugh" weight 5 required
criterion "IsAbilityUse" "announce_event" "ability_use" weight 5 required
criterion "IsCrystalAttack" "ability_name" "aghanim_crystal_attack" weight 5 required
criterion "IsStaffBeams" "ability_name" "aghanim_staff_beams" weight 5 required
criterion "IsBlink" "ability_name" "aghanim_blink" weight 5 required
criterion "IsSummonPortals" "ability_name" "aghanim_summon_portals" weight 5 required
criterion "IsSpellSwap" "ability_name" "aghanim_spell_swap" weight 5 required
criterion "IsShardAttack" "ability_name" "aghanim_shard_attack" weight 5 required
Response aghanim_CustomIsBossIntro
{
scene "scenes/aghanim/aghanim_aghs_battle_intro_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_battle_intro_03.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_battle_intro_04.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_battle_intro_05.vcd" nodelay noscene
}
Rule aghanim_CustomIsBossIntro_Rule
{
criteria Custom Isaghanim IsBossIntro
response aghanim_CustomIsBossIntro
}
Response aghanim_CustomIsBossIntroChance_10%
{
scene "scenes/aghanim/aghanim_aghs_battle_intro_02.vcd" nodelay noscene
}
Rule aghanim_CustomIsBossIntroChance_10%_Rule
{
criteria Custom Isaghanim IsBossIntro Chance_10%
response aghanim_CustomIsBossIntroChance_10%
}
Response aghanim_CustomIsAbilityUseIsCrystalAttack
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_01.vcd" nodelay noscene defaultdelay respeakdelay 60
scene "scenes/aghanim/aghanim_aghs_conjures_magic_01.vcd" nodelay noscene defaultdelay respeakdelay 60
}
Rule aghanim_CustomIsAbilityUseIsCrystalAttack_Rule
{
criteria Custom Isaghanim IsAbilityUse IsCrystalAttack
response aghanim_CustomIsAbilityUseIsCrystalAttack
}
Response aghanim_CustomIsAbilityUse
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_02.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_06.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_07.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUse_Rule
{
criteria Custom Isaghanim IsAbilityUse
response aghanim_CustomIsAbilityUse
}
Response aghanim_CustomIsAbilityUseIsSpellSwap
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_03.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_teleportation_03.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsSpellSwap_Rule
{
criteria Custom Isaghanim IsAbilityUse IsSpellSwap
response aghanim_CustomIsAbilityUseIsSpellSwap
}
Response aghanim_CustomIsAbilityUseIsShardAttack
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_04.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_teleportation_02.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsShardAttack_Rule
{
criteria Custom Isaghanim IsAbilityUse IsShardAttack
response aghanim_CustomIsAbilityUseIsShardAttack
}
Response aghanim_CustomIsAbilityUseIsBlink
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_05.vcd" nodelay noscene defaultdelay respeakdelay 60
scene "scenes/aghanim/aghanim_aghs_teleportation_01.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsBlink_Rule
{
criteria Custom Isaghanim IsAbilityUse IsBlink
response aghanim_CustomIsAbilityUseIsBlink
}
Response aghanim_CustomIsAbilityUseIsStaffBeams
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_08.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_conjures_magic_02.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsStaffBeams_Rule
{
criteria Custom Isaghanim IsAbilityUse IsStaffBeams
response aghanim_CustomIsAbilityUseIsStaffBeams
}
Response aghanim_CustomIsAbilityUseIsSummonPortals
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_09.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_conjures_magic_03.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsSummonPortals_Rule
{
criteria Custom Isaghanim IsAbilityUse IsSummonPortals
response aghanim_CustomIsAbilityUseIsSummonPortals
}
Response aghanim_CustomIsLaugh
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_laugh_01.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_laugh_02.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_laugh_03.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsLaugh_Rule
{
criteria Custom Isaghanim IsLaugh
response aghanim_CustomIsLaugh
}
Response aghanim_CustomIsHeroKilled
{
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_01.vcd" nodelay noscene speakonce
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_02.vcd" nodelay noscene speakonce
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_03.vcd" nodelay noscene speakonce
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_04.vcd" nodelay noscene speakonce
}
Rule aghanim_CustomIsHeroKilled_Rule
{
criteria Custom Isaghanim IsHeroKilled
response aghanim_CustomIsHeroKilled
}
Response aghanim_CustomIsBested
{
scene "scenes/aghanim/aghanim_aghs_bested_noise_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_bested_noise_02.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_bested_noise_final_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsBested_Rule
{
criteria Custom Isaghanim IsBested
response aghanim_CustomIsBested
}
Response aghanim_CustomIsTeamWipe
{
scene "scenes/aghanim/aghanim_aghs_beats_player_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_beats_player_02.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_beats_player_03.vcd" nodelay noscene
}
Rule aghanim_CustomIsTeamWipe_Rule
{
criteria Custom Isaghanim IsTeamWipe
response aghanim_CustomIsTeamWipe
}
Response aghanim_CustomIsAghanimLosesIsAscension0
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_1_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension0_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension0
response aghanim_CustomIsAghanimLosesIsAscension0
}
Response aghanim_CustomIsAghanimLosesIsAscension1
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_2_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension1_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension1
response aghanim_CustomIsAghanimLosesIsAscension1
}
Response aghanim_CustomIsAghanimLosesIsAscension2
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_3_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_4_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension2_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension2
response aghanim_CustomIsAghanimLosesIsAscension2
}
Response aghanim_CustomIsAghanimLosesIsAscension3
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_5_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension3_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension3
response aghanim_CustomIsAghanimLosesIsAscension3
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,164 @@
// This is the base rule script file for the AI response system for Expressive AI's who speak based on certain "Concepts"
// You can think of a concept as a high level state that the code is trying to convey, such as say hello, or say you're mad, etc.
//
// The format of this file is that there are five main types of commands:
// 1) #include "filename" // This just causes the included scriptfile to be parsed and added to the database
// 2) enumeration: this declares an enumerated type so that comparisons can be matched against the string versions of the type
// 3) response: this specifies a response to issue. A response consists of a weighted set of options and can recursively reference
// other responses by name
// 4) criterion: This is a match condition
// 5) rule: a rule consists of one or more criteria and a response
//
// In general, the system is presented with a criteria set, which is a set of key value pairs generated by the game code and
// various entity I/O and keyfields. For instance, the following criteria set was created in a map with a train terminal
// "speaker" entity wishing to fire random station announcements
// concept = 'train_speaker' (weight 5.000000) ; the high level concept for the search request
// map = 'terminal_pa' ; the name of the map
// classname = 'speaker' ; the classname and name of the "speaking" entity
// name = 'terminal_pa'
// health = '10' ; the absolute health of the speaking entity
// healthfrac = '0.000' ; the health fraction (health/maxhealth) of the speaking entity
// playerhealth = '100' ; similar data related to the current player:
// playerhealthfrac = '1.000'
// playerweapon = 'none' ; the name of the weapon the player is carrying
// playeractivity = 'ACT_WALK' ; animating activity of the player
// playerspeed = '0.000' ; how fast the player is moving
//
// Based on such a criteria set, the system checks each rule against the set. To do this, each criterion of the rule is
// given a numeric score as follows:
// score = 0 if criteria doesn't match or, criterion weight * keyvaliue weight if it does match
// The final score for a rule is the sum of all of the scores of its criteria. The best rule is the one with the highest
// score. Once a best rule is selected, then a response is looked up based on the response definitions and the engine is
// asked to dispatch that response.
//
// The specific syntax for the various keywords is as follows:
//
// ENUMERATIONS:
//
// enumeration <enumerationname>
// {
// "key1" "value1"
// "key2" "value2"
// ...etc.
// }
// The code and criteria refer to enumerations with square brackets and a double colon separator, e.g.:
// [enumerationname::key1]
//
//
// RESPONSES:
//
// Single line:
// response <responsegroupname> [nodelay | defaultdelay | delay interval ] [speakonce] [noscene] [odds nnn] [respeakdelay interval] [soundelvel "SNDLVL_xxx"] responsetype parameters
// Multiple lines
// response <responsegroupname>
// {
// [permitrepeats] ; optional parameter, by default we visit all responses in group before repeating any
// [sequential] ; optional parameter, by default we randomly choose responses, but with this we walk through the list starting at the first and going to the last
// [norepeat] ; Once we've run through all of the entries, disable the response group
// responsetype1 parameters1 [nodelay | defaultdelay | delay interval ] [speakonce] [odds nnn] [respeakdelay interval] [soundelvel "SNDLVL_xxx"] [displayfirst] [ displaylast ] weight nnn
// responsetype2 parameters2 [nodelay | defaultdelay | delay interval ] [speakonce] [odds nnn] [respeakdelay interval] [soundelvel "SNDLVL_xxx"] [displayfirst] [ displaylast ] weight nnn
// etc.
// }
// Where:
// interval = "startnumber,endnumber" or "number" (e.g., "2.8,3.2" or "3.2")
// responsetype =:
// speak ; it's an entry in sounds.txt
// sentence ; it's a sentence name from sentences.txt
// scene ; it's a .vcd file
// response ; it's a reference to another response group by name
// print ; print the text in developer 2 (for placeholder responses)
// nodelay = an additional delay of 0 after speaking
// defaultdelay = an additional delay of 2.8 to 3.2 seconds after speaking
// delay interval = an additional delay based on a random sample from the interval after speaking
// predelay interval = delays the speech for the time interval. NOTE: Only works on scenes (i.e. no sentences/speak/print)
// speakonce = don't use this response more than one time (default off)
// noscene = For an NPC, play the sound immediately using EmitSound, don't play it through the scene system. Good for playing sounds on dying or dead NPCs.
// odds = if this response is selected, if odds < 100, then there is a chance that nothing will be said (default 100)
// respeakdelay = don't use this response again for at least this long (default 0)
// soundlevel = use this soundlevel for the speak/sentence (default SNDLVL_TALKING)
// weight = if there are multiple responses, this is a selection weighting so that certain responses are favored over others in the group (default 1)
// displayfirst/displaylast : this should be the first/last item selected (ignores weight)
//
// CRITERIA:
//
// criterion <criterionname> <matchkey> <matchvalue> weight nnn required
// Where:
// matchkey matches one of the criteria in the set as shown above
// matchvalue is a string or number value or a range, the following are all valid:
// "0" ; numeric match to value 0
// "1" ; numeric match to value 1
// "weapon_smg1" ; string match to weapon_smg1 string
// "[npcstate::idle]" ; match enumeration by looking up numeric value
// ">0" ; match if greater than zero
// ">10,<=50" ; match if greater than ten and less than or equal to 50
// ">0,<[npcstate::alert]" ; match if greater than zer and les then value of enumeration for alert
// "!=0" ; match if not equal to zero
// weight = floating point weighting for score assuming criteria match (default value 1.0)
// required: if a rule has one or more criteria with the required flag set, then if any such criteria
// fail, the entire rule receives a score of zero
//
// RULE:
//
// rule <rulename>
// {
// criteria name1 [name2 name3 etc.]
// response responsegroupname [responsegroupname2 etc.]
// [matchonce] ; optional parameter
// [ <matchkey > <matchvalue> weight nnn required ]
// }
// Where:
// criteria just lies one more more criterion names from above and response list one or more of the response
// names from above (usually just one)
// matchonce (off by default): means that the rule is deactivated after the first time it is matched
// Note that additional "unnamed" criteria can be specified inline in the rule using the same syntax
// as for defining a criterion, except for the criterion keyword and the criterion name keys
//
// Interaction with entity I/O system
// CBaseEntity contains an inputfunc called "DispatchResponse" which accepts a string which is a concept name
// Thus, a game entity can fire this input on another entity with a concept string and a criteria set will
// be generated and searched against the entities current response system rule set.
// Right now only the speaker entity and NPC_Talker derived NPCs have any response rules loaded
// In addition, map placed entities have up to three "context" keypairs that can be specified.
// They take the form: "key:value" (key, single colon separator, value)
// When an entity with any such context keypairs is asked to dispatch a response, the keypairs are added to the
// criteria set passed to the rule system. Thus, map placed entities and triggers can specify their
// own context keypairs and these can be hooked up to response rules to do map-specific and appropriate
// responses
// In addition, entity I/O can be used to add, remove and clear any such context keypairs via the
// AddContext, RemoveContext, and ClearContext input functions.
// AddContext takes a keypair of the "key:value" format, while RemoveContext take just the "key"
// ClearContext removes all context keypairs
// The game .dll code can enumerate context keypairs and change them via code based methods
//
// The player and the world have their context added with the string player or world as a prefix, e.g.:
// "playerkey:value" or "worldkey:value" to differentiate world/player context from the context of the
// responding entity.
criterion "Custom" "Concept" "TLK_DOTA_CUSTOM" required
criterion "Followup_Positive" "Concept" "TLK_DOTA_FOLLOWUP_POSITIVE" required
criterion "Followup_Negative" "Concept" "TLK_DOTA_FOLLOWUP_NEGATIVE" required
criterion "Followup_Negative_Ongoing" "Concept" "TLK_DOTA_FOLLOWUP_NEGATIVE_ONGOING" required
criterion "Followup_Generic" "Concept" "TLK_DOTA_FOLLOWUP_GENERIC" required
criterion "Chance_1%" "randomnum" "99" required
criterion "Chance_2%" "randomnum" ">=97,<=98" required
criterion "Chance_3%" "randomnum" ">=94,<=96" required
criterion "Chance_5%" "randomnum" ">=89,<=93" required
criterion "Chance_10%" "randomnum" ">=79,<=88" required
criterion "Chance_12%" "randomnum" "<=12" required
criterion "Chance_15%" "randomnum" ">=64,<=78" required
criterion "Chance_20%" "randomnum" "<=20" required
criterion "Chance_25%" "randomnum" "<=25" required
criterion "Chance_30%" "randomnum" "<=30" required
criterion "Chance_35%" "randomnum" "<=35" required
criterion "Chance_40%" "randomnum" "<=40" required
criterion "Chance_45%" "randomnum" "<=45" required
criterion "Chance_50%" "randomnum" "<=50" required
criterion "Chance_55%" "randomnum" "<=55" required
criterion "Chance_60%" "randomnum" "<=60" required
criterion "Chance_65%" "randomnum" "<=65" required
criterion "Chance_70%" "randomnum" "<=70" required
criterion "Chance_75%" "randomnum" "<=75" required
#include "talker/response_rules_announcer_aghanim.txt"
#include "talker/response_rules_aghanim.txt"