joelday / papyrus-lang Goto Github PK
View Code? Open in Web Editor NEW📜Advanced language tools for the Papyrus scripting language.
License: Other
📜Advanced language tools for the Papyrus scripting language.
License: Other
Not a critical problem by far, but I thought it curious that I received such an error due to having the bUseVersionControl
setting listed twice in my CK INIs. I thought you might like to know this if you didn't already.
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.FormatException: A duplicate key 'General:bUseVersionControl' was found. at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers) at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at DarkId.Papyrus.LanguageService.Configuration.CreationKit.CreationKitInisConfigLoader.LoadConfig(CreationKitIniLocations inis) in C:\projects\papyrus-lang\src\DarkId.Papyrus.LanguageService\Configuration\CreationKit\CreationKitInisConfigLoader.cs:line 27 at DarkId.Papyrus.LanguageService.Configuration.CreationKit.CreationKitProgramOptionsProvider.GetAmbientProgramOptions() in C:\projects\papyrus-lang\src\DarkId.Papyrus.LanguageService\Configuration\CreationKit\CreationKitProgramOptionsProvider.cs:line 43 at DarkId.Papyrus.Server.ProjectProgramOptionsProvider.<GetProgramOptions>d__7.MoveNext() in C:\projects\papyrus-lang\src\DarkId.Papyrus.Server\ProjectProgramOptionsProvider.cs:line 76 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at DarkId.Papyrus.Common.TaskExtensions.WaitForResult[T](Task`1 task) in C:\projects\papyrus-lang\src\DarkId.Papyrus.Common\TaskExtensions.cs:line 12 at DarkId.Papyrus.Server.ProjectManager.UpdateProjects(UpdateProjectsOptions options) in C:\projects\papyrus-lang\src\DarkId.Papyrus.Server\ProjectManager.cs:line 100 at DarkId.Papyrus.Server.WorkspaceManager.UpdateProjects(UpdateProjectsOptions options) in C:\projects\papyrus-lang\src\DarkId.Papyrus.Server\WorkspaceManager.cs:line 63 at DarkId.Papyrus.Server.WorkspaceManager.<>c__DisplayClass4_0.<<-ctor>b__1>d.MoveNext() in C:\projects\papyrus-lang\src\DarkId.Papyrus.Server\WorkspaceManager.cs:line 52 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() [Error - 8:15:01 pm] Connection to server got closed. Server will not be restarted.
This is a feature request for a Scaleform debug panel.
Scaleform by Autodesk is a middleware based on Adobe Flash used to render user interfaces in video games. Scaleform is a custom Flash player with accompanying source libraries optimized for game development. Scaleform and Adobe Flash have a similar object model to JavaFx or WPF if you are familiar.
Runtime information for Scaleform is highly valuable. This information is useful for UI development & Papyrus <-> AS3 interoperation. I dont know exactly what Im looking at in the F4SE source code but there seems to be a large amount of Scaleform systems decoded. Below I will pitch all my pie-in-the-sky ideas in the details section below.
Eat the meat, spit out the bones.
Forms
)It'd be great if the extension could automatically generate .ppj files based on the Workspace currently loaded and the files/folders therein. It can already detect the game and its location, so that's pretty much all that is needed to create a .ppj file.
Event suggestions, so when you start typing the name of an event it auto suggests and then if you choose that it fills in the appropriate arguments that get passed through.
Should have clear messaging to users when Fallout is installed in a non-default location and a friendly way to specify the correct paths.
This is a feature request for a Papyrus unit testing provider in VS Code.
Imagine automatic pass/fail unit testing and building a code coverage report for papyrus.
Thankfully Chesko has already done half of the work by writing a test framework for scripts.
With Lilac we can use the game developer console and log files to execute and read reports.
Ive used it and have some samples and project examples.
It works well but it may be difficult for beginner scripters.
If integrating Lilac ends up being the smartest course of action then it would also be neat to retain the Lilac branding and art where possible. Even if its purely documentation or the odd icon or text label in editor. Kinda like how you see the Git icon in VS Code as a supplemental technology.
I thinking it would be good to add a panel for it with the debugger or something along those lines.
We could even integrate the whole Lilac code base if it ends up being necessary.
Using some runtime script injection is also a possibility for a testing framework.
Loading and binding scripts is apparently something that can be done via the in game developer console.
Ive never bothered to try since it never had any use to me in a release distribution or debugging for me.
This is the Lilac Documentation with project summary below.
Lilac is a unit testing framework for Papyrus.
It has a simple and direct syntax so that you can easily write tests to increase the quality of your mods.
It is inspired by Jasmine for Javascript.
It is currently available for Fallout 4 (GitHub) and Skyrim (GitHub) under the MIT license.
Lilac can be built into your mod and distributed with it.
Your tests will only run when you decide to run them; your users will most likely never know they exist.
Lilac is a behavior-driven development framework for Papyrus.
It has a clean, Jasmine-like syntax so you can quickly write tests for your mods.
The README.md
could use some preview GIFs to briefly show each major extension feature.
Details
Notes
Render Whitespace
.Minimap
.Currently any subdirectory (such as those for DLC) in an included directory will emit errors with no context for why.
This is a feature request for a mini papyrus code base sample to be provided.
Im writing this up as a feature request because a couple individuals have asked me about this.
I already have a sort of testing routine Ive been using with a mini-codebase sample for exactly that. I use it to have a common and consistent code base between version smoke tests. I can polish this code up and figure out the best distribution method later.
VSCodeTestCell
for a controlled testing environment in game.The code base looks something like this at the moment and still needs some polish.
E:\Games\Steam\steamapps\common\Fallout 4\Data
| VSCode.esp
E:\Games\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\VSCode
| Build.ppj
| VSCodeActor.psc
| VSCodeQuest.psc
|
\---VSCode
| Data.psc
| Globals.psc
|
+---Actors
| Sample.psc
| SampleComplex.psc
|
\---Quests
Sample.psc
SampleComplex.psc
This is a feature request for papyrus project scaffolding.
Add Create Project
command that auto-fills to match the ini configuration and provides basic scaffolding. I would imagine it should create a folder with that name, and put the ppj in there too.
This could work by right clicking on the VS Code file explorer.
Create Project
command.Create Project
command to the VS Code file explorer context menu.Describe the bug:
When opening a .pyc
script file after a fresh install of papyrus-lang, the output console reports the titular error message for Skyrim and Skyrim SE, but not Fallout 4.
To Reproduce:
Assumption is a typo in the language service script provided with the extension.
The paths for all three games appear to be correct, each game's unique CK is installed and updated, the ini files are all in place, the base scripts are extracted to their associated locations, and the .flg
files exist. I did notice that the Papyrus Compiler
folders appear to be lacking files compared to the Fallout 4 version, if that's relevant in any way.
VSC Output Logs:
{"compilerAssemblyPath":"f:\\Games\\steamapps\\common\\Fallout 4\\Papyrus Compiler",
"creationKitInstallPath":"f:\\Games\\steamapps\\common\\Fallout 4",
"relativeIniPaths":["CreationKit.ini","CreationKitCustom.ini"],
"flagsFileName":"Institute_Papyrus_Flags.flg",
"ambientProjectName":"Fallout 4 Creation Kit",
"defaultScriptSourceFolder":"\".\\Data\\Scripts\\Source\\User\"",
"defaultAdditionalImports":"\"$(source);.\\Data\\Scripts\\Source\\Base\""}
Starting language service...
Language service started.
[Info - 11:19:22 PM] Searching for Papyrus projects in c:\Users\bwfan\gitprojects\wrye-bash-grndbeef...
[Info - 11:19:22 PM] Found 0 project(s) in c:\Users\bwfan\gitprojects\wrye-bash-grndbeef:
[Info - 11:19:22 PM] Resolving script files for Fallout 4 Creation Kit...
{"compilerAssemblyPath":"F:\\Games\\steamapps\\common\\Skyrim Special Edition\\Papyrus Compiler",
"creationKitInstallPath":"F:\\Games\\steamapps\\common\\Skyrim Special Edition\\",
"relativeIniPaths":["CreationKit.ini","CreationKitCustom.ini"],
"flagsFileName":"TESV_Papyrus_Flags.flg",
"ambientProjectName":"Skyrim SE Creation Kit",
"defaultScriptSourceFolder":".\\Data\\Source\\Scripts\\"}
Error on language service pre-start: TypeError: Cannot read property 'toString' of undefined
{"compilerAssemblyPath":"F:\\Games\\steamapps\\common\\Skyrim\\Papyrus Compiler",
"creationKitInstallPath":"F:\\Games\\steamapps\\common\\Skyrim\\",
"relativeIniPaths":["SkyrimEditor.ini"],
"flagsFileName":"TESV_Papyrus_Flags.flg",
"ambientProjectName":"Skyrim Creation Kit",
"defaultScriptSourceFolder":"\"Data\\Scripts\\Source\""}
Error on language service pre-start: TypeError: Cannot read property 'toString' of undefined
Variable name "MyProperty" has wrong syntax coloring. The Property language keyword colorizes the variable name partially. I have attached a screen capture below.
This applies to at least v0.0.1-preview.1
Really the highest priority for us should be getting a logo that looks okay in a circle.
What we need from someone with artistic skills.
An icon/logo for this extension. See also VS Code Extension Manifest Icons.
16x16px
to 256x256px
. (256x256px
for Retina screens).Add GitHub's new Social preview image.
640×320px
(1280×640px
for best display).40px
(80px
?) margin.Possibly a new VS Code Icon Theme for files related to modding Bethesda games. See also the Icon Theme Extension Guide.
16x16
to 128x128
for each file type .The debugger performance has some room for improvement as of v2.9.3 + Debug Server v1.0.0.26
I have found that it can take a bit longer than expected for the game to pause on an initial break.
Occasionally the game will hang and Windows will prompt that Fallout 4 is not responding.
If I choose to wait for the program to respond everything will recover with some patience.
Here are some videos related to the current version at the time of writing.
This issue is for planning and goal purposes. After outstanding bugs are fixed, the debugger performance can be investigated.
I have Skyrim (Legendary Edition) installed to one drive, but I used a symbolic link to move it to my SSD. The automatic detection picks up the install correctly on the drive it was originally installed to, but the extension doesn't work nor does it log any errors. If I manually change the "papyrus.skyrim.installPath" value to the SSD path, it then works.
GotoState
SendCustomEvent
RegisterForCustomEvent
/UnregisterForCustomEvent
RegisterForRemoteEvent
/UnregisterForRemoteEvent
At the moment, the extension defaults to:
\Fallout 4\Papyrus Compiler\
I moved this folder into the tools folder like so:
\Fallout 4\Tools\Papyrus Compiler\
for organization. Currently there is no way to change this behaviour.
"Something like attributes in c#. Here is an idea that might work. In papyrus do a single inline block comment directly above a member to mark as DebuggerStepThrough, maybe with some other symbol too like @. Inline block comments are extremely rare so will likely not conflict with any existing code to date."
; This is my function doc string.
;/@DebuggerStepThrough/;
var Function Foobar(var argument)
; Dont bother stepping through this function.
return none
EndFunction
or
;/@DebuggerStepThrough/; ;/@SomeOtherAttribute/;
var Function Foobar1(var argument)
; Dont bother stepping through this function and some other thing.
return none
EndFunction
;/@DebuggerStepThrough/;
;/@SomeOtherAttribute/;
var Function Foobar2(var argument)
; Dont bother stepping through this function and some other thing.
return none
EndFunction
;/@DebuggerStepThrough | @SomeOtherAttribute/;
var Function Foobar3(var argument)
; Dont bother stepping through this function and some other thing.
return none
EndFunction
The Debugger will crash the game to desktop if attached while game is loading. An example of this happening is shown in the first part of this video. Logs are included in the description. This is also probably not a bug, but Ill let you decide in case its a symptom of something that is a bug.
Describe the bug
Functions defined in papyrus files are not shown in the outline, nor showup in the autocompletions within the script.
To Reproduce
As seen in the gif above, the two declared functions do not exist in the outline, nor show up during intellisense.
Blocked by microsoft/vscode#33523
The DarkId.Papyrus.DebugAdapterProxy.log
doesn't clear between game sessions. If I recall correctly much of the logging will get cut or scaled back at some point but for now that may result in extremely large log files. Your call if this is even a bug or not.
Suggested in #15.
Support for https://github.com/fireundubh/pyro yaml project format. Also ensure that XML deserializer is relaxed to allow Pyro's extended attributes.
Changes to referenced or indirectly referenced scripts aren't picked up until all downstream
Non-native flags are not appended to symbol display texts.
Describe the bug
The papyrus-debug-server xSE plugin is outdated for the current game runtime version of 1.10.138
. The plugin is versioned for 1.10.130
. There were no address changes with this update so it should simply be a matter of recompiling with F4SE v0.6.17.
To Reproduce
Steps to reproduce the behavior:
Describe the bug
Fallout script name mappings are not verified for namespaces.
To Reproduce
I put my samples in a namespace called VSCode:* and I think thats why they would not show up even though they are attached directly to the player actor reference. I Made another sample without a namespace and it is the one that appears in the loaded scripts panel. But not
VSCode:Sample
&VSCode:SampleComplex
.
~45% done?
This issue is so I can track wiki related tasks.
Below I will try to create a sort of wiki site map which tracks the completion of pages.
Add some pages (not exhaustive) about programming with papyrus.
A complete onsite markdown conversion of the core Papyrus language documentation.
Debugger variables panel only shows function arguments and object inheritance. Properties and fields seem to be missing. For example with this code.
Scriptname Example extends Actor
{The documentation string.}
; Fields
;--------------------------------------------
int Count = 0
; Properties
;--------------------------------------------
Group KeyCodes
int Property Left = 37 AutoReadOnly
int Property Right = 39 AutoReadOnly
EndGroup
; Events
;--------------------------------------------
Event OnInit()
RegisterForKey(Left)
RegisterForKey(Right)
EndEvent
Event OnKeyDown(int keyCode)
If (keyCode == Left)
Count -= 1
Debug.TraceSelf(self, "OnKeyDown", "Increased the count to "+Count)
ElseIf (keyCode == Right)
Count += 1
Debug.TraceSelf(self, "OnKeyDown", "Decreased the count to "+Count)
Else
Debug.TraceSelf(self, "OnKeyDown", "The key "+keyCode+" is unhandled.")
EndIf
EndEvent
If a user changes their configuration in order to resolve an issue that prevents the language server host from running, they have to restart VSCode.
Shouldn't show suggestions for variable declarations.
Describe the bug
Here is an image of my Project Panel.
I drew on this image. The marks are PPJ configurations with duplicate imports.
All the fallout PPJ configs have a duplicate import listed but the CreationKitCustom.ini
configs do not. Must be a difference between when you read from ini vs xml/ppj. The PPJ configs seem to be listing both SourceFolder
and where SourceFolder
is listed in additional imports. The CreationKitCustom.ini
has an equivalent import of itself but different behavior.
CreationKitCustom.ini
sAdditionalImports = "$(source);etc;etc
MyProject.ppj
<PapyrusProject>
<Imports>
<Import>.</Import>
</Imports>
<Folders>
<Folder>.</Folder>
</Folders>
</PapyrusProject>
To Reproduce
Steps to reproduce the behavior:
When working with numbers as part of my test case suite, I get the following error:
[Skyrim]: Value was either too large or too small for an Int32.
(System.OverflowException: Value was either too large or too small for an Int32.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int32.Parse(String s)
at DarkId.Papyrus.LanguageService.Program.Syntax.NodeBinder.<>c__DisplayClass35_1.<BindLiteralExpression>b__1(IntLiteralNode literalNode, Scanner`1 _) in C:\projects\papyrus-lang\src\DarkId.Papyrus.LanguageService\Program\Syntax\NodeBinder.cs:line 699
at DarkId.Papyrus.LanguageService.Program.Syntax.NodeBinder.CreateNode[T](SyntaxNode parent, Scanner`1 parentChildren, Action`2 bindAction) in C:\projects\papyrus-lang\src\DarkId.Papyrus.LanguageService\Program\Syntax\NodeBinder.cs:line 898)
The numbers in question -2500483647
and 6985425358
which should never exist, but just for case-tests they do, to check for proper behaviour.
Local variables are allowed to be flagged as const
. The extension reports a problem that it expected an identifier.
[Build.ppj] Identifier expected.
Function MyConstant()
int DaysInWeek = 7 const
Debug.Trace("There can only be "+DaysInWeek+" days in a week. This fact is unchangeable. :sad:")
EndFunction
Debugger variables do not support struct
types for Fallout 4.
Below is the sample I use to test structures.
Scriptname Example2 extends Actor
{The documentation string.}
; Fields
;--------------------------------------------
IntegerValue Count
Struct IntegerValue
int Value = 0
EndStruct
; Properties
;--------------------------------------------
Group KeyCodes
int Property Left = 37 AutoReadOnly
int Property Right = 39 AutoReadOnly
EndGroup
; Events
;--------------------------------------------
Event OnInit()
RegisterForKey(Left)
RegisterForKey(Right)
EndEvent
Event OnKeyDown(int keyCode)
KeyDownHandler(self, keyCode, Count)
EndEvent
; Statics
;--------------------------------------------
; Handles the OnKeyDown event by incrementing or decrementing a value.
; Note: Globals essentially a treated as external scripts.
Function KeyDownHandler(Example2 script, int keyCode, IntegerValue integer) Global
If (keyCode == script.Left)
integer.Value -= 1
Debug.TraceSelf(script, "OnKeyDown", "Increased the count to "+integer.Value)
ElseIf (keyCode == script.Right)
integer.Value += 1
Debug.TraceSelf(script, "OnKeyDown", "Decreased the count to "+integer.Value)
Else
Debug.TraceSelf(script, "OnKeyDown", "The key "+keyCode+" is unhandled.")
EndIf
EndFunction
This is related to issue #47
Describe the bug
The papyrus.searchCreationKitWiki
command does not work in menu contexts. The command does work as intended when used from the command palette or keyboard shortcut.
To Reproduce
Steps to reproduce the behavior:
Control
+Shift
+F12
.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.