Jump to content

Enchanted Ship In a Bottle (Player Home)


NexusComa

Recommended Posts

Today is my Birthday! ... woot!
But it's me giving out the gifts :tongue:

 

A fully envisioned version of this mod. Now with four room bounding for smooth occlusion.
It took me a bit but I finished off the decorations and added a few new surprises.
Optimized the mod in the editor also (names, scripts, .bsa load /size).

Guess I should add the link ... Enchanted Ship in a Bottle

Edited by NexusComa
Link to comment
Share on other sites

Well 4.0 had a total of 3 errors. One that had to go. Also fixed a double load problem under certain circumstances. Really made sure to test the mod fully.
Everything is working better than ever. You will how ever need to remove old saves and start the mod on a fresh save. Sorry about that. This time it's a must.

Added new stacking crates and it gave me a chance to use an old favorite script ...



Scriptname Ship00_Crates extends ObjectReference
;* Misc Rack * By: NexusComa * ; nexusmods.com
ObjectReference[] Property Item Auto
MiscObject Property ItemType Auto
Actor Property PlayerRef Auto
Int Property ItemMax Auto
Int r0 = 0
Int r1 = 0
;
Event OnInit()
GoToState("Done")
EndEvent
;
Event OnActivate(ObjectReference akActionRef)
If(akActionRef==(PlayerRef))
r0=(Self.GetItemCount(ItemType))
Endif
EndEvent
;
Event OnItemRemoved(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
If(akBaseItem==(ItemType))
Stack()
Endif
EndEvent
;
Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
If(akBaseItem==(ItemType))
If((aiItemCount+(r0))<=(ItemMax))
r0+=(aiItemCount)
Else
r0=(ItemMax)
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(ItemType))
While(r1<(ItemMax))
If(r0>(r1))
Item[r1].Enable()
Else
Item[r1].Disable()
Endif
r1+=(1)
EndWhile
EndFunction
;
State Done
;do nothing
EndState
;


This script goes on a container ... I use the orange rectangle an Invisible container (Markers\Misc\InvisibleCollision01.nif). The one bookcases use. Then is linked to static items.
The scripts controls the enable /disable call according to how many items are in the container. It allows you to create pretty much any type of rack, stack or item setting.

In this case it's a pallet of stack-able wine cases. But I've used it on most anything. The script is 5 years old and has never failed me. Any number of items can be used.

Edited by NexusComa
Link to comment
Share on other sites

  • Recently Browsing   0 members

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