CURRENT SCRIPT UPDATE: 10/05/2021 - Fixes and minor feature adds along with refactoring of ui boundary handling
So, you've read the documents and want some more examples of scripts to work with? This is the right topic for you!
TIPS:
1. If you are struggling to find a game to experiment with scripts (read: not as a serious profile), I would suggest that you try to use "Side Pocket" and go to practice. This gives you a good sandbox to not only explore shape features but also work on your knowledge of scripting in a time-unlimited manner.
2. Work environment. I personally use Notepad++ to do my scripting work because it has room for multiple file tabs. As such i have my reference files and 4 work files that allow me to have multiple scripts at the ready (example: in one tab i can have my UI script on it's own and another tab my rotation script on it's own for me to either work on adding features or to modify them per game). Plus working in notepad++ has the benefit of being able to set lua styling so you can see if anything is out of place.
DISCLAIMER:
Before you look at these, take into account:
1. These are not created by an expert (read: I ain't as good as geod at this)
2. These may have some weirdness (I created these for my use primarily but i am putting these out there as possible help for others)
3. They are subject to change and as such, if you grabbed a copy of the reference files one day, they may change within the next day (depending on how much I may or may not have done).
4. I am happy to take feedback/suggestions on these to make them less jank but i cannot guarantee how much i will be able to do in some circumstances.
WITH THAT IN MIND, THE SCRIPTS
Script_Ref_Main.txt
A - a base UI script that has the following features:
1. Automatic UI layering based on an "inGame" tag paired with ui threshhold values to define in renderspace where UI boundaries are.
2. *NEW! - WIP* UI Detection based on shape tags. To use, set uiautoenable=1, set uiautotype to the one you want (1 being shapes outside of the boundaries, 2 for inside the boundaries) and tag a shape at the edge of the UI border with either “bl” for the lower boundaries (referring to bottom left) and “ur” for the upper boundaries (referring to upper right)
3. Menu state tag (tag any shape with "menu") that auto-sets anything on screen as UI layer. useful for as the tag implies, menus.
4. Manual "ui" tag
5. Camera Lock function so camera view can be locked in place
6. Camera Reset function for use with anything that needs specific camera resets (example: a rotation script) - Kind of useless at the moment, might remove later.
7. UI X and Y Shift Variables and Switch vars. allows for anything UI (either tagged or boundary based) to be shifted on either the X or Y axis (Z axis possibly forthcoming)
8. UI Method switches. Allows for any "ui" elements of either type to be handled in one of two fashions: shape.UI definition *or* extra Z offset applied to bring it out of the main game screen.
9. (Temporary) A camera angle reset hotkey combo (NES Select and B together). a full list of possible NES button input reads available in Script_Ref_Small in case you cant to use it for your own purposes (example: activating cheats in some fashion)
B - Generic Layer Correction script:
Mainly built this to do minor things like possible alpha changes etc. not much here of note at the moment.
C - Rotation Script:
See Next Post.
D - Shape Location Detection
Explanation to be written up
There is no point in explaining Script_Ref_Small.txt as it is literally just a bunch of working script segments to refer to for things that might need good examples (such as ReadMem and WriteMem).
If you have any queries or feedback on these scripts, this thread will remain open to posts and I am available on Discord as both a moderator of the 3DSen Discord or directly with JJXB#0248 (Please try not to DM me every living moment pls :P I have a child and will sometimes be unavailable). Plus, you are free to modify these scripts in your profiles to add things (such as extra tag detects etc) to fit your needs.