Skip to content

Conversation

JoshdanG
Copy link
Collaborator

@JoshdanG JoshdanG commented Sep 2, 2023

1.Remove everything from hero item file except item list

  • Basic bootstrap is in item_purchase_generic.lua
  • All purchasing logic is in ItemPurchaseSystem.lua
  • Call BuySupportItem from ItemPurchaseExtend
  1. Remove self and ItemsToBuy from ItemPurchaseSystem
  • Call ItemPurchaseExtendDirectly
  1. Hero item files moved to items folder

Basically the same as before except now for all heroes, so no changes to hero selection.

adamqqqplay and others added 5 commits August 6, 2023 13:41
Move all item_purchase_*.lua to subdirectory to reduce maintenance costs
and make it easier for players to edit.

Fix: adamqqqplay#126

Signed-off-by: AdamQQQ <adamqqq@163.com>
1.Remove everything from hero item file except item list
- Basic bootstrap is in item_purchase_generic.lua
- All purchasing logic is in ItemPurchaseSystem.lua
- Call BuySupportItem from ItemPurchaseExtend
No need for self, and ItemsToBuy was not used
@ArcherWayne
Copy link
Collaborator

From gameplay perspective, the bot purchase system does not work as intented.

I found few issues during my testing:

  1. Bots did not buy anything and did level any skill up, which I believe is Valve's fault again.
  2. Agi heroes sometimes buy too many Blade of Alacrity.
  3. Supports sometimes phase boots or power treads.
  4. Side lane heros sometimes buy bottle, which I think is caused by the lane assignment issues.

I am not sure if those problem were caused by Valve's newly updated API. But the bots have too many issues to be enjoyed playing against.

@JoshdanG
Copy link
Collaborator Author

JoshdanG commented Sep 4, 2023

I have now merged the latest from master, which should fix the major failures

I think the rest of the problems may already be present on master -- can you see if you can reproduce there?

The one expected change in behavior is that we call ItemPurchaseSystem.BuySupportItem() for all heroes, so carries might start buying wards and such.

@JoshdanG
Copy link
Collaborator Author

JoshdanG commented Sep 4, 2023

Regarding buying support items, the list of "support heroes" seems to be a bit ill-defined. We should probably use "CanBeSupport()", since that is how we are deciding the team composition.

buy_support_before.txt
The heroes that would call BuySupport() before

CanBeSupport.txt
The set of heroes that return true for RoleUtility.CanBeSupport(). These come from the ['supp'] list in that file.

IsSupport.txt
The set of heroes that return true for RoleUtility.IsSupport(). These come from the list of ['hero_roles'] in that file.

@adamqqqplay
Copy link
Owner

I have now merged the latest from master, which should fix the major failures

@JoshdanG Thanks, I think rebase/merge to master will fix this issue. @ArcherWayne Can you try testing again? Thanks in advance.

Copy link
Owner

@adamqqqplay adamqqqplay left a comment

Choose a reason for hiding this comment

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

@JoshdanG @ArcherWayne
I tested your patch and it works great. Thanks!

@adamqqqplay adamqqqplay merged commit 4461fa5 into adamqqqplay:master Sep 17, 2023
@adamqqqplay adamqqqplay linked an issue Sep 17, 2023 that may be closed by this pull request
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.

Refactor code structure for item purchase
3 participants