Git Product home page Git Product logo

Comments (2)

amis92 avatar amis92 commented on August 17, 2024

Negative value

I've investigated negative values in detail.

Generally, negative values work "as normal", except "-1" for a type=max constraint, which is equivalent to no limit. The logic might not be tied to max, but for min a non-positive value is the same as no limit anyway. Do note, that any other negative value for a max is processed as that value (and not as "no limit").

BattleScribe Data Editor does some additional validations on value:

  • for Repeats, it must be positive
  • when "value is percentage", it must be between 0 and 100

As an interesting quirk, when an entry has a constraint of type=min scope=parent value=0, the entry is hidden in Roster Editor, as it's not allowed to be selected. As expected, using a Modifier to Set that constraint's value to -1 makes this entry selectable (unlimited) and it's correctly shown in Roster Editor. However, when using a Modifier to Decrease the value by 1 (making it 0 - 1 = -1 - unlimited), the Roster Editor does not show the entry (incorrectly?), as that entry is unlimited due to the new value of max constraint.

from phalanx.

amis92 avatar amis92 commented on August 17, 2024

Filter entries

In different comparison/field/scope combinations, different entries are allowed as filters. We'll use numeric comparison to mean all comparison operators that operate on numbers - that excludes the (not)-instance-of comparisons. Those will be called instance-of comparison.

Field selections or Costs

When field is selections or a specific Cost or Cost Limit, the following rules apply.

The comparison must be numeric (for instance-of the field is disabled, and so cannot have value).

scope=self and scope=parent allows filter to be:

  • any, unit, model, upgrade;
  • any Category Entry;
  • any Shared Selection Entry or Shared Selection Entry Group, or any of their descendant selection entries and groups;
  • any descendant selection entry or group of the resolved scope entry.

scope=force and scope=roster allows filter to be:

  • any, unit, model, upgrade;
  • any Category Entry;
  • any Shared Selection Entry or Shared Selection Entry Group, or any of their descendant selection entries and groups;
  • any Force Entry;
  • any Root Selection Entry or any of their descendant selection entries and groups.

scope=specific entry allows filter to be:

  • any, unit, model, upgrade;
  • any Category Entry;
  • any Shared Selection Entry or Shared Selection Entry Group, or any of their descendant selection entries and groups;
  • any descendant selection entry or group of the resolved scope entry.

Field disabled

When comparison is instance-of, the field is disabled and the following rules apply.

scope=self, scope=parent and scope=ancestor allows filter to be:

  • any, unit, model, upgrade;
  • any Category Entry;
  • any Shared Selection Entry or Shared Selection Entry Group, or any of their descendant selection entries and groups;
  • any Force Entry;
  • any Root Selection Entry or any of their descendant selection entries and groups.

scope=primary-category allows filter to be:

  • any, unit, model, upgrade;
  • any Category Entry.

scope=force allows filter to be:

  • any, unit, model, upgrade;
  • any Category Entry;
  • any Force Entry.

scope=primary-catalogue allows filter to be:

  • any Catalogue.

scope=specific entry allows filter to be:

  • any, unit, model, upgrade
  • any Category Entry.

Field forces

When field is forces, the following rules apply.

The comparison must be numeric (for instance-of the field is disabled, and so cannot have value).

scope=force and scope=roster allows filter to be:

  • any;
  • any Force Entry.

scope=specific Force Entry allows filter to be:

  • any;
  • any Force Entry that is a descendant of the resolved scope force entry.

from phalanx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.