jaam Posted June 6, 2018 Author Share Posted June 6, 2018 New for test in v19 2018 06 05: ; Get all the keys and values contained in a section. Both at once to avoid discrepancies in the order. ; The keys are in VarToVarArray(Var[0]) as String[] and the values in VarToVarArray(Var[1]) as String[] Var[] Function GetCustomConfigOptions(string fileName, string section) native global ; Set a list of keys and values in a section. Any other existing key will be left alone. bool Function SetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global ; Reset all the keys and values contained in a section. ; Any exiting key value pair will be suppressed first, so providing none arrays will effectivly removes all keys from the section. bool Function ResetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global ; Get all the sections in a file. string[] Function GetCustomConfigSections(string fileName) native global Some had their interface changed and all are now tested. EDIT: And I forgot PrintConsole, tested also: ; Prints a message to the debug console. Exposes the internal F4SE function Console_Print using the code found in Papyrutil in Skyrim. bool Function PrintConsole(String text) native global Link to comment
jaam Posted June 6, 2018 Author Share Posted June 6, 2018 Users searching for the latest version should still use v18! 2 Link to comment
smashly Posted June 6, 2018 Share Posted June 6, 2018 v19 with the LastCrosshairRef function, were do i find it? I saw the LastCrosshairRef function in the source in version 17, even tried adding the function to LL_FourPlay script, but it didn't return anything.. Then I saw your post on the prior page and thought maybe you had done some work to it... Grabbed the Test-LLFP-v19-20180605.7z, only to realize I must of been to late to the party since that's not the LL_Fourplay v19 plugin LastCrosshairRef would be damn handy for my use. I miss FNV and it's ObjectUnderRectile function, the range of it was awesome...lol. Link to comment
jaam Posted June 6, 2018 Author Share Posted June 6, 2018 It's in Src-v19-20180605, use the dll in the Release folder and the updated scripts Link to comment
jaam Posted June 6, 2018 Author Share Posted June 6, 2018 I found out why the LastCrossHairActor and LastCrossHairRef stopped working. Uploading a corrected version as Src-LLFP-v19-20180606. EDIT: Note that the method used does not detect every reference. For example in Sanctuary it picked the road sign but not the tree or the street light in my limited test. Actor are properly detected though. 3 Link to comment
smashly Posted June 7, 2018 Share Posted June 7, 2018 Thank You jaam, The LastCrossHairRef seems to work fine on any type of activateable object that is in range of the crosshair from what I've tested. nice. Be nice to have the same type of targeting that the workshop has or being able to get the workshop mode current target ref. I gather Place Everywhere author has that sorted in his code since he offers object movement of targeted objects. eg: target objects that are out of range of the crosshair Did you by chance happen to change anything with the DelKeywordFromForm? I saw the needs testing comment in the script. I'll give it another go if so. Link to comment
dagobaking Posted June 7, 2018 Share Posted June 7, 2018 Hello @jaam I've run into an issue using the CustomConfigOption functions. I'm trying to save and later retrieve XML in string form. The Set works ok and looks like this in the save file: [Actors] 1244368=<stat shortForm="Di" maxValue="10" label="Distance" minValue="0" value="0"/> <stat shortForm="En" maxValue="10" label="Enthusiasm" minValue="0" value="0"/> <stat shortForm="Fa" maxValue="10" label="Fatigue" minValue="0" value="0"/> <stat shortForm="Fr" maxValue="10" label="Friction" minValue="0" value="1"/> <stat shortForm="Go" maxValue="10" label="Goofiness" minValue="0" value="3"/> <stat shortForm="Ha" maxValue="10" label="Happiness" minValue="0" value="0"/> <stat shortForm="Sa" maxValue="10" label="Sadness" minValue="0" value="0"/> <stat shortForm="Sp" maxValue="10" label="Speed" minValue="0" value="0"/> 12063=<stat shortForm="Di" maxValue="10" label="Distance" minValue="0" value="0"/> <stat shortForm="En" maxValue="10" label="Enthusiasm" minValue="0" value="0"/> <stat shortForm="Fa" maxValue="10" label="Fatigue" minValue="0" value="0"/> <stat shortForm="Fr" maxValue="10" label="Friction" minValue="0" value="1"/> <stat shortForm="Go" maxValue="10" label="Goofiness" minValue="0" value="6"/> <stat shortForm="Ha" maxValue="10" label="Happiness" minValue="0" value="0"/> <stat shortForm="Sa" maxValue="10" label="Sadness" minValue="0" value="0"/> <stat shortForm="Sp" maxValue="10" label="Speed" minValue="0" value="0"/> But, when I try to Get the values back out, it only gives me the first line like this: <stat shortForm="Di" maxValue="10" label="Distance" minValue="0" value="0"/> Is that something that needs to be fixed in LLFP? Or, is there a way that I can wrap the string so that I can retrieve the full thing? Link to comment
dagobaking Posted June 7, 2018 Share Posted June 7, 2018 I tried unescaping the whole string before sending it in. That saved ok. But, then the get command only retrieved about 2.5 lines. Odd result. Maybe there is some kind of char limit being applied from LLFP? Link to comment
jaam Posted June 7, 2018 Author Share Posted June 7, 2018 I think all buffers are 32768 char long. Link to comment
dagobaking Posted June 7, 2018 Share Posted June 7, 2018 To be more precise in case it is helpful, escaping saves like this: [Actors] 1258764=%3Cstat%20shortForm%3D%22Di%22%20maxValue%3D%2210%22%20label%3D%22Distance%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22En%22%20maxValue%3D%2210%22%20label%3D%22Enthusiasm%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Fa%22%20maxValue%3D%2210%22%20label%3D%22Fatigue%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Fr%22%20maxValue%3D%2210%22%20label%3D%22Friction%22%20minValue%3D%220%22%20value%3D%221%22/%3E%0A%3Cstat%20shortForm%3D%22Go%22%20maxValue%3D%2210%22%20label%3D%22Goofiness%22%20minValue%3D%220%22%20value%3D%223%22/%3E%0A%3Cstat%20shortForm%3D%22Ha%22%20maxValue%3D%2210%22%20label%3D%22Happiness%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Sa%22%20maxValue%3D%2210%22%20label%3D%22Sadness%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Sp%22%20maxValue%3D%2210%22%20label%3D%22Speed%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A 1244368=%3Cstat%20shortForm%3D%22Di%22%20maxValue%3D%2210%22%20label%3D%22Distance%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22En%22%20maxValue%3D%2210%22%20label%3D%22Enthusiasm%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Fa%22%20maxValue%3D%2210%22%20label%3D%22Fatigue%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Fr%22%20maxValue%3D%2210%22%20label%3D%22Friction%22%20minValue%3D%220%22%20value%3D%221%22/%3E%0A%3Cstat%20shortForm%3D%22Go%22%20maxValue%3D%2210%22%20label%3D%22Goofiness%22%20minValue%3D%220%22%20value%3D%229%22/%3E%0A%3Cstat%20shortForm%3D%22Ha%22%20maxValue%3D%2210%22%20label%3D%22Happiness%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Sa%22%20maxValue%3D%2210%22%20label%3D%22Sadness%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22Sp%22%20maxValue%3D%2210%22%20label%3D%22Speed%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A But, a get from these keys will return something like this: %3Cstat%20shortForm%3D%22Di%22%20maxValue%3D%2210%22%20label%3D%22Distance%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat%20shortForm%3D%22En%22%20maxValue%3D%2210%22%20label%3D%22Enthusiasm%22%20minValue%3D%220%22%20value%3D%220%22/%3E%0A%3Cstat Link to comment
dagobaking Posted June 7, 2018 Share Posted June 7, 2018 2 minutes ago, jaam said: I think all buffers are 32768 char long. I just tested an example case and sublime counts the list at 255 chars before getting cut off. I think 255 has significance in some contexts...? Link to comment
jaam Posted June 7, 2018 Author Share Posted June 7, 2018 Yes. One must be limited. I'll check Link to comment
jaam Posted June 7, 2018 Author Share Posted June 7, 2018 You were right there was a limit at 255. Try this version : EDIT dll deleted because of v20. 2 Link to comment
dagobaking Posted June 7, 2018 Share Posted June 7, 2018 Works like a charm now! Thank you. Link to comment
jaam Posted June 7, 2018 Author Share Posted June 7, 2018 new in v20: fix for DelKeywordFromForm. ; Get all the keys and values contained in a section. Both at once to avoid discrepancies in the order. ; The keys are in VarToVarArray(Var[0]) as String[] and the values in VarToVarArray(Var[1]) as String[] Var[] Function GetCustomConfigOptions(string fileName, string section) native global ; Set a list of keys and values in a section. Any other existing key will be left alone. bool Function SetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global ; Reset all the keys and values contained in a section. ; Any exiting key value pair will be suppressed first, so providing none arrays will effectivly removes all keys from the section. bool Function ResetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global ; Get all the sections in a file. string[] Function GetCustomConfigSections(string fileName) native global ; For all array functions: ; The implementation as an arbitrary limitation of 32767 bytes buffer for all Keys, Values or sections involved. ; If needed because the limitation becomes a problem, another implementation can be done using memory allocation, though there will remain a limit imposed by Windows. ; When arrays for keys and values are provided, the count of elements in both arrays must be identical or the function fails on purpose. ; An empty value should be provided as a zero length string. TO BE TESTED ; ; CrossHair functions ; ==================== ; ; Returns the Reference that is currently under the CrossHair. Returns None if there isn't one currently. ObjectReference Function LastCrossHairRef() native global ; Returns the last Actor that is or was under the CrossHair. Returns None until there is one since the game was (re)started. Actor Function LastCrossHairActor() native global ; ; Misc functions ; ============== ; ; Prints a message to the debug console. Exposes the internal F4SE function Console_Print using the code found in Papyrutil in Skyrim. Function PrintConsole(String text) native global 1 Link to comment
jaam Posted June 7, 2018 Author Share Posted June 7, 2018 v20 is the same as the last v19 , but with DelKeywordFromForm tested and fixed. I also commented out the functions I know do not work as expected. Link to comment
CGi Posted June 7, 2018 Share Posted June 7, 2018 Thank you for your continued work. Highly appreciated. Without it, some stuff i want to do wouldn't be possible. Please keep up the good work, man. Link to comment
jaam Posted June 7, 2018 Author Share Posted June 7, 2018 Stop. I have the wrong DLL in v20. Corrective v21 upcoming Link to comment
jaam Posted June 7, 2018 Author Share Posted June 7, 2018 v21: Same as v20 but with the correct DLL. Sorry for anyone who downloaded v20. 2 Link to comment
smashly Posted June 8, 2018 Share Posted June 8, 2018 Thank You jaam, You rock, DelKeywordFromForm works awesome on my locations. Had the test code commented out in place from last update. 21 nails it. good work Cheers Edit: I'll try pushing my luck again since you seem to be active ftm. I asked once before about the FlyCam and key config... If the user maps their movement keys to anything other then WSAD the fly cam movement fails to move the cam. It's definitely broken in this scenario. Example: I set my movement keys to Arrow keys and when FlyCam is enabled I can not move the camera with any keys at all. The Arrow keys wont move the cam and the WASD keys wont move the cam. If I do not remap WASD movement keys then FlyCam camera movement works fine. Does not matter the method I assign the keys. Setting the movement keys via CustomControlMap.txt or by the native in game menu, the results are the same, broken fly cam movement. I'm getting this result on more then one pc and 2 different operating systems. It is not a case of the incorrect versions or bad installs of F4SE, LL_FourPlay plugin. To eliminate that the error comes from Layer keys being disabled in Fourplay itself, I've created a small test esp with no dependencies, 1 quest, 1 script, registered 1 key to toggle FlyCam and no layer disable keys. The behavior I mention above is exactly the same. No FlyCam cam movement when Movement keys are mapped to anything other then WASD. Link to comment
jaam Posted June 9, 2018 Author Share Posted June 9, 2018 Sorry I haven' taken the risk so far to touch my keyboard configuration in order to test your issue. I'll probably will need to at some point but it is rather strange that you are the only one reporting it (so far). Link to comment
dagobaking Posted June 15, 2018 Share Posted June 15, 2018 Hello @jaam! LooksMenu has a Papyrus API for adding body overlays through the "Overlays" script. And the plugin handles TintMasks also at character creation time. But, there isn't a script for applying those TintMasks (that I could find) via Papyrus. Is that something you can hook into and make Papyrus function for? It seems like the functionality is there. Just without a function to apply it from code... Link to comment
jaam Posted June 15, 2018 Author Share Posted June 15, 2018 Isn't that what the overlays.pex/psc is about ? I have it next to BodyGen.pex/psc. Link to comment
dagobaking Posted June 15, 2018 Share Posted June 15, 2018 4 minutes ago, jaam said: Isn't that what the overlays.pex/psc is about ? I have it next to BodyGen.pex/psc. I will double-check. But, it looks like that only applies to overlays that go on the hands and body. The ones that go on the face I think are handled different (tintmasks). 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