********************* * * * Tropico * * Editor Notes * * * ********************* **DISCLAIMER** The map editor is NOT considered a standard part of the game. It is completely unsupported by PopTop, Take 2, the tech support team, etc. - please do not ask them any questions about it, they won't know the answers. We make no guarantees whatsoever that all the editor tools will work in the way that you want or that they'll work at all. Basically, we are exposing our internal editing tools, used to make the scenarios in the game, but those tools do not have much polish and have not been deeply tested. The editor tools support some features that were not used in any of the scenarios we shipped with Tropico - those features in particular are untested and may or may not work as intended. Also, the descriptions below assume you have some familiarity with how to copy and rename files, and perform other basic Windows tasks. If you are a Windows novice, then map-editing is probably not for you... That said, we assume that mapmakers will tend to congregate around the main Tropico message boards on the internet, and that these will be a wealth of information for would-be mapmakers. As of this date, the biggest Tropico message board on the internet is at www.cafetropico.com (Click on 'Discussion Forum'). This message board even has a sub-board for the editor. You MAY NOT sell or commercially use maps, scenarios, and saved games created with these tools or in any other way prepared for use with Tropico. You MAY exchange such maps freely and non-commercially over the internet or via other means (excluding CD-ROM or other physical media) *************** ----------------------------------- Version 1.03 - 17 July 2001 ----------------------------------- There's so many changes in the 1.03 version that we've broken out a separate file listing them all 'Editor Changes in v1.03.txt' - check it out. ----------------------------------- GENERAL Version 1.02 - 9 May 2001 ----------------------------------- You'll need the 1.02 version or higher of TROPICO.EXE to use this stuff. Version number can be seen in the lower left corner of the main intro screen (the ruler's office). Editor mode cheat codes - to use these, hold down the key and type them in (in the main game world): EDITOR - Enables the editor (typing it again toggles editor mode off) RAPIDO - Enables instant building (typing it again toggles it off) MUERTE - Instant death for selected unit REMOVEPEOPLE - Removes all people from map (useful for getting a fresh start) EXACTO - Allows setting national treasury to an exact value POLITICALDIFFICULTY - Allows you to change the political difficulty of a map (basically altering the choice you make during the random map setup screen) ECONOMICDIFFICULTY - Allows you to change the economic difficulty of a map (basically altering the choice you make during the random map setup screen) RATEDDIFFICULTY - Allows you to change what's shown in the map setup screen as the map's difficulty (i.e. 'ridiculously hard', 'moderate') IMPORTMAP - Allows you to import map geography from an external image. For this process, the map must be in PCX format, residing in the main tropico directory (the same one that has TROPICO.EXE). The map should ideally be gray-scale and square in shape, with black values being ocean and gray and white values being land of progressively higher heights. Creating scenarios in Tropico consists of 2 separate parts - creating the map and adding scripted events. Scripted events are not absolutely necessary, though they certainly provide flavor and make things more interesting. The actual map creation is done entirely inside of the game. Basically, go in as if you're creating a random map. Your choices for character, special circumstance, etc. are not changeable (difficulty IS changeable) once you're in the game, so be careful as you set things up. In the game, use the cheats above ('EDITOR' and 'RAPIDO'), to enable map editing commands. When you've got your map set up to your satisfaction, save it as an ordinary saved game file. The save will take longer than usual, as Tropico recomputes weather patterns and other data when the map is saved. By default, the file will be saved into \program files\tropico\games. Change the extension from .GM2 to .MP2. Move the file into \program files\tropico\maps. Voila! it's there as an available map. You'll probably want to add some events - see the scripting section further down in this file. The following hot-keys are enabled in map editor mode: R - Enables Raise/Lower Ground tool. A useful hint - for the middle tool (smoothing), if you hold down while smoothing, it creates a plateau... V - Vegetation tool. To rapidly add or remove trees and such. When cutting down trees, if you hold down , they'll go to stumps rather than disappearing altogether... Z - Bulldozer tool. F - Fill terrain tool. P - Paint terrain tool. Fill and paint aren't quite as useful as they seem, as the various levels of grasses tend to revert back to their 'natural' level once people walk on them. These tools ARE useful for creating beaches, oceans, etc. If you hold down or when using the paint tool (not the fill tool), then instead of painting terrain type, you'll be painting ocean depth (there's no effect for land). Deeper water is darker blue and has more fish (though the fish aren't recomputed until you save the map). Holding down and painting makes the water deeper, is for shallower. The effect is subtle - you may have to paint an area multiple times to have the effect you want. M - Paint minerals tool. Useful for adding/removing gold mines and such. You'll want to lock in the info mode - mineral view before you enable this tool, otherwise you'll be working blind. U - Add unit mode. For adding people. Adding tourists, vehicles and animals is feasible, but not advised - these things require additional setup that this tool doesn't perform. Use this tool to add regular Tropican people. O - Add buildings via list. In general, you are strongly encouraged to use the conventional building adding tool - this was our placeholder tool from before we had the main building interface created. Some of the stuff in this tool works, some doesn't. One useful thing you can do here (and it works fine) that you can't do conventionally is to add shacks. Also, you can reposition the palace (bulldoze the old one first, then use this interface to place a new one...) A general precaution - many of the editor tools don't necessarily interact very well with the peoples' actions in the game world. If a farmer is in the middle of planting a field, a laborer is building a house, etc., and you bulldoze or otherwise alter what they're working on, strange side-effects could occur, including crashes. When creating maps, it's best to freeze the action up front and make your changes - don't let the people start building the world first. Also, keep your maps conforming to the general shape and feel of Tropico random maps. Keep a large band of water around the island. Don't create maze-like obstructions and/or lakes in the map interior (this will confuse the unit pathing). Compact layouts tend to play better than sprawling layouts... ------------------------------------- SCRIPTING Version 1.02 - 9 May 2001 ------------------------------------- Events in Tropico scenarios are set up using a scripting system. Basically, each scenario has a series of stand-alone ASCII text files with the .EVT extension on them, containing instructions about how each event should work. The events can be created, viewed and edited using any standard text-editing tool (Notepad works fine). Then these events are attached to a map using the program EVENTADD.EXE. Events can be fairly sophisticated, and can interact with each other. The following is the suggested way to get started with events. Create shortcuts to the programs EVENTADD.EXE and EVENTGET.EXE, and put those shortcuts on your desktop. Now open up Windows Explorer, and go to the \program files\tropico\maps directory. Drag the file fruitas.mp2 and drop it onto the EVENTGET.EXE shortcut. If you've done this successfully, you'll see a DOS box open briefly, showing a message that a number of events have been found. Select the Windows Explorer again and press to refresh the display - you should see that a \fruitas directory has been created. Explore it, and you'll see a number of files with .EVT and .OTH extensions. Open them in a text editor (i.e. Notepad), and you're looking at the events for this scenario. For a simple test, open the desc.oth file, and change the description to something different. Save and close the file. Now drag the fruitas.mp2 file from the \maps directory onto the shortcut to EVENTADD.EXE. All the events will be re-added to fruitas.mp2, incorporating any changes you've made (including the description). If you launch the game now and go look at the description for the Fruitas scenario, it should reflect your change. You can also modify the .EVT files, or create new ones. Once you've made changes, repeat the procedure shown above (drag FRUITAS.MP2 onto the shortcut to EVENTADD.EXE), to test them. The best way to figure out how events (.EVT files) work is to look at the events for the existing scenarios. We strongly suggest you start by using existing events as a template and experiment incrementally, rather than trying to create a large number of complex events your first time out... Here's a quick overview To construct an event, you have to tell the game one or more of the following -all of these are optional EXCEPT the first one (frequency) 1) The frequency at which the event should be checked for 2) Whether the event should only occur once 3) Whether the event should loop through and evaluate for all buildings and/or units 4) Conditions required for the event to occur 5) A message type and text to show 6) Up to 5 choices for the message, plus their effects if chosen 7) Any general effects from the event The key elements are the conditions causing the event to occur and the choices/effects presented by the event. In more detail >>>>>> 1) Frequency Must be one of the following: CheckFrequencyDayBegin CheckFrequencyDayEnd CheckFrequencyWeekBegin CheckFrequencyWeekEnd CheckFrequencyMonthBegin CheckFrequencyMonthEnd CheckFrequencyYearBegin CheckFrequencyYearEnd CheckFrequencyBriefing CheckFrequencyOnlyWhenCalled CheckFrequencyAlmanacScore For instance, if the you have the line CheckFrequencyWeekBegin in an event, it will be checked at the beginning of each game week. CheckFrequencyBriefing is always the first event to show up when a scenario is started. CheckFrequencyOnlyWhenCalled, is, as indicated, only checked if called (by another event - more on that later). CheckFrequencyAlmanacScore is for the event that shows up on the scores text of the almanac. There should be no more than one briefing event and one almanac score event for a scenario... >>>>>> 2) Whether the event should only occur once If the following line is in an event ExecuteOnlyOnce then after the event has occured once, it will never occur again. Note - the event may be EVALUATED many times, but the first time its conditions are true and the event is actually EXECUTED, it will not be evaluated or executed thereafter... >>>>>> 3) Whether the event should loop through and evaluate for all buildings and/or units Tropico has the ability to evaluate events at a per-unit or per-building level. However, none of the scenarios included with Tropico utilized this feature. While this was tested at one time, there are no guarantees that it will work correctly now. However, if you're bold enough to experiment, here's how this stuff is used... (Remember, both of these are optional, and are in fact not used in any of the events in the scenarios included with the game) LoopThroughAllBuildings LoopThroughAllUnits (Units means people) You'll probably want to use some unit or building specific conditions to narrow things down so the event doesn't execute for every single unit or building. You can also use non-unit/building specific conditions with these commands (i.e. with a base condition of the year being greater than 1960, loop through all units, and execute this event for any units whose type is banker. >>>>>> 4) Conditions required for the event to occur You can list a series of conditions necessary for the event to execute. A common one is certain date must have been reached Condition Year>=1952 If you list multiple conditions, ALL of them must be true for the event to occur Condition (LTDGSExportValueCigars + LTDGSExportValueMachineCigars) > 100000 Condition Money > 5000 Condition Month<=3 In the above case, the sum total of the players Lifetime-to-Date exports of both regular and machine cigars must be greater than 100000, the player must have more than 5000 in the national treasury, and the month must be January, February, or March. Complex boolean conditions (AND, OR) are allowable - they must be part of a single line Condition (Money > 5000) OR (Year>1960) In the above case, the player must have at least 5000, or the game year must be 1960 or later. When putting numbers in, don't format them with commas, dollar signs, etc. The full list of expressions that the game understands as part of conditions is listed separately, in the file edcondit.txt. You can put LTD ahead of any 'GS' expression to get the lifetime total for that condition, otherwise it's assumed to refer to the current year total only. One more tip - you can force an event to always evaluate to be TRUE by including the line AlwaysTrue (Don't precede this with the 'Condition' keyword - just put it on its own line as shown) This can be useful if you want to use the result of the Condition as replacement text in the event's message (described below). One thing you can do is have an event with a fairly complex condition, that, if evaluated to TRUE, calls a second event that has the AlwaysTrue flag enabled and uses its condition to compute a number shown in its message. (This technique is used in the warning messages for the Mother of All Cigars scenario) >>>>>> 5) A message type and text to show An event can occur without a message to the user (silent events), but if you want to display a message, you'll first have to specify the message type, from the following MessageTypeBottomRight - It displays in the bottom right circle (assuming something else isn't already there - use only for low priority stuff) MessageTypeDossier - It shows using the conventional dossier (letter) format MessageTypeSpecial - Special case to be used in conjunction with CheckFrequencyAlmanacScore to display text on the score page of the almanac. If you've specified a message type, you'll also need to specify MessageText, as follows MessageText "Hello world,\n\nThe player currently has [MONEY] in their bank account" The \n indicates a carriage return. [MONEY] will be replaced by the game with the amount of money the player has. Other text replacement possibilities are: [TRIGGER] (Whatever the condition of this event evaluated to, formatted as 123,456) [TRIGGER_FLOAT] (Whatever the condition of this event evaluated to, formatted as 123,456.78) [TRIGGER_MONEY] (Whatever the condition of this event evaluated to, formatted as $123,456) [TRIGGER_TF] ('True' if the condition of this event evaluated to a non-zero value, false otherwise) [UNIT_NAME] [PLAYER_NAME] [YEAR] [MONTH_YEAR] [DAY_MONTH_YEAR] [POPULATION] [MONEY] [SWISS_MONEY] [TRIGGER_EVENT_VARIABLE_1] [TRIGGER_EVENT_VARIABLE_2] [TRIGGER_EVENT_VARIABLE_3] [TRIGGER_EVENT_VARIABLE_4] [TRIGGER_GROUP_VARIABLE_1] [TRIGGER_GROUP_VARIABLE_2] [TRIGGER_GROUP_VARIABLE_3] [TRIGGER_GROUP_VARIABLE_4] [TRIGGER_MONEY_EVENT_VARIABLE_1] [TRIGGER_MONEY_EVENT_VARIABLE_2] [TRIGGER_MONEY_EVENT_VARIABLE_3] [TRIGGER_MONEY_EVENT_VARIABLE_4] [TRIGGER_MONEY_GROUP_VARIABLE_1] [TRIGGER_MONEY_GROUP_VARIABLE_2] [TRIGGER_MONEY_GROUP_VARIABLE_3] [TRIGGER_MONEY_GROUP_VARIABLE_4] >>>>> 6) Up to 5 choices for the message, plus their effects if chosen If an event shows a message in the dossier format, it can also present choices to the player. Choices are done as follows (From the Mother of all Cigars magazine event) Choice1Text "Hmmm... I think I like the idea of this fertilizer. Yes, please to start using it immediately" Choice1Effect CallEvent fe_buyit Choice2Text "This thing you ask. It is not to my liking. I say no to it." There are 2 possible choices for this event, with the text as shown. If the players chooses the first choice, then a different event is called to execute that choice, though it's also possible to have the choices effects in-lined - an alternative would have been... Choice1Text "Hmmm... I think I like the idea of this fertilizer. Yes, please to start using it immediately" Choice1Effect AddTo FarmingRate 50 Choice1Effect AddTo FarmingPollution 800 Choice1Effect AddTo FarmingMaintenance 200 Choice2Text "This thing you ask. It is not to my liking. I say no to it." Effects of choices work like general effects, which are discussed in the next section... >>>>>> 7) Any general effects from the event The following is an example of an event effect that would take $5000 from the players national bank account if the event was executed GeneralEffect AddTo Money -5000 The following are the broad categories of effects SetTo AddTo MultiplyBy CallEvent GameWon GameLost The full list of things that can be modified is in the file edeffect.txt Of the first 3 numeric modifiers (SetTo, AddTo, and MultiplyBy) - only AddTo works in most cases, SetTo and MultiplyBy only work for the group and event variables, plus money, swiss bank and game score. CallEvent is used as follows Choice1Effect CallEvent fe_buyit In this case there must be another event, at the same directory level, named "fe_buyit.evt" GameWon and GameLost, quite simply, trigger the win and lose game situations