ryobg / jcontainers Goto Github PK
View Code? Open in Web Editor NEWThis project forked from silverice/jcontainers
JSON-based data structures for Papyrus - the TESV Skyrim SE scripting language
License: MIT License
This project forked from silverice/jcontainers
JSON-based data structures for Papyrus - the TESV Skyrim SE scripting language
License: MIT License
Currently there is this Papyrus function from JC:
Form function getForm(Int object, Int index, Form default=None) global native
Which can be used also to walk an array and get at the end Form[]
type.
The idea is to instead have a:
Form[] function getForm(Int object, Form default=None) global native
That is, faster way to convert the JC array into native, Papyrus one.
See https://forums.nexusmods.com/index.php?/topic/6560841-jcontainers-se/?p=59903116
After writing into JFormDB using path ".myroot.value" I can't read/write values from JDB with the same root.
Example:
bool result
result = JDB.solveIntSetter(".test.value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JDB.solveInt(".test.value"))
result = JFormDB.solveIntSetter(Game.GetPlayer(), ".test.value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JFormDB.solveInt(Game.GetPlayer(), ".test.value"))
result = JDB.solveIntSetter(".test.value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JDB.solveInt(".test.value"))
Output:
result=TRUE
value=1
result=TRUE
value=1
result=False
value=0
It breaks only if I use the same root for JFormDB and JDB.
Looks like new update landed recently.
Ok, found another issue in string.h
DEFINE_MEMBER_FN(ctor, string_ref *, 0x00A511C0, const char * buf);
DEFINE_MEMBER_FN(Set, string_ref *, 0x00A51210, const char * buf);
DEFINE_MEMBER_FN(Release, void, 0x00A511B0);
are the old Skyrim references and should match the new ones in the skse64\gametypes.h
DEFINE_MEMBER_FN(ctor, string_ref *, 0x00C28280, const char * buf);
DEFINE_MEMBER_FN(Set, string_ref *, 0x00C283F0, const char * buf);
DEFINE_MEMBER_FN(Release, void, 0x00C283D0);
This was causing a ctd when using the functions to load the json files.
I would put his a pull request but as I've never really used github other than to download code I'm not sure of what the settings should be.
Ok, the first version for trials was released
https://github.com/ryobg/JContainers/releases/tag/v4.0.0-alpha
The next milestone is to gather enough volunteers willing to try it out and together chase the bugs and issues away. This issue is to keep a track of various notes during that process.
EDIT: Added newer, beta release
https://github.com/ryobg/JContainers/releases/tag/v4.0.1-beta
SKSEVR was just released. The source code for it is in the release. I am hoping a SKSEVR is as simple as using that source code for a dll build instead of the SKSE64 source. Either way, thank you for considering the request.
Are the lua 'os' functions supported such as os.date(), os.time() and os.clock()? I'm getting errors that there was an "attempt to call field 'clock' (a nil value)" etc when I try to use them. The reason I was thinking of using them (os.clock() particularly) was to avoid my log function from writing to file too often (which causes slowdowns whenever the file is opened, written and closed) so I was going to buffer writes into a local variable and only flush the text to the file every second or two.
Looks like hotfix for stuff not relevant to JC.
Are there plans to update JContainers for SSE 1.5.50 and SKSE 2.08? I'm getting questions. Thanks :)
Is there a way to determine whether a form is invalid in lua? When papyrus accesses an invalid JC form (e.g. forms have changed due to a different load order etc), it reads as nil. But that form still appears to have a value (CData) in lua - so testing for nil doesn't work. Essentially, I want to be able to delete invalid forms (or otherwise act on them) from a lua script. Thanks.
So, on the 14th of March, a new version of SKSE VR was released (2.0.11). And it seems that JContainers mod crashes if you use it with this version of SKSE VR. I tested it with vortex
I will drop some notes here to ponder on. People also can express their opinion.
Pros:
Cons:
To be continued...
Hi, I've been testing JContainers64 with a ported SSE version of AH Hotkeys. Installing AH Hotkeys caused a CTD on reloading a save game after AH Hotkeys was installed. I've done some testing by commenting out code that runs on startup, and isolated at least one of the causes down to the JArray.retain function, as follows:
string property JCTempTag = "AH_Hotkeys_TempTag" autoreadonly
int property objTempArray auto hidden
objTempArray = JValue.retain(JArray.object(), JCTempTag)
The JC functions that run prior to this point appear to be fine. Creating a JArray of strings in a test plugin and running this multiple times appeared to be fine over multiple savegame reloads, but the CTDs appear as soon as the above lines are added. There may be other causes of the CTD as well since the fully-uncommented AH Hotkeys code results in an immediate CTD after only the first savegame reload (not merely the 2nd or 3rd reload).
I can attach my working files if that will help.
It would be helpful if the .psc source files could be stored online in the repo to allow for remote builds using Pyro.
I've been getting frequent exceptions being output to Visual Studio when calling lua functions while running the debugger (I've been tinkering with developing a dll. Note that the exception also occurs without my test dll being active).
The exception being reported is :
Exception thrown at 0x00007FFAF762A839 (KernelBase.dll) in
SkyrimSE.exe: 0xE24C4A02.
I've isolated at least one of the causes to calling a lua function (any function) through jLua.evalLuaInt(). The exception doesn't happen every time, but is more likely to happen if the lua function is more complex (but can still happen, just more infrequently, if there is nothing in the code block).
The exception also doesn't appear to happen immediately. The function may successfully return to papyrus, but the exception won't be caught by Visual Studio until a short while later (so I had to add wait functions in papyrus of 0.1 to 0.2 seconds to isolate where the exceptions were coming from).
The exceptions also don't appear to be fatal since the game continues running and there is no indication in either the game or the JC or Papyrus logs that it happened.
However, this could point to an underlying latent issue that could cause problems? AH Hotkeys is the only mod in my load order causing this as far as I know. There are no exceptions being output if AH Hotkeys is disabled.
Edit: this is with JC 4.1.11 using SKSE 2.0. 16 and SSE 1.5.80.
I will drop here some notes for functions which may be of use for JC users.
int JArray.erase[Integers|Floats|Strings|Forms|Objects] (object, value, start = 0, end = -1)
- basically run over the whole range and delete all items which equal the passed value. Optionally, specify sub-range. Return the number of erased items.JArray.reverse (object, strart = 0, end = -1)
- reverse the order of elements within an array. May be used in conjunction with JArray.sort
to get the opposite order.int JArray.count[Integers|Floats|Strings|Forms|Objects] (object, value, start = 0, end = -1)
- go over a range within an array and count how many times a given value occurs.JArray.sort
with some generic utility to enable like reverse sorting, attribute sorting and etc. Probably with some kind of Lua/Papyrus(?) predicate.Currently, if a JC function tries to access a non-existent object, I only get the follow: "Warning: access to non-existing object with id 0x12CA" (or some other object ID).
The problem is that this makes it fairly difficult to pin-point exactly where the issue is in the code (if only Skyrim had some sort of debugger to step through the code...). It would be helpful if the name of the function throwing the warning is also included in the description, as well as providing an integer representation of the object ID (so I don't need to convert it to decimal in the calculator), and the parameters - if that's possible.
Thanks
Edit: the method I've been using to date involves commenting out chunks of code until I narrow it down enough to find the problem. It works. I'm just wondering if there was a better way.
Log file is going to the Oldrim folder,
Line 120 skse_callbacks.cpp '"\My Games\Skyrim\SKSE\' needs changing to '"\My Games\Skyrim Special Edition\SKSE\'
Post install is also not creating the 'Domains' folder under 'Data\SKSE\Plugins\JCData' - willl cause a ctd when starting skyrim if missing.
One of my lua scripts tests whether two papyrus forms are identical or not. Testing whether they are equal is fine. However, if I wanted to test whether either form is nil, then lua generates an error.
I believe it comes down to the metatype function in jc.lua:
local CForm = ffi.metatype('CForm', { __eq = function(l, r) return l.___id == r.___id end })
This function doesn't appear to consider the situation if either side is a nil value since referencing the id of either would generate an error (however, this is unfamiliar to me)? Thanks
Again!
The work that went into tracking this down is long and NSFW so I'll try to summarize:
Creation Club ESL masters load after official ESMs and before other mods.
Skyrim and SKSE track mods according to their literal load order - not the plugin order everyone is familiar with. They used to be the same thing, but with the advent of CC ESLs are not anymore.
SKSE's GetModByName, and likely other functions based on mod names and "load order", work according to that literal load order value.
Therefore, if one CC ESL master is loaded then it will be in the FE plugin order group but occupy position 05 in the load order (00-04 are the five ESMs). If Mod.esp is at 05 in the plugin order then it will be bumped down one spot to 06 in the actual load order, and this latter value is what gets reported through SKSE.
4a. JContainers unserializes "__formData|Mod.esp|0x123456" by looking up the load order for Mod.esp, shifting left, adding the relative form ID, and calling GetForm with it. This example would be calculated as 06123456, however to Skyrim the form is actually 05123456. The form will not be loaded.
I think the best solution is to have JContainers use the native GetFormFromFile function, bypassing all the load order confusion. I've tested in-game through Papyrus and it works correctly for regular mods, but I only assume it works correctly for ESLs.
It could be argued that the bug is in SKSE - easily, even - however I'm not sure how it would deal with ESLs. They can't all be at load order FE/FF after all. Or could they? A new set of methods might be required. But frankly, I think GetFormFromFile is the most appropriate method for JContainers to use to begin with.
4b. Untested but I assume serializing will have a similar problem: a form 05123456 should correspond to Mod.esp's xx123456, but JContainers (through SKSE) will see that the mod at position 05 is whatever.esl and thus serialize the form incorrectly. It would accidentally unserialize back to the original Mod.esp form though.
I don't know what JContainers could do to solve this one.
4c. I don't know how this impacts SKSE cosaved data.
I can write some Papyrus repro code if needed, and right now there are a couple Creation Club mods that are temporarily free to download (the mudcrab and some spell/mage clothes thing).
Currently there is the option of JContainers.userDirectory() for writing and loading files, another option like JContainers.gameDirectory() that returns the game install directory would be useful for reading in and writing to files created by other frameworks, or to allow for JContainers json files to be easily packed into mods that are loaded into mo2 or vortex.
I experienced issues when attempting to build JContainers from source using a Github workflow.
The error stemmed from boost defaulting to msvc140 when compiling instead of msvc141.
I resolved the issue by editing build_boost.bat to specify the right msvc toolset:
Old:
if not exist b2.exe (
echo b2 not found, bootstrapping Boost...
call bootstrap.bat
if errorlevel 1 (
echo Unable to bootstrap, exiting...
popd
exit /b 2
)
)
New:
if not exist b2.exe (
echo b2 not found, bootstrapping Boost...
call bootstrap.bat vc141
if errorlevel 1 (
echo Unable to bootstrap, exiting...
popd
exit /b 2
)
)
It would be great if this change could be incorporated into the main branch if possible.
Hi ryobg, is there any chance of a quick backport of the Lua bitwise operators to the LE version? I am needing bitwise for functions in a mod I am hoping to release on both platforms and despite the info on the LE Git stating they're included since JC 3.0 they do not appear to be.
If not, can you tell me how I might be able to work in something like https://gist.github.com/kaeza/8ee7e921c98951b4686d to at least get the functions in pure lua?
I've been busy writing some lua code in an attempt to speed up certain parts of my papyrus code. Since I'm still learning lua, this has been, while fun, also somewhat frustrating when trying to track down the exact source of all the error messages printed out to the console. Mostly, these error messages refer to some error in the internal lua files, such as:
Lua error: [string "local args = ...; local jobject = args;return..."]:1: attempt to call field 'findIndex' (a nil value)
Lua trace: stack traceback:
[C]: in function 'findIndex'
[string "local args = ...; local jobject = args;return..."]:1: in function 'func'
...ion/Data/SKSE/Plugins/JCData/InternalLuaScripts/init.lua:202: in function <...ion/Data/SKSE/Plugins/JCData/InternalLuaScripts/init.lua:199>
To my untrained eye, this doesn't really tell me the exact source of the problem - printing out the full text of the lua function that was attempted to be called (i.e. what I put into the JValue.evalLuaObj predicate parameter) would help track down the issue.
I'm currently implementing JContainers (4.1.13 for SKSE 2.0.19) for a project, and I followed the API usage example in order to get access to its functionality.
However, this line of code never completes:
default_domain = root->query_interface<jc::domain_interface>()->get_default_domain();
I created a debug build of JContainers to investigate further and found it stalling in the singleton::get()
function. I don't know why this happens.
Any help would be appreciated.
Looks like there was new SKSE VR release on 2018-05-26.
I've built an SKSE DLL linking to the JContainers64 API. The intent is to call some of the JContainers functions to directly access JC containers (JArray, JMap, JValue). So far, I've successfully compiled a static library for my JC interface (which is a VS 2017-era toolset v141 code base), linked into my DLL, which is based on VS 2019 (v142) and CommonLibSSE (I didn't really want to have two DLLs talking to each other).
I've done this and it now compiles fine. The problem is that getting the default domain always results in a hang - it doesn't crash, it just continues waiting on a 'SingleObject'. Even just using the API Example project hangs on this code in line 60 of source.cpp.
Looking in the call stack, it seems to be getting stuck in the boost basic_deadline_timer in autorelease_queue(object_registry& registry) when trying to retrieve the default_domain in domain_master.
Any tips on proceeding? Given that it's happening with the unmodified API Example too, I don't think it's an issue with my code?
Thanks.
Again.
JContainers64 4.1.1 plugin loaded Registering functions started 'Registering functions' throws 'boost::filesystem::directory_iterator::construct: Der Verzeichnisname ist ungültig: "D:\Programme\Steam\steamapps\common\Skyrim Special Edition\Data\SKSE\Plugins\JCData/Domains/"' of type 'class boost::filesystem::filesystem_error'
The translation of the OS message is roughly "directory name invalid". I have cloned the repo and built the plugin myself (made the project files compatible with win 7, had troubles with the original project files and resolved them).
I tried to load it with MO, which uses a VFS, and with a manual installation. The latter was successful.
Is there anything that can be done about it not seeing VFS stuff? I have little knowledge about VFS but still wanted to point the pitfall out.
I would like to test various expressions and print out the results to debug my lua scripts - but print() doesn't appear to print to the Skyrim console nor the JC log. Is this output going somewhere else? Assert() does work, but it prints a multi-line error message and stops execution.
In the Jlua api, it states that it is experimental and subject to change. I'm considering using these functions since it seems like a fairly simple way of calling relatively complex lua functions that take multiple parameters, such as multiple jobjects etc.
Is this api likely to change in future or is it now finished (and hopefully working as expected, I'll be testing this over the next few days)?
How would I get access to a JC object id in lua (i.e. the same number that is returned to papyrus as the object id number)? The .___id field for each object appears to be CData and not a number? Thanks.
I've been trying to replicate in lua the SKSE CRC32 function in HashUtil.cpp in order to calculate an itemID hash of the item display name and the formID. I've successfully done this - lua is calculating the correct hash. The problem is getting this number back into papyrus.
The hash calculated in lua is the same as the hash returned using the SKSE functions GetWornItemId() and GetEquippedItemId(), as well as calling the CRC32() and CalcItemId() functions directly in HashUtil.cpp and PapyrusActor.cpp respectively (albeit, via an online c compiler), so I'm pretty sure my translated lua function is correct.
However, after a certain length, numbers don't seem to be returned from lua correctly and start showing errors - the hashes being returned to papyrus were not the same as the hashes calculated in lua or the original c function. So I did a test, just passing numbers into lua and back out again to papyrus, and found the following (extracted from my log):
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 1 = 1
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 12 = 12
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 123 = 123
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 1234 = 1234
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 12345 = 12345
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 123456 = 123456
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 1234567 = 1234567
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 12345678 = 12345678
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 123456789 = 123456792
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 1234567890 = 1234567936
[07/19/2018 - 09:26:35PM] Debug(): test lua result. 12345678901 = -2147483648
Passing 12345678 to lua returned 12345678 back to papyrus, but passing 123456789 into lua incorrectly returned 123456792 to papyrus.
Is there some sort of length restriction to numbers somewhere in the pipeline? These numbers seem to be passed into lua ok (I printed them out into a lua log and they were exactly the same as what I entered in papyrus), but something gets messed up on the way out.
Papyrus JLua.evalLuaInt() function:
JLua.evalLuaInt("return AH_Hotkeys.NumTest(123456789)", 0))
Lua function:
function AH_Hotkeys.NumTest(testNum)
AH_Hotkeys.LogMessage("NumTest = "..testNum)
return testNum
end
Edit: I am able to return the hash results from lua correctly using strings (using evalLuaStr and a wrapping function at the lua end for tostring()), and then converting them back into ints in papyrus. Which I suppose is fine for now (this isn't a time critical operation), but this is a workaround and ideally returning the full int values should be possible?
A debug build doesn't run correctly but the mods I'm testing appear to work with a release build. The mod I'm testing with appears fully functional.
The problem appears when attempting to load a save game, either the load function or the save is corrupting the data and causing another ctd.
I have several object arrays and I am wondering if there is a way to use jArray.sort using a specific int/float/string value within the objects to order the objects within the array?
Possible functions which may be added if interest is high enough.
int JArray.[Max|Min][Integer|Float] (object, start = 0, end = -1)
end
equal or less than start
and etc.).A bug inside a mod led to a lot of rogue big objects stored inside the skse co-save. The mod in question is Ecotone Dual Sheath up to version 0.3.1. It was fixed by the author in version 0.3.2. The co-save is now 100mb+ and several user are affected. The following code is likely to be the cause of it:
`Function EnableOrDisbleMod()
DebugMessage("ectnDualSheathQuest - EnableOrDisbleMod")
If (modEnabled)
jsonData = JValue.readFromFile("Data/Ecotone Dual Sheath Patch.json")
JValue.retain(jsonData)
DebugMessage("ectnDualSheathQuest - EnableOrDisbleMod: jsonData isExists = " + JValue.isExists(jsonData))
; get the slot numbers from the json file
int settingMap = JMap.getObj(jsonData, "Setting")
leftHandSlot = JMap.getInt(settingMap, "LeftHandSlotID")
rightHandSlot = JMap.getInt(settingMap, "RightHandSlotID")
patchFileName = JMap.getStr(settingMap, "PatchFileName")
settingMap = JValue.release(settingMap)
If (PlayerRef.HasSpell(ectnDualSheathAbility))
SendModEvent(ectnDualSheathResetEvent)
Else
PlayerRef.AddSpell(ectnDualSheathAbility, false)
EndIf
If (followerEnabled || npcEnabled)
NPCToggle()
EndIf
Else
JValue.release(jsonData)
SendModEvent(ectnDualSheathDisableEvent)
NPCToggle()
EndIf
EndFunction`
Here is the fixed code of version 0.3.2:
`Function EnableOrDisbleMod()
DebugMessage("ectnDualSheathQuest - EnableOrDisbleMod")
If (modEnabled)
JValue.release(jsonData)
jsonData = JValue.readFromFile("Data/Ecotone Dual Sheath Patch.json")
JValue.retain(jsonData)
DebugMessage("ectnDualSheathQuest - EnableOrDisbleMod: jsonData isExists = " + JValue.isExists(jsonData))
; get the slot numbers from the json file
int settingMap = JMap.getObj(jsonData, "Setting")
leftHandSlot = JMap.getInt(settingMap, "LeftHandSlotID")
rightHandSlot = JMap.getInt(settingMap, "RightHandSlotID")
patchFileName = JMap.getStr(settingMap, "PatchFileName")
settingMap = JValue.zeroLifetime(settingMap)
If (PlayerRef.HasSpell(ectnDualSheathAbility))
SendModEvent(ectnDualSheathResetEvent)
Else
PlayerRef.AddSpell(ectnDualSheathAbility, false)
EndIf
If (followerEnabled || npcEnabled)
NPCToggle()
EndIf
Else
JValue.release(jsonData)
SendModEvent(ectnDualSheathDisableEvent)
NPCToggle()
Debug.Notification("Ecotone Dual Sheath has been disabled")
EndIf
EndFunction`
As you can see the only change is an added JValue.release(jsonData). This however does not fix already affected save games. Therefore my question: could we find a way to identify and remove these rogue objects from our co-saves? Unfortunately they are neither tagged nor inside a domain.
That test seems to fail occassionally and since recently.
See also 91389f3
Is there way to initialize JDB with default values ?
I have to wrap each JDB value into property:
int MyInt_Default = 0
int property MyInt
---int function get()
------return JDB.solveInt(".MyMod.MyInt", MyInt_Default)
---endfunction
---function set(int value)
------JDB.SolveIntSetter(".MyMod.MyInt", value, true)
---endfunction
endproperty
I'm not happy with such cumbersome code.
I can use OnInit or OnPlayerLoadGame event to initialize JDB, but it doesn't guaranty that another script won't try to read uninitialized values from JDB.
Can I access JDB from init.lua to do my initialization before any script can access it ?
Everything worked fine until for some reason loading any save game made after what seems to be a loadable file. The next save game made with it will crash after a few seconds when loading it.
https://pastebin.com/5UAmfhUR - Crash log
https://pastebin.com/tpBcXj7n - JContainers64.log
Hopefully the file "__delete_if_empty" made by Vortex mod manager inside JCData folder isn't causing issues, as everything worked fine before.
I'm using the version that came with mod VioLens, it has version 4.0.1b of JContainers64. I tried re-installing but that did not help. It is the only mod that is actively using it.
If I save indoors where I saved already, the save game is fine. If I go outside to save, that save game refuses to load.
Edit: I did those steps in order and the log is different and comes with some garbled text when the save is loaded.
Completely deleting all folders associated and installing JContainers64 outside of the mod manager seems to be working fine. Those spare files inside the working directory for the plugin seem to be the cause, but what is strange the issue only appeared after a number of saves, rather than immediately.
Regardless, I have sent a bug report to the Vortex team.
An assert to trigger when loading invalid triggers:
Hi, I'd like to request the JArray.eraseIndex() function be added to remove JArray entries. Currently, there's no way I can see to do this from within lua. table.remove() doesn't work since the JArray is cdata, not a table. I also had a look at JArray.__newindex using a nil value, but that doesn't seem to do the job.
So I had a look in the source code and came up with the following changes, which seem to work in my testing:
-- Added 'eraseIndex' function from tes_array.h to JArrayNativeFuncs in jc.lua.
local JArrayNativeFuncs = retrieveNativeFunctions('JArray',
{
object = {'handle'},
objectWithSize = {'handle', 'uint32_t'},
--getInt = {'int32_t', 'handle, index, int32_t'},
--getFlt = {'float', 'handle, index, float'},
--setInt = {'void', 'handle, index, int32_t'},
--setFlt = {'void', 'handle, index, float'},
valueType = {'int32_t', 'handle, index'}, -- AH CHANGED
eraseIndex = {'void', 'handle, index'}, -- AH ADDED
}
)
-- Added corresponding lua function to jc.lua
function JArray.eraseIndex(optr, idx)
JArrayNativeFuncs.eraseIndex(jc_context, optr.___id, convertIndex(idx))
end
Thanks.
Example:
bool result
result = JDB.solveIntSetter(".value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JDB.solveInt(".value"))
result = JFormDB.solveIntSetter(Game.GetPlayer(), ".value", 1, true)
Debug.Trace("result=" + result)
Debug.Trace("value=" + JFormDB.solveInt(Game.GetPlayer(), ".value"))
Output:
result=TRUE
value=1
result=False
value=0
Not a big issue, because you usually add prefix, but anyway.
Are bitwise operations included in the Lua implementation? I'm not sure if JContainers uses lua 5.2 or 5.3 (or other?) but bit32.bxor(x,y), x & y etc output errors in the log. I tried the following:
JValue.evalLuaInt(0, "return bit32.bxor(8, 2, 10)")
but got the following error:
Lua error: [string "local args = ...; local jobject = args;return..."]:1: attempt to index global 'bit32' (a nil value)
Lua trace: stack traceback:
[C]: in function '__index'
[string "local args = ...; local jobject = args;return..."]:1: in function 'predicate'
...Special Edition/Data/SKSE/Plugins/JCData/lua/jc/init.lua:50: in function 'func'
...ion/Data/SKSE/Plugins/JCData/InternalLuaScripts/init.lua:202: in function <...ion/Data/SKSE/Plugins/JCData/InternalLuaScripts/init.lua:199>
Note that the example above is also the example included in the JContainers documentation.
On the other hand, JValue.evalLuaInt(0, "return math.pi")) is fine (no error and returns the integer '3').
Maybe it's something I'm doing wrong?
Thanks.
As it turns out original code did some custom changes to SKSE. Here I will keep a track of notes wrt to changes done in x64 branch in order to support State Functions. This currently is blocking issue to continue with the build.
Some insight was provided for that though comment #1 and comment #2 - thanks javierhimura!
If you just serialize the entire form ID and use SKSESerializationInterface::ResolveFormId
, then you don't have to worry about changes to the load order.
My Game CTDs on my game loading a save. It'll actually load into the save for a solid 10 seconds and then immediately CTD. Tried it without it and the game successfully loaded with no problems.
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.