It is currently 23 Sep 2020, 20:23
   
Text Size

Some testing results

Moderators: Xander9009, CCGHQ Admins

Some testing results

Postby Xander9009 » 09 Oct 2019, 02:55

I've been doing an insane amount of weird testing today and I've discovered some stuff.

1: Why did I never know that if you restart a match, then the game reloads the function and card files? When testing changes, I've always restarted the game. Turns out, you only need to restart the match. So much faster to test lots of changes.

2: There is seemingly no possible way to import modules into the Lua engine. I don't know exactly which system they're using, but no matter what I do, it always says it couldn't load the file. I did at least manage to get it to *see* the file, but it wouldn't load it. That's a bummer because I really wanted to figure out how to do custom user settings, but that would require being able to load a file from outside the game's wads, since multiplayer compares them.

3: I did figure out how to run code before the match has started. That is, it can begin running the very moment the match has loaded. We could always run the code as soon as the lol file was loaded. After all, that's how the constant initialization works in every function file with a constant. However, you could never, say, make a manager token. That kind of code always had to be on an actual card to run when the match's first turn begins. I successfully started the game with every player controlling a token. Of course, the game crashed when I ended the match because the token wasn't registered on any of the cards in the match, but if the manager tokens were (or maybe even just one was) registered on every card, then we could do away with the manager token creation and instead have them automatically available in every game. This would be useful for things that will matter in every game, such as mulligan.

4: Finally, I've found a way to export data from in-game. It's clunky, because it makes use of the error log that appears after the game closes. But I figured out how to write arbitrary strings to that log. I used this to discover every single global variable and function available, which contained one previously unknown filter evaluated: `FE_CAN_BE_ENCHANTED_WITH`. It doesn't appear in the decompilable lol contents but is defined. I haven't tested it, yet, but it's interesting to me that *anything* was missing. Sadly, the only things of real interest were `dofile` (the one I was trying to use to load another lua file from outside the game, but it failed) and `raise_error` (which will append the supplied string to the error log and exit the current block of code).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 443 times

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 2 guests

Login Form