Question about game settings

deggesim

Chieftain
Joined
May 23, 2002
Messages
69
Location
Rome, Italy
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.
 
You can try this . Note that all other players must have your changes in order to play in MP games .

Code:
def initPersonnalGraphicSettings() :
        if CyGlobalContext().getActivePlayer().getName() == "Simone1974" :
                if CyGame().isNetworkMultiPlayer() :
                        CyUserProfile().setGraphicOption(GraphicOptionTypes.GRAPHICOPTION_NO_COMBAT_ZOOM, True)
                        CyUserProfile().setGraphicOption(GraphicOptionTypes.GRAPHICOPTION_FROZEN_ANIMATIONS, True)
                else :
                        CyUserProfile().setGraphicOption(GraphicOptionTypes.GRAPHICOPTION_NO_COMBAT_ZOOM, False)
                        CyUserProfile().setGraphicOption(GraphicOptionTypes.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 !
 
Top Bottom