News: Go to the front page portal to create a Torchmodders account | Visit the wiki!
May 20, 2019, 08:46:07 PM
collapse

*
Information

Please contribute to our


Sign up for a forum account at the Front Page. | Remember to Tag your posts.
Having problems logging in to the forums? Go the front page, log out and back in again.

Author Topic: [TL2] WTFH is the Charge Bar?  (Read 2033 times)

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
[TL2] WTFH is the Charge Bar?
« on: May 13, 2018, 10:23:26 PM »
OK, so I've spent the last day and a half screwing around with an old "boss monster" custom class I found on the Workshop, and while working on cleaning-up the mod for better design and stability, I read a half-dozen different web-pages discussing something called the "charge bar" (which the class in question does not have). 

So of course, I tried to look-up what this new mechanic is and how it works--and got a whole lot of technobabble with almost no context whatsoever.  Anything even remotely understandable (like http://torchlight.wikia.com/wiki/Charge) fails to clarify the actual nature of the mechanic itself. :\ 

Can someone explain to me what this "charge bar" is, exactly how it works, and what is the simplest way to add a new one to a custom class--in a way I can understand?  Preferably covering the overview as well as the specifics? 

EDIT: I am aware that the charge bar functions as a "secondary resource", similar to what is used by many classes in World of Warcraft.  I am also aware that TL2 uses Affixes to track its states.  What I do not quite understand is what this article is talking about, or this one, for that matter. 

« Last Edit: July 29, 2018, 09:13:17 PM by Lord Nyriox »

Offline Viz

  • Lowkey Modder
  • Unique
  • *
  • Posts: 355
  • Country: 00
    • status bored
    • View Profile
  • Mood: mood smiley
Re: [TL2] WTFH is the Charge Bar?
« Reply #1 on: May 14, 2018, 12:04:19 PM »
The author just took the base file of the dragon boss and turn it into a class..

A standard class is suppose to have a base file and the gender specific files for character creation. The base file usually points to skill and charge bar related code.

I'm not sure how far have you gotten into the charge bar creation, but here's an example.

You can try look into 'hum_arbiter_base' file, open it with notepad++

Then copy the lines from 'charges_max:1' until 'show_ui:always'  into the dragon base file.
Then scroll down a bit, search for "add triggerable' copy the whole [effect] code and paste it into the dragon base file. Save up, load the mod in GUTS and rebuild.

The dragon will have the Embermage charge bar.. but the charge effect is still not charging up.

I have no idea why it doesn't work .. but if I had to guess, its due to the dragon unittype being messed up.


Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] WTFH is the Charge Bar?
« Reply #2 on: May 14, 2018, 05:12:16 PM »
The author just took the base file of the dragon boss and turn it into a class..

Actually, the original author copied over dragon asset references willy-nilly into the Berserker files—without even trying to remove the Berserker's original wardrobe, skill, and charge-bar references.  It was frankly amazing the original class worked at all. 

I, on the other hand, decided to rebuild the class-unit files from scratch (yes, I did use the dragon-boss as a base), using caldurham's "playable werewolf" mod as a template (which was very cleanly implemented). 

The only redeeming aspect of Maxi's original Vyrax-class mod was the skills (which are fully converted to use player skill scaling and tier mechanics). 

A standard class is suppose to have a base file and the gender specific files for character creation. The base file usually points to skill and charge bar related code.

I did, in fact, notice that.

As I mentioned above, I used caldurham's "playable werewolf" mod as a template for my updated implementation.  In that mod, the base-file, male, and female files for the class are all merged into one shared file (with a similarly shared unit-type). 

This works because there is only one model file for the class, shared between genders.  If the class used a separate file for each gender, the two files would be completely identical. 

Since the same principles apply here (barring the possibility of using a different texture for each gender), I do not think this should be considered a problem. 

I'm not sure how far have you gotten into the charge bar creation.

I barely even understand what a charge-bar is.  I think that fact speaks for itself. 

You can try look into 'hum_arbiter_base' file, open it with notepad++

Then copy the lines from 'charges_max:1' until 'show_ui:always'  into the dragon base file.
Then scroll down a bit, search for "add triggerable' copy the whole [effect] code and paste it into the dragon base file. Save up, load the mod in GUTS and rebuild.

The dragon will have the Embermage charge bar.. but the charge effect is still not charging up.

I have no idea why it doesn't work .. but if I had to guess, its due to the dragon unittype being messed up.

It is more likely due to the way skills are set up for this class. 

