Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Checking Ingredient Count


LegendofThunder
 Share

Recommended Posts

I have a script that pushes every ingredient in the vanilla game through a counter:

Function ingCount(Ingredient iCur, Int stage, Int max, Int pLot)
	float CurrentCount = Game.GetPlayer().GetItemCount(iCur)
	
		if pLot == 0
			if CurrentCount > max
				CurrentCount = max
			endif
			pLOT01AbeceanLongfinCount.Value = CurrentCount
			UpdateCurrentInstanceGlobal(pLOT01AbeceanLongfinCount)
		endif

This is for the Abecean Longfin, if this was the Bear Claws then pLot would be 1 and the rest self explanitory. The end result also increases a global variable counting off how many ingredients have been maxed. Total should be 92.

Function CountAll()
	ingCount(pAbeceanLongfin, 30, 3, 0)
	ingCount(pBearClaws, 40, 1, 1)
	ingCount(pBee, 50, 2, 2)

This works completely and will count all ingredients off to the variable 'max' which is separate for each ingredient on how many are required. As I said, this works almost flawlessly, as when the script starts it begins with the Abecean Longfin.

 

This seems to be where the problem lies, as although every single other ingredient works without fail, the Abecean Longfin seems to get skipped, if I drop enough of them and then pick them up it counts but I need it to check these at the start of the quest in case the player has enough pre-questing to tick off the objective.

 

When the entire thing runs in game it ticks off every ingredient except the Abecean Longfin and the Total is set to 91 which is one short. The Abecean Longfin is the last step here and I can pretty much release this, which I am truly looking forward to as I've spent a good many hours developing this over the last week :)

 

Before anyone suggests it, I have also added the line: ingCount(pAbeceanLongfin, 30, 3, 0) onto the end of the function CountAll() and it still seems to get overlooked.

 

Can anyone help here? I'm fairly certain I've provided enough information but if not please ask me for what you may need :)

 

Thank you so much in advance

LoT

Link to comment
Share on other sites

Yeah just read that and attempted the same thing for the rest. Really don't understand that? All the rest update yet they all return false?

I have just reran it, it actually comes back true after I start the quest. When the quest is started, it runs through and counts all current ingredients in the players inventory to show the correct statistics. They message came back as TRUE but I am still left without the Abecean Longfin completing.

 

EDIT: Nevermind, I've managed to fix it.

Edited by LegendofThunder
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...