+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Stats ezBlock

Members
Total Members: 129
Latest: Drath3n
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 676
Total Topics: 334
Most Online Today: 3
Most Online Ever: 20
(June 30, 2017, 12:18:50 AM)
Users Online
Members: 0
Guests: 2
Total: 2

Author Topic: As we look at Making Card Headers correct colors  (Read 1339 times)

SAbel

  • Administrator
  • Jr. Member
  • *****
  • Posts: 98
    • View Profile
As we look at Making Card Headers correct colors
« on: July 27, 2015, 04:08:06 PM »
Once we find out what makes a header color for the power cards it would be awesome if we can find a way to make items Yellow/Gold color to make them as different from class/race powers.

Adamos

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: As we look at Making Card Headers correct colors
« Reply #1 on: July 28, 2015, 06:56:17 AM »
That is an excellent idea!

May the Virtues guide thee!

SAbel

  • Administrator
  • Jr. Member
  • *****
  • Posts: 98
    • View Profile
Re: As we look at Making Card Headers correct colors
« Reply #2 on: December 29, 2016, 12:18:50 AM »
still not finding it BUT i ran across this the other day see below POWER call to the howling storm.

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: As we look at Making Card Headers correct colors
« Reply #3 on: February 17, 2017, 04:46:44 PM »
sheet_powercards.dat has this at line 272:

Code: [Select]
      ~if our 'color output' is disabled, do nothing special.
      if (hero.tagis[source.PowCardBW] <> 0) then
        ~do nothing

      ~otherwise, if this is an encounter or at-will power, change the style
      ~appropriately.
      elseif (tagis[PowerUse.Encounter] <> 0) then
        perform portal[letter].setstyle[outTitleEn]
        perform portal[name].setstyle[outTitleEn]
        perform portal[keywords].setstyle[outKeyEn]
      elseif (tagis[PowerUse.AtWill] <> 0) then
        perform portal[letter].setstyle[outTitleAt]
        perform portal[name].setstyle[outTitleAt]
        perform portal[keywords].setstyle[outKeyAt]
        endif

The color for in the DDI for Items is #DA9722 the sub headings for them is #EFD09F and finally the background for them is #F8E9D5. If you want to know how I know that without a subscription to the DDI, you should send me a private message.

To make an option for items to have the item color for their powers, you would add this to the styles_output.aug around line 258 (near the at will and encounter versions) to give an option for a "outTitleIt" and "outKeyIt":
Code: [Select]
  <!-- title & keyword text for item granted powers - gold background -->
  <style
    id="outTitleIt">
    <style_output
      textcolor="f0f0f0"
      backcolor="DA9722"
      font="ofnttitle"
      alignment="center">
      </style_output>
    </style>
  <style
    id="outKeyIt">
    <style_output
      textcolor="f0f0f0"
      backcolor="DA9722"
      font="ofntkeywrd"
      alignment="center">
      </style_output>
    </style>

After that is put in the styles_output.aug file, you can change the color script:

Code: [Select]
      ~if our 'color output' is disabled, do nothing special.
      if (hero.tagis[source.PowCardBW] <> 0) then
        ~if it's a daily check to see if it's magic.
      elseif (tagis[PowerUse.Daily] <> 0) then
        if (hero.tagis[PowerClass.MagicItem] <> 0) then
            perform portal[name].setstyle[outTitleIt]
          endif
      ~if its daily but not magic, leave it like it is (I guess daily is default?)
      ~otherwise, if this is an encounter or at-will power, change the style
      ~appropriately.
      elseif (tagis[PowerUse.Encounter] <> 0) then
        ~if the power is from a magic item, change the title to be gold
        if (hero.tagis[PowerClass.MagicItem] <> 0) then
            perform portal[letter].setstyle[outTitleEn]
            perform portal[name].setstyle[outTitleIt]
            perform portal[keywords].setstyle[outKeyAt]
          ~if it's not from a magic item, it's normal, so give the whole thing the power color
          else
            perform portal[letter].setstyle[outTitleEn]
            perform portal[name].setstyle[outTitleEn]
            perform portal[keywords].setstyle[outKeyEn]
          endif
      elseif (tagis[PowerUse.AtWill] <> 0) then
        if (hero.tagis[PowerClass.MagicItem] <> 0) then
            perform portal[letter].setstyle[outTitleAt]
            perform portal[name].setstyle[outTitleIt]
            perform portal[keywords].setstyle[outKeyAt]
          else
            perform portal[letter].setstyle[outTitleAt]
            perform portal[name].setstyle[outTitleAt]
            perform portal[keywords].setstyle[outKeyAt]
          endif
        endif