The custom skills used by Maxi's original Vyrax-class mod (which I left alone apart from their names and descriptions) are some bizarre hybrid between the original dragon boss-skills and some kind of vanilla class-skills whose origin I cannot identify. 

Normal (weapon) attack mechanics do not work with this class, yet somehow all these skills use weapon-damage as a base.  Furthermore, every attack has both humongous splash damage and complicated triggers that I cannot even begin to untangle. 

Since the charge-bar mechanic for the Embermage ("arbiter" in the game files) essentially reduces the cost of skills, I imagine that such unconventional skill-data might break charge-bar functionality. 

NOTE:  Skills are another mechanic I only marginally understand, so keep that in mind. 

EDIT:  Also, you did not really answer my original question.  What I am really looking for is an "Idiot's Guide to Charge-Bar Internals" (or something to that effect). 

And yes, I do imagine that would be a huge topic to cover, but a guy can dream.  ;> 
« Last Edit: May 14, 2018, 05:25:18 PM by Lord Nyriox »

Offline Phanjam

  • Operator
  • Legendary
  • *
  • Posts: 2651
  • Country: ph
    • status ready
    • View Profile
  • Mood: mood angel
Re: [TL2] WTFH is the Charge Bar?
« Reply #3 on: May 15, 2018, 03:05:33 AM »
Hey @Lord Nyriox welcome back. Yes chargebars are a fairly big area to cover, so bear with us as we try to phrase a response that is actually helpful ;) I'll come back and edit this post when ive got something...



Offline Sch123

  • 🎮 & 💡
  • Legendary
  • *
  • Posts: 848
  • Country: 00
    • status game
    • View Profile
  • Mood: mood cheesy
Re: [TL2] WTFH is the Charge Bar?
« Reply #4 on: May 15, 2018, 07:02:40 AM »
Quote
Hey @Lord Nyriox welcome back.

And you also @Phanjam, welcome back. :D

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] WTFH is the Charge Bar?
« Reply #5 on: May 15, 2018, 08:03:08 AM »
Hey @Lord Nyriox welcome back.

Hey to you, too!  (And yes, I know I have been gone a long time.) 

Yes chargebars are a fairly big area to cover, so bear with us as we try to phrase a response that is actually helpful ;) I'll come back and edit this post when ive got something...

I am not in any kind of hurry to bash my head against this particular wall, so feel free to take all the time you need.  ;}

EDIT: I have opened a separate topic to ask all the other questions I have regarding this class project, in case anyone wants to help me out a bit. 

Thanks for the support.  :}

« Last Edit: July 29, 2018, 09:07:15 PM by Lord Nyriox »

Offline steffire3

  • Mod_Seeker, Balance_Researcher, Person_Listener.
  • Rare
  • *
  • Posts: 221
  • Country: us
  • I am more active on the Steam Workshop Discussions
    • status busy
    • View Profile
  • Mood: mood smiley
Re: [TL2] WTFH is the Charge Bar?
« Reply #6 on: May 16, 2018, 06:44:34 AM »
@Lord Nyriox If you want a good Charge Bar mix that isn't game breaking yet highly appreciated then just mix Engineer with Outlander Charge Bar bonuses together and try to implement the Charge Used function to empower or affect some of the Dragon Skills and maybe make a custom Dragon Charge Bar Visual Texture... easier said than done I realize.  :D

I do agree that Embermage's 100% Mana Cost Reductions (Free Skill Cost) and Berserker's 100% Critical Chance on Attack and an unknown % Chance boost on Skills is also questionable for balance sake.
At this point after playing Torchlight 2 for 5 years original and modded... ignorant of mods and now wise with compatibility... the one thing I value the most-

-is being able to have "support" from the author of any mod.

I think the only advice I can give is that you don't burn yourself out. ^_^

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] WTFH is the Charge Bar?
« Reply #7 on: May 16, 2018, 09:54:46 PM »
@Lord Nyriox If you want a good Charge Bar mix that isn't game breaking yet highly appreciated then just mix Engineer with Outlander Charge Bar bonuses together and try to implement the Charge Used function to empower or affect some of the Dragon Skills

You are assuming I understand the internal functionality of the charge-bar well enough to even do that much.  Please understand that I am not joking when I say I have no clue about the internals of this mechanic. 

Until someone explains to me exactly how the charge-bar works within the game's code, doing anything with it at all will remain an elusive dream. 

maybe make a custom Dragon Charge Bar Visual Texture... easier said than done I realize.  :D

