Python (civ4 scripting language) tutorial thread

One question, HOW can I immediately see the changes of the python files in game without restarting it? thx
 
ooo6ooo said:
One question, HOW can I immediately see the changes of the python files in game without restarting it? thx

It already happens that way. I often have an editor window open, make a change, save and ALT-Tab back to Civ 4. There is a debug message that says "Reloading python modules..." and the results are there immediately.

If you do this too often, your environment can get corrupted, so it pays to restart from time to time especially if you start to see really weird stuff.

Eusebius
 
This is a bit off civ4 but Oblivion uses the same principles and tools so the fix is likely to be the same. I've added a new anim to the game of a violinist playing his instrument. The anim plays fine however I need to somehow tack the end of the violin which is a seperate item to the bipeds left hand so that when the animation plays the violin tacks to the hand and moves with the body. At the moment the violin hangs in the air and stays still. The biped is a kf file, the violin a nif.
 
proconsul said:
This is a bit off civ4 but Oblivion uses the same principles and tools so the fix is likely to be the same. I've added a new anim to the game of a violinist playing his instrument. The anim plays fine however I need to somehow tack the end of the violin which is a seperate item to the bipeds left hand so that when the animation plays the violin tacks to the hand and moves with the body. At the moment the violin hangs in the air and stays still. The biped is a kf file, the violin a nif.

This thread is only about Python Programming. You should start a new thread in the Customization forum or find another thread to ask your question.
 
I have used your tutorials, and they all come up smelling of roses :). I must add that they are a lot more clear than some that I have come across.
 
Thank you. I really wanted to learn how to make mods in Civ IV and now I can make my own civilizations.:)
 
I recently downloaded thelopez's cultural influence MOD and improved civics Mod.Problem is I don't know how to run both simultaneously.I go to the config. screen and change Mods=0 to Mods\cultural influence.How do I add additional mods in that screen?Thank you to whomever could help me here.
 
Hi guys! I am new to the modding scene, even if I edited the .txt files in civ 2 and used the civilization 3 editor extensively, I am finding that this is the hardest civ to mode ever.

I have tried to open the .xml files with a XML editor, and it says that "the XML entry can't be readed with the XSL style sheet". I have tried it to open it with python and it is useless. I have tried to open the .xml files with the txt and it is a mess, same with the Dreamweaver MX. The only program that seemed to open it "properly" was Excel. However, once I saved the modified documents and tried to run the mod, it gave me an error.

Does anyone here knows how am I suppoused to edit them?
 
Hi guys! I am new to the modding scene, even if I edited the .txt files in civ 2 and used the civilization 3 editor extensively, I am finding that this is the hardest civ to mode ever.

I have tried to open the .xml files with a XML editor, and it says that "the XML entry can't be readed with the XSL style sheet". I have tried it to open it with python and it is useless. I have tried to open the .xml files with the txt and it is a mess, same with the Dreamweaver MX. The only program that seemed to open it "properly" was Excel. However, once I saved the modified documents and tried to run the mod, it gave me an error.

Does anyone here knows how am I suppoused to edit them?
If you're daring: notepad.
There was also rather recently an XML or technology tree or whatever editor released recently. Check the last few weekly mod summaries posted on the main page.
 
Hi guys! I am new to the modding scene, even if I edited the .txt files in civ 2 and used the civilization 3 editor extensively, I am finding that this is the hardest civ to mode ever.

I have tried to open the .xml files with a XML editor, and it says that "the XML entry can't be readed with the XSL style sheet". I have tried it to open it with python and it is useless. I have tried to open the .xml files with the txt and it is a mess, same with the Dreamweaver MX. The only program that seemed to open it "properly" was Excel. However, once I saved the modified documents and tried to run the mod, it gave me an error.

Does anyone here knows how am I suppoused to edit them?

Any text editor will do. I think the style thing works better if you copy the entire XML tree--which is against the point of modding only the files you need! I use Context (www.context.cx) a freeware editor for almost all of my editing. I occasionally use the free version of XMLSpy because it will do syntax checking.

Eusebius
 
i know a little HTML because i made websites but mostly i used frontpage and dreamweaver, would it be difficult to learn how to mod.
 
i know a little HTML because i made websites but mostly i used frontpage and dreamweaver, would it be difficult to learn how to mod.
Python is a really accessible language, so hopefully that aspect of modding shouldn't be too difficult for you.

As for graphics and SDK editing, well, that you'd have to ask people who know more of it.
 
Hey fellas, I got a fairly simple question. I'd like to act as "host" for a Civ4 PBEM for some buddies. What I'd like to do is:

1. Generate a random multiplayer map with the settings they want, and their names for the tribe leaders (4 human, 5 AI, Large map)

2. Then open the file in the Worldbuilder as the admin, and make sure nobody is getting hosed on their starting location, as well as add one settler and one worker to all the human players locations.

3. Save the file, send it to the player 1, and off they go!

I've tried generating a single player map, but when I generate it with the difficulty level they want to play the AI at (Warlord) the map is entirely unbalanced for all the 2nd through 9th positions. I have managed to make changes to this initial random SP file, save it in the Public Maps, then open it as a Scenario in the MP games startup, but then the player one fellow has a huge advantage cause his starting location is so much better than the other guys.

Maybe a jury-rigged fix would be to generate the map on Noble or Prince difficulty, and then maybe all the "AI" players would have relatively better starting locations?
 
One thing a buddy and I have figured out is that it is possible to play a game as an online (non-simultaneous turns) match, then to open it up as a PBEM, and resume playing it as a PBEM! It seems that, the next human following the host of the original online game must open the final .save from the online game in order for it to get going properly.

My buddy hosted it, he was France, I was America. We played (with 2 AI on a small map) up to about 225 BC. We both saved it. When he opened either his or my .sav file, it opened to Americans, and same thing for me. When I opened it as a PBEM, then saved it to my PBEM folder and sent it to him, it worked properly for him! opened for him as France, he played his turn, sent it back to me it opened as Americans, I played my turn, sent it back to him and it opened fine for him.

Only problem is, it did not ask for passwords after we changed it to a PBEM from an online match.
 
I am currently using your superb tutorial to teach myself Python, GB Man! This self-help tool really is an extraordinary accomplishment + a great gift to the gaming community. Thanks a million!
 
This is a super beginner tutorial GBM. Combined with TGA's CivIV specific tutorial I've learned a ton. :thumbsup:
 
Back
Top Bottom