Go to Cafe Tropico Cafe Tropico
Go to the Blue Parrot Inn
Search:     Advanced search
05/24/13 at 10:50 AM
Welcome, Guest. Please login or register.

Login with username, password and session length
207390 Posts in 10531 Topics by 2074 Members
Latest Member: cpmoneymakertutorials
   Home   Help Search Calendar Login Register  
Cafe Tropico  |  Tropico 2: Pirate Cove  |  Pirate Cove Editor/Scripting Help (Moderator: CafeDave)  |  Topic: Scripting help PLEASE!!!!!!!!
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Scripting help PLEASE!!!!!!!!  (Read 658 times)
0 Members and 1 Guest are viewing this topic.
carguy23
Guest
« on: 02/03/04 at 05:41 PM »

I have no clue on how to do anything. I've looked in DOCUMENTATION, PLAYER EXAMPLE or whatever, and also all of the other .txt files just to try to figure out what to do. I just want to know the basic stuff. PLEASE HELP!!!!!!!!!!!!!!!
Report to moderator   Logged
TJ
Rebel
***
Offline Offline

Gender: Male
Posts: 240

Yes, I am addicted to Tropico 2. Ok, I was...


« Reply #1 on: 02/03/04 at 07:48 PM »

The file "PLAYER SAMPLE.txt" is the basic framework for creating a script. I am going to attach a basic script for you to look at as well. You can modify this file if you want.

I would say a basic script has three parts.

The first is the title and header. You can see in the example where they go.

The next is the initialization section. Usually it is the setup rule as in this example. There are many things that can be done at the start.

In this example, the basic script does the following:
- Set the starting cash (treasury) to 1000
- Adds 14 Spanish unskilled laborers
- Adds 7 French pirates
- Adds Black Bart as a captain
- Adds Anne Bonny as a captain recruit for 1000
- The next six actions unlock each of the six ship types
- The next four statements give starting supllies of 20 lumber, 20 corn,  and 10 slop (chuck tent).
- The last action (execute_once) tells the game to only do this rule one time.

The final part of this basic script are the four rules that cause the game to give the gold, silver, bronze or loss conditions of the scenario.

In this example, the game will last 10 years. 3652 ticks per year times 10 years is 36520. If the player hoard is at least 10000 it awards the gold, 5000 for silver and 2000 for bronze. Under 2000 loses the game.

Take a look at this example and then look at some of the other scenario files and you should start to get the idea of how this works.

Besides the basics in this file much more can be done. Feel free to continue to ask questions. I would be happy to help coach you through this. I have a programming background so it is a little easier for me, but it is not that tough.

* Basic_Script.txt (2.27 KB - downloaded 95 times.)
Report to moderator   Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
Cafe Tropico  |  Tropico 2: Pirate Cove  |  Pirate Cove Editor/Scripting Help (Moderator: CafeDave)  |  Topic: Scripting help PLEASE!!!!!!!!
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!