 |
|  |
 |
|
wervdon
|
|
Even though this is almost common sense, I didn't know to do it this way until it occurred to me tonight and I had to go back and redo all my leader mods because of it.
There is an easy way to change or add leaderheads without interfering with the original game or any other mod.
1) When you change a leaderhead of an existing civ or add a new civ, give it a UNIQUE civolopedia entry. For example, if you change Joan to Napolean in your mod. Change the french civ's civilopedia entry from RACE_FRENCH to RACE_YOURMODNAME_FRENCH.
2) When you add your flic file for the leaderhead animation, give it a path name like this: Scenarios\YourModName\Leader.flc rather than one like this: Art\Flics\Leader.flc
3) Open up civilopedia.txt and add a new entry for #RACE_YOURMODNAME_FRENCH or whatever race you modified or added.
4) Open up pediaicons.txt and add the entries needed for your civ. For example the first entries would be:
#RACE_YOURMODNAME_FRENCH
Scenarios\YourModName\Napolean.pcx
Scenarios\YourModName\Napolean_all.pcx
5) Create a folder in scenarios named "Yourmodname" matching the path you had been using and put all your new pcx/flic files in that.
Now when people play your scenario they use the leaders you added, when they play other scenarios or the normal game they use whats in art\whatever.
The only difficult part is that the two txt files have to be modified, but hopefully we can come up with some utility (or gramphos can add it to his) that can easily patch those without the end user needing to hand add the entries for your leaders.
|
|
|  |
 |
|
wervdon
|
|
Since Gramphos said he doesn't have time right now to modify his multitool to patch pediaicons.txt and civilopedia.txt. I went ahead and created a quick C program to do it for pediaicons.txt and civilopedia.txt/
The readme file I included is below:
To Use:
1) Create a text file containing your new pediaicons.txt entries exactly as they should
appear in pediaicons.txt (for example test.txt)
2) Create a similar text file containing your new fields for civilopedia.txt as they
should appear in civilopedia.txt (for example test2.txt)
2) Run the program with the name of those files as its argument.
ie) patcher test.txt test2.txt
3) Ideally for your end users you would create a batch file to do this:
install_my_mod.bat
patcher my_mod_icons.txt my_mod_pedia.txt
It will append any entries which were missing from pediaicons.txt to the bottom of
pediaicons.txt. Any entry which is not missing is compared against a list of original key names (in the executable itself) to see if it was a key value that was part of the original text files, if so it is skipped and reported. Otherwise, it replaces the old entry.
It will append any entries missing from civilopedia.txt at the end before the #EOF
in a similar manner. Those not missing are skipped and reported.
The included test.txt and test2.txt just an examples to show how to setup a pediaicons.txt and civilopedia.txt patch files.
The program also backs up the users current civilopedia.txt and pediaicons.txt to
civilopedia.bak and pediaicons.bak in the folder it is run from.
It looks for civilopedia.txt and pediaicons.txt in the following locations in this order:
In the current folder
Full path for default install: (C:\Program Files\Infogrames Interactive\Civilization III\Text\
With the assumption its run from the scenarios folder: ..\text\
Version 3 added:
Adds the protection for original keys in the files that came with the last patch (1.29)
Allows replacing of non-protected entries rather than just skipping them. (thus a scenario author can patch his scenario)
Added an unpatcher.exe which de-applies a patch applied by patcher.
Attachment: patcher.zip
This has been downloaded 859 time(s).
Last edited by wervdon on 21-07-2002 at 09:28
|
|
|  |
 |
|
wervdon
|
|
Oh and this goes without saying, but I highly reccomend you backup your original pediaicons.txt before using it. It should be 100% non-destructive as it only opens the file for reading and appending, but just in case it never hurts 
Ill try to have it make automatic backups when/if I update it again.
EDIT: The 2nd version I uploaded makes backups to the folder it is run from:
pediaicons.bak and civilopedia.bak, it overwrites those the next time it runs.
Last edited by wervdon on 20-07-2002 at 17:27
|
|
|  |
 |
|
wervdon
|
|
Sample text files:
test.txt
#RACE_TEST_FRENCH
scenarios\Wervdon\Napolean.pcx
scenarios\Wervdon\Napolean_all.pcx
#RACE_TEST_SPANISH
scenarios\Wervdon\Isabella.pcx
test2.txt
#RACE_TEST_FRENCH
We are the french!
patcher test.txt test2.txt
Would add those entries in test.txt to pediaicons.txt, and the entry for #RACE_TEST_FRENCH to civilopedia.txt without overwriting any old entries. If the entries for those keys already existed, they would be replaced by the new entries.
Entries which were present in the original txt files that came with the game are protected and are still skipped.
Last edited by wervdon on 21-07-2002 at 09:29
|
|
|  |
 |
|
wervdon
|
|
It definately works for just adding civs and leaders I tested that much. I have no idea what would happen if you tried to use it for unit graphics, but I strongly suspect it would work since the principle should be the same.
And yeah, its not perfect cause there's still alot of setup for the mod/scenario maker to do, but at least it reduces the set of instructions of end users to:
unzip mod/scenario
Run batch file
Load civ3, pick the scenario and play
The patcher still needs one more update though, but its too big of one for me to do today. Ideally, it shouldn't skip over fields it finds already in the text files since that doesnt allow mod makers to easily distribute fixes to their scenarios. But to do that Ill need code to do more than append entries to the end of those files since the original entries need to be deleted too. And if I allow replacing old entries, Ill also want to build in write-protection for any of the keys that were in the original files so mod-makers can't muk up someone's game without really trying. (ie it wouldn't let you write to #RACE_FRENCH cause it was in the original .txt files) I guess there'll be a version 3 of it sometime this week to address those issues, we don't need it yet though since no one has used it to distribute any scenarios with errors in the text files yet to need to correct Once I do that, Ill probally also supply an "unpatcher" to remove a scenario/mods entries since the only changes that'd be needed at that point is to skip the writing out of the changes function calls.
EDIT: That update is above now, I don't perceive needing anymore updates to this unless its for a bug that I missed.
Last edited by wervdon on 21-07-2002 at 09:29
|
|
|  |
 |
|  |
 |
|
wervdon
|
|
You set those in the editor under the civilizations tab. As far as I know its the only art that is set in the editor directly.
|
|
|  |
All times are GMT. The time now is 05:21. Apolyton Time is 00:21. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|