jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Sat Nov 02, 2024 10:40 pm Post subject: AutoAssembler - structs? |
|
|
Arrrggg!
I was having trouble with what I thought was GETMONOSTRUCT which I want to use in my Dredge table with fields like "<Player>k__BackingField". The thing is it seemed to be working for most things, I just had trouble with one struct. Then I cleaned up my table and the whole thing stopped working. I finally figured out it wasn't using the AA struct for that, it was using a structure I defined when fiddling with the game. I didn't know AA could do that...
Anyway it would be nice if GETMONOSTRUCT worked with those also. I might be able to make that change myself, but would want some agreement on what should be done... My thoughts/ideas:
Code: | * Report conflict if AA structure and CE structure have the same name
* Struct is defined ok, maybe assembler needs tweak to handle those names
* Possibly rename those fields in GETMONOSTRUCT, using what's inside <>
|
Anyone have thoughts? I added this to my mono activate script to create a new function to rename those fields to what's inside <>:
Code: | [enable]
USEMONO()
{$lua}
function monoAA_MYMONOSTRUCT(parameters, syntaxcheckonly)
local s = monoAA_GETMONOSTRUCT(parameters, syntaxcheckonly)
return string.gsub(s, "<([^>]+)>k__BackingField:", "%1:")
end
registerAutoAssemblerCommand("MYMONOSTRUCT", monoAA_MYMONOSTRUCT)
{$asm}
[disable] |
I did run into an issue and had to change my order because 'GameManager' has a 'Player' field now and if I define GameManager first, the offset is used instead of 'Player' in the parameter:
Code: | MYMONOSTRUCT(GM,GameManager)
MYMONOSTRUCT(P,Player)
// Gives error "MYMONOSTRUCT(P,AC)"
// AC is the offset of GameManager.Player
|
|
|