pipdude Posted June 13, 2017 Share Posted June 13, 2017 View 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: scaleChanges the size that the SWF file displays at. "100" is equivalent to 100%. durationThe amount of time the SWF will be displayed in seconds. swfLocationThe location that the SWF will be displayed at. Valid options are "TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT" or "CENTER". swfWidth and swfHeightThese values should be set to the size of your SWF content in pixels. They are used to calculate proper location. marginThis is the amount of space in pixels to offset the SWF away from the edges of the screen. monochromeThis 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! Submitter pipdude Submitted 06/12/2017 Category Modders Resources Requires F4SE Link to comment
Grine Posted June 14, 2017 Share Posted June 14, 2017 Excellent. I am currently out of town but I will see what I can do with my image setups! Thanks for your wonderful work here!!! Link to comment
Grine Posted July 24, 2017 Share Posted July 24, 2017 -quote- So I finally managed to fix up swf software I have and redo some resources. I downloaded the mod and I was wondering how do I test it in game? What I did was I replaced your ISWF_banner that you made as a test with my own file to see how it looks in the game. How do I begin pop the image up? Thanks. Link to comment
pipdude Posted July 24, 2017 Author Share Posted July 24, 2017 -quote- So I finally managed to fix up swf software I have and redo some resources. I downloaded the mod and I was wondering how do I test it in game? What I did was I replaced your ISWF_banner that you made as a test with my own file to see how it looks in the game. How do I begin pop the image up? Thanks. Were you able to see that placeholder swf with the mod installed? I would first make sure you can see that to ensure that it's installed, activated, etc. first. Then, when you replace that swf, it should appear on every game reload. You could also make a simple script that calls it on keypress for testing, using the documentation I posted. Let me know if you have any trouble and I'll help you through it. Link to comment
Grine Posted July 24, 2017 Share Posted July 24, 2017 Well I have zero knowledge when it comes to coding. The best I can do is change some values in the notepad or play around with images. When I start the game I don't see you your swf and if there is command or object to make it show up I cant find it. I have 43 images that I need to test and see it in the game, to check how they look. Once that's done I will leave it up there to be used as a resource. If you could set up something so that I can test these images in the game it would be wonderful. In the files below there is a vanilla SWF file and my own attempt to have the same dimensions and quality. I will be making sure all pictures have the same dimensions as the "Slave Level 3" file. PS. use a browser like Firefox to open them. SWF Test Files.zip Link to comment
pipdude Posted July 26, 2017 Author Share Posted July 26, 2017 Ok. I will put a tester plugin together. I think that you may not be seeing the test swf because the mod is not activated or maybe because it gets loaded and runs before the screen fades in. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now