Open ivan-mogilko opened 6 months ago
The toggle fps counter is my most used feature probably ever, I would be glad if this function is not removed from script as it's very convenient to throw in a Debug(4, 1);
in game_start, I use it so much I know it's numbers by heart. I use zero of other things, so I don't care about the rest, but I really think a script api function to show the fps counter is useful.
Alright, I guess this suggestion may be expanded to 3 things:
Debug(n,n)
with something more explicit, for example: System.DisplayFPS
.but we're lacking a way to give a list of room names in script
Uhm, random idea, have a way to retrieve a dict with all room numbers as keys and names as values - room numbers don't have to be consecutive so they won't work in an array. Something like Game.GetRoomsAsDict()
.
Other option would be Game.GetRoomName(int n)
and have it return null if the room doesn't exist, but it's not clear up to which number to test since RoomCount
wouldn't make sense.
There's a Debug() function in script, which purpose is to provide some arbitrary chosen information for diagnostic purposes. The detailed description may be found in the manual: https://adventuregamestudio.github.io/ags-manual/Globalfunctions_General.html#debug
In brief, it can do following:
There are 2 major issues with this function:
Considering above makes me think that this command should not be in the script API. Instead, there are two things that may be done in parallel:
--test
) and display some kind of default information independent from the rest of the game logic.Debug()
function, these are available alternatives: Debug optionplayer.AddInventory()
in a loop, iterating all inv items.System.RuntimeInfo
for a while now, but it also relies on hardcoding a formatted string. A better option is recently addedSystem.GetEngineString
(see #2358).GetDrawingSurfaceForWalkableArea
, and painting that on an overlay. Perhaps a more direct option may be implemented as well.player.ChangeRoom()
command, but we're lacking a way to give a list of room names in script. A workaround is to hardcode array of room names in a global script instead, but this is less convenient.System.GetEngineInteger
(see #2358).