Hey all, I'm new to WML and have been studying the basics to create a simple modification add-on.
Before I get to the meat of the add-on, though, I'd like to setup a proper debugging workflow that would allow me to develop faster, more easily and more correctly.
To that point, I've been looking for ways to log things to the in-game screen. I'm running the game from Steam so I don't think doing things/reading logs via console is feasible.
Now, I found some tags and macros that would seemingly achieve what I need, but I'm struggling with even a simple example - for instance, so far I learned about the relevant tags [message], [chat], [wml_message] (ref) and debug macros: DEBUG_MSG, DEBUG, LOG (ref) - but I can't seem to make them work as I understand they should.
For reference this is my simple _main.cfg file:I added comments to explain the results I get with each... I'm familiar with :inspect and :debug and :log if relevant to your troubleshooting help...
In addition, even if I use the interface to tweak logging levels (Menu > Preferences > Advanced > Logging) and set "wml" to "debug" level, I don't see anything in the in-game chat (Multiplayer > Local game > 1v1 with both sides controlled by me).
Game version 1.18.3, MacOS Steam
Changing logging via ":log <level> wml" doesn't seem to have an effect... Changing logging via game interface doesn't seem to have an effect: I'm able to invoke "inspect" and check the event with my content (outdated code in the screenshot), in case I need to troubleshoot further: Thanks in advance,
Before I get to the meat of the add-on, though, I'd like to setup a proper debugging workflow that would allow me to develop faster, more easily and more correctly.
To that point, I've been looking for ways to log things to the in-game screen. I'm running the game from Steam so I don't think doing things/reading logs via console is feasible.
Now, I found some tags and macros that would seemingly achieve what I need, but I'm struggling with even a simple example - for instance, so far I learned about the relevant tags [message], [chat], [wml_message] (ref) and debug macros: DEBUG_MSG, DEBUG, LOG (ref) - but I can't seem to make them work as I understand they should.
For reference this is my simple _main.cfg file:
Spoiler:
In addition, even if I use the interface to tweak logging levels (Menu > Preferences > Advanced > Logging) and set "wml" to "debug" level, I don't see anything in the in-game chat (Multiplayer > Local game > 1v1 with both sides controlled by me).
Game version 1.18.3, MacOS Steam
Changing logging via ":log <level> wml" doesn't seem to have an effect... Changing logging via game interface doesn't seem to have an effect: I'm able to invoke "inspect" and check the event with my content (outdated code in the screenshot), in case I need to troubleshoot further: Thanks in advance,
Statistics: Posted by fmaiabatista — Today, 6:04 pm