Difference between revisions of "User:Scrivener07/Menus"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
(Added a note)
imported>Qazaaq
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
These are my notes and findings about Actionscript 3 & Scaleform in Fallout 4.
These are my notes and findings about Actionscript 3 & Scaleform in Fallout 4.
Some notes were moved to [[User Interface]] and [[Menu]]s.


== F4SE ==
==== Notes ====
[[:Category:F4SE|F4SE]] will install a code object to the root of any registered menu.
* Make page notes about the game's string pool potentially causing UI calls invoked from Papyrus to fail. See also iEquip Author.
To acquire the F4SE code object in AS3, use <code>(stage.getChildAt(0) as MovieClip).f4se</code> or <code>MovieClip(root).f4se</code>..
* A menu with flag <code>0x200000</code> will not hide when opening another menu which normally hides all others(pausemenu or messageboxmenu).


There are some cases when the installed F4SE code object on a menu root may be unreachable from your display object class.
==== Missing Font Error ====
With [[:Category:F4SE|F4SE]] v0.6.8 and greater the code object may be received by implementing the <code>onF4SEObjCreated</code> function on your display object class.
An example of a missing font error. The errors are logged into the F4SE.log file.
This function is called on the menu root document as well as first-level children.
<source lang="text">
 
Missing font "Times New Roman" in ".root1.Menu_mc.CreditsContainer.instance18". Search log:
<source lang="actionscript">
  Searching for font: "Times New Roman" [Device]
package Shared.F4SE
      Movie resource: "Times New Roman" [Device] not found.
{
      Imports      : "Times New Roman" [Device] not found.
public interface ICodeObject
      Exported      : "Times New Roman" [Device] not found.
{
      Registered fonts: "Times New Roman"[Device] not found.
function onF4SEObjCreated(codeObject:*):void;
      Searching FontLib: "Times New Roman" [Device] not found.
}
      Searching FontLib without [Device] flag: "Times New Roman" not found.
}
      Searching again without [Device] flag:
        Movie resource: "Times New Roman"  not found.
        Imports      : "Times New Roman"  not found.
        Exported      : "Times New Roman"  not found.
        Registered fonts: "Times New Roman" not found.
  Font not found.