Actually, finding a dragon-themed charge-bar texture was surprisingly easy.  A user named "icaruspade" had developed a so-called "dragonborn class" a long time ago--and as luck would have it, that mod includes a dedicated charge-bar texture.  It does have some obvious compression artifacts (along with some rather ugly aliasing), but otherwise it is both cool-looking and distinctive. 

I do agree that Embermage's 100% Mana Cost Reductions (Free Skill Cost) and Berserker's 100% Critical Chance on Attack and an unknown % Chance boost on Skills is also questionable for balance sake.

Ugh.  This class is already too OP for my tastes.  No need to blow up the game even more. 


Random Idea:  Perhaps an inverse version instead?  (As in, the charge-bar could apply a debuff that *increases* the mana-cost and *reduces* critical chance, dodge-chance, casting speed, and movement speed.)  Such a "fatigue" mechanic would certainly fit with the style of the class. 

Huh.  I really like that idea.  It could certainly help with the balance issues I have been dealing with. 

Thanks for helping me come up with a charge-bar proposal, @steffire3!  ;>
« Last Edit: July 29, 2018, 09:14:20 PM by Lord Nyriox »

Offline Viz

  • Lowkey Modder
  • Unique
  • *
  • Posts: 355
  • Country: 00
    • status bored
    • View Profile
  • Mood: mood smiley
Re: [TL2] WTFH is the Charge Bar?
« Reply #8 on: May 17, 2018, 02:44:39 AM »
Yes, a charge bar that inflicts debuff to the player is easily doable. 

An example of such charge bar can be seen in a custom class mod called Double Agent.  :)

Offline Sch123

  • 🎮 & 💡
  • Legendary
  • *
  • Posts: 848
  • Country: 00
    • status game
    • View Profile
  • Mood: mood cheesy
Re: [TL2] WTFH is the Charge Bar?
« Reply #9 on: May 17, 2018, 05:10:33 PM »
Hi @Lord Nyriox

Maybe this Mod can give you an idea about making "Monster Charge Bar". :)

- Monster hero.
- Like a Boss Class Pack

In that Mod you can use Boss Monster as a player and they also has own charge bar. ;D

I hope this can helps. :D
« Last Edit: May 17, 2018, 05:27:04 PM by Sch123 »

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] WTFH is the Charge Bar?
« Reply #10 on: May 17, 2018, 06:32:06 PM »
Yes, a charge bar that inflicts debuff to the player is easily doable. 

OK, let me make myself abundantly clear: 

Someone needs to explain to me precisely what code I need to inject into my class to make a charge-bar work at all (including a comprehensive list of every single file that affects or is affected by the original vanilla charge mechanics), or charge-bars for this class WILL NOT HAPPEN

Since this is my first-ever modding project for TL2—I have not even played the game itself yet, except for some basic play-testing of this one mod in the starting area of Act-1—anything regarding mechanics that have changed since TL1 will be completely and utterly over my head.  :\

But I know you were simply trying to be helpful, so thank you anyway.  :} 
« Last Edit: May 17, 2018, 06:44:35 PM by Lord Nyriox »

Offline Anarch16sync

  • The Ripper
  • Developer
  • Legendary
  • *
  • Posts: 556
  • Country: ar
  • Back on track
    • status study
    • View Profile
  • Mood: mood huh
Re: [TL2] WTFH is the Charge Bar?
« Reply #11 on: May 17, 2018, 09:07:51 PM »
From Darkness he awakes, in times of great need... It's told he's a legendary lurker, or some crazy guy, in fact he's just a modder, a very irresponsible and procrastinating modder... Here it is... It's-a me, Anarch16sync. Hi guys, just passing by...

OK, let me make myself abundantly clear: 

Someone needs to explain to me precisely what code I need to inject into my class to make a charge-bar work at all (including a comprehensive list of every single file that affects or is affected by the original vanilla charge mechanics), or charge-bars for this class WILL NOT HAPPEN
...

I'm not exactly fresh on the specific file needed for a working charge bar, since I been away from modding almost a year now, so just bear with me if I sound a bit unspecific...

