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

Leveling fixes #698

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Leveling fixes #698

wants to merge 12 commits into from

Conversation

CarlPoppa1
Copy link

@CarlPoppa1 CarlPoppa1 commented Feb 25, 2025

  • Moved runs to either already existing boss runs or already existing functions within the quest run
  • Fixed other issues within leveling_act1.go to leveling_act5.go
  • Moved option to use thawing/antidote potions to Duriel and Andariel main boss runs
  • Added option to clear levels of Forgotten Tower in Countess run (we can't get to level 5 of the tower by running past mobs before we can teleport)
  • Changed some run logic in act 1 leveling script (Den of Evil til 3, Cold Plains til 6, Stony Field til 9, Countess til 14 then Andariel)
  • Fixed issue with traversing areas and discovering waypoints erroring if we have to return to town (needed for act 5)
  • Added anvil UI position for classic (needed to open door to Duriel) and other UI positions for classic and resurrected (e.g skill list, merc list)

I've deliberately left out the changes I made to open doors more reliably. So this PR will only work smoothly once #697 has been merged. Both PRs will need to be tested together.

More changes to come...
Skill allocation
Stat allocation (with struct to allow for stats to be defined more than once)
Dodge
Autostart (don't need tome portal bound)
Option to set optimal settings

CarlPoppa and others added 8 commits February 20, 2025 14:07
IsFromQuest() doesn't work on equippable items
Moved from part of leveling to option in main runs
Also forced clear floors when leveling and low lvl
Useful when low on gold and has no other impact
Where possible. Also fixed bugs and improved logic
@CarlPoppa1 CarlPoppa1 marked this pull request as draft February 25, 2025 14:26
@CarlPoppa1 CarlPoppa1 closed this Feb 25, 2025
@CarlPoppa1 CarlPoppa1 reopened this Feb 25, 2025
@Wamlad
Copy link

Wamlad commented Feb 25, 2025

What do you mean by "Stat allocation (with struct to allow for stats to be defined more than once)"? Unsure what you mean by defined more than once. Is that to do with the autoequip?

Some potential fixes on your more changes to come list below. Would like to help out where I can.
Apologies for the wall of text. Can DM to take any discussion out of the PR if preferred.

Stat allocation and Skill allocation can use PR 674 #674 . It only changes leveling_tools.go so no impact on your changes. It also doesn't require any changes to the character scripts, so should be fine with your autoequip work? Assuming stat points will be amended in those scripts to meet strength requirements etc.

Autostart without TP bound, I've tested a solution to this (or a workaround at least). Just need some time to amend it in this PR.. If it's easier for you to add or can improve on the workaround:

  • In each of the character leveling scripts, need to amend 'requireKeybindings' to remove 'skill.TomeOfTownPortal'
  • In 'leveling_tools.go' remove the line 'skillsToBind = append(skillsToBind, skill.TomeOfTownPortal)' as this was a duplicate, it's already included in the character leveling scripts.
  • This will effectively start the game without TPs, but the logic is already built in to buy Tome of TP and ID if it isn't found. So it will just farm the first area until it can. It will then bind the skill too.
  • Bot settings should have return to town for HP and MP unticked. This isn't ideal, as they'll need to be switched back on later in the Koolo UI. Can that setting be overridden if char is less than level 3 or something? It's triggered in internal/bot/bot.go but I don't know if that setting can be overridden when the bot is running, outside of changing the actual config.yaml and clicking reload configs.
  • Only other suggestion is to maybe change the chest opening from false to true for the Den of Evil since it's the first area. Might help get that gold sooner to buy Tomes.

Other suggestion: There is lots of running through Act 1, so when traversing to new areas or even clearing areas I have been repurposing the Andy script section to buy Stamina Potions at the start of these functions (instead of antidote pots). Helps with speed and survivability. Especially running to Countess, 4 pots seemed sufficient if not clearing monsters.

@Wamlad
Copy link

Wamlad commented Feb 26, 2025

Cold Plains function needs a quick fix:
image
MoveToArea needs to be directly adjacent, so it can't run this straight from the Rogue Encampment. Whereas WayPoint will traverse all the way to it if the character doesn't have it yet.

Now uses action.Waypoint and not MoveToArea
@CarlPoppa1
Copy link
Author

CarlPoppa1 commented Feb 26, 2025

What do you mean by "Stat allocation (with struct to allow for stats to be defined more than once)"? Unsure what you mean by defined more than once. Is that to do with the autoequip?

Current implementation uses a map with a key of stat.ID to assign stat points. That means we can only apply any single stat in one consecutive action or actions. In reality, we want to assign a few strength points at level 3, a few at level 12 etc to make sure that we can equip better items as we move through the acts. I've moved it to a struct where you input your target points, once that target has been reached it moves on to the next entry in the struct:

func (s SorceressLeveling) StatPoints() []context.StatAllocation {

	// Define target totals (including base stats)
	targets := []context.StatAllocation{
		{Stat: stat.Vitality, Points: 50},  // Base 10 + 40
		{Stat: stat.Strength, Points: 25},  // Base 10 + 15
		{Stat: stat.Vitality, Points: 65},  // Previous 50 + 15
		{Stat: stat.Strength, Points: 47},  // Previous 25 + 22
		{Stat: stat.Vitality, Points: 999}, // Rest into vit
	}

	return targets
}

Autostart without TP bound, I've tested a solution to this (or a workaround at least). Just need some time to amend it in this PR.. If it's easier for you to add or can improve on the workaround:

* In each of the character leveling scripts, need to amend 'requireKeybindings' to remove 'skill.TomeOfTownPortal'

* In 'leveling_tools.go' remove the line 'skillsToBind = append(skillsToBind, skill.TomeOfTownPortal)' as this was a duplicate, it's already included in the character leveling scripts.

* This will effectively start the game without TPs, but the logic is already built in to buy Tome of TP and ID if it isn't found. So it will just farm the first area until it can. It will then bind the skill too.

Yes, I've done exactly the same, I just haven't pushed the commit yet.

* _Bot settings should have return to town for HP and MP unticked._ This isn't ideal, as they'll need to be switched back on later in the Koolo UI. Can that setting be overridden if char is less than level 3 or something? It's triggered in internal/bot/bot.go but I don't know if that setting can be overridden when the bot is running, outside of changing the actual config.yaml and clicking reload configs.

I've set it to be based on the amount of gold (in act 1 only but maybe it needs to be for all acts) - it get switched back on when we have enough gold and turned back off when we drop below a certain level.

* Only other suggestion is to maybe change the chest opening from false to true for the Den of Evil since it's the first area. Might help get that gold sooner to buy Tomes.

Good idea, I'll do this, thanks for reviewing.

@Wamlad
Copy link

Wamlad commented Feb 26, 2025

Sounds like it's all getting there, appreciate the responses. Let me know if I can assist with anything, but happy to test/review when I can.

Re: the stats allocation, is that not what it already does?
Rather than being a list that is progresses through one by one, the only difference (in my mind) is that the current setup shows which level it's triggering the different thresholds. To me this is the exact same thing but more transparent and editable.

The existing one below is from sorceress_leveling_lightning.go. I would change this to get strength earlier, but didn't think it was worth making a PR until autoequip would take advantage of it. But it's very clear for anyone editing what levels these start triggering. So just saying it's something that probably doesn't need an overhaul, and has a working PR if that's something you can save your time on.

`statPoints := make(map[stat.ID]int)

if lvl.Value < 9 {
	statPoints[stat.Vitality] = 9999
} else if lvl.Value < 15 {
	statPoints[stat.Energy] = 45
	statPoints[stat.Strength] = 25
	statPoints[stat.Vitality] = 9999
} else {
	statPoints[stat.Energy] = 60
	statPoints[stat.Strength] = 50
	statPoints[stat.Vitality] = 9999
}`

@Antizerg
Copy link

Current script isn't clearing tower floors, which is not ideal for leveling.
I believe you are missing the countess.go update on this PR that you had intended.

The current countess.go on main does not have any action.ClearCurrentLevel.

But we also need to make it a configurable, like you intended so a normal countess run isn't impacted by this.

I believe if you add your local countess.go to this PR, it will fix the issue.

@Antizerg
Copy link

Balance Update: Current script has us going to Countess at lvl 9. This is resulting in a lot of chickens. I recommend hitting countess at level 12. For a sorc, this allows for fireball, which is a decent power creep and allows for clearing countess much easier. Right now at lvl 9-10, I am chickening 100% of the time. If I wait until lvl 12, that lowers chicken rate significantly.

Clearing Stoney until 12 just requires one parameter update in your code. We might be able to maximize this and just clear BlackMarsh until level 12, not sure what would be faster. I can test this if you want, but for now I am just going to settle with clearing stoney until 12.

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