Simple Statement en - Glomzzz/RandomItem GitHub Wiki

Declare Sections Simply

The declare simply format:

{id}: '{id}-{type}:{value},{value},{value}'

If you want to let some value be its default value, you could make it empty (don't enter value) (the "," and "," is required!!!)

Just like this:

x: 'x-calculation:(1+(<quality.5>/2)) * \<Example\> * <strength> / 20,100,,,,2'

Now, let's look at the parameters of different section types!

strings

  • substrings : {substring-id};{weight};{values},...

For example:

example: 'example-strings:Example1;10;Hello!,Example2;20;Hi!'

is same as

example:
  type: strings
  strings:
    Example1:
      weight: 10
      values:
        - 'Hello!'
    Example1:
      weight: 20
      values:
        - 'Hi!'

number

  • start
  • bound
  • fixed.integer.max
  • fixed.integer.min
  • fixed.demical.max
  • fixed.demical.min
  • decimal

For example:

strength: 'strength-number:1,20,0,,,,,0'

is same as

strength:
  type: number
  decimal: 0
  start: '1'
  bound: '20'

compute

  • formula
  • max
  • fixed.integer.max
  • fixed.integer.min
  • fixed.demical.max
  • fixed.demical.min

For example:

x: 'x-calculation:(1+(<quality.5>/2)) * <Example> * <strength> / 20,100,,,,2'

is same as

x:
  type: calculation
  max: 100
  fixed
    demical
      min: 2
  formula: '(1+(<quality.5>/2)) * <Example> * <strength> / 20'

javascript

  • script

For example:

script: 'script-javascript:
    var id = "<quality.id>";
    switch(id){
     case "Rough":
     return 0;
     case "Normal":
     return 1;
     case "Fine":
     return 2;
     case "Excellent":
     return 3;
     case "Epic":
     return 4;
     case "Legendary":
     return 5;
     default:
     return 114514;
     }'

is same as

script:
  type: javascript
  script: |
    var id = "<quality.id>";
    switch(id){
     case "Rough":
     return 0;
     case "Normal":
     return 1;
     case "Fine":
     return 2;
     case "Excellent":
     return 3;
     case "Epic":
     return 4;
     case "Legendary":
     return 5;
     default:
     return 114514;
     }

lore

  • value1
  • value2
  • value3
  • ...

For example:

prefix: 'prefix-lore:&7Rough ,&aFine ,&5Epic '

is same as

prefix:
  type: lore
  values:
    - '&7Rough '
    - '&aFine '
    - '&5Epic '

Now, did u get it?

⚠️ **GitHub.com Fallback** ⚠️