This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Two resource bars?  (Read 1180 times)

Tompoolk

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 15
    • View Profile
Two resource bars?
« on: September 12, 2015, 03:29:51 am »
I was wondering, would it be possible to have two types of resources for a single class? For instance one bar for rage and another for energy, with powers utilizing either one of those resource? If anyone has any ideas, please let me know as I have hit a wall with this one.
Thanks.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Darkon47

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 5
    • View Profile
Re: Two resource bars?
« Reply #1 on: September 12, 2015, 05:37:45 am »
Giving mana to any class that normally does not use it will display a mana bar, though it will likely not regenerate. Additionally, at least in trinity, all classes can use energy and rage, though they do not show a bar, and rage needs some small core edits to allow other classes to generate it. Runes are infinite and runic power always 0 for non-DK's though that could probably be fixed with some moderate core edits.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Tompoolk

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 15
    • View Profile
Re: Two resource bars?
« Reply #2 on: September 12, 2015, 05:22:30 pm »
Quote from: "Darkon47"
Giving mana to any class that normally does not use it will display a mana bar, though it will likely not regenerate. Additionally, at least in trinity, all classes can use energy and rage, though they do not show a bar, and rage needs some small core edits to allow other classes to generate it. Runes are infinite and runic power always 0 for non-DK's though that could probably be fixed with some moderate core edits.

Wow, OK sounds far simpler than I thought. However how would I go about adding mana, energy etc to a class that doesn't use it, whilst keeping the old bar? I know you have said it is possible, but what would I need to edit exactly? For example, how would I add energy to a warrior. Thanks for the help  :!:
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Darkon47

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 5
    • View Profile
Re: Two resource bars?
« Reply #3 on: September 12, 2015, 07:44:27 pm »
All classes actually already have energy and regenerate it on a trinity server, you simply need to make an addon to allow the clients to see it. Something like energy watch might be good to take a look at for that, and just find where to disable the class restriction in its code. Assuming you are on trinity or your core has a similar enough SQL structure, you add mana by adjusting the world.player_classlevelstats that has an entry for base HP and mana for each level for each class, you could also add it via custom equipment, the stat number for it is either 1 or 0. Becareful though, as most spells cost a percentage of your base mana, meaning that somone with 0 base mana casts them for free, and the more base mana you have the worse it actually is.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Tompoolk

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 15
    • View Profile
Re: Two resource bars?
« Reply #4 on: September 12, 2015, 08:33:38 pm »
Quote from: "Darkon47"
All classes actually already have energy and regenerate it on a trinity server, you simply need to make an addon to allow the clients to see it. Something like energy watch might be good to take a look at for that, and just find where to disable the class restriction in its code. Assuming you are on trinity or your core has a similar enough SQL structure, you add mana by adjusting the world.player_classlevelstats that has an entry for base HP and mana for each level for each class, you could also add it via custom equipment, the stat number for it is either 1 or 0. Becareful though, as most spells cost a percentage of your base mana, meaning that somone with 0 base mana casts them for free, and the more base mana you have the worse it actually is.

Ok I have had a look at the "Energy Watch", I can make it show energy but it is quite tempormental, but with some work I can get it working. However, thinking it over I was wondering if it would be possible to make a new type of resource, such as the hunter focus bar? I'm asking this because I want to make some universal powers that all classes can use, with this new resource bar, as Rogues already utilize energy for their base line abilities, so I would like a new resource bar, and have it show as well as the main resource bar. So is it possible or if you, or anyone else have a more efficient way of getting this done that would also be great. Thanks for the help so far, was pretty stumped before hand  :lol:
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Darkon47

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 5
    • View Profile
Re: Two resource bars?
« Reply #5 on: September 13, 2015, 12:25:19 am »
That would be doable, though I dont think the client would show it, so you would have to write an addon for that. And while it is possible, you do need to be able to make several core edits, and I am not certain exactly where each of the edits needs to be. One thing you could do would be to have multiple versions of the spells you want and have it cost energy for non-rogues and have a rogue version that costs mana or something like that.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »