Jump to content

scrivener07

Premium Member
  • Posts

    1416
  • Joined

  • Last visited

Everything posted by scrivener07

  1. Repost from Discord. This thread answers that. Here is an example start of a document that I had in mind. # What if... ## I want to fork the entire SCP project? answer/description here ## What if I want to forward a change from SCP into my own mod? answer/description here ## I contribute to the SCP project, what does this entitle me to? answer/description here ## my project uses SCP as a dependency, can I monetize my project? answer/description here ## my project uses SCP as a dependency, can I opt my project into the Nexus Mods DP program? answer/description here ## my project uses SCP as a dependency, can I accept direct donations? answer/description here ## my project uses SCP as a dependency, must I make my source available? answer/description here etc etc.. What other points does anyone think would expand the document?
  2. To figure out whats exposed to AS3, I had to write some AS3 functions to trace out object data. It looks something like this Below are some utility functions for dumping information to log files. You can pluck out Debug.as & Utility.as and place them into your own project. Those two files shouldnt have any dependencies besides each other. https://github.com/F4CF/Creation-Framework/blob/master/System/Interface/Source/System/System/Diagnostics/Utility.as#L17-L31 System.Diagnostics.Utility.TraceObject(BGSCodeObj);https://github.com/F4CF/Creation-Framework/blob/master/System/Interface/Source/System/System/Diagnostics/Utility.as#L73-L76 System.Diagnostics.Utility.TraceDisplayList(stage);When you run TraceDisplayList make sure the swf is fully loaded by only calling it during the ADDED_TO_STAGE event or later. The class constructor will be too early. The last part of this trick is getting the code into the menu you want to dump info for. I made a standalone swf that can be injected into the display list of any target menu like HUDMenu or PipBoyMenu for example. I did the injection via Papyrus using the xSE UI.Load function. I would listen for the target menu to open via OnMenuOpenClose event and then run UI.Load. In some cases I had to use an OnKeyDown event instead of OnMenuOpenClose because some menus are tricky to catch opening in papyrus. Well once my custom swf was UI.Load'ed into the target display list I would run the utility functions to dump info into the f4se.log
  3. It takes a lot of man power to get stuff like this documented and verified. If you can pin down the function parameters for these then it would be a good community service to note them on the pages. https://www.creationkit.com/fallout4/index.php?title=Console If possible. The site doesnt work well for many people.
  4. There is Pyro too, which in integrated into the PapyrusLang VS Code extension. https://github.com/fireundubh/pyro > Paste in your compiler batch file like C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\ScriptCompile.Bat That would be the same one included with the Creation Kit and he is already scripting outside the CK. If OP is opening the CK just to compile a script then learning of the PapyrusCompiler.exe works is a good place to start. https://www.creationkit.com/fallout4/index.php?title=Papyrus_Compiler
  5. No, the last version of a form to load wins. You would have to create a 3rd plugin to patch the two forms to have the final combined result.
  6. Heavier than an animated sequence in a nif (probably?). Its not a one size fits all solution so only use dynamic material swapping when appropriate. Im not sure how well it would perform as a constantly pulsating effect but any transition should be reasonable. Then again.. even a pulsating constantly swapping effect should be reasonable if a 1000 "frames" are not used. By frames I mean a material file. The time between each material swap gives the "fps". Edit: Ill say again that working on the nif directly is the best solution if you know how.
  7. Hmmm. I dont know enough about materials to say if you can change the color/tint/hue or whatever, but if you can then I have an idea. Dynamic material swapping https://github.com/Scrivener07/FO4_DynamicGlass Although I feel Thirdstorms approach is the best, the dynamic material swaps can work on any model without needing to edit the nif or other original files. This might be useful when you dont have permissions to edit & distribute some elses nif.
  8. Its possible to replace an existing marker with minimal effort but adding an all new one would be a bit harder, maybe impossible with conventional means.
  9. VS Code with the Papyrus Language extension. https://marketplace.visualstudio.com/items?itemName=joelday.papyrus-lang-vscode https://github.com/joelday/papyrus-lang/wiki Pyro provides mod authors with an all-in-one tool for compiling Papyrus scripts, packaging BSA and BA2 archives, and preparing builds for distribution. Pyro can be integrated as an external tool into any IDE, allowing mod authors to "Instant Build" projects with a single hotkey. https://github.com/fireundubh/pyro/releases Top of the line Papyrus tooling.
  10. Its both. Menus are independent applications but they do have the ability to communicate with the engine and file system in limited degrees. The vanilla holotapes have a limited ability to interoperate with papyrus too. With F4SE, you can interoperate between papyrus and AS3 with ease. https://github.com/Scrivener07/FO4_HoloChatter Demonstrates a holotapes built in ability to communicate with ActionScript using Papyrus. More reading. https://www.creationkit.com/fallout4/index.php?title=Category:F4SE https://www.creationkit.com/fallout4/index.php?title=User_Interface The docs are scarce and poorly written but there are some useful tidbits. This isnt for holotapes specifically but might be one of the only video walkthroughs on UI work in fallout. The main difference being your holotape would probably not be using much papyrus.
  11. In most cases you dont have to restart the game to test swf changes. Depends on the menu but most are unloaded/disposed completely when they are closed. There are exceptions like the Console menu which needs a game restart to see changes, but I think with holotapes you can just have the game running in the background while you work in Adobe Flash, re-publish your swf, then tab to fallout and open the menu/holotape.
  12. In fallout 4 I think its just a console command called `Screenshot`. You might be able to invoke the command in a convoluted way. ScriptName Derp Extends Quest int Home = 36 const ; the home key string EmptyState = "" const string ExecuteState = "Execute" const string ConsoleMenu = "Console" const Event OnQuestInit() RegisterForKey(Home) EndEvent Event OnKeyDown(int keyCode) GotoState(ExecuteState) EndEvent State Execute Event OnBeginState(string oldState) RegisterForMenuOpenCloseEvent(ConsoleMenu) UI.OpenMenu(ConsoleMenu) EndEvent Event OnMenuOpenCloseEvent(string menuName, bool opening) If (opening) var[] arguments = new var[1] arguments[0] = "Screenshot" ; the console command to send UI.Invoke(ConsoleMenu, "root1.AnimHolder_mc.Menu_mc.executeCommand") GotoState(EmptyState) EndIf EndEvent Event OnEndState(string newState) UnregisterForMenuOpenCloseEvent(ConsoleMenu) UI.CloseMenu(ConsoleMenu) EndEvent EndState
  13. You will need an absolute minimum of CS3 or greater and be handy with Actionscript 3.0. Start with extracting a vanilla holotape swf from the BA2 and decompiling it into an FLA file with FFDec https://www.creationkit.com/fallout4/index.php?title=JPEXS_Free_Flash_Decompiler_(FFDec) At that point you will be able to edit the holotape and re-publish it back to a playable swf.
  14. Heh, well back to the remote method of things then? Sorry for the double post. Ive been acquainted with discord.
  15. I think you did well. Maybe check that the actor is the player and not some random NPC. Scriptname rep_keyObject Extends ObjectReference {Attach this to each of your potions.} Group Properties MiscObject Property rep_tinkey Auto Const Mandatory Keyword Property rep_canration Auto Const Mandatory Message Property rep_tinkeyuse Auto Const Mandatory EndGroup Event OnEquipped(Actor AkActor) If (akActor == Game.GetPlayer()) ; you dont want an NPC to trigger a message in the players face if AkActor.GetItemCount(rep_tinkey) > 0 rep_tinkeyuse.Show() AkActor.RemoveItem(rep_tinkey) Debug.Trace("C-Ration opened with key.") Elseif AkActor.GetItemCount(rep_tinkey) == 0 AkActor.DamageValue(Game.GetHealthAV(), 10) Debug.Trace("C-Ration opened without key.") endif EndIf EndEvent Attach to your potions and I think your good to go.
  16. Oh yea, resist the urge to use ANY of the `Debug` functions in your final work. This was acceptable in Skyrim but is no longer the case for Fallout 4. Instead of using `Debug.Notification()` use a proper `Message` form in the CK. You can have Debug functions in your code. Thats totally fine. Just make sure the functionality of your mod does not depend on these debug functions. For the "best" solution, Im not familiar enough with your end goals to say.
  17. You cannot attach a script to a Keyword but the advice of SKK50 is otherwise solid. I looked at what your script does and rewrote it how I would have. There are some optimizations, and in my opinion, more readable code. ScriptName rep_Rationkey Extends Quest Actor Player Group Properties MiscObject Property rep_tinkey Auto Const Mandatory Keyword Property rep_canration Auto Const Mandatory ActorValue property HealthAV Auto Const Mandatory EndGroup Event OnQuestInit() Player = Game.GetPlayer() RegisterForRemoteEvent(Player, "OnItemEquipped") EndEvent Event Actor.OnItemEquipped(Actor sender, Form baseObject, ObjectReference reference) If (baseObject is Potion) If (baseObject.HasKeyword(rep_canration)) int count = Player.GetItemCount(rep_tinkey) If (count == 1) Player.RemoveItem(rep_tinkey) Debug.Notification("Your tin key broke! You cannot open another canned ration without hurting yourself.") ElseIf (count == 0) Player.DamageValue(HealthAV, 10) Debug.Notification("Ouch. You should try to find a tin key to not hurt yourself.") Else Debug.TraceSelf(self, "Actor.OnItemEquipped", "The equipped item count of "+count+" is unhandled.") EndIf Else Debug.TraceSelf(self, "Actor.OnItemEquipped", "The equipped item does not have the `rep_canration` keyword.") EndIf Else Debug.TraceSelf(self, "Actor.OnItemEquipped", "The equipped item is NOT of the Potion type.") EndIf EndEvent Edit: Remote events are not a hassle. Well, I was not hassled by the extra line of code in this sample.
  18. I did a "cloak AOE spell" to pull this off. Pretty much I took a gamble that I was right when I originally posted my GetDetected sample. But I was wrong. More about cloak spells https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts What this will do is send a "ping" around the player and any actor in the ping radius will have an effect applied. The effect will run the GetDetected condition function to see if the pinged actor has detected the player. The core idea of capturing a condition function result with magic effect events is still how this works. It was only the magic effect implementation details for this particular condition function I had wrong since the observer must be the MGEF subject. Sample download. https://drive.google.com/open?id=1I4tI5At8StGQ-TxpvpZD6d7LMBaOrEgH Side Example: Line of Sight Condition Function Other conditions work too, such as (LOS) line of sight. https://cdn.discordapp.com/attachments/643251604308623380/643820901787238420/2019-11-12_09-33-19.mp4 It will track detection of the player by all actors in the cell. This is what matches to the sneak eye. The monitor will signal detection all the time regardless of if the player is sneaking or not. You might want to add the IsSneaking == 1 condition check on the monitor effect too. I took out Line Of Sight as a sample and made it only detection, but it proves the techniques are valid. Thanks to Psyche for bringing this thread to my attention all these years later. There are other pure code ways of finding GetDetection these days with skse too, but I feel its too complicated to explain in full. Ill let Psyche explain in brief.
  19. Since Ive got some messages about this script all these years later I hereby declare the above papyrus source code as licensed under MIT with no explicit copyright notice, just the liability disclaimer. Hope to see someone pick this up and make a release out of it.
  20. Yes, a real time debugger with breakpoints that allow you to inspect scripts at runtime. Joel Day did it for Fallout 4 already with Skyrim support in the wings.
×
×
  • Create New...