diff --git a/src/diary/entries/220127 b/src/diary/entries/220127 index 4a5ef2a..a6a5234 100644 --- a/src/diary/entries/220127 +++ b/src/diary/entries/220127 @@ -7,30 +7,30 @@ january 27, 2022

what is hostility?


Hostility is a state that a character's AI state machine can enter. More specific states will inherit from the hostile state to prompt targeting, aggressive, and defensive behavior. It's a very similar concept to aggro in Guild Wars because weaving through patrol patterns and balling mobs is one of my favorite things from any game.

-

when does a character become hostile?


+

when does a character become hostile?


NPCs generally will not seek out the player for combat. They will either stand stationary or follow their patrol route, oblivious of the player until becoming hostile.

Usually, if an NPC is hostile, that means a threat got too close. Currently, proximities in Blessfrey mirror Edward T. Hall's zoning for interpersonal distances. Intimate distance is the range for physical interaction and melee attacks and social distance is the range for assessing hostility and ranged attacks.
-
(image: A visualization of proxemics by WebHamster of Wikipedia. Around someone are 4 concentric circles with varying diameters: within 25 feet is their public space, 12 feet is their social space, 4 feet is their personal space, and 1.5 feet is their intimate space.)
+
(image: A visualization of proxemics by WebHamster of Wikipedia. Around someone are 4 concentric circles with varying diameters: within 25 feet is their public space, 12 feet is their social space, 4 feet is their personal space, and 1.5 feet is their intimate space.)
(By WebHamster - Own work, CC BY-SA 3.0, Link)

An NPC will become hostile under a few conditions:

-

what changes when a character is hostile?


+

what changes when a character is hostile?


A hostile NPC will enter a combative AI state, usually with the goal of pursuing its opponent until either is killed or out of range. During combat, its passive health regeneration will slow, while energy regeneration will remain constant. Maybe certain skills and items can't be used during combat. If it has hostility towards multiple targets, it will prioritize targets according to its targeting AI state, probably favoring the nearest and weakest opponents.

Each NPC will express hostility differently. Broadly, hostile behavior falls into 3 groups: offensive, defensive, and targeting. Offensive states may involve melee or ranged attacks, weapon attacks or offensive skill usage, single-target attacks or AoE, frontlining or backlining, and so on. Defensive states may involve buffing or healing, fleeing or kiting, protecting themselves or their teammates, and so on. The targeting state will allow the character to have unique opinions on who is most deserving of its attention.

When a character becomes hostile toward the player, there will be feedback, such as battle music playing, the opponent's name turning red, or a sound effect playing. (Now I have the Aion aggro sound effect in my head.)

-

when is a character no longer hostile?


+

when is a character no longer hostile?


An NPC will lose hostility under a few conditions:
-

what happens after a character is no longer hostile?


+

what happens after a character is no longer hostile?


The character will return to its idle position or the nearest waypoint of its patrol route. Its passive health regeneration returns to its usual rate. Possibly some skills and items will be combat-only and will become disabled.

-

team hierarchy


+

hostility in action


+This next section is mostly for me. Let's run through some faction clash examples after illustrating the relationship of teammates and allies.
+
+
+

team hierarchy


Teams have a leader. If there are additional teammates, they will be followers of the leader. Teams can be allied with other teams. Generally, the leader of the ally team will become a follower of the main team's leader, while its teammates will be followers of their local leader. If a teammate has a pet, raises a minion, casts a summon, or triggers an event that grants it an ally, that character will be the leader of its own group, allied with the responsible teammate. Alliances can be gained or broken.

Teams will be more or less oblivious to their allies' position and lose them if they aren't keeping up. They will support allies in combat, but they characters usually prioritize teammates over allies.

(A diagram of team hierarchy. )


-

scenarios


-
(An illustration of the chain resulting from paladins allying with a necromancer who summons a vampire who converts a ghoul who is friends with a chaos dwarf who build a war golem.)

+

scenarios


+
(An illustration of the chain resulting from paladins allying with a necromancer who summons a vampire who converts a ghoul who is friends with a chaos dwarf who build a war golem.)


A, B, and C are in team 1. D is allied with them. They are preparing to attack the idle team 2 (V, W, and X with ally Y). Both teams will be spotted by the patrolling team 3 (M, N, and O with ally P) in a minute. Team 2 and 3 are members of the same faction, while Team 1 is of an opposing faction. A, B, and D are within range of either other, while C is investigating something just out of range. V, W, and X are within range, while Y is stuck behind a rock just out of range. M, N, and O are patrolling, while P walks too slowly to be in immediate range of the others. A, V, and M are leaders of their teams. They lead, while their teammates flock with them. Allies are members of their own team(s). Ally team leaders will follow the team leader of the main team, while their teammates flock with them. Allies can have their own allies, resulting in large trails of allied groups. Allies will not engage against allies or support direct enemies of their allies. Allies may engage against allies removed or support direct enemies of allies twice removed, though.

