Quick Modding Questions Thread

I want to change the numbering from leaders to countries,like this:
1.Alexander the Glorious=>Greek Empire
 
The text for those uses TXT_KEY_TOPCIVS_TEXT3, should you want to change the general format of "X the Y".

The actual name is inserted into this in CvTopCivs.py, found in vanilla BtS's Python\Sceens folder. Line 214, in the printList function, is where it gets the name. You'd want to change that to find the name of the player's civilization, possibly by changing the "getNameKey()" part to "getCivilizationDescription(0)".

But you might then want to override the value of TXT_KEY_TOPCIVS_TEXT3 because "Greek Empire the Glorious" doesn't sound good. "The Glorious Greek Empire" sounds better, in which case the English version of the text key would be "The %s2_rank %s1_civilization"
 
Oops!
I followed your instructions but this happened:
Spoiler :
attachment.php

Did I did something wrong?
Spoiler :
def printList(self, szType):

# Print out the list
for iRankLoop in range(8):

if (iRankLoop > len(self.aiTopCivsValues)-1):
return

iPlayer = self.aiTopCivsValues[iRankLoop][1]
iValue = self.aiTopCivsValues[iRankLoop][0]

szPlayerName = getCivilizationDescription(0)

if (szPlayerName != ""):

Spoiler :
<TEXT>
<Tag>TXT_KEY_TOPCIVS_TEXT3</Tag>
<English>The %s2_rank %s1_civilization</English>
<French>%s1_leader, %s2_rank</French>
<German>%s1_leader [NUM1:der:die:x:x] %s2_rank</German>
<Italian>%s1_leader [NUM1:il:la] %s2_rank</Italian>
<Spanish>%s1_leader, [NUM1:el:la:los:las] %s2_rank[NUM1:o:a:os:as]</Spanish>
</TEXT>
 

Attachments

  • Civ4ScreenShot0225.JPG
    Civ4ScreenShot0225.JPG
    141 KB · Views: 869
Yes.

You replaced the entire thing with the new last part, instead of just replacing the last part.

It should be more like this:
szPlayerName = gc.getPlayer(iPlayer).getCivilizationDescription(0)

(Retaining the proper indentation, of course).
 
Another question...
How do you make the names that appear on the scoreboard change from example:
Asoka=>India
Elizabeth=>England
 
Does anyone know how to solve this problem?
http://i.imgur.com/zgriH.jpg
Rat swordsman in this part of animation should not be holding a sword in his hand, but it should look like swordsman far right. I am not take picture, animations at the same time, but animation is the same. Rat should not waving the sword, but should have the same animation as part of the Swordsman. Sorry if I said anything unreasonable or incorrectly expressed.
 
Sure that both are using the same animations?
Because it might be that whoever did the unit changed them.

Another question...
How do you make the names that appear on the scoreboard change from example:
Asoka=>India
Elizabeth=>England

In Python\Screens\CvMainInterface.py, change....er...wait...I think it's this line:
PHP:
szTempBuffer = u"%d: %s" %(gc.getGame().getPlayerScore(ePlayer), gc.getPlayer(ePlayer).getName())

exchange the getName() to getCivilizationDescription(0).

(more or less the same procedure like God-Emperor already mentioned)
 
It did not work,did I something wrong?
Spoiler :
szTempBuffer = u"%d: %s" %(gc.getGame().getPlayerScore(ePlayer), gc.getPlayer(ePlayer).getCivilizationDescription(0))

EDIT:I found how to do it myself.
But now it displays the English Empire and Indian Empire instead of England and India
EDIT2:Found how to do it
 
Sure that both are using the same animations?
Because it might be that whoever did the unit changed them.

Yes, they use same animation, "Swordsman.kfm" All working, just this part of animation don't work correctly.
 
:dunno: then probably a glitch in the unit itself. Might be the transparency of the incorrect sword...but well...I'm not an artist :dunno:.

Do you know someone who knows how to work with these things? :)
 
Hello!

This is not exactly a modding question, but since I am doing various modifications to the game this could be related.

I have noticed weird bug today: when range units fight (gun units or archers) following happens:
-a sub-unit on 1 side gets killed (death animation shown) so 3 men get reduced to 2 men
-combat continues and SUDDENLY the dead man stands up and keeps on firing
-after battle the final death animations for either side are not shown, the dead unit just poofs into thin air and message reports that it was killed

this happens with all units who use bows, rifles, machine guns and other raneg attacks.
melee combat happens normally.

Any ideas what can cause that?

I understand that I am using about a dozen of custom made units in my mod that could act weirdly due to poor work done on animations, but this also affects ALL of the original units as well that were never touched.

thanks!

bumping my post with some more details:

1. its not graphics related but most certainly xml related - i got something somewhere that's causing it.

I tested it like this:
-the base game runs without a glitch - so its only bug in my mod
-running my mod WITHOUT any new graphics I added still causes this bug.

in addition i got this curious bug which ALWAYS occurs when I am starting a new game and chosen to play Caesar or Hannibal:
Spoiler :

Civ4ScreenShot0000.JPG


if i click EXIT the game loads and i see this:

Spoiler :
Civ4ScreenShot0001.JPG


no interface :eek:

anyone saw anything like that before???
 
@ChaosSlayer That kind of problem is caused by a python error.

If there is a python error somewhere, typically it prevents the rest of the python code after the error from executing; and so you may end up with missing bit in your interface and so on depending on where the error is. You should check the pythondbg.log to find out where the error is.

(It may be indirectly related to xml; in that there may be something in the xml that the python code didn't expect to see and doesn't know how to handle. But the core problem is almost certainly in the python code.)
 
I got that a few times editting my Worldbuilder file.

I found it was related to typo, causing a missing element to be closed.

Check every Begin??? is followed by an End???, for all plots, all cities and all units.
 
Back
Top Bottom