View Full Version : Religion Movies Mod


alexpro14
Apr 19, 2006, 06:42 AM
has anyone created a mod for disabling the religion movies or even replacing them with static pictures

alexpro14
Apr 19, 2006, 09:30 AM
Or is it possible to make a mod to replace the religion movies with static pictures like the Static LeaderHeads Pack on this thread http://forums.civfanatics.com/showthread.php?t=161083

Rabbit_Alex
Apr 19, 2006, 09:35 AM
I assume that it's possible since the Static LeaderHeads Pack simply changes the references in the XML files to point to the static images instead of the head models and textures.

alexpro14
Apr 19, 2006, 09:56 PM
So do u know how to do this:confused:

Rabbit_Alex
Apr 19, 2006, 10:24 PM
There is a new option in the options menu that turns off all movies. I don't think that's what you want to do though.

Here's what you can do (after making images to use of course)

1. Open up
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML\GameInfo

2. Make a copy of it

3. Place the copy in your CustomAssets/xml/gameinfo directory.

4. Open up the copy and find the <MovieFile> tags.

5. Replace the text inside the tags with the directory path to the image you want to use for that religion
(example: Art/Movies/Religion/Judaism/Judaism/dds).

Hope that helps. I might actually do this as a mod. :goodjob:

Dual
Apr 20, 2006, 12:18 AM
I found a way to disable just the religion movies when I did my Shinto mod.

In the vanilla game, every religion must play a movie when it's founded or the game crashes (unless you have the no-movie option on of course). So I was forced for a time to have the Buddhism movie play when Shinto was founded. Because having the movie blank in the XML caused a crash, and I couldn't figure out how to add a custom one.

What I ended up doing was going into the python files, and I found that in the CvWonderMovieScreen.py file there was some code that allowed certain Project Wonders to have no movie. It looks like this:

# not all projects have movies
if self.iMovieType == MOVIE_SCREEN_PROJECT:
szArtDef = gc.getProjectInfo(iMovieItem).getMovieArtDef()
if len(szArtDef) == 0:
return

player = PyPlayer(CyGame().getActivePlayer())

So I used that code as a template to write a version for Religion Movies, which I pasted into that python file. What I came up with was this:

# Added code for Shinto Mod; Skips movie if Religion's MovieFile tag is closed or empty. (i.e. <MovieFile/> )
if self.iMovieType == MOVIE_SCREEN_RELIGION:
szArtDef = gc.getReligionInfo(iMovieItem).getMovieFile()
if len(szArtDef) == 0:
CyAudioGame().Play2DSound("AS2D_SHINTO_DINK")
return

player = PyPlayer(CyGame().getActivePlayer())

What it does is tell the game to check the <MovieFile> tag, in the CIV4ReligionInfo.xml file, for the religion that was just founded. And if the religion's <MovieFile> tag is empty, then it just skips ahead to displaying the game message instead of trying to play a movie.

This part here:
CyAudioGame().Play2DSound("AS2D_SHINTO_DINK")

That tells the game to play a certain sound when the movie is skipped, and is specific to my Shinto mod. I added that in because I found that founding Shinto seemed too quiet without a movie. ;)

You could change that part to play one of the vanilla game's sounds or your own custom sound. Or you could just delete that part of the code, and have no sound at all. :D

Hope that helps. Even if you don't know python, it would be very easy to open up the CvWonderMovieScreen.py file with notepad and paste that bit of code into it.

alexpro14
Apr 20, 2006, 04:43 AM
Thx alot for the advice as soon as i have time i will try both ways of fixing my problem:goodjob:

alexpro14
Apr 21, 2006, 10:40 PM
Well first i tryed Rabbiat Alex's method and i couldnt get that to work, it send something was wrong the graphics or something like that to do with the pcitures i made. So i tryed Dual's method and copy and pasted the code in and the orginal movies played so im pretty sure i did something wrong:confused:

alexpro14
Apr 21, 2006, 10:55 PM
I have finally worked out what i was doing wrong with Dual's Method, i forgot to change the Moviefile tag in the XML. thx alot to both of u for helping me to fix my problem and Rabbiat Alex if u end up making a mod email me, thx:goodjob:

Rabbit_Alex
Apr 21, 2006, 11:00 PM
Did you save the images as .DDS? They have to be in that format in order to work.

Dual
Apr 21, 2006, 11:25 PM
I have finally worked out what i was doing wrong with Dual's Method, i forgot to change the Moviefile tag in the XML. thx alot to both of u for helping me to fix my problem and Rabbiat Alex if u end up making a mod email me, thx:goodjob:

Glad you got it working now. :)

alexpro14
Apr 22, 2006, 02:35 AM
Yeah i did save it as DDS, i used direct X texture tool and it looked like it was going to work, but then some error came up saying something about rendering or something like that.