@@ -61,21 +65,25 @@ Technically, allies are in their own team by themselves. Allies will flock withi
  • A lays a trap. V walks into the trap and takes damage. A and V are now hostile towards each other. A and V will prepare for battle and begin hunting for each other. Their RangeBubbles will extend farther during this time. If they search for too long or travel too many steps without finding an opponent, they will resume their idle positions. If A finds an opponent, any teammates or allies within their RangeBubble will gain hostility towards the opponent and move within range. Combat will ensue. If very few or no members were in range of A, its team will idle on without it. If most members were in range, the remaining members will flock to their team and inevitably gain hostility and enter combat.
  • A one-hit-kills V from a safe distance. A becomes hostile and searches for an opponent. Team 2 is oblivious.
  • Teams 1 and 2 are hostile towards each other. Team 1 changes to the same faction. Teams 1 and 2 lose hostility. They will now consider each other friendly and possibly support each other. If one team gains hostility towards another team, the other will share hostility if still in range.
  • -
  • Teams 1 and 2 are friendly with each other and following each other. Team 1's faction changes to an adversial one. They are all so close, they all gain hostility towards the other team's members immediately.
  • +
  • Teams 1 and 2 are friendly with each other and following each other. Team 1's faction changes to an adversarial one. They are all so close, they all gain hostility towards the other team's members immediately.
  • All of team 1 is hostile towards all of team 2. Team 3 enters range of team 2. All of team 3 gains hostility towards team 1 the moment a member of team 2 enters range of a single member of team 3.
  • Team 1 and team 2 are hostile towards each other with team 3 approaching. Ally P intersects with ally Y, triggering hostility between them. Teams 1 and 2 remain oblivious towards Team 3 and vice-versa. If team 3 starts going somewhere else, P will be left behind. Members of team 3 will gain hostility on a case by case basis as they flock nearby and inevitably get too close.
  • Team 1 and team 2 are hostile towards each other with team 3 approaching. Teammate M intersects with ally Y, triggering hostility between all of team 3 and ally Y. Team 2 will eventually enter the fray coincidentally.
  • - +

    ally chains



    (An illustration of the chain resulting from paladins allying with a necromancer who summons a vampire who converts a ghoul who is friends with a chaos dwarf who build a war golem.)


    -If a necromancer is allied with a team of paladin, they will only enter hostility through their own terms. For instance, the paladins may attack a bear, but the necromancer will ignore it until the bear is a direct threat to itself. If the paladins attack another necromancer, the enemy necromancers will likely ignore the paladin-allied necromancer and never pose a direct threat. The allied necromancer may express idle supportive behavior like buffing the paladins, but it will remain idle. The politics of the main team trump that of other roaming teams. The allied necromancer will not enter combat with the paladins merely because it is the same type as the necromancers. It will also not idly heal the team that is currently directly opposed to its paladin allies. If the enemy necromancers were fighting a team of merchants, and the paladins completely ignore both groups, the necromancer ally will enter the fray in support of the necromancers and against the merchants. This may draw the paladins in, who will support the merchants and fight the necromancers. The allied necromancer will immediately lose hostility towards anyone directly opposed to the main team's leader.
    +If a necromancer is allied with a team of paladins, they will only enter hostility through their own terms. For instance, the paladins may attack a bear, but the necromancer will ignore it until the bear is a direct threat to itself. If the paladins attack another necromancer, the enemy necromancers will likely ignore the paladin-allied necromancer and never pose a direct threat. The allied necromancer may express idle supportive behavior like buffing the paladins, but it will remain idle. The politics of the main team trump that of other roaming teams. The allied necromancer will not enter combat with the paladins merely because it is the same type as the necromancers. It will also not idly heal the team that is currently directly opposed to its paladin allies. If the enemy necromancers were fighting a team of merchants, and the paladins completely ignore both groups, the necromancer ally will enter the fray in support of the necromancers and against the merchants. This may draw the paladins in, who will support the merchants and fight the necromancers. The allied necromancer will immediately lose hostility towards anyone directly opposed to the main team's leader.

    -If the necromancer raises 2 liches, each lich is the leader of its own team, and each team is allied with the necromancer. Let's say the liches summon vampiric minions, one of which converts someone to an allied ghoul whose alliance remains constant with its chaos dwarf buddy who in turn is allied with its wargolem. The paladin will respect the necromancer and liches but become hostile towards the vampires and all other evil monsters and vice-versa. In the case all these groups were factionless, the paladin would be neutral towards the vampires and everything else down the chain. Neutral characters are generally low priority in combat, but AoE attacks can easily whip up hostility.
    +If the necromancer raises 2 liches, each lich is the leader of its own team, and each team is allied with the necromancer. Let's say the liches summon vampiric minions, one of which converts someone to an allied ghoul whose alliance remains constant with its chaos dwarf buddy who in turn is allied with its war golem. The paladin will respect the necromancer and liches but become hostile towards the vampires and all other evil monsters and vice-versa. In the case all these groups were factionless, the paladin would be neutral towards the vampires and everything else down the chain. Neutral characters are generally low priority in combat, but AoE attacks can easily whip up hostility.

    If the necromancer dies, the lich and paladins will no longer restrain themselves from becoming hostility towards each other.
    +

    hostility concluded


    +Before, I was trying to force the combat state into flat booleans, but clearly there is more nuance to the issue. A character can be hostile but not in active combat. A character can be in combat but not hostile. Also, hostility is more of a product of a character's surroundings, actions, and actions inflicted on it. Structurally, it needs to resemble (extremely obviously) an AI state rather than any kind of variable.
    +
    +The characters' state machines now behave more like the above scenarios, and I'd love to make a cutscene-like demo for Blessfrey's second demo that sets differently factioned groups on clashing patrols to make sure it all works. Look forward to it!

    -Last updated January 12, 2022 +Last updated January 31, 2022
    diff --git a/src/diary/entries/220201 b/src/diary/entries/220201 index 4a9c7c9..1e2fcfe 100644 --- a/src/diary/entries/220201 +++ b/src/diary/entries/220201 @@ -5,15 +5,15 @@ february 1, 2022

    saturday, january 1

    wednesday, january 5


    friday, january 7

    @@ -36,6 +36,7 @@ february 1, 2022
  • Web maintenance
  • friday, january 14

    +

    saturday, january 15

    @@ -62,7 +63,7 @@ february 1, 2022

    saturday, january 22

    tuesday, january 25

    wednesday, january 26

    +

    thursday, january 27

    + +

    friday, january 28

    + +

    saturday, january 29

    + +

    sunday, january 30

    + +

    monday, january 31

    +
    -Last Updated January 16, 2021
    +Last Updated January 31, 2022

    diff --git a/src/static/xml/blessfrey.xml b/src/static/xml/blessfrey.xml index 64f2630..f344212 100644 --- a/src/static/xml/blessfrey.xml +++ b/src/static/xml/blessfrey.xml @@ -7,6 +7,34 @@ en-us chimchooree@mail.com (chimchooree) +hostility +https://www.blessfrey.me/diary/entries/220127 +what is hostility? Hostility is a state that a character's AI state machine can enter. More ... +Thu, 27 Jan 2022 05:00:05 GMT +https://www.blessfrey.me/diary/entries/220127 + + +designing blessfrey's first demo +https://www.blessfrey.me/diary/entries/220120 +my goals The systems and game mechanics in Blessfrey are mostly present and functional, so I feel ... +Thu, 20 Jan 2022 05:00:05 GMT +https://www.blessfrey.me/diary/entries/220120 + + +goalless games +https://www.blessfrey.me/diary/entries/220114 +goalless games Some developers are happy to make loose, meandering sandbox games without no true ... +Fri, 14 Jan 2022 05:00:05 GMT +https://www.blessfrey.me/diary/entries/220114 + + +new year's resolution (2022) - money year +https://www.blessfrey.me/diary/entries/220113 +This blog is my gamedev diary, but it's fun to use it as a real diary, too. Last year's resolution ... +Thu, 13 Jan 2022 05:00:05 GMT +https://www.blessfrey.me/diary/entries/220113 + + december 2021: hosting christmas https://www.blessfrey.me/diary/entries/220101 sunday, december 5 My family's hosting Christmas this year. My in-laws are visiting next ... @@ -30,7 +58,7 @@ september 2021: moving in https://www.blessfrey.me/diary/entries/211001 -summary Another month of moving into our new home. Last Updated October 31, 2021 ... +summary Another month of moving. Last updated january 25, 2022 ... Fri, 01 Oct 2021 05:00:05 GMT https://www.blessfrey.me/diary/entries/211001 @@ -83,33 +111,5 @@ Tue, 01 Jun 2021 05:00:05 GMT https://www.blessfrey.me/diary/entries/210601 - -writing a game design document -https://www.blessfrey.me/diary/entries/210527 -A game design document (GDD) is a detailed document used to communicate the vision for a videogame. ... -Thu, 27 May 2021 05:00:05 GMT -https://www.blessfrey.me/diary/entries/210527 - - -playing FlightRising with spreadsheets -https://www.blessfrey.me/diary/entries/210513 -FlightRising is a petsite where you can breed and raise pet dragons. The dragons' appearances are ... -Thu, 13 May 2021 05:00:05 GMT -https://www.blessfrey.me/diary/entries/210513 - - -april 2021: will patrols ever work? -https://www.blessfrey.me/diary/entries/210501 -thursday, april 1 - April Fool's Day I got gnomed by my group leader, and FlightRising's ... -Sat, 01 May 2021 05:00:05 GMT -https://www.blessfrey.me/diary/entries/210501 - - -an enemy patrol in godot -https://www.blessfrey.me/diary/entries/210429 -My patrol routes look like a series of waypoints (Position2Ds) which are the children of a patrol ... -Thu, 29 Apr 2021 05:00:05 GMT -https://www.blessfrey.me/diary/entries/210429 -