View Full Version : UnitSelected Pane ( Reformat? )
Balderstrom May 19, 2008, 03:45 PM I've gotten the unittype removed from renamed units.
Posted into Request for new features thread.
What I'm trying to do is reformat the text area, but I'm running into a standstill with trying to move the location of the promotions.
The textual changes are easy enough.
Here is a mocked up screenshot.
http://michaelmckiel.com/_CIV4/051908/UnitSelectedPane_idea.jpg
( Sorry for the new thread Alerum :-)
Could post into the modding forum, just this is a BUG change...so...
I've tried about 3 or 4 different methods, they either screw up unit selection, dump the whole MainInterface or just don't display promotions at all. Obviously not what I intended hehe.
alerum68 May 20, 2008, 01:06 AM Don't mind new threads like this as much as ones that are "I can't get this to work!" ones.:p
Are you running into a problem trying to get them to go horizontally from vertical?
Balderstrom May 20, 2008, 01:37 AM Well it uses a function to place them. that function appears to be hardcoded. So thats of no use. So then I perused the Sevopaedia - since that uses the small versions of promotions as well as large - but I can't really tell what is being used there to print out the promotions.
The other thing I tried was to place another panel in the same area, only make it tall enough for 1 icon, and the in-built function would have to place them side by side - but I can't get that panel to show up... which makes me think perhaps only one panel can have the same coordinates.
Honestly I'm stumped.
The only other idea I looked into, beyond those varied attempts. Was to see how the tool (info) screens for Units work, but I can't seem to locate those.
... Since they list unit promotions horizontally as well.
Basically I really hate the promotions over on the side, they almost always block the unit graphic, and with the fully promoted units - covers it completely.
As well having "Strength" and all the word labels there, is mostly redundant :-)
EmperorFool May 28, 2008, 11:50 AM I'm having a hard time understanding exactly that the problems you're having are (just a common language issue). Can you post some code snippets of what's not working. What is the hard-coded function of which you speak?
If by "tool (info) screens for units" you mean the hover pane for a unit, that text is generated by the DLL, not in Python. However, PLE generates its own hover pane in Python, so you could use that for some sample code. The promotions are displayed as buttons -- not as text.
It looks like it creates a button for every promotion type and keeps them hidden. When a unit is hovered over, it shows the buttons for the promotions the unit has and moves them into the correct position.
# handles the display of the unit's info pane
def showUnitInfoPane(self, id):
... end of this function ...
# show promotion buttons
iTemp = 0
for i in range(gc.getNumPromotionInfos()):
if pUnit.isHasPromotion(i):
szName = self.PLE_PROMO_BUTTONS_UNITINFO + str(i)
self.displayUnitInfoPromoButtonPos( szName, iTemp, dy-1*self.CFG_INFOPANE_PIX_PER_LINE_1 )
screen.show( szName )
iTemp += 1
# displays the unit's promotion buttons in the info pane. They are not part of the info pane.
def displayUnitInfoPromoButtonPos( self, szName, iPromotionCount, yOffset ):
self.bUnitPromoButtonsActive = true
screen = CyGInterfaceScreen( "MainInterface", CvScreenEnums.MAIN_INTERFACE )
if ( CyInterface().getShowInterface() == InterfaceVisibility.INTERFACE_SHOW ):
y = self.CFG_INFOPANE_Y
else:
y = self.CFG_INFOPANE_Y2
screen.moveItem( szName, BugPle.getInfoPaneX() + 4 + (self.CFG_INFOPANE_BUTTON_SIZE * (iPromotionCount % self.CFG_INFOPANE_BUTTON_PER_LINE)), \
y + 4 - yOffset + (self.CFG_INFOPANE_BUTTON_SIZE * (iPromotionCount / self.CFG_INFOPANE_BUTTON_PER_LINE)), -0.3 )
screen.moveToFront( szName )
·Imhotep· Jun 08, 2008, 06:41 AM Actually you could free up some space by only showing the most recent promotion of a promotion line. For example: If a unit has Combat IV and CR III, only those promotions are shown and not the whole line from Combat I - III and CR I + II. This is how FfH2 does it. I like it !
alerum68 Jun 08, 2008, 11:24 AM That's a great idea actually Imhotep.
NikNaks Jun 08, 2008, 12:28 PM Yeah, that makes a lot more sense than having them all cluttering up the screen.
Balderstrom Jun 08, 2008, 02:13 PM Wouldn't it be that much more difficult to differentiate units at a glance, if similiar promotions were not displayed?
A CR:1,2, and 3 unit, will all look the same, until your mind registers level differences et al. Whereas with all 3 promotions showing, the units are Visually different.
alerum68 Jun 08, 2008, 11:15 PM We can easily edit the promotion Buttions to have a number or roman numeral super-imposed over it to help with this.
·Imhotep· Jun 09, 2008, 04:42 PM @Balderstrom:
As regular FfH2 player I can tell you: No, it's not confusing or difficult. But alerum's suggestion has its charm too :) !
alerum68 Jul 22, 2008, 11:03 PM What ever happened to this?
|
|