Jump to content

Need help with a short script (Activator inventory title)


Recommended Posts

Hi all,


i wanna change the inventory title on the top of a Activator(like when you open a container inventory),


to be clear not the title of the activator itself.


The problem is that the Activator is linked to a settlement Workshop


so i can only change it if i change the title of the Workshop but don't want change that.


So here is the script i using:



Scriptname DCF_SupplyCrateFactory extends ObjectReference

ObjectReference Property MasterContainer Auto

auto STATE closedPosition
EVENT onActivate(objectReference triggerRef)
gotoState("busy")

; Wait for the open animation to complete.
Utility.wait(0.1)

; Activate the Master Container.
MasterContainer.Activate(akActivator = Game.GetPlayer(), abDefaultProcessingOnly = True)

; Wait till the Inventory Menu closes. The wait function pauses when the game is in menu mode.
Utility.wait(0.1)

; Set the container as opened and re-activate it to end the animation.
gotoState("openedPosition")
Self.activate(Game.getPlayer())
endEVENT
endSTATE

STATE busy
EVENT onActivate(objectReference triggerRef)
; Do Nothing.
endEVENT
endSTATE

STATE openedPosition
EVENT onActivate(objectReference triggerRef)
; Perform the closing container animation and sound.
gotoState("busy")
Utility.wait(0.01)
gotoState("closedPosition")
endEVENT
endSTATE

What line should i put and where?


hope i explained well if not i have here 2 images for more clarity:


1. help01.jpg 2. help02.jpg


Link to comment
Share on other sites

I'm thinking that an easy way is to assign that ref to a quest alias that changes the name through its display name drop down. You need to make a message for that, and I believe the title will serve as the name.

Wow Wow easy there ,

thnx for your reply .

I had a similar solution from somebody but didn't know

exactly how to do that cuz i am sort of new in modding and

scripting is something i'm not good at :sad: .

I would appreciate it if you could explain me how or a link to a tut. :thumbsup:

Edited by H3S
Link to comment
Share on other sites

This should help you understand

 

https://imgur.com/a/G5k0AxB

 

Note in the alias example I show I didn't actually fill it. You would need to properly fill it and set up the other flags as necessary. I just outlined the 2 key parts related to name overrides.

 

I'm not sure that this will actually change the name visible in the container inventory window, but it will change the display name of the crate on the floor.

Link to comment
Share on other sites

This should help you understand

 

https://imgur.com/a/G5k0AxB

 

Note in the alias example I show I didn't actually fill it. You would need to properly fill it and set up the other flags as necessary. I just outlined the 2 key parts related to name overrides.

 

I'm not sure that this will actually change the name visible in the container inventory window, but it will change the display name of the crate on the floor.

I am confused , :confused:

i created the message and reference alias but what now ?

how do i link it to the crate so the inventory name of the crate shows different than the workshop inventory name?

Could you Please explain it step by step i tried it for maybe 2 months.. :sad:

 

(Edit) ok , i did manage to make it work with your guide (i think)

but the inventory name of the crate is still the same as the workshop inventory name.

I was thinking and came with some ideas only dnt know how i can establish that:

 

1. A simple line to put in my script like the "abDefaultProcessingOnly = True" line (what blocks the workshop mode)

but then one that prevent that the Inventory name is linked (the same).

2. A simple line to put in my script that change temporary the name of the workshop (cuz the crate takes the same name every time i activate it)

only when i activate the crate.

 

3. Or use idea 2 but with a quest and than attach it to the crate (with a script a guess,not sure)

so every time i activate the crate it runs the quest.

 

I think its a good idea but is it possible :unsure:

What do you think ? is there a line like that ?

Edited by H3S
Link to comment
Share on other sites

I was afraid of that. You won't be able to change the inventory name the way you want. The quest alias trick only works for the object name when you hover over it with the cross hair.

and what about idea 3 i mentioned earlier do you know a way to do that? cuz i think that will do

it but only if there is such a script that triggers a quest when i activate the crate ("OnActivate"or something).

 

thnx anyway :thumbsup: i will try to find a way to do that if not ill give up and give the workshop the name of the crate.

Edited by H3S
Link to comment
Share on other sites

My suggestion several weeks ago was to quest alias rename the source workshop ref so the container name changes.

My understanding is OP doesn't want the source workshop ref name changed though. Though I suppose a roundabout way would be to intercept the activation, throw the source workshop into an alias to cause the name change, retrigger activation for the inventory movement, then upon leaving clear the alias to return the source workshop name to normal. To me that seems like a mess though.

 

 

 

I was afraid of that. You won't be able to change the inventory name the way you want. The quest alias trick only works for the object name when you hover over it with the cross hair.

and what about idea 3 i mentioned earlier do you know a way to do that? cuz i think that will do

it but only if there is such a script that triggers a quest when i activate the crate ("OnActivate"or something).

 

thnx anyway :thumbsup: i will try to find a way to do that if not ill give up and give the workshop the name of the crate.

 

See response to SKK50. Not elegant but might get you there.

Edited by BigAndFlabby
Link to comment
Share on other sites

  • Recently Browsing   0 members

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