Check contents of multiple containers of same ID

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
hlamas
Posts: 7
Joined: 25 Oct 2016, 20:16

Check contents of multiple containers of same ID

Post by hlamas »

Hello,

I'm trying to use the "GetItemCount" console command to make random loot tracking less tedious, ie. so that I don't have to manually check every container in a cell to know if the desired random loot has spawned or not.

I go to Addamasartus and run:

crate_smuggler_01->getitemcount "sc_fphyggisgemfeeder"

It only checks one of the crates, even though there are three. Is there a function that checks / selects multiple instances of a container, eg. using the "GetItemCount" function?

I'm not sure if I'm missing something or whether it's not possible, but I've tried to search the OpenMW and UESP wikis, and Morrowind Scripting wiki, and I couldn't find a way to achieve this.
User avatar
silentthief
Posts: 456
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Check contents of multiple containers of same ID

Post by silentthief »

Maybe Zini can weigh in. I know that there were discussions early on for replicating certain functions from the MWSE scripting -- which included among other things searching by reference (so your scripts could identify a specific guard from all guards in the cell for example).

I dunno how far this is or was being worked on. But if I recall correctly you *should* be able to check this.

Can one of the devs confirm/deny this?

sorry that this reply is not that helpful

ST
User avatar
silentthief
Posts: 456
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Check contents of multiple containers of same ID

Post by silentthief »

Bumping this (*forgive me plz*) hoping that a Dev or someone who might know more on the scripting side could comment on how to do this -- or if it is possible at this time

ST the bumper
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Re: Check contents of multiple containers of same ID

Post by Jyby »

Bumping this post again, maybe we can get a response or a feature request from this.
User avatar
MiroslavR
Posts: 156
Joined: 12 Feb 2014, 17:45

Re: Check contents of multiple containers of same ID

Post by MiroslavR »

No, it's not possible with vanilla functions, and even if we replicated MWSE, it still wouldn't be possible to do via console.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Check contents of multiple containers of same ID

Post by Zini »

IIRC we actually do not have a way to uniquely identify references globally. Any feature of this kind would require a substantial rework on how we handle references. Not sure if we are ever going to do that or choose a different approach.

But for the case given in the OP we should have something in one of the first couple of feature releases after 1.0. The idea here would be to locally grab a list of all references in the current cell and then go through them in a loop. This would require a script that then could be executed from the console.
hlamas
Posts: 7
Joined: 25 Oct 2016, 20:16

Re: Check contents of multiple containers of same ID

Post by hlamas »

Thank you Zini, a simple loop like that would be all I need.
Post Reply