Skip to content

Conversation

@dartasen
Copy link
Member

@dartasen dartasen commented Jan 12, 2025

  • Stalker FindNest
  • Stalker DropTooth
  • AttackLastTarget (Done through current system)
  • MoveTowardsTarget (Done through current system)
  • FleeOnDamage
  • SwimToHeroPeeper
  • AggressiveWhenSeeTarget (Done through current system)
  • MeleeAttack
  • PrisonPredatorSwimToPlayer
  • CreatureFlinch
  • CreatureFear
  • PrisonCreatureBehaviour
  • AvoidObstacles
  • StayAtLeashPosition
  • AvoidEscapePod

Will need work after this PR :

  • MeleeAtack (Pickup held item from remote player)
  • CreatureFriend System
  • CollectShiny

Closes #2250
Closes #2243

@dartasen dartasen requested a review from tornac1234 January 12, 2025 14:04
@tornac1234 tornac1234 added the Area: AI Related to state machines (as used by the fish) label Jan 12, 2025
@dartasen dartasen marked this pull request as draft January 12, 2025 19:35
@dartasen dartasen force-pushed the feature/stalkersync branch from 24c8a58 to 19d2afe Compare January 12, 2025 22:36
@dartasen dartasen force-pushed the feature/stalkersync branch from 7029e10 to f916df4 Compare January 26, 2025 12:04
@dartasen dartasen force-pushed the feature/stalkersync branch from f916df4 to b47a533 Compare March 3, 2025 12:06
@dartasen dartasen added this to the 1.8 milestone Mar 17, 2025
@AtlantaDEV-ui

This comment has been minimized.

@dartasen dartasen force-pushed the feature/stalkersync branch 2 times, most recently from f98dea9 to 8844ac0 Compare April 10, 2025 19:39
@dartasen dartasen requested a review from Copilot April 10, 2025 21:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

NitroxClient/GameLogic/Spawning/Metadata/Extractor/StayAtLeashPositionMetadataExtractor.cs:7

  • The class name 'StayAtLeastPositionMetadataExtractor' appears inconsistent with the metadata type 'StayAtLeashPositionMetadata'; renaming it to 'StayAtLeashPositionMetadataExtractor' would improve clarity.
public sealed class StayAtLeastPositionMetadataExtractor : EntityMetadataExtractor<Creature, StayAtLeashPositionMetadata>

@dartasen dartasen force-pushed the feature/stalkersync branch from 8844ac0 to 50240e7 Compare April 11, 2025 11:56
@dartasen dartasen requested a review from Jannify April 12, 2025 08:23
@dartasen dartasen marked this pull request as ready for review April 12, 2025 10:01
@dartasen dartasen force-pushed the feature/stalkersync branch 2 times, most recently from ae17e14 to 0d25ae2 Compare April 12, 2025 17:18
@dartasen dartasen force-pushed the feature/stalkersync branch from 0d25ae2 to 063426c Compare April 26, 2025 09:37
Comment on lines +21 to +28
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
yield return new CodeInstruction(OpCodes.Ldarg_0);
yield return new CodeInstruction(OpCodes.Ldarg_1);
yield return new CodeInstruction(OpCodes.Ldarg_2);
yield return new CodeInstruction(OpCodes.Call, Reflect.Method(() => Perform(default, default, default)));
yield return new CodeInstruction(OpCodes.Ret);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that it's fairly doable to do a little transpiler magic to just replace the local transform(stloc.1) and targetDirection(stloc..2) variables with the once from the lastTarget, no?

instance.swimBehaviour.SwimTo(targetTransform.position, instance.swimVelocity);
creature.TryGetNitroxId(out NitroxId nitroxId);

Log.InGame($"[PrisonPredatorSwimTo Swim] {creature.name} {nitroxId?.ToString()} {lastTarget.target.name}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed debug logging

Comment on lines +76 to +78
creature.TryGetNitroxId(out NitroxId nitroxId);

Log.InGame($"[PrisonPredatorSwimTo Eval] {creature.name} {nitroxId?.ToString()} {gameobject.name}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover debug logging

Comment on lines +27 to +31
yield return new CodeInstruction(OpCodes.Ldarg_0);
yield return new CodeInstruction(OpCodes.Ldarg_1);
yield return new CodeInstruction(OpCodes.Ldarg_2);
yield return new CodeInstruction(OpCodes.Call, Reflect.Method(() => EvaluatePriority(default, default, default)));
yield return new CodeInstruction(OpCodes.Ret);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like in PrisonPredatorSwimToPlayer_Perform_Patch I think we can manipulated the IL to get the same outcome.
Creating a new local variable, filling it with the ecoTarget and then replacing all usings of the Player local variable with the new one should work.

@OhmV-IR
Copy link
Collaborator

OhmV-IR commented May 6, 2025

  • Cameras are super desynced with stalkers grabbing them, I don't see the camera in the position that the other client does and they can pick it up after the stalker drops it to dupe cameras
  • yellow goo attack VFX is not shown on the other client and neither is the SFX
  • cuddlefish can escape alien containment through animation with player(probably out of scope for the PR)
  • Stalkers hatched in alien containment but we did not see any change in behavior when we entered the room or the tank

@dartasen dartasen modified the milestones: 1.8, 1.9 May 9, 2025
@rylaix

This comment was marked as spam.

@dartasen dartasen force-pushed the feature/stalkersync branch from 063426c to 025ee09 Compare October 8, 2025 19:38
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Test Results

247 tests  +4   246 ✅ +4   7s ⏱️ ±0s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5704605. ± Comparison against base commit e50c7d2.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: AI Related to state machines (as used by the fish)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add sync for Stalker Stalker teeth invisible?

7 participants