Lutefisk Mafia
Inscrutable Enforcer
And now, DA mod giblet 2: Spinny camera!
Original discussion in the DA thread can be found here:
http://forums.civfanatics.com/showpost.php?p=6929010&postcount=505
And reproduced in full below:
**************
In my DA modmod, the tall dungeon walls often made it hard to see items on the floor. To fix this, I imported a modified Afterworld style of camera freedom. I should quickly note that this mod giblet does NOT lock the player into a close-up view like AW does. (I found that really annoying).
Instead, this simple code addition to your CvEventManager.py file allows full 360 spinning of the worldview.
If you open up your CvEventManager.py file and scroll down a bit, you will come to the "def onKbdEvent" code. The code should be altered to look like this:
This important bit to add in is between the "begin add AW camera" comments and the "end add AW camera" comment.
Once added, this code will allow you to spin the camera a full 360 degrees. Pressing the Control key and the left or right arrow, will spin the world 45 degrees counterclockwise (widdershins) and clockwise (deasil). Pressing the Shift key and the left or right arrow will spin 10 degrees.
In my opinion, this type of camera movement should be deafult in all Civ games, but that's just me!
An example of the python code shown above can be downloaded from here:
360 degree camera = http://www.atomicgamer.com/file.php?id=70068
Hope this is of use to you. Enjoy your newfound spinny camera freedom, and please let me know if it is working for you.
Original discussion in the DA thread can be found here:
http://forums.civfanatics.com/showpost.php?p=6929010&postcount=505
And reproduced in full below:
**************
In my DA modmod, the tall dungeon walls often made it hard to see items on the floor. To fix this, I imported a modified Afterworld style of camera freedom. I should quickly note that this mod giblet does NOT lock the player into a close-up view like AW does. (I found that really annoying).
Instead, this simple code addition to your CvEventManager.py file allows full 360 spinning of the worldview.
If you open up your CvEventManager.py file and scroll down a bit, you will come to the "def onKbdEvent" code. The code should be altered to look like this:
Code:
def onKbdEvent(self, argsList):
'keypress handler - return 1 if the event was consumed'
eventType,key,mx,my,px,py = argsList
game = gc.getGame()
if (self.bAllowCheats):
# notify debug tools of input to allow it to override the control
argsList = (eventType,key,self.bCtrl,self.bShift,self.bAlt,mx,my,px,py,gc.getGame().isNetworkMultiPlayer())
if ( CvDebugTools.g_CvDebugTools.notifyInput(argsList) ):
return 0
if ( eventType == self.EventKeyDown ):
theKey=int(key)
#begin add AW camera
if (theKey == int(InputTypes.KB_LEFT)):
if self.bCtrl:
CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() - 45.0)
return 1
elif self.bShift:
CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() - 10.0)
return 1
if (theKey == int(InputTypes.KB_RIGHT)):
if self.bCtrl:
CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() + 45.0)
return 1
elif self.bShift:
CyCamera().SetBaseTurn(CyCamera().GetBaseTurn() + 10.0)
return 1
#end add AW camera
CvCameraControls.g_CameraControls.handleInput( theKey )
if (self.bAllowCheats):
# Shift - T (Debug - No MP)
if (theKey == int(InputTypes.KB_T)):
if ( self.bShift ):
self.beginEvent(CvUtil.EventAwardTechsAndGold)
#self.beginEvent(CvUtil.EventCameraControlPopup)
return 1
elif (theKey == int(InputTypes.KB_W)):
if ( self.bShift and self.bCtrl):
self.beginEvent(CvUtil.EventShowWonder)
return 1
# Shift - ] (Debug - currently mouse-overd unit, health += 10
elif (theKey == int(InputTypes.KB_LBRACKET) and self.bShift ):
unit = CyMap().plot(px, py).getUnit(0)
if ( not unit.isNone() ):
d = min( unit.maxHitPoints()-1, unit.getDamage() + 10 )
unit.setDamage( d, PlayerTypes.NO_PLAYER )
# Shift - [ (Debug - currently mouse-overd unit, health -= 10
elif (theKey == int(InputTypes.KB_RBRACKET) and self.bShift ):
unit = CyMap().plot(px, py).getUnit(0)
if ( not unit.isNone() ):
d = max( 0, unit.getDamage() - 10 )
unit.setDamage( d, PlayerTypes.NO_PLAYER )
elif (theKey == int(InputTypes.KB_F1)):
if ( self.bShift ):
CvScreensInterface.replayScreen.showScreen(False)
return 1
# don't return 1 unless you want the input consumed
elif (theKey == int(InputTypes.KB_F2)):
if ( self.bShift ):
import CvDebugInfoScreen
CvScreensInterface.showDebugInfoScreen()
return 1
elif (theKey == int(InputTypes.KB_F3)):
if ( self.bShift ):
CvScreensInterface.showDanQuayleScreen(())
return 1
elif (theKey == int(InputTypes.KB_F4)):
if ( self.bShift ):
CvScreensInterface.showUnVictoryScreen(())
return 1
return 0
This important bit to add in is between the "begin add AW camera" comments and the "end add AW camera" comment.
Once added, this code will allow you to spin the camera a full 360 degrees. Pressing the Control key and the left or right arrow, will spin the world 45 degrees counterclockwise (widdershins) and clockwise (deasil). Pressing the Shift key and the left or right arrow will spin 10 degrees.
In my opinion, this type of camera movement should be deafult in all Civ games, but that's just me!
An example of the python code shown above can be downloaded from here:
360 degree camera = http://www.atomicgamer.com/file.php?id=70068
Hope this is of use to you. Enjoy your newfound spinny camera freedom, and please let me know if it is working for you.