Jump to content

"Equipping" misc items


GodofAlcohol

Recommended Posts

Does anybody know how to script an event that occurs when a misc item is "Equipped"/clicked in the inventory?

I tried to make such a scrpt for a log time now, but no blocktype seems to "fire" on misc items.

 

Should be just something like this:

 

- i have a misc item, lets say a lunchbox

- when i click on the lunchbox in the inv-screen a messagebox pops up

- now i can decide to eat the lunch or something similiar

 

So i dont want to make the lunchbox an ingestible, i just want to make the player be able to actually DO something with misc items.

 

Other attempt:

- I have te lunchbox in inv.

- now when I get a new specific item, perhaps mirelurk meat, a messagebox appears and lets me choose between several options

 

Would this work with an Object-Script for the lunchbox and an "begin OnAdd player" block ?

 

Thanks for any help

Link to comment
Share on other sites

Does anybody know how to script an event that occurs when a misc item is "Equipped"/clicked in the inventory?

I tried to make such a scrpt for a log time now, but no blocktype seems to "fire" on misc items.

 

Should be just something like this:

 

- i have a misc item, lets say a lunchbox

- when i click on the lunchbox in the inv-screen a messagebox pops up

- now i can decide to eat the lunch or something similiar

 

So i dont want to make the lunchbox an ingestible, i just want to make the player be able to actually DO something with misc items.

 

Other attempt:

- I have te lunchbox in inv.

- now when I get a new specific item, perhaps mirelurk meat, a messagebox appears and lets me choose between several options

 

Would this work with an Object-Script for the lunchbox and an "begin OnAdd player" block ?

 

Thanks for any help

Whenever changing vanilla objects be sure such alterations aren't breaking something important. This lunchbox, for instance, is part of a schematic for some kind of grenade (bottlecap?), it seems.

 

Indeed vanilla objects should never be touched, at least while the game is still new and not even DLCs were launched, who knows what the softhouse is planning for it?.

 

Coming back in topic: Yes, OnAdd acts once something is added to the inventory. Just be aware it does not trigger anything if already there (where OnEquip may help). But the script for your last scenery will never be activated this way if placed in the lunchbox (BTW, this script would activate only when the lunchbox is added to inventory).

Link to comment
Share on other sites

Thanks for the answer.

 

I dont want to touch vanilla objects, but my problem is that i have to make every (custom) usable item ingestible,armor or weapon, because otherwise i cant do anything with them, except selling or dropping it.

I dont want to flood the Aid section with items that certainly dont belong there (and its annoying when you need to really use chems/stims etc. and have tons of misc items in the aid section).

 

Regarding the fact that even vanilla Books are "ingestible", i think Bethesda hadnt in mind that misc items should be usable.

So Im searching for some trick or something to make custom misc. items that can be "equipped", but i tried many variants without a (satisfying) result. Or even put ingestibles in the misc section (to clean up inventory), but i dont think thats possible either.

 

Next idea was creating a misc item that reacts on an item added to inventory. Kind of the food sanitizer (for which i never found the regarding script) that reacts on food in the inventory and enhances it (does he actually do this?).

 

So if anyone has found a work-around for these problem(s) and wants to share it, I would appreciate it ;)

Even if someone tinkering with the same problem can tell me theres absolutely no way, I could at least stop thinking about it.

Link to comment
Share on other sites

  • 1 month later...
Hi i have a similar enquiry to the original poster except i want to add a few items similar 2 the lucky 8 ball (misc item that adds stats or some other effect) yet i dunno what scrpit i should use, ive had a look at the script for lucky 8 ball, do i copy an paste that in2 a new script and change the effect id to the effect i have created? i havent tried it yet as i dont want 2 ruin my save game.
Link to comment
Share on other sites

  • 2 months later...

stevohall ~

 

Sorry I'm coming a little late to the party here; you may have already found an answer to your question.

 

In order to have a Lucky 8 Ball-esque item, yes, cut and paste the script for the 8 Ball into a blank script, then give it a different scn or scriptname. Remember that if you do something like open the Lucky 8 Ball script, change the name to "scn myPerceptiveCueBallScript" or whatever, and save it, that will OVERWRITE the 8 ball script! Always start a new blank script and paste the old script, then change the scriptname before saving.

 

As for the OnEquip for misc items question, I'm trying some things with Lunchboxes as well, and unless I'm mistaken, Misc Items simply cannot be activated like armor or ingestibles. :wallbash:

 

One workaround is to make a duplicate of the Misc Item which is an Aid Item; when the Misc Item is added to the player inventory, remove it and add the Aid version.

 

Another is to have a special Aid item that can be activated, and which makes any changes you want done to the Misc Item. For example, I wanted to be able to activate Medical Tubing to give the player the option of creating a usable Tourniquet. Instead, I may create a new Doctor's Bag so that when activated it gives you the option of switching the first item for the second. Imperfect, but so's the world.

 

Hope that helps.

Link to comment
Share on other sites

One possible workaround for this would be to create an aid item that, when "used", opens a container. The player could then add misc items to the container in order to "activate" them, and once the container is closed you could check if certain items are present within it, then call RemoveAllItems to return them to the player's inventory.

 

This could potentially cause problems with items that have OnAdd, OnDrop blocks etc. but would also allow for the pseudo-activation of misc objects. Once inventory walking functions are made available with FOSE, this method could be refined a little more.

 

Cipscis

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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