That should theoretically make the power type letter in the corner and the keywords show up as the color of the power, but the title as Gold. If we want the keywords to be gold, change the lines with outKeyAt or outKeyEn to outKeyIt (but only the ones that test for the magic item). I am assuming that daily powers are the default color scheme (grey) which is why if everything is set to no color it skips the color phase, and also why there isn't a daily section. So I added a daily section and only modified the Title to make it gold.

I don't remember if CDATA scripts like this one choke when they have more than one if/endif nested. I don't think so, but the only way to know for certain will be to test it. Because these are all background files the changes can't be made with a .user file, or I would include one for some other sucker to test.

If I get a chance I'll test it tonight, but this computer doesn't have HL on it. I mean, why would I have Hero Lab on my work computer? That would be ridiculous. Almost as ridiculous as having a full copy of the code files on the work computer.

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: As we look at Making Card Headers correct colors
« Reply #4 on: February 17, 2017, 05:17:38 PM »
The real question here is not how to change the colors of cards, but WTF is going on with that racial power that makes it do that.

The power doesn't have any special anything ("PowerClass" is "Race" but that's it). The powercards file where it formats the cards doesn't have a special rule for racial powers - there is no check for Race in there (but if this works for MagicItem, it will be trivial to make it work for Race as well if we want to format Racial powers differently). There isn't a style output for race that seems to apply, and after that I'm out of places to look for it. Do other Racial encounter powers do this? Dailies? It might do it with At-Wills, but we wouldn't be able to tell because it would just be green.

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: As we look at Making Card Headers correct colors
« Reply #5 on: February 18, 2017, 01:28:33 AM »
Wait, all of the encounter powers are failing to have the right colored top bar? How long has this been happening? Or is it just me (I know it's at least a little bit not me, because SAbel posted a picture of what's happening)?

I've actually spent the last hour rolling back my data files trying to discover where it all went wrong - I have a few character pdfs that were created in December 2014 that are correct (red bars for encounter powers). I've gotten to the point that using the 2014 profiles with 2014 data files still give me the messed up bar. The files that old wouldn't load without fixing the definitions file, because there was an issue that the newer versions of HL don't allow anymore, but after that everything loads. But when I generate the exact same character sheets from the exact same data and profile files it gives me the screwed up bar for encounter powers.

At this point, it's one of two things causing the problem. Windows 10 or a newer version of Hero Lab - I can possibly get a VM spinning to to test the Windows version idea, but I don't have backups of my download folders, so I can't roll that back to get a past version, and the website only has the newest flavor. I'm inclined to believe they broke something in the program - the fact that the 2014 files wouldn't even run without modification proves they at least did /something/ to the program, even if that change isn't the one that broke the encounter power cards.

The script also doesn't work. It doesn't seem to do anything at all. I didn't find a magic item with a daily power that was an actual power rather than just fluffy description of the power that should be, so I don't know if that would work, but the encounter one is definitely not working - which is no shock because the normal version of the encounter power is also not working.


dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: As we look at Making Card Headers correct colors
« Reply #6 on: February 18, 2017, 01:49:02 AM »
The code actually works fine - with a change. I botched part of the code, so it wasn't detecting the magic item part of the power, because it was searching the character for the tag, not the power. Oops.

Code: [Select]
      ~if our 'color output' is disabled, do nothing special.
      if (hero.tagis[source.PowCardBW] <> 0) then
        ~if it's a daily check to see if it's magic.
      elseif (tagis[PowerUse.Daily] <> 0) then
        if (tagis[PowerClass.MagicItem] <> 0) then
            perform portal[name].setstyle[outTitleIt]
          endif
      ~if its daily but not magic, leave it like it is (I guess daily is default?)
      ~otherwise, if this is an encounter or at-will power, change the style
      ~appropriately.
      elseif (tagis[PowerUse.Encounter] <> 0) then
        ~if the power is from a magic item, change the title to be gold
        if (tagis[PowerClass.MagicItem] <> 0) then
            perform portal[letter].setstyle[outTitleEn]
            perform portal[name].setstyle[outTitleIt]
            perform portal[keywords].setstyle[outKeyAt]
          ~if it's not from a magic item, it's normal, so give the whole thing the power color
          else
            perform portal[letter].setstyle[outTitleEn]
            perform portal[name].setstyle[outTitleEn]
            perform portal[keywords].setstyle[outKeyEn]
          endif
      elseif (tagis[PowerUse.AtWill] <> 0) then
        if (tagis[PowerClass.MagicItem] <> 0) then
            perform portal[letter].setstyle[outTitleAt]
            perform portal[name].setstyle[outTitleIt]
            perform portal[keywords].setstyle[outKeyAt]
          else
            perform portal[letter].setstyle[outTitleAt]
            perform portal[name].setstyle[outTitleAt]
            perform portal[keywords].setstyle[outKeyAt]
          endif
        endif

