Skip to content

Fix issue where duels were not being triggered correctly#2183

Draft
trolloks wants to merge 2 commits intomod-playerbots:test-stagingfrom
trolloks:fix/duel_trigger_fix
Draft

Fix issue where duels were not being triggered correctly#2183
trolloks wants to merge 2 commits intomod-playerbots:test-stagingfrom
trolloks:fix/duel_trigger_fix

Conversation

@trolloks
Copy link
Copy Markdown
Contributor

@trolloks trolloks commented Mar 3, 2026

Pull Request

Issue #493

  • Re-added 'rpg duel' to rpg strategy and added value from here
  • Changed duel trigger to activate only when a user is NOT AFK.

Design Philosophy

We prioritize stability, performance, and predictability over behavioral realism.
Complex player-mimicking logic is intentionally limited due to its negative impact on scalability, maintainability, and
long-term robustness.

Excessive processing overhead can lead to server hiccups, increased CPU usage, and degraded performance for all
participants. Because every action and
decision tree is executed per bot and per trigger, even small increases in logic complexity can scale poorly and
negatively affect both players and
world (random) bots. Bots are not expected to behave perfectly, and perfect simulation of human decision-making is not a
project goal. Increased behavioral
realism often introduces disproportionate cost, reduced predictability, and significantly higher maintenance overhead.

Every additional branch of logic increases long-term responsibility. All decision paths must be tested, validated, and
maintained continuously as the system evolves.
If advanced or AI-intensive behavior is introduced, the default configuration must remain the lightweight decision
model
. More complex behavior should only be
available as an explicit opt-in option, clearly documented as having a measurable performance cost.

Principles:

  • Stability before intelligence
    A stable system is always preferred over a smarter one.

  • Performance is a shared resource
    Any increase in bot cost affects all players and all bots.

  • Simple logic scales better than smart logic
    Predictable behavior under load is more valuable than perfect decisions.

  • Complexity must justify itself
    If a feature cannot clearly explain its cost, it should not exist.

  • Defaults must be cheap
    Expensive behavior must always be optional and clearly communicated.

  • Bots should look reasonable, not perfect
    The goal is believable behavior, not human simulation.

Before submitting, confirm that this change aligns with those principles.


Feature Evaluation

Please answer the following:

  • Describe the minimum logic required to achieve the intended behavior?
  • Describe the cheapest implementation that produces an acceptable result?
  • Describe the runtime cost when this logic executes across many bots?

How to Test the Changes

  • Step-by-step instructions to test the change
  1. Add a playerbot to your party
  2. Add nc +start duel
  3. Add nc +rpg
  4. Move to a valid dueling area without nearby npcs
  5. Should eventually receive duel invite
  • Any required setup (e.g. multiple players, bots, specific configuration)
  • Expected behavior and how to verify it

Complexity & Impact

Does this change add new decision branches?

    • No
    • Yes (explain below)

Does this change increase per-bot or per-tick processing?

    • No
    • Yes (describe and justify impact)

Could this logic scale poorly under load?

    • No
    • Yes (explain why)

Defaults & Configuration

Does this change modify default bot behavior?

    • No
    • Yes (explain why)

Default rpg strategy now has the ability to start duels

If this introduces more advanced or AI-heavy logic:

    • Lightweight mode remains the default
    • More complex behavior is optional and thereby configurable

AI Assistance

Was AI assistance (e.g. ChatGPT or similar tools) used while working on this change?

    • No
    • Yes (explain below)

If yes, please specify:

  • AI tool or model used (e.g. ChatGPT, GPT-4, Claude, etc.)
  • Purpose of usage (e.g. brainstorming, refactoring, documentation, code generation)
  • Which parts of the change were influenced or generated
  • Whether the result was manually reviewed and adapted

AI assistance is allowed, but all submitted code must be fully understood, reviewed, and owned by the contributor.
Any AI-influenced changes must be verified against existing CORE and PB logic. We expect contributors to be honest
about what they do and do not understand.


Final Checklist

    • Stability is not compromised
    • Performance impact is understood, tested, and acceptable
    • Added logic complexity is justified and explained
    • Documentation updated if needed

Notes for Reviewers

Anything that significantly improves realism at the cost of stability or performance should be carefully discussed
before merging.

@trolloks trolloks closed this Mar 3, 2026
@trolloks trolloks reopened this Mar 3, 2026
@trolloks trolloks changed the base branch from master to test-staging March 3, 2026 13:55
@trolloks trolloks closed this Mar 3, 2026
@trolloks trolloks reopened this Mar 3, 2026
@trolloks trolloks marked this pull request as ready for review March 3, 2026 18:02
@kadeshar
Copy link
Copy Markdown
Collaborator

kadeshar commented Mar 4, 2026

Its not a fix but implementing duel into rpg strategy.
What with duel strategy?

@trolloks
Copy link
Copy Markdown
Contributor Author

trolloks commented Mar 4, 2026

Its not a fix but implementing duel into rpg strategy. What with duel strategy?

Sorry, not a 100% clear on what you are saying. What I'm gathering is.

  • You say this is not a fix, but just me adding it to rpg strategy.
    This is how it was proposed on the bug i was trying to resolve?

  • You are saying there is another strategy called duel?
    I checked that now. It might be my limited knowledge about the code base, but it doesn't seem to have a trigger set up, like RpgDuelTrigger?

@kadeshar
Copy link
Copy Markdown
Collaborator

kadeshar commented Mar 5, 2026

This PR have in name "Fix..." and I refered to that.
Triggers are setup in file DuelStrategy.cpp. Im not sure about implementing duels in 2 strategies. How this strategies interfere?

@trolloks
Copy link
Copy Markdown
Contributor Author

trolloks commented Mar 6, 2026

This PR have in name "Fix..." and I refered to that. Triggers are setup in file DuelStrategy.cpp. Im not sure about implementing duels in 2 strategies. How this strategies interfere?

Ok no problem. Let me go investigate the existing strategy first and see if that works as expected. I'll revert the PR to draft for now.

@trolloks trolloks marked this pull request as draft March 6, 2026 06:10
@Celandriel
Copy link
Copy Markdown
Collaborator

As a part of the rpg strategy I dont think it will work without rpg, but that right now is not a default strategy.

@trolloks
Copy link
Copy Markdown
Contributor Author

trolloks commented Mar 6, 2026

As a part of the rpg strategy I dont think it will work without rpg, but that right now is not a default strategy.

Yeah the way i saw it working was also only via an rpg strategy, but I'm not sure what the 'DuelStrategy' even does. Will check that out first to see if its not duplicating the duelling logic.

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