Jump to content

About This File

This is a modders resource that attempts to make it easy for other mod authors to show a custom SWF temporarily in the UI. This is not intended to be used for widgets. It is designed more for showing custom player status updates, mod title graphics, warnings, achievement graphics, etc.

 

Usage

 

Your mod will need to set up a connection to ImmersiveSWF and then call the "showSWF" function in order to display your custom SWF file.

 

Here is an example of how the connection and function call work:

Quest ImmersiveSWF = Game.GetFormFromFile(0x01000F99, "ImmersiveSWF.esp") as Quest ;Create a reference to ImmersiveSWF.ScriptObject ImmersiveSWFQuestScript = ImmersiveSWF.CastAs("ImmersiveSWF:ImmersiveSWFQuestScript") ;Create a reference to the script we need.; Check to see if the ImmersiveSWF mod was found, if so, run the showSWF function, requesting the SWF id "test".If ImmersiveSWFQuestScript   Var[] params = new Var[1]   params[0] = "test"   ImmersiveSWFQuestScript.CallFunction("showSWF", params)Endif


The above example attempts to show a SWF with the id "test". To use this mod, you will need to list your own SWF files with their own unique id names in your own XML file. It's easy.

 


Here is an example XML file:

<meta title="ISWF_sample_data.xml" version="1.0"/><defaults scale="100" duration="5" swfLocation="TOP_LEFT" swfWidth="124" swfHeight="32" margin="0" monochrome="TRUE"/><swf id="showISWFBanner" swf="ISWF_banner.swf"/><swf id="test" swfLocation="CENTER" swf="ISWF_banner.swf"/>


The meta node simply lists information about your SWF list. It is not required.

 


The defaults node lists the parameters the mod will use if you do not define the parameters per SWF. This is for convenience so that you don't have to repeatedly write 'duration="5"' for every SWF if you know that you want all of your SWF files to show for 5 seconds when called.

 

The swf nodes are where you list your id names and SWF file names. The id name is the reference you use to call a specific SWF with "showSWF" like the example above. The swf parameter is the name of your custom SWF file. You can add more swf nodes to reference all of your custom SWF files.

 

As you can see in the "test" swf node, parameters like "swfLocation" can be included in the swf node to over-ride the default parameters.

 

The various parameters available:

 


scale

Changes the size that the SWF file displays at. "100" is equivalent to 100%.

 

 

 

duration

The amount of time the SWF will be displayed in seconds.

 

 

 

swfLocation

The location that the SWF will be displayed at. Valid options are "TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT" or "CENTER".

 

 

 

swfWidth and swfHeight

These values should be set to the size of your SWF content in pixels. They are used to calculate proper location.

 

 

 

margin

This is the amount of space in pixels to offset the SWF away from the edges of the screen.

 

 

 

monochrome

This determines whether or not the SWF will use the UI color or allow you to use custom colors. If set to "TRUE", you should make your SWF graphics with the color white only. If set to "FALSE" you can use whatever colors you want in your SWF and they will show correctly in game. Please note that the mod does not support alpha properly because Fallout adds a dropshadow under all elements.

 


IMPORTANT: Your XML file and SWF files need to be placed in a folder titled "ImmersiveSWF" within the "Data" folder. The mod can load multiple lists from multiple different mods unless there is a naming conflict. So, please use unique identifiers/naming for your SWF files, XML and SWF id names.

 

Credits

 

Thanks out to the F4SE team!


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use