Skip to content

ArkShop 1.9: ASA 92.28 compatibility and dino traits - #23

Open
bfferris wants to merge 1 commit into
ArkServerApi:ARK_89.31from
bfferris:arkshop-asa-92.28-dino-traits
Open

ArkShop 1.9: ASA 92.28 compatibility and dino traits#23
bfferris wants to merge 1 commit into
ArkServerApi:ARK_89.31from
bfferris:arkshop-asa-92.28-dino-traits

Conversation

@bfferris

@bfferris bfferris commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • Updates ArkShop to 1.9 for ASA 92.28.
  • Adds optional random traits for ArkShop dino purchases.
  • Adds default trait settings with per-dino overrides.

Testing

  • Built ArkShop.sln Release x64.
  • Tested on ASA server 92.28 with AsaApi 2.03.

@bfferris bfferris closed this Aug 16, 2026
@bfferris
bfferris deleted the arkshop-asa-92.28-dino-traits branch August 16, 2026 20:43
@bfferris
bfferris restored the arkshop-asa-92.28-dino-traits branch August 16, 2026 20:44
@bfferris bfferris reopened this Aug 16, 2026
@Lethalinjectionx
Lethalinjectionx requested a balanced review from Copilot August 16, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ArkShop plugin to version 1.9 for compatibility with ARK: Survival Ascended 92.28 (AsaApi 2.03) and introduces an optional random "dino traits" system for shop dino purchases. It also migrates several player-state checks and purchase actions away from now-changed AsaApi helpers to direct SDK field/method access, and hardens the engram/beacon purchase paths with point-refund-on-failure handling.

Changes:

  • Adds a configurable DinoTraits system (global Enabled, tier weights, trait list) with a per-dino GiveRandomTrait override, applied in GiveDino; auto-migrates existing config.json to include the new defaults.
  • Replaces AsaApi::IApiUtils dead/riding checks with local ArkShop::IsPlayerDead/IsRidingDino helpers, and updates the post-spawn controller lookup and the unconscious check for 92.28 compatibility.
  • Reworks engram unlock (ServerUnlockEngram) and beacon summon (DoSummon) to detect failure and refund points, and bumps the plugin version to 1.9.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ArkShop/Configs/PluginInfo.json Bumps plugin version 1.8 → 1.9.
ArkShop/Configs/config.json Adds DinoTraits default block (enabled flag, tier weights, trait list).
ArkShop/Configs/Commented.json Documents the new DinoTraits block and per-dino GiveRandomTrait override.
ArkShop/ArkShop/Private/Helpers.h Adds IsPlayerDead/IsRidingDino inline helpers using SDK field access.
ArkShop/ArkShop/Private/ArkShop.h Extends GiveDino signature with bool giveRandomTrait = false.
ArkShop/ArkShop/Private/ArkShop.cpp Implements trait parsing/weighted selection, config migration, applies trait in GiveDino, updates unconscious check.
ArkShop/ArkShop/Private/Store.cpp Migrates engram unlock/beacon summon to new SDK calls with refund-on-failure; uses new helpers.
ArkShop/ArkShop/Private/StoreSell.cpp Uses local IsPlayerDead helper.
ArkShop/ArkShop/Private/Kits.cpp Uses local IsPlayerDead helper; replaces post-spawn controller lookup with GetOwnerController.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Lethalinjectionx Lethalinjectionx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is no way this code can be accepted in its current form.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nearly 400 lines of code is not needed for this. Did copilot write this code because it doesn't seem care based on its review.

Comment on lines +7 to +24
FORCEINLINE bool IsPlayerDead(AShooterPlayerController* player_controller)
{
if (player_controller == nullptr)
return true;

AShooterCharacter* character = player_controller->BaseGetPlayerCharacter();
return character == nullptr || character->bIsDead()();
}

FORCEINLINE bool IsRidingDino(AShooterPlayerController* player_controller)
{
if (player_controller == nullptr)
return false;

AShooterCharacter* character = player_controller->BaseGetPlayerCharacter();
return character != nullptr && character->bIsRiding()();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Absolutely 0 reasons to pull these functions from the API headers they are already compiled inline and were already being used from the API Utils.

bool CanUseKit(AShooterPlayerController* player_controller, const FString& eos_id, const FString& kit_name)
{
if (player_controller == nullptr || AsaApi::IApiUtils::IsPlayerDead(player_controller))
if (ArkShop::IsPlayerDead(player_controller))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

void RedeemKit(AShooterPlayerController* player_controller, const FString& kit_name, bool should_log, bool from_spawn, int senderPlatform)
{
if (AsaApi::IApiUtils::IsPlayerDead(player_controller))
if (ArkShop::IsPlayerDead(player_controller))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

void BuyKit(AShooterPlayerController* player_controller, FString* message, int, int senderPlatform)
{
if (AsaApi::IApiUtils::IsPlayerDead(player_controller))
if (ArkShop::IsPlayerDead(player_controller))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

Comment on lines +711 to +713
AShooterPlayerController* player = _this != nullptr
? static_cast<AShooterPlayerController*>(_this->GetOwnerController())
: nullptr;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

bool Buy(AShooterPlayerController* player_controller, const FString& item_id, int amount)
{
if (AsaApi::IApiUtils::IsPlayerDead(player_controller))
if (ArkShop::IsPlayerDead(player_controller))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

bool Sell(AShooterPlayerController* player_controller, const FString& item_id, int amount)
{
if (AsaApi::IApiUtils::IsPlayerDead(player_controller))
if (ArkShop::IsPlayerDead(player_controller))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants