View Full Version : Question about game settings


Simone1974
Sep 05, 2007, 03:56 AM
I'm developing a mini-mod, just to divide single (with my localization) and multiplayer (without any localization) modes.

I'd like to dynamically modify game settings in order to enable animations on combat when I singleplay, and disable them when I multiplay (sorry for neologisms :lol: ).

Is there a way to achieve it?

Thanks in advance :)

EDIT: I know the possibility to create profile options, but I'd like to know if it is possible to force game settings.

Sto
Sep 05, 2007, 08:27 AM
You can try this . Note that all other players must have your changes in order to play in MP games .

def initPersonnalGraphicSettings() :
if CyGlobalContext().getActivePlayer().getName() == "Simone1974" :
if CyGame().isNetworkMultiPlayer() :
CyUserProfile().setGraphicOption(GraphicOptionType s.GRAPHICOPTION_NO_COMBAT_ZOOM, True)
CyUserProfile().setGraphicOption(GraphicOptionType s.GRAPHICOPTION_FROZEN_ANIMATIONS, True)
else :
CyUserProfile().setGraphicOption(GraphicOptionType s.GRAPHICOPTION_NO_COMBAT_ZOOM, False)
CyUserProfile().setGraphicOption(GraphicOptionType s.GRAPHICOPTION_FROZEN_ANIMATIONS, False)


You can try to launch this function via the event manager ( in onBeginGameTurn ) . but i've not tested that , i don't know if this work and if the changes in your profil will be applied .

Tcho !