Getitemcount and quest items

Post » Tue May 17, 2011 8:03 am

I'm having some problems testing for a quest item.

At one stage in my quest, the player is asked to recover the Ink Container from Arlington (MS15ink). I can successfully use getitemcount in dialog to verify that the player possesses the the ink container and skip that stage, but the same test when used in the quest script does not seem to function.

(Player.getitemcount MS15Ink > 0)

Am I missing something about how GECK counts quest items in inventory or do my problems lie elsewhere?
User avatar
clelia vega
 
Posts: 3433
Joined: Wed Mar 21, 2007 6:04 pm

Post » Tue May 17, 2011 10:06 am

(Player.getitemcount MS15Ink > 0)

This looks completely normal to me. I think it should work.
User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Tue May 17, 2011 5:44 am

There is nothing wrong with the getItemCount so it must be a problem with your quest.
User avatar
chloe hampson
 
Posts: 3493
Joined: Sun Jun 25, 2006 12:15 pm

Post » Tue May 17, 2011 12:40 am

Actually, there is nothing wrong with the quest. I've just been chasing my tail hunting down stupid user tricks. Think its time to go to DisneyLand.
User avatar
Lakyn Ellery
 
Posts: 3447
Joined: Sat Jan 27, 2007 1:02 pm

Post » Tue May 17, 2011 9:00 am

Uhm... Don't you need an "If" in front of that Quest script code snippet?
User avatar
lucile davignon
 
Posts: 3375
Joined: Thu Mar 22, 2007 10:40 pm

Post » Tue May 17, 2011 3:06 am

Just post the result script; there might be a silly mistake that a fresh pair of eyes will spot.

Just a small note about http://geck.gamesas.com/index.php/GetItemCount - because it can only return an integer greater than or equal to 0, and pretty much no optimisation is done to expressions when your script is compiled, it's more efficient to just do this:
if player.GetItemCount MS15Ink
That's as opposed to doing this:
if player.GetItemCount MS15Ink > 0

Cipscis
User avatar
sw1ss
 
Posts: 3461
Joined: Wed Nov 28, 2007 8:02 pm

Post » Tue May 17, 2011 1:42 pm

Show us the entire script. Are you using this in a gamemode block? Menumode? Anything like that could matter as it could be whats stopping the line from ever running.
User avatar
Nathan Maughan
 
Posts: 3405
Joined: Sun Jun 10, 2007 11:24 pm

Post » Tue May 17, 2011 1:12 pm

Snippet is from a quest script. Full segment runs in a game mode block as follows:

IF  (Getstage xCalBOE == 20) && (Player.getitemcount MS15Ink > 0)		SetStage xCalBOE 25	EndIF


A few users have reported problems with the quest stalling at this point 'though they claim they recovered the ink container. At least one person who reported the problem later claimed they resolved it by changing load order.

I suspect there is nothing at all wrong with the code, but there is potentially an unanticipated condition that does not get handled directly. I just can't think what it might be.

As usual Cipscis your advice is sound, but I worry about those unanticipated states like another mod adding additional ink containers.


User avatar
Miragel Ginza
 
Posts: 3502
Joined: Thu Dec 21, 2006 6:19 am

Post » Tue May 17, 2011 3:40 pm

Hey, while I'm hogging a thread, does anyone know why this won't work?

;##################### Stupidity TestIF GetGameLoaded	IF (IsModLoaded xCALIBRmunitions_FOSEnhancements)		Showmessage xCalFUBAR1	ElseIF (IsModLoaded xCALIBRmunitions)		Showmessage xCalFUBAR1	EndIFEndIF

User avatar
Sxc-Mary
 
Posts: 3536
Joined: Wed Aug 23, 2006 12:53 pm

Post » Tue May 17, 2011 10:09 am

Hmm. Well, first off you could just create a unique reference of the ink in order to rid of the probably of compatability with other mods. Also, whats your quests script delay. Maybe they just arent waiting for it the process the script?
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm

Post » Tue May 17, 2011 10:43 am

Hey, while I'm hogging a thread, does anyone know why this won't work?

;##################### Stupidity TestIF GetGameLoaded	IF (IsModLoaded xCALIBRmunitions_FOSEnhancements)		Showmessage xCalFUBAR1	ElseIF (IsModLoaded xCALIBRmunitions)		Showmessage xCalFUBAR1	EndIFEndIF



I've always use quotes for the mod names and it works:

IF GetGameLoaded	IF (IsModLoaded "xCALIBRmunitions_FOSEnhancements")		Showmessage xCalFUBAR1	ElseIF (IsModLoaded "xCALIBRmunitions")		Showmessage xCalFUBAR1	EndIFEndIF

User avatar
Myles
 
Posts: 3341
Joined: Sun Oct 21, 2007 12:52 pm

Post » Tue May 17, 2011 6:27 am

Not a bad idea Gunmaster95, though not the direction I want to go in. I'd rather lead the player to a quest item they might otherwise miss.

Sweet! Thanks RickerHK. I never would have thought of quotes.

FOSE's documentation is just embarrassing. Maybe this community can start a stick thread to pool our collective, hard earned, wisdom (well others wisdom, not mine). I shudder every time I approach a new FOSE command knowing it will be like throwing darts against a wall figuring out the proper use and syntax.
User avatar
Harinder Ghag
 
Posts: 3405
Joined: Wed Jan 17, 2007 11:26 am

Post » Tue May 17, 2011 11:23 am

I missed something from your post - for the IsModLoaded, you need the whole file name with the file extension .esp or .esm, as part of the string, like
IsModLoaded "FO3 Wanderers Edition - Main File.esp"

User avatar
Jinx Sykes
 
Posts: 3501
Joined: Sat Jan 20, 2007 11:12 pm

Post » Tue May 17, 2011 2:36 pm

OK. Good to know. I stripped the file extensions because GECK's compiler choked with them.
User avatar
Paula Rose
 
Posts: 3305
Joined: Fri Feb 16, 2007 8:12 am


Return to Fallout 3