-
-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
…to mission
- Loading branch information
Showing
147 changed files
with
2,919 additions
and
940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#define GET_AI_BEHAVIOR(behavior_type) SSai_behaviors.ai_behaviors[behavior_type] | ||
#define HAS_AI_CONTROLLER_TYPE(thing, type) istype(thing?.ai_controller, type) | ||
|
||
#define AI_STATUS_ON 1 | ||
#define AI_STATUS_OFF 2 | ||
|
||
|
||
///Monkey checks | ||
#define SHOULD_RESIST(source) (source.on_fire || source.buckled || HAS_TRAIT(source, TRAIT_RESTRAINED) || (source.pulledby && source.pulledby.grab_state > GRAB_PASSIVE)) | ||
#define IS_DEAD_OR_INCAP(source) (HAS_TRAIT(source, TRAIT_INCAPACITATED) || HAS_TRAIT(source, TRAIT_HANDS_BLOCKED) || IS_IN_STASIS(source)) | ||
|
||
///For JPS pathing, the maximum length of a path we'll try to generate. Should be modularized depending on what we're doing later on | ||
#define AI_MAX_PATH_LENGTH 30 // 30 is possibly overkill since by default we lose interest after 14 tiles of distance, but this gives wiggle room for weaving around obstacles | ||
|
||
///Cooldown on planning if planning failed last time | ||
#define AI_FAILED_PLANNING_COOLDOWN 1.5 SECONDS | ||
|
||
///Flags for ai_behavior new() | ||
#define AI_CONTROLLER_INCOMPATIBLE (1<<0) | ||
|
||
///Does this task require movement from the AI before it can be performed? | ||
#define AI_BEHAVIOR_REQUIRE_MOVEMENT (1<<0) | ||
///Does this task let you perform the action while you move closer? (Things like moving and shooting) | ||
#define AI_BEHAVIOR_MOVE_AND_PERFORM (1<<1) | ||
|
||
///Subtree defines | ||
|
||
///This subtree should cancel any further planning, (Including from other subtrees) | ||
#define SUBTREE_RETURN_FINISH_PLANNING 1 | ||
|
||
///Monkey AI controller blackboard keys | ||
|
||
#define BB_MONKEY_AGRESSIVE "BB_monkey_agressive" | ||
#define BB_MONKEY_GUN_NEURONS_ACTIVATED "BB_monkey_gun_aware" | ||
#define BB_MONKEY_GUN_WORKED "BB_monkey_gun_worked" | ||
#define BB_MONKEY_BEST_FORCE_FOUND "BB_monkey_bestforcefound" | ||
#define BB_MONKEY_ENEMIES "BB_monkey_enemies" | ||
#define BB_MONKEY_BLACKLISTITEMS "BB_monkey_blacklistitems" | ||
#define BB_MONKEY_PICKUPTARGET "BB_monkey_pickuptarget" | ||
#define BB_MONKEY_PICKPOCKETING "BB_monkey_pickpocketing" | ||
#define BB_MONKEY_CURRENT_ATTACK_TARGET "BB_monkey_current_attack_target" | ||
#define BB_MONKEY_TARGET_DISPOSAL "BB_monkey_target_disposal" | ||
#define BB_MONKEY_DISPOSING "BB_monkey_disposing" | ||
#define BB_MONKEY_RECRUIT_COOLDOWN "BB_monkey_recruit_cooldown" | ||
#define BB_MONKEY_NEXT_HUNGRY "BB_monkey_next_hungry" | ||
|
||
///Dog AI controller blackboard keys | ||
|
||
#define BB_SIMPLE_CARRY_ITEM "BB_SIMPLE_CARRY_ITEM" | ||
#define BB_FETCH_TARGET "BB_FETCH_TARGET" | ||
#define BB_FETCH_IGNORE_LIST "BB_FETCH_IGNORE_LISTlist" | ||
#define BB_FETCH_DELIVER_TO "BB_FETCH_DELIVER_TO" | ||
#define BB_DOG_FRIENDS "BB_DOG_FRIENDS" | ||
#define BB_DOG_ORDER_MODE "BB_DOG_ORDER_MODE" | ||
#define BB_DOG_PLAYING_DEAD "BB_DOG_PLAYING_DEAD" | ||
#define BB_DOG_HARASS_TARGET "BB_DOG_HARASS_TARGET" | ||
|
||
/// Basically, what is our vision/hearing range for picking up on things to fetch/ | ||
#define AI_DOG_VISION_RANGE 10 | ||
/// What are the odds someone petting us will become our friend? | ||
#define AI_DOG_PET_FRIEND_PROB 15 | ||
/// After this long without having fetched something, we clear our ignore list | ||
#define AI_FETCH_IGNORE_DURATION 30 SECONDS | ||
/// After being ordered to heel, we spend this long chilling out | ||
#define AI_DOG_HEEL_DURATION 20 SECONDS | ||
/// After either being given a verbal order or a pointing order, ignore further of each for this duration | ||
#define AI_DOG_COMMAND_COOLDOWN 2 SECONDS | ||
|
||
// dog command modes (what pointing at something/someone does depending on the last order the dog heard) | ||
/// Don't do anything (will still react to stuff around them though) | ||
#define DOG_COMMAND_NONE 0 | ||
/// Will try to pick up and bring back whatever you point to | ||
#define DOG_COMMAND_FETCH 1 | ||
/// Will get within a few tiles of whatever you point at and continually growl/bark. If the target is a living mob who gets too close, the dog will attack them with bites | ||
#define DOG_COMMAND_ATTACK 2 | ||
|
||
//enumerators for parsing dog command speech | ||
#define COMMAND_HEEL "Heel" | ||
#define COMMAND_FETCH "Fetch" | ||
#define COMMAND_ATTACK "Attack" | ||
#define COMMAND_DIE "Play Dead" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,41 @@ | ||
//Monkey defines, placed here so they can be read by other things! | ||
|
||
//Mode defines | ||
#define MONKEY_IDLE 0 // idle | ||
#define MONKEY_HUNT 1 // found target, hunting | ||
#define MONKEY_FLEE 2 // free from enemies | ||
#define MONKEY_DISPOSE 3 // dump body in disposals | ||
|
||
#define MONKEY_FLEE_HEALTH 50 // below this health value the monkey starts to flee from enemies | ||
#define MONKEY_ENEMY_VISION 9 // how close an enemy must be to trigger aggression | ||
#define MONKEY_FLEE_VISION 4 // how close an enemy must be before it triggers flee | ||
#define MONKEY_ITEM_SNATCH_DELAY 25 // How long does it take the item to be taken from a mobs hand | ||
#define MONKEY_CUFF_RETALIATION_PROB 20 // Probability monkey will aggro when cuffed | ||
#define MONKEY_SYRINGE_RETALIATION_PROB 20 // Probability monkey will aggro when syringed | ||
/// below this health value the monkey starts to flee from enemies | ||
#define MONKEY_FLEE_HEALTH 50 | ||
/// how close an enemy must be to trigger aggression | ||
#define MONKEY_ENEMY_VISION 9 | ||
/// how close an enemy must be before it triggers flee | ||
#define MONKEY_FLEE_VISION 4 | ||
/// How long does it take the item to be taken from a mobs hand | ||
#define MONKEY_ITEM_SNATCH_DELAY 25 | ||
/// Probability monkey will aggro when cuffed | ||
#define MONKEY_CUFF_RETALIATION_PROB 20 | ||
/// Probability monkey will aggro when syringed | ||
#define MONKEY_SYRINGE_RETALIATION_PROB 20 | ||
|
||
// Probability per Life tick that the monkey will: | ||
#define MONKEY_RESIST_PROB 50 // resist out of restraints | ||
// when the monkey is idle | ||
#define MONKEY_PULL_AGGRO_PROB 5 // aggro against the mob pulling it | ||
#define MONKEY_SHENANIGAN_PROB 5 // chance of getting into mischief, i.e. finding/stealing items | ||
// when the monkey is hunting | ||
#define MONKEY_ATTACK_DISARM_PROB 50 // disarm an armed attacker | ||
#define MONKEY_WEAPON_PROB 20 // if not currently getting an item, search for a weapon around it | ||
#define MONKEY_RECRUIT_PROB 25 // recruit a monkey near it | ||
#define MONKEY_SWITCH_TARGET_PROB 25 // switch targets if it sees another enemy | ||
|
||
#define MONKEY_RETALIATE_HARM_PROB 95 // probability for the monkey to aggro when attacked with harm intent | ||
#define MONKEY_RETALIATE_DISARM_PROB 20 // probability for the monkey to aggro when attacked with disarm intent | ||
/// probability that monkey resist out of restraints | ||
#define MONKEY_RESIST_PROB 50 | ||
/// probability that monkey aggro against the mob pulling it | ||
#define MONKEY_PULL_AGGRO_PROB 5 | ||
/// probability that monkey will get into mischief, i.e. finding/stealing items | ||
#define MONKEY_SHENANIGAN_PROB 20 | ||
/// probability that monkey will disarm an armed attacker | ||
#define MONKEY_ATTACK_DISARM_PROB 50 | ||
/// probability that monkey will get recruited when friend is attacked | ||
#define MONKEY_RECRUIT_PROB 25 | ||
|
||
#define MONKEY_HATRED_AMOUNT 4 // amount of aggro to add to an enemy when they attack user | ||
#define MONKEY_HATRED_REDUCTION_PROB 25 // probability of reducing aggro by one when the monkey attacks | ||
/// probability for the monkey to aggro when attacked with harm intent | ||
#define MONKEY_RETALIATE_HARM_PROB 95 | ||
/// probability for the monkey to aggro when attacked with disarm intent | ||
#define MONKEY_RETALIATE_DISARM_PROB 20 | ||
|
||
// how many Life ticks the monkey will fail to: | ||
#define MONKEY_HUNT_FRUSTRATION_LIMIT 8 // Chase after an enemy before giving up | ||
#define MONKEY_DISPOSE_FRUSTRATION_LIMIT 16 // Dispose of a body before giving up | ||
/// amount of aggro to add to an enemy when they attack user | ||
#define MONKEY_HATRED_AMOUNT 4 | ||
/// amount of aggro to add to an enemy when a monkey is recruited | ||
#define MONKEY_RECRUIT_HATED_AMOUNT 2 | ||
/// probability of reducing aggro by one when the monkey attacks | ||
#define MONKEY_HATRED_REDUCTION_PROB 20 | ||
|
||
#define MONKEY_AGGRESSIVE_MVM_PROB 0 // If you mass edit monkies to be aggressive. there is a small chance of in-fighting | ||
///Monkey recruit cooldown | ||
#define MONKEY_RECRUIT_COOLDOWN 1 MINUTES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.