Hi,
I'm not experienced in modding, and I have not played D:OS much yet, so I apologize if I'm doing something wrong.
One of the most irritating things for me is the lack of option to change the coordinates of the main map from the map screen (which is opened by hitting the 'm' key). In other words, I would like to go to the map screen, click some coordinates on it, and have those coordinates centered up on my main game screen.
I have found some dead posts on this subject without any acceptable answer. After some time searching I've realized that Larian isn't interested in "fixing" this (maybe this option isn't a member of their vision of the game), so I've started to wonder if this can be achieved by doing an UI mod.
I have found that inside Game.pak there are .swf files in Public/Game/GUI, and it seems that I should be interested in journal.swf.
I've downloaded a .swf decompiler (JPEXS Free Flash Decompiler), and with its help I was able to acquire the source of the map UI screen, or so it seems. In "map_14" script it seems there are methods that handle UI interaction inside this dialog. At least, there are handlers for mousewheel up/down (those handlers zoom in and zoom out the map), left mouse button inside the "onMapDown" function, and dragging the map inside the "onMapMove" function. There are more, but I'm not interested in most of them.
I also know how to extract the X and Y position of the mouse click; it seems that it's as easy as reading the "mapMouseX" and "mapMouseY" class fields, at least they can act as a starting point.
So my plan was to temporarily disable the handler of putting down the Marker flag on the map, and instead put the logic that reads "mapMouseX" and "mapMouseY", then forces the main game screen to move to a position derived from those coordinates (maybe after performing some translation of these coordinates, depends on how well it will work). If everything will work as expected, I wanted to restore the Flag functionality and somehow move "my" logic to the handler of the right mouse button.
But I can't figure out how to actually set the coordinates of the main screen, as it seems that it's not implemented as a Flash layer, or I couldn't find the proper place. I have no experience in ActionScript so I'm not sure if my problem has an obvious solution or not.
I've seen some calls to ExternalInterface.call(), which seem to be able to invoke code located outside Flash subsystem (i.e. it seems that it can be used to call JavaScript code from inside the .swf script), but I'm not sure if that could be applicable here?
Also, there are several "functions" called via ExternalInterface interface, i.e. "addFlag", "trackIcon", "cancelTrackingIcon", "removeFlag", "doubleClickFlag", etc., but I'm not even sure how to find the handlers for these functions?