This will work. Except it doesn't because the [name] is always changed to At-Will Green. I know the code works otherwise because if you set the [letter] to [outTitleIt] it makes that gold. Similarly you can change the letter of the encounter powers to Gold by changing the appropriate section.

Additionally if you change the At-Will (non-magic item) section to have gold or red as the style, it changes all of the bars that are green (At-Will and Encounter) into whatever style picked. I assume the same is the case for the keyword bar, but I didn't bother trying.

Cryptoknight

  • Administrator
  • Sr. Member
  • *****
  • Posts: 260
    • View Profile
Re: As we look at Making Card Headers correct colors
« Reply #7 on: February 21, 2017, 06:56:06 AM »
It was a change to Herolab.  I remember it kicking in and then having no clue what happened.

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: As we look at Making Card Headers correct colors
« Reply #8 on: February 23, 2017, 03:24:01 PM »
It is such a strange issue that I can't get a handle on working around it. The weirdest part is how it changes what colors it uses depending on if the power cards are landscape or portrait. I've submitted a support request with Lone Wolf, but I'm not sure how far we will get. Does anyone know if we tried to get the developer involved when it first went wrong?

 

+-Recent Topics

Total Newb... but... by Johnny B Evil
November 19, 2017, 02:47:52 PM

Feat Valenar Weapon Training by Eldyn
October 13, 2017, 08:53:03 PM

Making Utility Powers? by dmayhew469
July 07, 2017, 02:11:16 PM

4e license question by Cryptoknight
June 25, 2017, 09:28:29 PM

Remove/increase limit on Temporary Adjustment value? by Fox Lee
June 22, 2017, 07:30:45 PM

Add the INit modifier for Battle Harness by dmayhew469
June 15, 2017, 08:27:12 PM

Change Attack Ability by dmayhew469
June 15, 2017, 07:57:20 PM

How to allow resistance show up by dmayhew469
June 12, 2017, 04:05:57 PM

Would somebody like to take this over? by dmayhew469
June 09, 2017, 02:02:12 PM

Inherent Bonuses by dmayhew469
June 09, 2017, 01:59:28 PM

No Class or Race options by rkjanik
June 06, 2017, 01:57:21 AM

Spy by Mckinley
May 25, 2017, 02:06:57 AM

Is there a guide out for how to build a race by SAbel
May 05, 2017, 11:59:46 PM

Please read this and weigh in - Issue/Source/Document Version Control System by Charlie
April 27, 2017, 09:54:40 PM

Request Access to the CodePlex System by Charlie
March 03, 2017, 10:47:03 PM

Vampire class by Fox Lee
February 26, 2017, 05:29:29 AM

As we look at Making Card Headers correct colors by dracusmage
February 23, 2017, 03:24:01 PM

Question Involving Twofold Pact for Warlock by dracusmage
February 16, 2017, 02:52:32 AM

Daily Powers by Charlie
February 15, 2017, 06:31:00 PM

Missing Fighter? by dracusmage
February 13, 2017, 10:41:45 PM

Armor at Paragon and above by dracusmage
February 13, 2017, 06:52:16 PM

Help applying bonus damage (x + modifier) to class powers by Fox Lee
January 18, 2017, 06:16:49 AM

Cavalier Summon Steed Patch by Fox Lee
January 15, 2017, 01:00:56 AM

Fey Beast Companions (HotF) by Fox Lee
January 12, 2017, 07:49:08 PM

Has anyone worked with the Warlock (Binder) by SAbel
December 29, 2016, 11:43:17 PM

Powered by EzPortal