Jump to content

A GECK function that checks if the player has ingested something? [New Vegas]


PsychorGames

Recommended Posts

Let's say I want the Player's carry weight to increase after eating Brahmin Meat. How would I go about doing that?

 

I could theoretically make a script that just checked how many Brahmin Meat's were in the Player's inventory, and when one was removed, the script that increased the Player's carrying capacity would run.

 

But in that case, I would have to pray that the player wouldn't discover that he could just get the carry weight bonus by dropping the Brahmin Meat from his inventory, or placing the Brahmin Meat in a container.

 

So, is there a function I can use that will just get whether the Player has eaten the Brahmin Meat or not? Anything in NVSE?

 

-

 

This is for a new mod I'm making called "Survival and Medicine Revolution". If you play New Vegas, and you haven't seen my last revolution, "Unarmed and Melee Revolution", I highly recommend it! Thanks for the help!

Link to comment
Share on other sites

Couldn't you just use the increase carry weight effect right on it, bypassing the need for any scripting?

 

I mean, I've only ever used it on armor and creatures, but is there anything to stop it from being used on a consumable?

I could probably add that effect to the item itself, but I only want the effect to occur during specific circumstances. I guess I should have prefaced with that. I don't want the Brahmin Meat to increase the Player's carry weight all the time.

 

I guess I might as well just explain my mod idea. This is how it works.

 

If you crouch near a campfire you have the ability to cook your food (as long as there is a frying pan in your inventory). A menu will pop up asking you if you want to cook your food. If you select yes, all the food in your inventory will be "Well-Cooked" and eating certain foods will give you certain bonuses. Brahmin Meat and Brahmin Steak will increase your carrying capacity by 100. Dog Meat and Coyote Meat will increase your Agility by 5 and Luck by 5. Maybe Pinyon Nuts will increase your Endurance. Maybe Broc Flower will increase your charisma. Basically, when you are "Well-Cooked", food items give you cool bonuses when eaten. The "Well-Cooked" effect wears off over time, but you can get it again by going to a campfire with a frying pan in your inventory.

 

I don't want to edit the ingestibles themselves, because there are other mods that edit ingestibles, and I don't want my mod and theirs to interfere.

Link to comment
Share on other sites

[sUCCESSFULLY RESOLVED]

 

It took me all day, but I finally figured out how to do what I wanted. The solution is actually charmingly simple.

if player.isspelltarget BrahminMeat
          ; do thing
endif

To any future readers, you're welcome.

 

At one point I gave up on looking for a function to see what the player had ingested, and was instead looking for a way to scan the player's nearby surroundings for dropped food items, that way I could disable the bonuses granted if the script detected that the food was simply removed by dropping and not by actually eating. That went nowhere and was overly complicated anyway.

Link to comment
Share on other sites

 

At one point I gave up on looking for a function to see what the player had ingested,

 

Sorry no function of ingestion. but the out put of the ingestible could give the player a perk ... which you could then check if the player has that perk. Therefore your script would know if the player had ingested something.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...