How to install packages using specific directory (or mount) as a "system" directory (OpenIndiana)

I am working on a system where I need to add IPS packages to it, I know you can only install to default directories, but I want to change the default directory in some way, in a complete build of Illumos-gate

Welcome!
Check the man page of your update command.
I don't know OpenIndiana well. Say your update command is

pkg update

Then study its man page

man pkg

It might say -R installroot
Then it is

pkg update -R /install

if your installroot(target directory) is /install

The man page doesn’t explain what -R does or how to use it.

I found the man pages online and finally got a private answer elsewhere. For OpenIndiana, I have to create an image via the image-create subcommand, and once done, run the command sudo pkg -R /path/to/installroot install package-name, and yes the -R comes after the pkg command, not install or update subcommands. Is this a little odd? Maybe. But considering it worked, and @MadeInGermany pointed me in the right direction, I consider this a massive success. Thank y’all!