I've spent some time pondering the question of how to get the current time and store it as a variable at map start. Such functionality could pave the way for features such as limited ban periods, custom achievement earned dates, Time since last play data etc.
As it turns out, the functionality doesn't exist in the galaxy editor, however, I'd like to propose an alternative solution. As I understand it, Mod files can be published to contain a lot of preset data. What if someone were to create a program that automatically saves the current time within a mod file then publishes the mod, perhaps once every 10 minutes or every hour?
Maps could query the mod file and get the current time on map-start. A timer could then be used in-game to detect the game-finish time.
Now, I'm rather inexperienced in program development so I've no idea if this solution is viable. I'd like to hear some second opinions on this idea :)
I'm confused on your suggestion. Are you saying that you could take the current time, and then update the map every 10 minutes? That would be incredibly difficult.
What could be plausible is to check to make sure the game has an internet connection, and then if it does, get the current time from the folder that it is kept in, similarly to the way that custom UI's are stored.
I know this is possible, I'm just not entirely sure where the data is stored. I however know that, because it is part of the UI, it is accessible.
This would allow the map to be updated through current time, and have no reason to be constantly updated. I don't even think a bank would be necessary.
Was thinking more along the lines of a .sc2mod file than an actual map :) That way, only one location would be updated and several maps could query the one source :P
I'm actually not sure where the time is taken from, but I know that it is displayed int the UI, and if it is displayed int he UI, it is accessible. (At least it was, before they changed all the UI layout stuff)
That way you would just take the time and date, and then do some math and then be able to figure out the total time.
I think that could work, but please, prove me wrong, because then I will understand how the new UI layout thing works.
Rollback Post to RevisionRollBack
Great to be back and part of the community again!
To post a comment, please login or register a new account.
I've spent some time pondering the question of how to get the current time and store it as a variable at map start. Such functionality could pave the way for features such as limited ban periods, custom achievement earned dates, Time since last play data etc.
As it turns out, the functionality doesn't exist in the galaxy editor, however, I'd like to propose an alternative solution. As I understand it, Mod files can be published to contain a lot of preset data. What if someone were to create a program that automatically saves the current time within a mod file then publishes the mod, perhaps once every 10 minutes or every hour?
Maps could query the mod file and get the current time on map-start. A timer could then be used in-game to detect the game-finish time.
Now, I'm rather inexperienced in program development so I've no idea if this solution is viable. I'd like to hear some second opinions on this idea :)
@Cloud_Wolf: Go
I'm confused on your suggestion. Are you saying that you could take the current time, and then update the map every 10 minutes? That would be incredibly difficult.
What could be plausible is to check to make sure the game has an internet connection, and then if it does, get the current time from the folder that it is kept in, similarly to the way that custom UI's are stored.
I know this is possible, I'm just not entirely sure where the data is stored. I however know that, because it is part of the UI, it is accessible.
This would allow the map to be updated through current time, and have no reason to be constantly updated. I don't even think a bank would be necessary.
Great to be back and part of the community again!
@TacoManStan: Go
Was thinking more along the lines of a .sc2mod file than an actual map :) That way, only one location would be updated and several maps could query the one source :P
I wasn't aware that could be done from in-game :O But then again, I don't really know all that much about the sc2 editor yet ;)
@Cloud_Wolf: Go
I'm actually not sure where the time is taken from, but I know that it is displayed int the UI, and if it is displayed int he UI, it is accessible. (At least it was, before they changed all the UI layout stuff)
That way you would just take the time and date, and then do some math and then be able to figure out the total time.
I think that could work, but please, prove me wrong, because then I will understand how the new UI layout thing works.
Great to be back and part of the community again!