Jump to content

[LE] Scripting help for specific items and unique stands


MelissaS52

Recommended Posts

Greenston

The answer is in the code, you'll find it after you study it.

Unfortunately there isn't too many different ways to make a Miraak's Mask Display script, due to the nature of the elements involved, i can only think of one more way to make this script look different and still be fully functional.

Link to comment
Share on other sites

Here are a few of mine ... 1st one runs off a modified obj/activator. I took a switch (Dungeons\Imperial\Door\ImpButton01.nif) and changed the [primitive] to a sphere.
It's kind of tricky to do as you need to start with an object that has the [primitive] tab. But once you figure it out you can use that same switch for most every activator.

You do need to make static versions of the items that are being enabled or disabled. Place the static version in place and the activator in front of it.
Also uses the Traplever script lever type 2

The 2nd one is a modified container with it's model changed to that orange rectangle (Markers\Misc\InvisibleCollision01.nif) then used as the activator/container.
They are both pretty unique and work really well for anything you want to use them for. Both of these start out with the static Item(s) disabled.

dddd_zpshk1mq0wq.png

The "Marker" in this one is the item itself as in a static version being enabled or disabled. This one was a claw rack and many others.

Scriptname _RGD_EnableMiscRack Extends ObjectReference
;* MiscRack Enable/Disable * By: NexusComa * ; nexusmods.com
ObjectReference Property Marker Auto
MiscObject Property ObjectType Auto
;
Event OnInit() 
 If(Marker.IsDisabled())
  GoToState("Disabled")
 Else
  GoToState("Enabled")
 EndIf
EndEvent
;-----------------------
State Disabled
 Event OnActivate(ObjectReference akActionRef)
  If(Game.GetPlayer().GetItemCount(ObjectType) > 0)
   Game.GetPlayer().RemoveItem(ObjectType)
   Marker.Enable()
   GoToState("Enabled")
  EndIf
 EndEvent
EndState
;-----------------------
State Enabled
 Event OnActivate(ObjectReference akActionRef)
  Game.GetPlayer().AddItem(ObjectType)
  Marker.Disable()
  GoToState("Disabled")
 EndEvent
EndState
;

This one is for a lot items of the same type. In this case it was Ingots. Again I made static a version of the ingot placed them in a nice stack then loaded them up in the array.

ScriptName _RGD_IngotStack Extends ObjectReference
;* Ingot Stack * By: NexusComa * ; nexusmods.com
ObjectReference[] Property Ingot Auto
MiscObject Property IngotType Auto
Actor Property PlayerRef Auto
Int Property IngotMax Auto
Int r0 = 0
Int r1 = 0
;
Event OnInit()
 GoToState("Done")
EndEvent
;
Event OnActivate(ObjectReference akActionRef)
 If(akActionRef==(PlayerRef))
  r0=(Self.GetItemCount(IngotType))
 Endif
EndEvent
;
Event OnItemRemoved(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
 If(akBaseItem==(IngotType))
  Stack()
 Endif
EndEvent
;
Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
 If(akBaseItem==(IngotType))
  If((aiItemCount+(r0))<=(IngotMax))
   r0+=(aiItemCount)
  Else
   r0=(IngotMax)
   Self.RemoveItem(akBaseItem, Self.GetItemCount(akBaseItem)-(r0), true, akSourceContainer)
  Endif
  Stack()
 Else
  Self.RemoveItem(akBaseItem, aiItemCount, true, akSourceContainer)
 Endif
EndEvent
;
Function Stack()
 r1=(0)
 r0=(Self.GetItemCount(IngotType))
 While(r1<(IngotMax))
  If(r0>(r1))
   Ingot[r1].Enable()
  Else 
   Ingot[r1].Disable()
  Endif 
  r1+=(1)
 EndWhile 
EndFunction
;
State Done
 ;do nothing
EndState
;
Edited by NexusComa
Link to comment
Share on other sites

They will work with anything ... look I'm stacking gems ... Totally generic. You may need to switch the item type but that's it.
What you're looking at are static versions of the real items. You can make anything a static version. You could stack/shelf anything in the game
this way. Even weird things you normally wouldn't ever be able to. The array ones will even show them in the order you added then to the array.
So every number looks great. I add 5 to the stack 5 bars in the front show and so on ... The other one is for single objects. That one can do
anything too. Just set it to the right item type of object. They don't work like any other shelf's you've ever seen.

Edited by NexusComa
Link to comment
Share on other sites

They will work with anything ... look I'm stacking gems ... Totally generic. You may need to switch the item type but that's it.

What you're looking at are static versions of the real items. You can make anything a static version. You could stack/shelf anything in the game

this way. Even weird things you normally wouldn't ever be able to. The array ones will even show them in the order you added then to the array.

So every number looks great. I add 5 to the stack 5 bars in the front show and so on ... The other one is for single objects. That one can do

anything too. Just set it to the right item type of object.

 

Dig in a little bit deeper and you will see the problem, you do have the necessary skills to spot it !.

Link to comment
Share on other sites

I've done them masks ... The single version can be focused on any item ... one at a time. Yes they will need to be modified a bit.
Each one of them claws have the property aimed at that claw. That's just how you would do it with them masks with armor.

What do you mean do I have the skills ... I was the one that answered the 1st question you ever asked here.

Your script is aimed right at them masks I see that ... good work too. These can be used for anything with a little tweaking.

Edited by NexusComa
Link to comment
Share on other sites

NexusComa
"What do you mean do I have the skills"
I mean that you know scripting.
Read carefully, i wrote " you do have the necessary skills" and not " do you have the necessary skills ".
"I was the one that answered the 1st question you ever asked here."
Do you mean 12 years ago...
* I've been modding since Quake & Unreal release its first editor (i don't remember which one was first), and even older than those if you count Red Alert as modding.

 

* This is not a contest, if you have a valid answer to provide unconditional support to a fellow modder, then please do !, everything else is irrelevant !.

 

Edit : Typo... Stupid keyboard is full with bread and cookie crumbs !

Edited by maxarturo
Link to comment
Share on other sites

The question was answered in the 1st few reply's ... but the title says "specific items and unique stands" For anyone else looking for this I offered a few of my more unique setups.

Sorry If I read that wrong. Guess I'm getting old. Yes, that many years ago. I have never looked at any of this like a contest. I've made so many mods I just happen to have a mega library of
different ways of going about things. (I don't post my mods here as it seems people don't want well thought out mods. They want boobs). One person asked this question with one type of problem.
But many will look at this for unique stand ideals. So I just gave a totally different angle. Take it or leave it ... Please don't get offended over my lack of tact. It's all good and all relevant.

Link to comment
Share on other sites

Hey guys,

 

Thanks a lot for the replies.

As I'm new to modding myself, I'm always glad to receive tips and tricks about it.

 

This method you shared looks very interesting, NexusComa, thank you for that.

I'll most certainly mess around with that in the future.

You mentioned that you don't post mods here, because of the ridiculous amount of "adult-mods".

Where do you post them, then? Because I prefer "Well thought out mods" over virtual skyrim boobs anytime.

 

Haven't used your script yet, Maxarturo. Been too busy irl to load up the Creation Kit.

But I will as soon as I have the chance.

 

Maybe another quick question: How do I include these scripts in the final esp? I currently don't have a bsa for my mod as it only uses vanilla assets. Or do I need to make one now that I have scripts?

 

Thanks

Link to comment
Share on other sites

  • Recently Browsing   0 members

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