</source>
</source>
==== Code Object ====
It is a good idea to wrap calls to the F4SE code object in a Try/Catch block.
* <code>AllowTextInput : Function(allow:Boolean):void</code>
* <code>GetMembers : Function():void</code>
* <code>CallFunctionNoWait : Function():void</code>
* <code>SendExternalEvent : Function(eventName:String, *...):void</code> Only the event name is required.
* <code>GetDirectoryListing : Function(path:String, match:String, recursive:Boolean):Array</code> Recursive may be an optional argument.
* <code>MountImage : Function(menuName:String, mountPath:String, mountName:String):void</code>
* <code>UnmountImage : Function(menuName:String, mountPath:String):void</code>
* <code>plugins : Array</code>
** <code>f4mcm : [Object]</code>
* <code>version : [Object]</code>
** <code>releaseIdx : Number</code>
** <code>minor : Number</code>
** <code>major : Number</code>
** <code>beta : Number</code>
== ExamineMenu ==
==== BGSCodeObj ====
* <code>SetName : Function():void</code>
* <code>ConfirmBuild : Function():void</code>
* <code>PlaySound : Function():void</code>
* <code>ScrapItem : Function():void</code>
* <code>StartBuildConfirm : Function():void</code>
* <code>SetItemSelectValuesForComponents : Function():void</code>
* <code>FillModPartArray : Function():void</code>
* <code>OnAlternateButton : Function():void</code>
* <code>HasNullMod : Function():void</code>
* <code>ToggleFavoriteMod : Function():void</code>
* <code>IsSelectedItemEquipped : Function():void</code>
* <code>UpdateItemSelectList : Function():void</code>
* <code>ToggleItemEquipped : Function():void</code>
* <code>RegisterComponents : Function():void</code>
* <code>RegisterRequirementList : Function():void</code>
* <code>SwitchMod : Function():void</code>
* <code>ShowItem : Function():void</code>
* <code>StartAnimation : Function():void</code>
* <code>ZoomIn : Function():void</code>
* <code>HideMenu : Function():void</code>
* <code>SwitchBaseItem : Function():void</code>
* <code>UpdateRequirements : Function():void</code>
* <code>SendTutorialEvent : Function():void</code>
* <code>RequestItemSelectListData : Function():void</code>
* <code>RepairSelectedItem : Function():void</code>
* <code>CanRepairSelectedItem : Function():void</code>
* <code>CheckRequirements : Function():void</code>
* <code>StartItemSelection : Function():void</code>
* <code>EndRotate3DItem : Function():void</code>
* <code>RevertChanges : Function():void</code>
* <code>RemoveHighlight : Function():void</code>
* <code>OnBuildFailed : Function():void</code>
* <code>CancelConfirm : Function():void</code>
* <code>ItemSelect : Function():void</code>
* <code>ZoomOut : Function():void</code>
* <code>StartRotate3DItem : Function():void</code>
* <code>ShouldShowTagForSearchButton : Function():void</code>
== PipboyMenu ==
==== BGSCodeObj ====
* <code>PlaySound</code> <code>0</code>
* <code>PlaySmallTransition</code> <code>1</code>
* <code>PopulatePipboyInfoObj</code> <code>2</code>
* <code>onNewPage</code> <code>3</code>
* <code>onNewTab</code> <code>4</code>
* <code>toggleMovementToDirectional</code> <code>0x28</code>
* <code>UseStimpak</code> <code>5</code>
* <code>UseRadaway</code> <code>6</code>
* <code>ShowPerksMenu</code> <code>7</code>
* <code>PlayPerkSound</code> <code>8</code>
* <code>StopPerkSound</code> <code>9</code>
* <code>onPerksTabOpen</code> <code>0xA</code>
* <code>onPerksTabClose</code> <code>0xB</code>
* <code>SelectItem</code> <code>0xC</code>
* <code>onInvItemSelection</code> <code>0xD</code>
* <code>updateItem3D</code> <code>0xE</code>
* <code>SetQuickkey</code> <code>0xF</code>
* <code>ItemDrop</code> <code>0x10</code>
* <code>SortItemList</code> <code>0x11</code>
* <code>ExamineItem</code> <code>0x12</code>
* <code>onComponentViewToggle</code> <code>0x13</code>
* <code>ToggleComponentFavorite</code> <code>0x14</code>
* <code>onShowHotKeys</code> <code>0x27</code>
* <code>onQuestSelection</code> <code>0x16</code>
* <code>SetQuestActive</code> <code>0x15</code>
* <code>ShowQuestOnMap</code> <code>0x17</code>
* <code>ShowWorkshopOnMap</code> <code>0x18</code>
* <code>RegisterMap</code> <code>0x19</code>
* <code>UnregisterMap</code> <code>0x1A</code>
* <code>FastTravel</code> <code>0x1D</code>
* <code>HasSetPlayerMarkerRequest</code> <code>0x20</code>
* <code>SetPlayerMarker</code> <code>0x21</code>
* <code>ClearPlayerMarker</code> <code>0x22</code>
* <code>onSwitchBetweenWorldLocalMap</code> <code>0x23</code>
* <code>CenterMarkerRequest</code> <code>0x24</code>
* <code>onModalOpen</code> <code>0x25</code>
* <code>CheckHardcoreModeFastTravel</code> <code>0x1E</code>
* <code>RefreshMapMarkers</code> <code>0x1F</code>
* <code>ToggleRadioStationActiveStatus</code> <code>0x26</code>

Latest revision as of 00:29, 8 March 2020

These are my notes and findings about Actionscript 3 & Scaleform in Fallout 4. Some notes were moved to User Interface and Menus.

Notes[edit | edit source]

  • Make page notes about the game's string pool potentially causing UI calls invoked from Papyrus to fail. See also iEquip Author.
  • A menu with flag 0x200000 will not hide when opening another menu which normally hides all others(pausemenu or messageboxmenu).

Missing Font Error[edit | edit source]

An example of a missing font error. The errors are logged into the F4SE.log file.

Missing font "Times New Roman" in ".root1.Menu_mc.CreditsContainer.instance18". Search log:
   Searching for font: "Times New Roman" [Device]
      Movie resource: "Times New Roman" [Device] not found.
      Imports       : "Times New Roman" [Device] not found.
      Exported      : "Times New Roman" [Device] not found.
      Registered fonts: "Times New Roman"[Device] not found.
      Searching FontLib: "Times New Roman" [Device] not found.
      Searching FontLib without [Device] flag: "Times New Roman"  not found.
      Searching again without [Device] flag:
         Movie resource: "Times New Roman"  not found.
         Imports       : "Times New Roman"  not found.
         Exported      : "Times New Roman"  not found.
         Registered fonts: "Times New Roman" not found.
   Font not found.