I've reworked aanpsx's item scripts to streamline the whole thing. One tiny script + id tables for the items/resources/artifacts I've obtained so far.
Most of aanpsx's scripts still work so head there if you need Unit stats scripts and the like.
Note: You'll need a custom 'RPG VX type'. If you don't have it follow these instructions ⟶
In the search area, right click drop down lists next to Value type and pick this one 'Define new custom type (Auto Assembler)' the auto assemble window will pop up, paste this script:
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'RPG VX type',0
ByteSize:
dd 4
UsesFloat:
db 0 //Change to 1 if this custom type should be treated as a float
CallMethod:
db 1 //Remove or change to 0 for legacy call mechanism
//The convert routine should hold a routine that converts the data to an integer (in eax)
//function declared as: cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
//jmp dllname.functionname
[64-bit]
//or manual:
//parameters: (64-bit)
//rcx=address of input
//rdx=address
mov eax,[rcx] //eax now contains the bytes 'input' pointed to
shr eax, 1
ret
[/64-bit]
[32-bit]
//jmp dllname.functionname
//or manual:
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=address of input
//[ebp+c]=address
//example:
mov eax,[ebp+8] //place the address that contains the bytes into eax
mov eax,[eax] //place the bytes into eax so it's handled as a normal 4 byte value
shr eax, 1
pop ebp
ret
[/32-bit]
//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
//function declared as: cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
//jmp dllname.functionname
//or manual:
[64-bit]
//parameters: (64-bit)
//ecx=input
//rdx=address
//r8=address of output
//example:
shl ecx, 1
inc ecx
mov [r8],ecx //place the integer at the 4 bytes pointed to by r8
ret
[/64-bit]
[32-bit]
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=input
//[ebp+c]=address
//[ebp+10]=address of output
//example:
push eax
push ebx
mov eax,[ebp+8] //load the value into eax
mov ebx,[ebp+10] //load the output address into ebx
shl eax, 1
inc eax
mov [ebx],eax //write the value into the address
pop ebx
pop eax
pop ebp
ret
[/32-bit]
then click OK and the option 'RPG VX type' will be available.
Has support for artifacts and items. Has most ids for artifacts and items.
As I mentioned elsewhere before, this script is probably injecting into display code. That's also one of the reasons item lists change after going between artifact listing screen and item listing screens. This means 4 things:
If you want to update the item pointers, set Update when loading inventory? to Update items then open one of the item screens in-game like [Organize Army > Use Items] or [Organize Army > Squad Operations > Use Items] or to update arena tokens, head to [Arena].
If you want to update the artifact pointers, set Update when loading inventory? to Update artifacts then open one of the artifact screens in-game like [Organize Army > Squad Operations > Artifacts] or [Marketplace > Sell Items].
After updating one of the lists once, set Update when loading inventory? to Don't update to avoid overriding the lists just in case.
You only need to update again if you gain new items or artifacts. Follow steps 1. or 2. again for that.
Also added a simple get by Id option, for when you don't want to go through the categories to find a single item. Just update the list you want first then set the item you want in Select By Id and then activate Load By Id and it will point to the correct item.
Credits again to aanpsx's for the original injection points.
I've reworked aanpsx's item scripts to streamline the whole thing. One tiny script + id tables for the items/resources/artifacts I've obtained so far.
Most of aanpsx's scripts still work so head there if you need Unit stats scripts and the like.
Note: You'll need a custom 'RPG VX type'. If you don't have it follow these instructions ⟶
In the search area, right click drop down lists next to Value type and pick this one 'Define new custom type (Auto Assembler)' the auto assemble window will pop up, paste this script:
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'RPG VX type',0
ByteSize:
dd 4
UsesFloat:
db 0 //Change to 1 if this custom type should be treated as a float
CallMethod:
db 1 //Remove or change to 0 for legacy call mechanism
//The convert routine should hold a routine that converts the data to an integer (in eax)
//function declared as: cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
//jmp dllname.functionname
[64-bit]
//or manual:
//parameters: (64-bit)
//rcx=address of input
//rdx=address
mov eax,[rcx] //eax now contains the bytes 'input' pointed to
shr eax, 1
ret
[/64-bit]
[32-bit]
//jmp dllname.functionname
//or manual:
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=address of input
//[ebp+c]=address
//example:
mov eax,[ebp+8] //place the address that contains the bytes into eax
mov eax,[eax] //place the bytes into eax so it's handled as a normal 4 byte value
shr eax, 1
pop ebp
ret
[/32-bit]
//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
//function declared as: cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
//jmp dllname.functionname
//or manual:
[64-bit]
//parameters: (64-bit)
//ecx=input
//rdx=address
//r8=address of output
//example:
shl ecx, 1
inc ecx
mov [r8],ecx //place the integer at the 4 bytes pointed to by r8
ret
[/64-bit]
[32-bit]
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=input
//[ebp+c]=address
//[ebp+10]=address of output
//example:
push eax
push ebx
mov eax,[ebp+8] //load the value into eax
mov ebx,[ebp+10] //load the output address into ebx
shl eax, 1
inc eax
mov [ebx],eax //write the value into the address
pop ebx
pop eax
pop ebp
ret
[/32-bit]
then click OK and the option 'RPG VX type' will be available.
Has support for artifacts and items. Has most ids for artifacts and items.
As I mentioned elsewhere before, this script is probably injecting into display code. That's also one of the reasons item lists change after going between artifact listing screen and item listing screens. This means 4 things:
If you want to update the item pointers, set Update when loading inventory? to Update items then open one of the item screens in-game like [Organize Army > Use Items] or [Organize Army > Squad Operations > Use Items] or to update arena tokens, head to [Arena].
If you want to update the artifact pointers, set Update when loading inventory? to Update artifacts then open one of the artifact screens in-game like [Organize Army > Squad Operations > Artifacts] or [Marketplace > Sell Items].
After updating one of the lists once, set Update when loading inventory? to Don't update to avoid overriding the lists just in case.
You only need to update again if you gain new items or artifacts. Follow steps 1. or 2. again for that.
Also added a simple get by Id option, for when you don't want to go through the categories to find a single item. Just update the list you want first then set the item you want in Select By Id and then activate Load By Id and it will point to the correct item.
Credits again to aanpsx's for the original injection points.
I've reworked aanpsx's item scripts to streamline the whole thing. One tiny script + id tables for the items/resources/artifacts I've obtained so far.
Most of aanpsx's scripts still work so head there if you need Unit stats scripts and the like.
Note: You'll need a custom 'RPG VX type'. If you don't have it follow these instructions ⟶
In the search area, right click drop down lists next to Value type and pick this one 'Define new custom type (Auto Assembler)' the auto assemble window will pop up, paste this script:
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'RPG VX type',0
ByteSize:
dd 4
UsesFloat:
db 0 //Change to 1 if this custom type should be treated as a float
CallMethod:
db 1 //Remove or change to 0 for legacy call mechanism
//The convert routine should hold a routine that converts the data to an integer (in eax)
//function declared as: cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
//jmp dllname.functionname
[64-bit]
//or manual:
//parameters: (64-bit)
//rcx=address of input
//rdx=address
mov eax,[rcx] //eax now contains the bytes 'input' pointed to
shr eax, 1
ret
[/64-bit]
[32-bit]
//jmp dllname.functionname
//or manual:
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=address of input
//[ebp+c]=address
//example:
mov eax,[ebp+8] //place the address that contains the bytes into eax
mov eax,[eax] //place the bytes into eax so it's handled as a normal 4 byte value
shr eax, 1
pop ebp
ret
[/32-bit]
//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
//function declared as: cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
//jmp dllname.functionname
//or manual:
[64-bit]
//parameters: (64-bit)
//ecx=input
//rdx=address
//r8=address of output
//example:
shl ecx, 1
inc ecx
mov [r8],ecx //place the integer at the 4 bytes pointed to by r8
ret
[/64-bit]
[32-bit]
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=input
//[ebp+c]=address
//[ebp+10]=address of output
//example:
push eax
push ebx
mov eax,[ebp+8] //load the value into eax
mov ebx,[ebp+10] //load the output address into ebx
shl eax, 1
inc eax
mov [ebx],eax //write the value into the address
pop ebx
pop eax
pop ebp
ret
[/32-bit]
then click OK and the option 'RPG VX type' will be available.
Has support for artifacts and items. Has most ids for artifacts and items.
As I mentioned elsewhere before, this script is probably injecting into display code. That's also one of the reasons item lists change after going between artifact listing screen and item listing screens. This means 4 things:
If you want to update the item pointers, set Update when loading inventory? to Update items then open one of the item screens in-game like [Organize Army > Use Items] or [Organize Army > Squad Operations > Use Items] or to update arena tokens, head to [Arena].
If you want to update the artifact pointers, set Update when loading inventory? to Update artifacts then open one of the artifact screens in-game like [Organize Army > Squad Operations > Artifacts] or [Marketplace > Sell Items].
After updating one of the lists once, set Update when loading inventory? to Don't update to avoid overriding the lists just in case.
You only need to update again if you gain new items or artifacts. Follow steps 1. or 2. again for that.
Also added a simple get by Id option, for when you don't want to go through the categories to find a single item. Just update the list you want first then set the item you want in Select By Id and then activate Load By Id and it will point to the correct item.
Credits again to aanpsx's for the original injection points.
SymphonyOfWarJustItems.ct
Nice work, anyway I think there are one more type of traits as in Yellow or Golden Color Book, I got this one book trait called Silver Tongue.
Hey sorry, so I tried everything from the instruction and I'm not able to get the table to work... the values just aren't changing. Not sure where I did wrongly!
I have just about zero coding experience, but I tried decoding the tables using my strong google-fu, grit and pattern recognition, to insert what items/traits were missing.
All credits goes to Hentai-san and aanpsx, as they did ALL of the legwork, as I have zero clue how these tables actually work - all I really did was gain the slightest understanding of the traits/items correlation of ingame adresses, via RPGmaker VX adresses, and hexadresses.
I'm using this myself, and just thought I'd share - but don't go asking about adding anything other than this, as I simply don't know how to; i.e. faction xp! That's a job for people actually knowing this stuff!
any way for this to get updated? having trouble using it. i try editing things and nothing changes and in stead of ?? i get some wierd line of text like )h? or something
This works great for me. The only downside I've seen so far, I've only been able to edit the values once I've gotten the item. If you don't have it, it just shows up as ??? It probably causes errors if you try to add something you don't have yet. For example, I only have bronze and silver arena tokens, haven't found any gold yet so it stays as ??? for me, I just leave that alone and only edit the bronze and gold.
Just gotta remember to change the Update Items/Artifacts back to Don't Update whenever you're done what you need to. I usually just put it back right after I'm done editing the values so nothing gets messed up.