Jump to content
⚠ Known Issue: Media on User Profiles ×

Trying to learn how to fill forms from other files, help appreciated


icecreamassassin

Recommended Posts

ok, cool. Yeah I was playing around with it and I think it may work using my existing display handling script with the display and item lists being changed out and filled from the getform init function. Is there a way to fill the properties on one script with the filled properties from another? I have like 120 things I defined in the setup script but I've run out of room in the script memory so I was going to fill the lists with another quest script (because I can't figure out how the hell to get Notepad++ to work)

Link to comment
Share on other sites

Workaround if you can't get compiling to work in Notepad++ or in SublimeText and still need larger scripts than CK memory allows.

 

Edit the script in the text editor. Save the changes.

Open the Creation Kit

Go to the "Game play" drop down menu

Select the "Papyrus Script Manager"

Use the filter to obtain your script

Right click and choose "Compile"

 

But to answer your question. Yes it is possible. I have one script that is nothing but properties shared across a ton of scripts. I didn't want to keep refilling properties and introduce potential errors by accidentally picking the wrong thing. Just do it the same as you would share a function from another script.

Example:

 

In the property section

abim_IMS_PublicPropertyScript Property PPScript Auto

In use in the script

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
	GetWeightlessBool()
	If !(PPScript.ModArmors.HasForm(akBaseItem))
		If !(WorkingList.HasForm(akBaseItem))
			WorkingList.AddForm(akBaseItem)
		EndIf
		If UseMakeWeightless == false 
			Float Add = akBaseItem.GetWeight() * (aiItemCount as Float)
			MyWeight = MyWeight + Add
			SelfItem.SetWeight(MyWeight)
		EndIf
	EndIf
EndEvent

In case you were wondering, the script is on a container and depending upon choices made the container is either weightless or its weight becomes that of the stored contents. (FYI - there is more to the process than just this)

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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