NeverMind
Apr 22, 2006, 02:45 AM
5. Replace the text inside the tags with the directory path to the image you want to use for that religion
(example: Art/Movies/Religion/Judaism/Judaism/dds).


It works fine as a replacement for wonder movies, but not for religions directly. Wonder movies use .bik engine, religion movies use .nif.

NeverMind
Apr 22, 2006, 03:10 AM
In the vanilla game, every religion must play a movie when it's founded or the game crashes (unless you have the no-movie option on of course). So I was forced for a time to have the Buddhism movie play when Shinto was founded. Because having the movie blank in the XML caused a crash, and I couldn't figure out how to add a custom one.


It's possible. And the solution is in CvWonderMovieScreen.py again.

if self.iMovieType == MOVIE_SCREEN_RELIGION:
screen.addReligionMovieWidgetGFC( "ReligionMovie", gc.getReligionInfo(self.iWonderId).getMovieFile(), self.X_WINDOW + self.X_MOVIE, self.Y_WINDOW + self.Y_MOVIE, self.W_MOVIE, self.H_MOVIE, WidgetTypes.WIDGET_GENERAL, -1, -1)
CyInterface().playGeneralSound(gc.getReligionInfo( self.iWonderId).getMovieSound())
elif self.iMovieType == MOVIE_SCREEN_WONDER:
screen.playMovie(gc.getBuildingInfo(self.iWonderId ).getMovie(), self.X_WINDOW + self.X_MOVIE, self.Y_WINDOW + self.Y_MOVIE, self.W_MOVIE, self.H_MOVIE, -2.3 )

The difference between Religion and Wonder lines is obviuos. So I changed it in this way:

Original line
screen.addReligionMovieWidgetGFC( "ReligionMovie", gc.getReligionInfo(self.iWonderId).getMovieFile(), self.X_WINDOW + self.X_MOVIE, self.Y_WINDOW + self.Y_MOVIE, self.W_MOVIE, self.H_MOVIE, WidgetTypes.WIDGET_GENERAL, -1, -1)

Changed line
screen.playMovie(gc.getReligionInfo(self.iWonderId ).getMovieFile(), self.X_WINDOW + self.X_MOVIE, self.Y_WINDOW + self.Y_MOVIE, self.W_MOVIE, self.H_MOVIE, -2.3 )

Now we can use MovieFile tag in CIV4ReligionInfos.xml as a link to a .dds file or to a "false" movie file. It works ok. Look at screenshot. :)

alexpro14, Static religions pack is ready, if you are still interested ;). I'll upload it at CFC later today.

Dual
Apr 22, 2006, 03:51 AM
Good work NeverMind. :thumbsup: That will be very helpful to be able to add custom religion images.

I might have to add that to my Shinto mod the next time I do an update. :D

EDIT: One question though. Do the old religion movies (the nif files) still work with those changes? Or do you have to replace all the religion files with dds or bik versions?

You see, I just want to add a static image to one of the religions, and keep the rest the same in my mod.

alexpro14
Apr 22, 2006, 09:42 PM
Thx for that nevermind and i am intrested in static Religions Pack

Rabbit_Alex
Apr 22, 2006, 10:26 PM
Nice work Nevermind. I just assumed that DDS images would work with religions since they work with leaders and wonders.

NeverMind
Apr 24, 2006, 03:37 PM
Do the old religion movies (the nif files) still work with those changes? Or do you have to replace all the religion files with dds or bik versions?

You see, I just want to add a static image to one of the religions, and keep the rest the same in my mod.

No, nif movies dont work now. I'm sure it's possible to use some sort of IF-ELSE after that "if self.iMovieType == MOVIE_SCREEN_RELIGION:" line to separate nif movies from biks/dds. But I'm comppletely a newby in python (and in coding in general). Anyway, I'll be looking for a solution :)

Padmewan
Apr 24, 2006, 03:55 PM
What are the dimensions of the default movie?

Turns out that era transitions are 512x512 so they can be DDS compressed, but then the engine stretches them to something more like 3x2.

(not specific to this thread, but what is the proper DDS compression for Civ4?)

NeverMind
Apr 27, 2006, 04:04 AM
You're right. Wonder Movie screen is 720x480. It's possible to use DDS files, DXT1 (no alpha) works fine. But I would recommend static bik files for wonders.

Houman
May 20, 2006, 05:51 PM
Despite the SDK we are not yet able to play a bik file for a custom religion right? So we have to make a static dds for all religions in order to use it. Correct?

Thanks
Houman

NeverMind
May 24, 2006, 02:29 PM
We are able to play a bik for a religion, but in this case we have to replace nif files for original religions with bik or dds either. Nif files for all religions - or - bik\dds files for all religions. That's the problem for now.

Houman
May 31, 2006, 03:54 PM
Is there a way to convert existing religion .Nif/dds files to Bik files?

Thanks
Houman