efosamark / Uberhand-Overlay

The fully craft-able overlay executor.
https://efosamark.github.io/Uberhand-Overlay/
GNU General Public License v2.0
26 stars 4 forks source link

Feature Request: variables #117

Open CatcherITGF opened 2 months ago

CatcherITGF commented 2 months ago

It will make it possible to define parameters in one place and then use them throughout the package. This can be useful for kip offsets. When updating the kip, it will be possible to change only the values of variables that will be applied in all declared places.

Definition:

var SwitchCraft = '/atmosphere/kips/sc_loader.kip'

var SCCustTable = [
  commonCpuBoostClock = 4,
  commonCpuUV = 8,
  marikoCpuMinVolt = 12,
  eristaGpuUV = 16
]

Сalling:

Wizard Configurator

[*UV Level]
catch_errors
json_mark_cur_kip '/switch/.packages/SC Wizard/Configure/CPU/json/eristaCpuUV.json' name SCCustTable.commonCpuUV
hex-by-cust-offset-dec SwitchCraft SCCustTable.commonCpuUV {json_mark_cur_kip(*,dec)}
back

Kip Management:

  {
    "name": "UV Level",
    "offset": "SCCustTable.commonCpuUV",
    "length": "1"
  },

I do not insist on such an implementation, these are just an example of how it can be used.

CatcherITGF commented 2 months ago

var may not be a very good name for a data warehouse in this context. It will depend on the implementation. If they can be redefined anywhere, then yes. And if not, then you can implement const.