Jump to content

Unity Script Templates by BadCase


BadCase
 Share

Recommended Posts

Unity Script Templates by BadCase


These are a few templates to allow you to easily create scripts for Unity based games.

Fields.Class.Name.Offset.Template.by.BadCase

Add edits to the "fieldEdits" table in the following format

    [1] = {
        editName = "Free Clothes",
        emoji = "👖",
        edits = {
            {
                className = "ClothesOriData",
                armEdits = {0X18, 0X28},
                editTo = 0,
                editType = gg.TYPE_DWORD,
                editIfEqual = nil
            }, {
                className = "ClothesOriData",
                armEdits = {0X1C, 0X28},
                editTo = 0,
                editType = gg.TYPE_DWORD,
                editIfEqual = nil
            }}
    },

className: is the name of the Class the Field belongs to

armEdits: is a table in this format {arm7_field_offset,arm8_field_offset}

editTo: is the value to edit the Field instances to

editType: is the type of value to edit the Field instance as

editIfEqual: use if you only want to edit fields of a certain value and or get user input for this value can bet set to
nil: if editing all Field instance
integer: for editing all Field instances of a single value
integer range: in this format 0~100 for editing all Field instance with a value in that range
text: for providing instructions to the user in a prompt asking them to specify the value to be edited

Methods.Class.Method.Name.Template.by.BadCase

Add edits to the "methodEdits" table in the following format

    [1] = {
        editName = "Unlimited Ammo",
        emoji = "♾️",
        edits = {
            {
                className = "Player",
                methodName = "HasBulletsClip",
                armEdits = {{"~A MOV R0, #1", "~A BX LR"}, {"~A8 MOV W0, #1", "~A8 RET"}}
            }}
    },
    
className: is the name of the Class the Method belongs to

methodName: is the name of the Method to edit

armEdits: is a table in this format {(arm7_lib_edits},{arm8_lib_edits}} edits can be GG assembler opcodes (~A BX LR), hex (00000000h) or reverse hex (00000000r)

Combined.Field.Method.Template.by.BadCase

This is the above 2 templates combined, make sure you have the same items in both the "methodEdits" and "fieldEdits"

If a function only has one type of edits for example "fieldEdits" and no "methodEdits" then the "methodEdits" edit table for that function should be an empty table {}

Check the last function in the script for an example.


 


 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.