Let's start with the basic, what a charge-bar is:
A charge-bar is the visual representation on the UI of the players "charge", like you said charge is a secondary resourse, is like mana.
Now let's go with what Charge is, "Charge" is a stat, a number, that if I recall correcty can go from 0 to 100. Nothing more, noting less. You also have other stat that I think is named "ChargeS" that are used in the enginner bar, so when you have one or more "ChargeS" you consume one to increase the effect of a skill.
Now the effects of a charge-bar, in the vanilla classes, are triggetable effects aplied to the character on creation. Triggetables are conditional effects, something like: If charge=100, give 3000 per second to the player for 5 seconds (That I think is what the Embermage chargebar does).
 Now, the vanilla charge is somewhat hardcoded if recall correctly to increase with normal attacks,  and with skills that have the "produce charge" flag to true.
 So there you have the basics working of a charge-bar, an UI piece that tracks the "charge" stat, and a triggetable effect attached to the class that uses the value of charge as a condition to do something, the embermage charge bar and the Outlander are the simplest ones to analise, one does something when is full, the other does something when is empty and give bonus based on the value of the charge stat.
 
 Now what  this is talking about is of a method that instead of aplaying a triggetable effect to the character, gives him a passive skill that does the work, and what that let's you do is balance your charge-bar effects without the need of strange measures to fix old characters, because a triggetable effect aplied directly to a characters is applied on character creation, and if you change that effect the only characters affected by the change are new created characters. If you use the passive method you can buff, nerf, overhaul or whatever to your charge-bar passive effects and every character will get the changes. If I recall correctly a good passive to base your charge passive is the "share the wealth" skill of the outlander that basicly gives a bonus effect based on the charge value (it has a layout attached to give the effect to other party members so you have to remove that part, and make it only affect the player)

Now like the charge is just like any other stat, and the charge-bonus are like any other bonus, you can do a lot of stuff with the "mechanics" of a charge-bar, some cool concepts but with a bit of tricks to them are for example the chargebars for the Destroyer (two charge-bars that charge independantly with different conditions, and give different bonus) or the Alchemist Charge-bar (only increase charge with skill usage, gives bonus based on value but triggers a negative effect when full) both in the TL1CP.

Hope this helps, if you need clarification on any thing... I'll try to give it, but maybe the other torchmodders can take it from here, since I'm really rusty on specific files and code lines.

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] WTFH is the Charge Bar?
« Reply #12 on: May 17, 2018, 10:31:38 PM »
From Darkness he awakes, in times of great need... It's told he's a legendary lurker, or some crazy guy, in fact he's just a modder, a very irresponsible and procrastinating modder... Here it is... It's-a me, Anarch16sync. Hi guys, just passing by...


Thanks for the explanation, @Anarch16sync!  I should be able to draft a prototype Charge mechanic with that information. 

« Last Edit: May 22, 2018, 12:36:47 AM by Lord Nyriox »

Offline Phanjam

  • Operator
  • Legendary
  • *
  • Posts: 2651
  • Country: ph
    • status ready
    • View Profile
  • Mood: mood angel
Re: [TL2] WTFH is the Charge Bar?
« Reply #13 on: May 30, 2018, 08:47:00 AM »
Hi @Lord Nyriox pardon the delay in replying.

I composed a reply then saw that @Anarch16sync also answered, so pardon yet again if my answer doesnt flow smoothly from or into his (or Viz's or Steffire's lol).

So anyway I'll use the Arbiter's charge bar setup as the reference point for this short aswer to the question How does the Arbiter get those EFFECTs of "zero mana cost" and increased cast speed when their chargebar gets full?

The Arbiter's unit .DAT file specifies an "ADD TRIGERRABLE" EFFECT for the Arbiter unit, the "ARBITER_AVATAR" triggerable.

As the name implies, triggerables trigger something.  The conditions for the trigger to fire are in the first part of the triggerable's .DAT. I'm not well-versed with these, so I'll point you to Triggerables page on our wiki for details on those.

The ARBITER_AVATAR triggerable turns out to be a TRIGGERSKILL type of triggerable (there are only a few different types). So, as near as I can figure, because of that line "<STRING>SUBTYPE:MAXEDCHARGE" in the triggerable, when your Embermage hits maximum charge the named skill ("AVATAR") will trigger.

The AVATAR skill in turn adds the affix which gives the "zero mana cost" and increased cast speed effects (the "ARBITER_AVATAR" affix) and another to alter the charge mechanics for the duration of the affix (the "ARBITER_AVATAR_NO_DISPLAY" affix).

Weird how nothing so far references the "chargebar" itself! That's because the actual chargebar is just a graphical device at the end of all this stuff. It's driven by the ARBITER_AVATAR affix and displays whatever that affix is giving to the Arbiter at any point in time while it's active. And that's why there's that funny line in the Arbiter unit .DAT...

   [CHARGE_AFFIXES_TO_WATCH]
      <STRING>AFFIX:ARBITER_AVATAR
   [/CHARGE_AFFIXES_TO_WATCH]

