Author Topic: Conditional Format  (Read 1836 times)

markul

  • *
  • Posts: 206
    • View Profile
Conditional Format
« on: 2020-08-22 12:39:39 »
Hi  ;D , one question about the 7th heaven  xml format.
Im triying to load a mod folder with this conditions:
  <ModFolder Folder="Ojos\ojosCloud\Cloud"  >
  <ActiveWhen>
   <And>
      <Option>CloudOjos = 0</Option>
      <Option>gameplay = 1</Option>
      <Option>Byte:0xDC091B = 1</Option>
   </And>
  </ActiveWhen>
  </ModFolder>

But it seems that dont work for the variable  Byte:0xDC091B, (i tried with a 7th heaven variable and it work  and i know that Byte:0xDC091B has the correct value when i test it) i can make this conditions in other way?

unab0mb

  • 7th Heaven Crew
  • *
  • Posts: 405
    • View Profile
    • 7th Heaven Web Site
Re: Conditional Format
« Reply #1 on: 2020-08-27 01:46:59 »
I don't believe that is a correct format. I believe Option is strictly for use in Configure Mod. However, if by some miracle that worked if you added the variable to the var file, then I will note that there was a bug in previous versions of 7H (2.0) that didn't work with custom variables, but that has since been fixed.

With that said, I believe the proper format would be combining these 2 examples in the Help documentation:
http://7thheaven.rocks/help/modhelp.html#conditionalfolders
http://7thheaven.rocks/help/modhelp.html#modoperators

orichalcon

  • It's a sin that somehow
  • *
  • Posts: 438
  • Light is changing to shadow
    • View Profile
    • The Reunion
Re: Conditional Format
« Reply #2 on: 2020-08-27 01:54:57 »

unab0mb

  • 7th Heaven Crew
  • *
  • Posts: 405
    • View Profile
    • 7th Heaven Web Site
Re: Conditional Format
« Reply #3 on: 2020-08-27 02:12:22 »
I don't believe I had the documentation on the web at the time and only had it onboard with 7H itself...and I thought I did mention to check out the onboard help, but maybe I didn't think of it for some reason.

markul

  • *
  • Posts: 206
    • View Profile
Re: Conditional Format
« Reply #4 on: 2020-08-27 12:46:55 »
I don't believe that is a correct format. I believe Option is strictly for use in Configure Mod. However, if by some miracle that worked if you added the variable to the var file, then I will note that there was a bug in previous versions of 7H (2.0) that didn't work with custom variables, but that has since been fixed.

With that said, I believe the proper format would be combining these 2 examples in the Help documentation:
http://7thheaven.rocks/help/modhelp.html#conditionalfolders
http://7thheaven.rocks/help/modhelp.html#modoperators
Oh, thanks ! I tried some combinations and now it seems to work! I didnt know that i could put the "ActiveWhen" tag into the "Conditional " tag  .
<Conditional Folder="Ojos\ojosCloud\Aeris"  >
  <ActiveWhen>
   <And>
      <Option>CloudOjos = 3</Option>
      <Option>gameplay = 1</Option>      </And></ActiveWhen>
      <RuntimeVar Var="Byte:0xDC091B" Values="5" />
</Conditional>