Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability names #185

Open
vojtechBobcik opened this issue Nov 21, 2023 · 1 comment
Open

Ability names #185

vojtechBobcik opened this issue Nov 21, 2023 · 1 comment
Labels
question Further information is requested

Comments

@vojtechBobcik
Copy link

AbilityID names does not correspond with ingame abbility names .. is there any way to connect those names together ? or give some key value table ?

@vojtechBobcik vojtechBobcik changed the title Abbility names Ability names Nov 21, 2023
@BurnySc2 BurnySc2 added the question Further information is requested label Nov 30, 2023
@BurnySc2
Copy link
Owner

You should be able to produce some kind of mapping (via identical enum values aka ability IDs) here:

self.abilities: Dict[int, AbilityData] = {
a.ability_id: AbilityData(self, a)
for a in data.abilities if a.ability_id in ids
}
self.units: Dict[int, UnitTypeData] = {u.unit_id: UnitTypeData(self, u) for u in data.units if u.available}
self.upgrades: Dict[int, UpgradeData] = {u.upgrade_id: UpgradeData(self, u) for u in data.upgrades}

An instance of this class is accessible through the bot instance via self.game_data e.g. self.game_data.abilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants