• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Platy's Peculiar Pleasant Posh Python

Is it possible to put a 1 second timer in between each message? If there are more than 6, they will not be shown.
VLjAP2j.jpg


another thing, is it possible to right align the icons so they fit with the values?
Spoiler :
LUCeBGf.jpg
 
Nope and Nope. Though you can extend the duration of the messages, but doubt it is useful since they will still be overridden. You can always check in events log.
 
Edited wonder movie file to enable hide background option.
 
Thanks ;) Didnt even have to ask :D

edit:

Oh my!
Spoiler :
tQCFMGa.png


Its all World Builder stuff right? Then I'll just copy the new file instead of merging.

editedit:
Nvm I merged it. Most were NewLines ;)

Btw. I noticed
screen.enableWorldSounds(False)
in the CvWonderMovieScreen.py
is there a enableMusic(True) or similar command? Reason is I want the soundtrack for my intromovie enabled even if music is disabled, and if it means that wondermovies will have music too, I see it only as a bonus :D

editeditedit:
I found this in CvOptionsScreenCallbackInterface.py

PHP:
######################################## AUDIO OPTIONS ########################################
	
def handleVolumeSlidersInput ( argsList ):
	"Handles Volume slider input"
	iValue, szName = argsList
	iVolumeType = int(szName[szName.find("_")+1:])
	
 	iMax = UserProfile.getVolumeStops()
	
	if (iVolumeType == 0):		# Master Volume
		UserProfile.setMasterVolume(iMax - iValue)
	elif (iVolumeType == 1):	# Music Volume
		UserProfile.setMusicVolume(iMax - iValue)
	elif (iVolumeType == 2):	# Sound Effects Volume
		UserProfile.setSoundEffectsVolume(iMax - iValue)
	elif (iVolumeType == 3):	# Speech Volume
		UserProfile.setSpeechVolume(iMax - iValue)
	elif (iVolumeType == 4):	# Ambience Volume
		UserProfile.setAmbienceVolume(iMax - iValue)
	elif (iVolumeType == 5):	# Interface Volume
		UserProfile.setInterfaceVolume(iMax - iValue)
	
	return 1
	
def handleVolumeCheckboxesInput ( argsList ): 
	"Handles checkbox clicked input"
	bValue, szName = argsList
	iVolumeType = int(szName[szName.find("_")+1:])
	
	if (iVolumeType == 0):		# Master Volume
		UserProfile.setMasterNoSound(bValue)
	elif (iVolumeType == 1):	# Music Volume
		UserProfile.setMusicNoSound(bValue)
	elif (iVolumeType == 2):	# Sound Effects Volume
		UserProfile.setSoundEffectsNoSound(bValue)
	elif (iVolumeType == 3):	# Speech Volume
		UserProfile.setSpeechNoSound(bValue)
	elif (iVolumeType == 4):	# Ambience Volume
		UserProfile.setAmbienceNoSound(bValue)
	elif (iVolumeType == 5):	# Interface Volume
		UserProfile.setInterfaceNoSound(bValue)
	
	return 1
I tried with
screen.setMusicNoSound(False)
screen.setMusicVolume(50)
Which, ehm, obviously didnt work.
 
Hello! If there's still anyone out here, for some reason, a question: Is there a way to get a part dealing with the City Screen from the Ultrapack, as a separate download?

Most other mod packs here have separate parts as independent downloads as well, but the one dealing with the UI is in one big block, which is a bit overwhelming for me, TBH ;) Would be really grateful for any advice!
 
Whatever is in the city screen, is in the maininterface file
 
OK, another question, if thats not too much trouble.

Is there a way to make the Requirement Script work with K-Mod/BUG? I tried simply adding it, and get no conflicts, errors or anything of the sort - it just don't work. Works perfectly on its own though...
 
Those mods change the way python loads, not of my interest.
 
@platyping, how exactly do you merge in True Prophets with the BUG Python?
 
Hello Platyping, i tried today your mod component mercenaries but i got this error message. Did you already get it?
 

Attachments

  • pb mercenaries.png
    pb mercenaries.png
    231.7 KB · Views: 259
its probably an missing xml tag in what ever you added, maybe a unit, maybe a leader/civ.
look for >< tags of, >none< where you cant put >none<
Hello keldath, i didn't add anything anywhere. I installed it, without any change, as an independent mod for testing it before merging it with my own mod.
 
Here is a screenshot of CvMainInterface line 244
 

Attachments

  • Capture d’écran 2016-12-20 à 09.36.07.png
    Capture d’écran 2016-12-20 à 09.36.07.png
    48.4 KB · Views: 168
Looking at the .rar pack, nope. The art files are inside. Most likely you did not load the modular files.
 
Donno if you still come to these parts but .... ;)

I was cleaning up my code, running a debug dll, when I noticed that the Victory screen was using a different way of showing the Civ Specific Background than the rest, and resulting in a Failed Assert:
Assert Failed

File: CvGlobals.cpp
Line: 3499
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type GRAPHICOPTION_SPECIFIC_BACKGROUND not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml


Assert Failed

File: CvGlobals.cpp
Line: 3499
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type GRAPHICOPTION_TRANSPARENT_PANEL not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml

----------------------------------------------------------

Looking through the code it seems this here was the problem:
Code:
## Unique Background ##
        sBackGround = CyArtFileMgr().getInterfaceArtInfo("MAINMENU_SLIDESHOW_LOAD").getPath()
        pPlayer = gc.getPlayer(CyGame().getActivePlayer())
        sType = gc.getEraInfo(pPlayer.getCurrentEra()).getType()
        if CyUserProfile().getGraphicOption(gc.getInfoTypeForString("GRAPHICOPTION_SPECIFIC_BACKGROUND")):
            sType = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getType()
        sNewArt = CyArtFileMgr().getInterfaceArtInfo("ART_DEF_BACKGROUND_" + sType)
        if sNewArt:
            sBackGround = sNewArt.getPath()
        screen.addDDSGFC("ScreenBackground", sBackGround, 0, 0, screen.getXResolution(), screen.getYResolution(), WidgetTypes.WIDGET_GENERAL, -1, -1 )
## Unique Background ##

While all the other screens use:
Code:
## Unique Background ##
        screen.addDDSGFC("ScreenBackground", PlatyOptions.getBackGround(), 0, 0, screen.getXResolution(), screen.getYResolution(), WidgetTypes.WIDGET_GENERAL, -1, -1 )
## Unique Background ##

However, just replacing the code gives tons of python errors.

Another thing I noticed is with the tech upgrade tree. When the resolution is low, the tech tree in platypedia will reduce the vertical distance between the techs, however when in the ordinary (F6) techtree this doesnt happen.
 
Try putting import PlatyOptions at the top of that module of code



Another thing I noticed is with the tech upgrade tree. When the resolution is low, the tech tree in platypedia will reduce the vertical distance between the techs, however when in the ordinary (F6) techtree this doesnt happen.
I believe this is by design. It tries to fit all the techs vertically on the screen if possible. It makes it easier for the player to navigate if there is only one scroll direction.
 
Try putting import PlatyOptions at the top of that module of code
Thanks, will try that :D

EDIT: nope, unfortunately its the same: if use code from other screens it come up with 20-30 python errors and if using the original code it still creates a failed assert

I believe this is by design. It tries to fit all the techs vertically on the screen if possible. It makes it easier for the player to navigate if there is only one scroll direction.
Yup, I know, ROM had it, but Platy didnt in the beginning so I suggested it a long time ago ;), but while it works in the Platypedia, it doesnt when using the ingame F6 tech advisor (or at least not in mine). I'm not strong enough in Python to be able to transfer the code myself though :(
 
Last edited:
Unfortunately I don't use the Civ Specific Background as I find it makes the real information more difficult to see. However I just realised I do have a mod I am working on that starts with all Platypings UI stuff. I'll have a look and see if I can figure something out.
 
Back
Top Bottom