[GWA2] ModStructs For Perfect Items

04/24/2025 19:17 Thorulf#46
Thanks for this! Was working on it myself, you beat me to it. Well done! ^^

One small comment though: should not the logic in the CanSell() method be reversed? Given:
  • CanSell() returns true when the item will be SOLD.
  • Given that we want to KEEP the (configured set of) +5 profession mods, it should return false for those cases.
  • Currently it returns the value of the helper methods KeepXWeapons(), which by its name and logic returns the opposite: the keep bool flag, not the sell bool flag.

Alt. fix: simply rename the KeepXWeapons to SellXWeapons and adjust your wanted config accordingly.
Personally I like the current func names and would adjust the logic in the CanSell() func.
Just my 2 cents.

Should I be missing some detail, pls enlighten me. ^^
Cheers!
05/01/2025 01:26 Underavelvetmoon#47
Quote:
Originally Posted by Thorulf View Post
Thanks for this! Was working on it myself, you beat me to it. Well done! ^^

One small comment though: should not the logic in the CanSell() method be reversed? Given:
  • CanSell() returns true when the item will be SOLD.
  • Given that we want to KEEP the (configured set of) +5 profession mods, it should return false for those cases.
  • Currently it returns the value of the helper methods KeepXWeapons(), which by its name and logic returns the opposite: the keep bool flag, not the sell bool flag.

Alt. fix: simply rename the KeepXWeapons to SellXWeapons and adjust your wanted config accordingly.
Personally I like the current func names and would adjust the logic in the CanSell() func.
Just my 2 cents.

Should I be missing some detail, pls enlighten me. ^^
Cheers!
You are absolutely right! Big oversight on my part, thank you! I was wondering why I wasnt keeping any when botting haha. In any regards it seems that only necro mods are worth keeping, but ill definitely make that change and update accordingly.
05/01/2025 22:01 Thorulf#48
You're welcome! ^^ The following works well. And yes I agree many of the new +5 mods are actually not worth keeping. My time is much more valuable, not gonna waste it in Kamadan. Given this fact I streamlined the KeepXWeapons pretty hard.


Code:
Func CanSell($aItem)
	; === [CHECK FOR +5 PROFESSION MODS] ===
	Local $PlusFiveMod = IsPlusFiveMod($aItem)

	Switch $PlusFiveMod
	Case True
	  If PlusFiveModFilter($aItem) = "1" Then
		  Return Not KeepStrengthWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "2" Then
		  Return Not KeepExpertiseWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "3" Then
		  Return Not KeepSoulReapingWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "4" Then
		  Return Not KeepFastCastingWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "5" Then
		  Return Not KeepEnergyStorageWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "6" Then
		  Return Not KeepDivineFavorWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "7" Then
		  Return Not KeepSpawningPowerWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "8" Then
		  Return Not KeepCritStrikeWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "9" Then
		  Return Not KeepLeadershipWeapons($aItem)
	  ElseIf PlusFiveModFilter($aItem) = "10" Then
		  Return Not KeepMysticismWeapons($aItem)
	  EndIf
	; NB! Dont return CanSell = True for all other case. 
        ; We still want to perform the normal checks below.
	EndSwitch	
	; === [+5 MOD CHECK DONE] ===
        ; < Rest of the CanSell() function here >
EndFunc
10/26/2025 06:25 some ectos for sale#49
Hello, can the nonperfect modstructs be mathematically calculated from the values of perfect mods? is there a single strict rule?

Usefull for pre mods like 17%, 18% dmg vs Charr, 8, 9 armor vs charr for shield/focus