Event Signs for Civ4: Beyond the Sword Author: Dresden; Current Version: 1.00 Download: CFC Downloads Database or attachment on this post Description: This is a very simple mod component which adds "landmark" signs to the map when an event which changes plot yields is triggered. For example, when the Truffles event happens, a sign will be placed on the affected plot noting the food and commerce increase as well as a short event identifier. It consists of 1 Python and 2 XML files; details on the changes below. This mod is designed for single-player BTS 3.17; compatibility with previous versions and/or multiplayer is unknown. The signs produced are the very same ones you can add yourself via ALT-S or the Strategy Layer "Sign" option. As such they can be easily removed if you find one getting in the way. One caveat is that if there is an existing sign already on that plot, the pre-existing sign will be left alone and nothing denoting the event will be added. However unless you really use a lot of signs yourself this will generally be a rare situation and should only occur on plots that are already visible to you. In such a case it would be easy to modify your old sign manually. Known Issues: Jerrymander has reported that signs are visible even on unrevealed plots. As that is spoiler information which tells you where other people are, I'm trying to find a workaround to keep them invisible until you've explored there. Distribution: There are no licensing or distribution restrictions for this mod component. However if you do incorporate it into a publicly-released mod of your own, a mention in the credits would be greatly appreciated. Sample before and after screenshot: Installation: Spoiler : Code: This mod contains 3 files which should be placed within your CustomAssets directory; the directory structure of this download mirrors that of the CustomAssets directory to assist in placement. Two of the files replace original game files and so the originals should be backed up to a safe location before you copy this mod's files over. Step-by-step instructions: 1. Backup your current CustomAssets/Python/EntryPoints/CvRandomEventInterface.py 2. Backup your current CustomAssets/XML/Events/CIV4EventInfos.xml 3. Copy the included CvRandomEventInterface.py to CustomAssets/Python/EntryPoints/ 4. Copy the included CIV4EventInfos.xml to CustomAssets/XML/Events/ 5. Copy the included EventSigns_CIV4GameText.xml to CustomAssets/XML/Text 6. Play. Technical Information: Spoiler : Code: For those who wish to merge this with other Event mods, customize it for their own preferences, or are simply curious as to how it works, below is a summary of the changes made. See also comments in the code. The guts of this mod are in the Python file CvRandomEventInterface.py; all additions in that file are marked with "EventSigns" comments and should be easy to locate. The mod provides 3 new functions at the end of the file and alters one previously-existing function. The new functions are: 1. applyLandmarkFromEvent -- the generic event callback 2. placeLandmark -- a helper function that actually puts the signs on the map 3. clearSignsAndLandmarks -- an unused helper function that removes all signs and landmarks from a given plot. The existing callback function applySaltpeter was also modified to call the placeLandmark function for all plots whose yields it changes. If you have a simple event which only changes plot yields through the use of <PlotExtraYields> the only thing you have to do to make signs appear for it is to assign applyLandmarkFromEvent as the <PythonCallback> for it and add an appropriate caption in EventSigns_CIV4GameText.xml. In fact, the only changes this mod makes to CIV4EventInfos.xml are to assign this callback to each of the following Events: EVENT_HORTICULTURE_1 EVENT_HORTICULTURE_2 EVENT_PARROTS_1 EVENT_JADE_1 EVENT_BLACK_PEARLS_1 EVENT_CLUNKER_COAL_1 EVENT_SOUR_CRUDE_1 EVENT_TRUFFLES_1 EVENT_SEA_TURTLES_1 EVENT_TIN_1 EVENT_PRAIRIE_DOGS_1 EVENT_APPLESEED_1 EVENT_FORTY_THIEVES_1 EVENT_WATERS_OF_LIFE_1 EVENT_GREAT_BEAST_1 If you modify any of those events to no longer provide plot yield changes, you should remove the callback although no sign should appear unless there is an actual yield change. And if you decide to write your own callback for one of those events, you can see how to call placeLandmark directly by using the applySaltpeter callback as an example. Note that the placeLandmark function will allow you to make true "landmarks" instead of team signs; these appear in a different color and can only be removed via the WorldBuilder. If you would rather use those you only need to change one parameter of the placeLandmark function in the generic callback; you should also change any manual placeLandmark calls in other callbacks too. In order to provide captions for any added events, you need to make new entries in EventSigns_CIV4GameText.xml (or another text XML file). The tags for the entry should be the <type> of the added event with "TXT_KEY_SIGN" prepended to it. For example, if you create an event with a <type> of EVENT_BAND_CAMP_1 then for the descriptive caption you would create an xml text entry with tag TXT_KEY_SIGN_EVENT_BAND_CAMP_1. There are also several TXT_KEY_SIGN_FORMAT_* entries in EventSigns_CIV4GameText.xml which give you some control over how the generated signs look. Note: apologies on the weird post formatting; I basically just copied my README file to the post and added a screenshot.