Ambreville
Deity
Is there a way to get X/Y coordinates to show on the map in worldbuilder by any chance?? Thanks!
I guess I should say that by WorldBuilder I meant if I turn the cheats on (CheatCode = chipotle) the shift function works for me.
With cheats enabled and I hit Ctrl-W it doesnt show there.
Ctrl-Q to toggle back out and it's back to working.
I went and tested and if I change the .ini back to "CheatCode = 0" i get nothing when pressing shift.
Did anyone figure out how this works? I can go back and forth in and out of worldbuilder, and the ONLY time I see plot info down in the lower left is when I am OUTSIDE worldbuilder, when the world is still covered in darkness.... pretty darned useless then! Any way to reveal the whole map? Or get the plot info while in worldbuilder where the world is revealed?
Any help is appreciated.
def mouseOverPlot (self, argsList):
##### Dale - WB X-Y Plot Show START
message = "Plot: %s %s" %(CyInterface().getMouseOverPlot().getX(), CyInterface().getMouseOverPlot().getY())
CyInterface().addImmediateMessage(message,"")
##### Dale - WB X-Y Plot Show END
Well, the SIMPLEST way is to edit ..\Assets\Python\Screens\CvWorldBuilderScreen.py
Find the function mouseOverPlot and add the following code:
Code:def mouseOverPlot (self, argsList): ##### Dale - WB X-Y Plot Show START message = "Plot: %s %s" %(CyInterface().getMouseOverPlot().getX(), CyInterface().getMouseOverPlot().getY()) CyInterface().addImmediateMessage(message,"") ##### Dale - WB X-Y Plot Show END
This put the plot x, y in the message area (you may have to move a window to view it correctly).
def mouseOverPlot (self, argsList):
if (self.m_bReveal):
if (self.m_pCurrentPlot != 0):
self.showMultipleReveal()
self.m_pCurrentPlot = CyInterface().getMouseOverPlot()
if (CyInterface().isLeftMouseDown() and self.m_bLeftMouseDown):
self.setMultipleReveal(True)
elif(CyInterface().isRightMouseDown() and self.m_bRightMouseDown):
self.setMultipleReveal(False)
else: #if ((self.m_tabCtrlEdit == 0) or (not self.m_tabCtrlEdit.isEnabled())):
self.m_pCurrentPlot = CyInterface().getMouseOverPlot()
self.m_iCurrentX = self.m_pCurrentPlot.getX()
self.m_iCurrentY = self.m_pCurrentPlot.getY()
if (CyInterface().isLeftMouseDown() and self.m_bLeftMouseDown):
if (self.useLargeBrush()):
self.placeMultipleObjects()
else:
self.placeObject()
elif (CyInterface().isRightMouseDown() and self.m_bRightMouseDown):
if (not (self.m_bCityEdit or self.m_bUnitEdit)):
if (self.useLargeBrush()):
self.removeMultipleObjects()
else:
self.removeObject()
return
def mouseOverPlot (self, argsList):
##### Dale - WB X-Y Plot Show START
message = "Plot: [B]%d %d[/B]" %(CyInterface().getMouseOverPlot().getX(), CyInterface().getMouseOverPlot().getY())
CyInterface().addImmediateMessage(message,"")
##### Dale - WB X-Y Plot Show END
def mouseOverPlot (self, argsList):
szText = "Plot: (%d, %d)" %(CyInterface().getMouseOverPlot().getX(), CyInterface().getMouseOverPlot().getY())
screen = CyGInterfaceScreen( "WorldBuilderScreen", CvScreenEnums.WORLDBUILDER_SCREEN )
screen.setLabel( "WBCoords", "Background", szText, CvUtil.FONT_CENTER_JUSTIFY, screen.getXResolution()/2, 6, -0.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
# rest of function unchanged
self.m_pCurrentPlot = CyInterface().getMouseOverPlot()
self.m_iCurrentX = self.m_pCurrentPlot.getX()
self.m_iCurrentY = self.m_pCurrentPlot.getY()
I never even thought to look if the coords were in the args list. Probably a good idea to check though.
argsList contains a single argument. I have no idea what the argument is, but it isn't coordinates or even a plot index. On a quick test, it was a constant "23" regardless of what plot I was mousing over.