Jump to content

A player.startrepairmenu on a MISC item


Deleted53237921User

Recommended Posts

I am new to PC gaming so bear with me while I fumble and stumble about.

 

I always thought it would be a good idea to have the player able to start the repair menu using their own Repair skill. I have discovered that it is possible via the command console to issue player.startrepairmenu or player.srm and repair all of your items; paying yourself for the work instead of the vendors. It shows how to issue this command in the Example in the documentation for the GECK.

 

Now for my ultimate question. Is it possible to attach this command to an item which the player can carry with them in their inventory and activate from there? If yes, could someone help me to create a mod? I want to learn and this seems like a good place to start.

Edited by Guest
Link to comment
Share on other sites

It should be possible. You could have a script with the line player.showrepairmenu attached to, say, a wrench. You would need to drop the wrench to activate it, then pick it up again while sneaking.

 

You would need to create both a miscellaneous object and an activator with scripts for each. The best place to start would be to look at mods that add objects for activation in this way. One I know of is the Stimpak Refilling Station mod, which adds a item like this (a hotplate).

 

If you have any specific questions just ask.

Edited by blackrat99
Link to comment
Share on other sites

I don't know. You'd have to try it and see. There is a menumode for the inventory, e.g. Begin MenuMode 1002. You'd need to test for the item being present in your inventory, but how would you activate it?

 

I found this in the GECK wiki:

 

Clicking on items in inventory causes the onEquip block to run, not the onActivate block.

  • However, you can make an item run it's own onActivate block in the inventory menu (MenuMode 1008, MenuMode, onEquip, etc.) with Activate player, 1.

What that means exactly I don't know, you'd have to experiment.

 

Maybe instead you can use an onEquip block. If the item can't be equipped you'll get a message to that effect but you may still be able to run the code you want. See this page: http://geck.bethsoft.com/index.php?title=OnEquip.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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