Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,378
Try replacing getDefineINT with getInfoTypeForString.So does anybody know how to fix this code?
Try replacing getDefineINT with getInfoTypeForString.So does anybody know how to fix this code?
Do you know what that means?Does it need a return true/false statement at the end?
Most of the python I used to use was covered in them!
I really hope we do find out how to get this to work as my mod depends on it.
def onCityAcquired(self, argsList):
'City Acquired'
iPreviousOwner,iNewOwner,pCity,bConquest,bTrade = argsList
### Civciv5 START ###
if bConquest:
pPlayerNew = gc.getPlayer(iNewOwner)
if(pCity.getName() == "Berlin" and pPlayerNew.getCivilizationType() == gc.getInfoTypeForString("CIVILIZATION_ZULU")):
pCity.setName("New-Berlin", True);
### Civciv5 END ###
CvUtil.pyPrint('City Acquired Event: %s' %(pCity.getName()))
def onCityAcquiredAndKept(self, argsList):
'City Acquired and Kept'
iOwner,pCity = argsList
CvUtil.pyPrint('City Acquired and Kept Event: %s' %(pCity.getName()))
There is no sound associated with specific missionaries. When a missionary spreads a religion to city, it simply calls the code that adds the religion to the city, no matter if spread by missionary or from random spread. The sound you hear is always the one associated with the religion.
Are you sure it already works for normal spread? It's the sound file specified in the CIV4ReligionInfos.xml. Buildings do have separate building sounds that are only identical by convention, so it's not sufficient to only check those.
<Script3DSound>
<ScriptID>AS3D_UN_CHRIST_MISSIONARY_ACTIVATE</ScriptID>
<SoundID>SND_CHRIST_MISSIONARY_ACTIVATE</SoundID>
<SoundData>
<SoundID>SND_CHRIST_MISSIONARY_ACTIVATE</SoundID>
<Filename>Sounds/Units/ChristMissionaryActivate</Filename>
<LoadType>DYNAMIC_RES</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>
TIL you can also include sounds in kf files![]()
You're missing an entry in Audio3DScripts.xml (and a sound? - or re-use the one you have).
and in AudioDefines.xml:Code:<Script3DSound> <ScriptID>AS3D_UN_CHRIST_MISSIONARY_ACTIVATE</ScriptID> <SoundID>SND_CHRIST_MISSIONARY_ACTIVATE</SoundID>
Code:<SoundData> <SoundID>SND_CHRIST_MISSIONARY_ACTIVATE</SoundID> <Filename>Sounds/Units/ChristMissionaryActivate</Filename> <LoadType>DYNAMIC_RES</LoadType> <bIsCompressed>1</bIsCompressed> <bInGeneric>1</bInGeneric> </SoundData>
hi Leoreth,
although i haven't tried it to be 100% sure, it looks like you can add a sound via xml and then edit the kf to call that sound when the action is activated.
I agree, that seems like a really weird way of setting things up, especially because it breaks with the conventions established by the rest of the game. If anything, the same thing that triggers the animation should also trigger the sound, instead of associating the sound directly with the animation.
Now I'm completely lost when it comes to xml setup. Clearcut xml settings like sounds for a unit is not in xml![]()
That sounds very likely, if you want to verify I suggest changing the Hindu missionary sound and test if it affects your new missionary as well.Now, maybe it is related directly to the unit.
This custom unit was made from Hindu unit, and perhaps somewhere in unit file the ACTION calls to Hindu sound.
I looked at kfm, but can't seem to find the path to a sound file.
You're welcome!ps: thanks for helping me change my thread's title![]()
hi guys,
maybe the link to the sound you are looking for is the one inside the kf file. for example, i attach an image of the christianmissionary_md_activate.kf file viewed with nifscope![]()
Did you already look in the "Surrender" or "Die" kf file?I have given a unit custom selection and action sounds, but I don't know how to give it custom death sounds. There doesn't seem to be an entry for that. Any ideas?