« Last Edit: May 30, 2018, 08:49:42 AM by Phanjam »



Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] WTFH is the Charge Bar?
« Reply #14 on: May 30, 2018, 10:11:58 PM »
Hi @Lord Nyriox pardon the delay in replying.

I composed a reply then saw that @Anarch16sync also answered, so pardon yet again if my answer doesnt flow smoothly from or into his (or Viz's or Steffire's lol).

So anyway I'll use the Arbiter's charge bar setup as the reference point for this short aswer to the question How does the Arbiter get those EFFECTs of "zero mana cost" and increased cast speed when their chargebar gets full?

The Arbiter's unit .DAT file specifies an "ADD TRIGERRABLE" EFFECT for the Arbiter unit, the "ARBITER_AVATAR" triggerable.

As the name implies, triggerables trigger something.  The conditions for the trigger to fire are in the first part of the triggerable's .DAT. I'm not well-versed with these, so I'll point you to Triggerables page on our wiki for details on those.

The ARBITER_AVATAR triggerable turns out to be a TRIGGERSKILL type of triggerable (there are only a few different types). So, as near as I can figure, because of that line "<STRING>SUBTYPE:MAXEDCHARGE" in the triggerable, when your Embermage hits maximum charge the named skill ("AVATAR") will trigger.

The AVATAR skill in turn adds the affix which gives the "zero mana cost" and increased cast speed effects (the "ARBITER_AVATAR" affix) and another to alter the charge mechanics for the duration of the affix (the "ARBITER_AVATAR_NO_DISPLAY" affix).

OK.  That explains how "burst"-type Charge mechanics work (Berserker / Embermage), but what about "scaling"-type Charge mechanics (like the Outlander)? 

Weird how nothing so far references the "chargebar" itself! That's because the actual chargebar is just a graphical device at the end of all this stuff. It's driven by the ARBITER_AVATAR affix and displays whatever that affix is giving to the Arbiter at any point in time while it's active. And that's why there's that funny line in the Arbiter unit .DAT...

   [CHARGE_AFFIXES_TO_WATCH]
      <STRING>AFFIX:ARBITER_AVATAR
   [/CHARGE_AFFIXES_TO_WATCH]

So the "CHARGE_AFFIXES_TO_WATCH" value is linked to the Charge GUI, not the internal mechanics of it.  I was wondering about that. 

Is there some kind of "hard-link" between the Charge-watcher and the bar GUI, or can they be independently tweaked somehow? 

Tags:
 

* Quick Search


* Member Information

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Mod Boards Activity

* Who's Online

  • Dot Guests: 2
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Calendar

May 2019
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 [20] 21 22 23 24 25
26 27 28 29 30 31

No calendar events were found.

* Recent Topics

Darkened TL2 UI (Re-texture Mod) by Sch123
[Today at 03:15:13 AM]


FEP+ April 2019 Update by Phanjam
[May 19, 2019, 10:34:51 PM]


Skills Expansion: Bugs Report & Ideas by Sch123
[May 16, 2019, 10:54:27 AM]


Charge Domination % by TwinkleToes
[May 11, 2019, 04:33:57 AM]


[Help Request] Putting Custom Dungeons Into Vanilla Zones by Phanjam
[May 09, 2019, 02:19:19 AM]


Triggerable Weapons by Phanjam
[April 29, 2019, 11:15:57 AM]


Need Help: Getting Translation into game by steffire3
[April 25, 2019, 10:23:02 PM]


Destroyer Rebalance by Phanjam
[April 15, 2019, 06:10:08 AM]


FEP+ by LeavingUndad
[April 14, 2019, 06:47:25 PM]


Knowledge-basing For Level & Quest Making by Phanjam
[April 13, 2019, 01:51:42 PM]


Pet Variants Mod by Phanjam
[April 11, 2019, 02:53:00 PM]


[IDEA] Maika's Quest (children's mod) by Phanjam
[April 11, 2019, 09:33:41 AM]


Need Help: Template File List by steffire3
[April 10, 2019, 07:21:54 PM]


Deathknight class by Phanjam
[April 10, 2019, 12:47:27 AM]


TL1CP Update 4 - A new baseline (I hope) by Anarch16sync
[April 09, 2019, 03:25:53 PM]

* Popular Topics