A way to override existing commands in HD Admin v2
I was thinking about modifying the music command in HD Admin to use a more modern audio system, so I was wondering if it would be possible to override existing commands in HD Admin v2.
I was thinking about modifying the music command in HD Admin to use a more modern audio system, so I was wondering if it would be possible to override existing commands in HD Admin v2.
Thanks; I ended up asking for this because I'm interested in using the latest audio API.
@ForeverHDTeam ·
there's currently two ways depending on what you need to do:
for a small change, the easiest thing to do is use
modifyin your loader's ConfigCommandsMod. it hands you the command table before it loads, so you can swap out itsrun(or wrap the original), for example:for a full command re-write, you have to first exclude internal one by doing
exclude = {"music"}in ConfigCommandsMod, then you can create a new"music"command entirely, for example under your Custom command module.the
excludestep is required right now, but i'd like to improve this in the future by having any custom command you write replace the internal one straight away (without this unnecessary step), so thanks for the suggestion. will share an update here when that's finished.you can also find the docs for creating commands at hdadmin.com/commands and hdadmin.com/custom-commands