Jump to content

Jabadahut50

Resident
  • Posts

    37
  • Joined

  • Last visited

Reputation

21 Excellent

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I am very curious about potential examples to see how these things are done. It sounds fascinating.
  2. If you're talking about the spinning crystals... llTargetOmega is your best bet... llSetPrimitiveParamsFast occasionally to resync the spin. If it was something else, you'll have to specify.
  3. Wow.... not bad at all. Blender can do all of this but is WAY fiddlier, so it's nice to have a separate piece of software that specializes it. And their free license ACTUALLY includes the availability to do commercial work with it. Throw in a fairly reasonable price that is cheaper than adobe even when you do go over that amount of revenue... this is looking like a great piece of software. Thanks for sharing!
  4. this kind of thing is also very useful for people who DO know how to write scripts but find syntax far more tedious than the drag and drop method (aka lazy people like me XD)
  5. I have almost never gotten a good script out of chat gpt and it's actually what drove me to take the time to learn how to actually script troubleshooting its hallucinated code. I found it had the tendency to make up functions and constants a lot.
  6. The easiest thing would be simply to set up a listen event and have the dancer look for a chat command, but not filter by the poster.
  7. Another update. This time I moved the Bail function into the Assume function and then split the Assume function into two separate types, allowing to individually test for type and value. Additionally, I added the ability to return instead of Bailing by setting a new parameter the BailFlag to 0 to allow for error handling instead of automatically killing the script no matter what. /*Assume and Bail Goal: Create functions and macros to enable easier debugging # Released under MIT License Copyright (c) 2023 Abel Skaeren(Jabadahut50.Resident) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef DEBUG #define DEBUG #endif //DEBUG #ifndef ASSUMEANDBAIL #define ASSUMEANDBAIL #ifdef DEBUG integer AssumeTypesCalls = 0; integer AssumeValuesCalls = 0; integer AssumeTypes(list Assume, list Test, integer BailFlag){ integer i;//for loops integer count;//for loops list types = ["Invalid","Integer","Float","String","Key","Vector","Rotation"];//Thank you to Quistess Alpha's reccomendation for simplifying the testing using this. ++AssumeTypesCalls; if(Assume != Test){ if(BailFlag == TRUE){ llOwnerSay("ERROR| Func: AssumeTypes Call " + (string)AssumeTypesCalls + ": Assume and Test are not the same length. Bailing!"); llSetScriptState(llGetScriptName(),FALSE); llSleep(0.1); }else{ llOwnerSay("ERROR| Func: AssumeTypes Call " + (string)AssumeTypesCalls + ": Assume and Test are not the same length. Returning."); return 0; } } count = llGetListLength(Test); for(i = 0; i < count; ++i){ if(llGetListEntryType(Assume, i) != llGetListEntryType(Test, i)){ if(BailFlag == TRUE){ llOwnerSay("ERROR| Func: AssumeTypes Call " + (string) AssumeTypesCalls + ": Assume[" + (string)i + "] Type " + (string)types[llGetListEntryType(Assume, i)] + " did not match Test[" + (string)i + "] Type " + (string)types[llGetListEntryType(Test,i)] + ". Bailing!"); llSetScriptState(llGetScriptName(),FALSE); llSleep(0.1); }else{ llOwnerSay("ERROR| Func: AssumeTypes Call " + (string)AssumeTypesCalls + ": Assume[" + (string)i + "] Type " + (string)types[llGetListEntryType(Assume, i)] + " did not match Test[" + (string)i + "] Type " + (string)types[llGetListEntryType(Test,i)] + ". Returning."); return 0; } } } llOwnerSay("SUCCESS| Func: AssumeTypes Call " + (string)AssumeTypesCalls + ": Assume and Test share all types. Returning."); return 1; } integer AssumeValues(list Assume, list Test, integer BailFlag){ integer i; integer count; ++AssumeValuesCalls; if(Assume != Test){ if(BailFlag == TRUE){ llOwnerSay("ERROR| Func: AssumeValues Call " + (string)AssumeValuesCalls + ": Assume and Test are not the same length. Bailing!"); llSetScriptState(llGetScriptName(),FALSE); llSleep(0.1); }else{ llOwnerSay("ERROR| Func: AssumeValues Call " + (string)AssumeValuesCalls + ": Assume and Test are not the same length. Returning!"); return 0; } }else{ count = llGetListLength(Assume); for(i = 0; i < count; ++i){ if((string)Assume[i] != (string)Test[i]){ if(BailFlag == TRUE){ llOwnerSay("ERROR| Func: AssumeValues Call " + (string)AssumeValuesCalls + ": Assume[" + (string)i + "] Value: " + (string)Assume[i] + " did not match Test[" + (string)i + "] Value: " + (string)Test[i] + ". Bailing!"); llSetScriptState(llGetScriptName(),FALSE); llSleep(0.1); }else{ llOwnerSay("ERROR| Func: AssumeValues Call " + (string)AssumeValuesCalls + ": Assume[" + (string)i + "] Value: " + (string)Assume[i] + " did not match Test[" + (string)i + "] Value: " + (string)Test[i] + ". Returning."); return 0; } } } } llOwnerSay("SUCCESS| Func: AssumeValues Call " + (string)AssumeValuesCalls + ": Assume and Test Values all equal. Returning."); return 1; } #else #define AssumeType(x,y) /* Removed by #undef DEBUG */ #define AssumeValue(x,y) /* Removed by #undef DEBUG */ #endif //DEBUG #endif //ASSUMEANDBAIL default { touch(integer num_detected) { integer i; //Passes and returns i = AssumeTypes([1,2,3],[1,2,3],0); //Fails and returns i = AssumeTypes([1,"2",3],[1,2,3],0); //Passes and returns i = AssumeValues([1,2,3],[1,2,3],0); //Fails and Bails. i = AssumeValues([1,2.1,3],[1,2,3],1); } }
  8. Sounds like they're talking about on the fly AO baking or maybe on upload AO map generation of some kind. It'd be a nice feature to be able to generate for a mesh on upload and then let people tick on option on a mesh during building so that you can have the mesh override the one in a material, so materials can be more portable between objects. So long as it's not the only method, and we can still make the ones in the GLTF at our discretion to maintain artistic vision.
  9. Just had a thought today. If we are getting rid of 32 bit viewer support and switching exclusively to 64 bit. Is LL going to go back in and solve tech debt based around 32 bit limitations and do the same with the servers? Are we going to get better rendering and building capabilities above 4000 m? Are we going to get 64 bit LSL variables? Somehow I doubt it, but it'd be great if they did.
  10. Won't let me edit the original again, so posting new modification here. This version makes Bail into a function and automatically removes it when you use #undefine DEBUG in your script, so you no longer need to put your Bail = Assume(); and following if statement into an #ifdef DEBUG block. The Preprocessor will simply automatically remove the new function for you. /*Assume and Bail Goal: Create functions and macros to enable easier debugging # Released under MIT License Copyright (c) 2023 Abel Skaeren(Jabadahut50.Resident) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef DEBUG #define DEBUG #endif //DEBUG #ifndef ASSUMEANDBAIL #define ASSUMEANDBAIL #ifdef DEBUG integer AssumeCalls = 0; integer Assume(list input, list test){//test to make sure the input is what you are expecting it to be. integer i; //for the loops ++AssumeCalls; //for tracking which assume call triggered the Bail. list TYPES = ["invalid","integer","float","string","key","vector","rotation"];//Thank you to Quistess Alpha's reccomendation for simplifying the testing using this. //test first to make sure there lengths are the same if(input != test){ llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input and Test lists not the same length, Bailing!"); return 0; }else{ for(i = 0; i <= llGetListLength(input); ++i){ if(llGetListEntryType(input, i) != llGetListEntryType(test, i)){ llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input[" + (string)i + "] did not match type to Test[" + (string)i + "]"); llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input[" + (string)i + "] was " + llList2String(TYPES,llGetListEntryType(input, i)) + "."); llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", expected " + (string)TYPES[llGetListEntryType(test, i)] + ". Bailing!"); return 0; } } for(i = 0; i<= llGetListLength(input); ++i){ if((string)input[i] != (string)test[i]){ llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input[" + (string)i + "]: " + (string)input[i] + " did not match Test[" + (string)i + "]: " + (string)test[i] + ". Bailing!"); return 0; } } } llOwnerSay("Succes| Func: Assume Call " + (string)AssumeCalls + ", Complete. " + llList2CSV(input) + " matched test. Proceeding."); return 1; } Bail(list input, list test){ integer Bail; Bail = Assume(input, test); if(Bail == FALSE){ llSetScriptState(llGetScriptName(), FALSE); llSleep(0.1); } } #else #define Bail(x,y) /* Removed by #undef DEBUG */ #endif //DEBUG #endif //ASSUMEANDBAIL default{ state_entry(){ llOwnerSay("click to test"); } touch(integer num_detected){ /*will pass as written. Must include ()'s around lists not passed as variables in order to satisfy #undefine macro */ Bail(([1,2.5,"Wohoo"]),([1,2.5,"Wohoo"])); //will fail due to Element[3] not matching Bail(([1,2.5,"woohoo"]),([1,2.5,"wohoo"])); // will fail for different list lengths Bail(([1,2.5]),([1,2.5,"wohoo"])); //will fail for Element[1] bieng different types Bail(([1,2.5,"Wohoo"]),([1.0,2.5,"Wohoo"])); } }
  11. Excellent suggestions, will defiantly update the code when I can. The efficiency is less important to me on this script because it's only going to be used (by me at least) during debugging. When I go to make the script efficient and fast for publishing after getting it to work, I'll #undefine DEBUG removing all of this anyway. I've never personally used JSON_ARRAY's yet (I only started coding in LSL about a month ago) but feel free to modify for your uses if it helps ^.^
  12. Having gone to the link and read the script, very basically it contacts AccuWeather once an hour and changes between 32 different environment settings in order to match the weather AccuWeather reports to it.
  13. A simple little function I whipped up to aid in debugging. To use, you would call Bail = Assume() before and/or after another function that manipulates data to test to see if the data going in or out is what you expect it to be. If not, Bail becomes set to 0 and a simple if statement with llSetScriptState(llGetScriptName(),FALSE); llSleep(0.1); will stop the script. As you can probably tell, I wrote this using the Firestorm Preprocessor, since I plan to use it frequently in debugging my scripts. I'll hop back on here later and leave a more conventional copy/paste version for people who prefer not to use the Preprocessor. EDIT: Updated code to include Quistess Alpha's recommendations, as well as a new call counter to aid in finding which exact call of Assume(); in your script caused a bail. Additionally, added some very basic example codes. /*Assume and Bail Goal: Create functions and macros to enable easier debugging # Released under MIT License Copyright (c) 2023 Abel Skaeren(Jabadahut50.Resident) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef DEBUG #define DEBUG #endif //DEBUG #ifdef DEBUG #ifndef ASSUMEANDBAIL #define ASSUMEANDBAIL integer Bail;//Global variable for bailing integer AssumeCalls = 0; integer Assume(list input, list test){//test to make sure the input is what you are expecting it to be. integer i; //for the loops ++AssumeCalls; //for tracking which assume call triggered the Bail. list TYPES = ["invalid","integer","float","key","string","vector","rotation"];//Thank you to Quistess Alpha's reccomendation for simplifying the testing using this. //test first to make sure there lengths are the same if(input != test){ llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input and Test lists not the same length, Bailing!"); return 0; }else{ //test to make sure the inputs share types for(i = 0; i <= llGetListLength(input); ++i){ if(llGetListEntryType(input, i) != llGetListEntryType(test, i)){ llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input[" + (string)i + "] did not match type to Test[" + (string)i + "]"); llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input[" + (string)i + "] was " + llList2String(TYPES,llGetListEntryType(input, i)) + "."); llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", expected " + (string)TYPES[llGetListEntryType(test, i)] + ". Bailing!"); return 0; } } //finally, test to make sure the input actually matches for(i = 0; i<= llGetListLength(input); ++i){ if((string)input[i] != (string)test[i]){ llOwnerSay("ERROR| Func: Assume Call " + (string)AssumeCalls + ", Input[" + (string)i + "]: " + (string)input[i] + " did not match Test[" + (string)i + "]: " + (string)test[i] + ". Bailing!"); return 0; } } } llOwnerSay("Succes| Func: Assume Call " + (string)AssumeCalls + ", Complete. " + llList2CSV(input) + " matched test. Proceeding."); return 1; } #endif //ASSUMEANDBAIL #endif //DEBUG default{ state_entry(){ llOwnerSay("click to test"); } touch(integer num_detected){ //will pass as written Bail = Assume([1,2.5,"Wohoo"],[1,2.5,"Wohoo"]); if(Bail == FALSE){ llSetScriptState(llGetScriptName(), FALSE); llSleep(0.1); } //will fail due to Element[3] not matching Bail = Assume([1,2.5,"woohoo"],[1,2.5,"wohoo"]); if(Bail == FALSE){ llSetScriptState(llGetScriptName(), FALSE); llSleep(0.1); } // will fail for different list lengths Bail = Assume([1,2.5],[1,2.5,"wohoo"]); if(Bail == FALSE){ llSetScriptState(llGetScriptName(), FALSE); llSleep(0.1); } //will fail for Element[1] bieng different types Bail = Assume([1,2.5,"Wohoo"],[1.0,2.5,"Wohoo"]); if(Bail== FALSE){ llSetScriptState(llGetScriptName(), FALSE); llSleep(0.1); } } }
  14. The GLTF standard is mostly about asset portability. How your engine interprets said assets is up to you... to an extent... I think it does define some specific requirements TBF, so It is still up in the air, but separating texture channels and manipulating them is trivial nowadays, so I'd imagine this wouldn't be too hard. I suppose we'll wait and see.
  15. Yeah, been watching that post. LSL is such a strange place that creates fascinating solutions.
×
×
  • Create New...