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 » 12 Nov 2016, 17:17

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.

silentthief
Posts: 435
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Check contents of multiple containers of same ID

Post by silentthief » 13 Nov 2016, 22:06

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
"You like to dance close to the fire, don't you?."

silentthief
Posts: 435
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Check contents of multiple containers of same ID

Post by silentthief » 18 Nov 2016, 04:41

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
"You like to dance close to the fire, don't you?."

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

Re: Check contents of multiple containers of same ID

Post by Jyby » 20 Dec 2016, 23:36

Bumping this post again, maybe we can get a response or a feature request from this.
Macbook Air 2013 - 1.7GHz Intel i7 - 8 GB - 512 GB SSD - Intel HD 5000
Windows 10 PC - 4GHz Intel i7 - 16 GB - 512 GB SSD - EVGA GTX 1060 SSC

User avatar
MiroslavR
Posts: 156
Joined: 12 Feb 2014, 17:45

Re: Check contents of multiple containers of same ID

Post by MiroslavR » 21 Dec 2016, 01:36

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 » 21 Dec 2016, 10:16

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 » 25 Dec 2016, 18:27

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

Post Reply