Go to Cafe Tropico Cafe Tropico
Go to the Blue Parrot Inn
Search:     Advanced search
05/25/13 at 12:24 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: number of ships sunk function/command?
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: number of ships sunk function/command?  (Read 622 times)
0 Members and 1 Guest are viewing this topic.
Captain Bligh
Tourist
*
Offline Offline

Gender: Male
Posts: 44


I miss the Bounty!


« on: 05/11/03 at 07:48 PM »

I have been trying to write a "Mercenary" type event where you get paid for the number of captives and ships sunk of a certain nation.
I found the num_captives_plundered command, but is there one for number of ships sunk?
Also, how could I store a value to seperate the amounts captured from year to year so they dont keep getting paid over and over again for captives from the previous year? Is that even possible?
Report to moderator   Logged

Mel Gibson went native and cost me my ship.
jonedwards
Tourist
*
Offline Offline

Posts: 49


I'm a llama!


« Reply #1 on: 05/12/03 at 12:31 AM »

I think the get_event_count function may provide the information you want.  Look for the EVENT_SANK
macros in T2GameTypes.txt, e.g., EVENT_SANK_WARSHIP_ENGLAND. You have to wait for the patch to get a count of the number of pirate ships sunken.

You can use the assert_int command to create variables to do the annual bookkeeping you want. There's a rule evaluation frequency of "year," but I believe that means January 1, not every 12 months from the start of the game. I believe I've added some more "time" related variables in the patch, but you can calculate the frequency you want based upon the current game tick and the fact that a year is 365.2 days and there are 10 ticks per day.

So, yes, I think you can do what you want, but it'll require a little programming.
Report to moderator   Logged
Captain Bligh
Tourist
*
Offline Offline

Gender: Male
Posts: 44


I miss the Bounty!


« Reply #2 on: 05/12/03 at 04:00 AM »

Thank you jonedwards.

  I appreciate you taking the time to respond. I'm not sure that I am a good enough programmer to do that but I'll give it a shot.  Roll Eyes
                   
                 Thanks again!
Report to moderator   Logged

Mel Gibson went native and cost me my ship.
Pages: [1]   Go Up
  Send this topic  |  Print  
Cafe Tropico  |  Tropico 2: Pirate Cove  |  Pirate Cove Editor/Scripting Help (Moderator: CafeDave)  |  Topic: number of ships sunk function/command?
 
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!