Thread Tools
Old December 31, 2002, 09:23   #31
Martin the Dane
Prince
 
Martin the Dane's Avatar
 
Local Time: 14:22
Local Date: November 1, 2010
Join Date: Feb 2000
Location: Aarhus, Denmark
Posts: 550
Not exactely, but thanks for the xls, that's usefull stuff.

What I'm looking for is something like this:
Code:
HandleEvent(SetPiratingArmy) 'My_Pirating_handler' post{
    GEA_TradeRoute The_TradeRoute;
    The_TradeRoute = My_Pirating_handler.arguments[0];
    Event:KillTradeRoute(The_TradeRoute,0);
}
This however does not work (ctp2 won't load it), so how do I get the affected traderoute?

Acording the refference the SetPiratingArmy event needs two arguments the first being of type? GEA_TradeRoute, the second being the army doing the pirating. So my thougtht was, that if the event gets the arguments the handler sould know about them, and thus I should be able to access them.

Edit: corrected typo.
__________________
Visit my CTP-page and get TileEdit and a few other CTP related programs.
Download and test SpriteEdit development build.

Last edited by Martin the Dane; December 31, 2002 at 09:29.
Martin the Dane is offline  
Old December 31, 2002, 09:48   #32
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 15:22
Local Date: November 1, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Ah, okay. No, unfortunately GEA_* things can't be used in SLIC. Because of this some events, like KillTradeRoute, are read-only
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old December 31, 2002, 10:22   #33
Martin the Dane
Prince
 
Martin the Dane's Avatar
 
Local Time: 14:22
Local Date: November 1, 2010
Join Date: Feb 2000
Location: Aarhus, Denmark
Posts: 550
So I can't find out what trade route was pirated And thus can't make my pirating mod work.
__________________
Visit my CTP-page and get TileEdit and a few other CTP related programs.
Download and test SpriteEdit development build.
Martin the Dane is offline  
Old December 31, 2002, 11:42   #34
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 15:22
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Peter Triggs
Martin G, where'd the traderoute array come from. I don't think I've ever seen it before. Do you know what members it has, if any?
There is no traderoute array otherwise the code would have been accepted by CTP2. I tried some other types of variables, the KillTradeRoute event accepted, an int, an army, a location and a city variable, probably it accepts also a unit variable but I didn't tried this. Fact is that I was able to fill the first argument with whatever type I wanted, without any error message, at least I expected something like a error message that this event expects a traderoute_t variable like the ImprovementComplete event that expects as first argument a improvement_t variable, the improvement array is valid but doesn't work here.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old January 16, 2003, 15:34   #35
Meitnerium
Settler
 
Local Time: 05:22
Local Date: November 1, 2010
Join Date: Aug 2002
Location: California
Posts: 2
Quote:
Originally posted by child of Thor
I think the most annoying thing is the way your routes are automatically plotted and how DUMB those routes are sometimes(like right through enemy territory ). I don't think that can be Slic-ed, unfortunately.
Does anyone know if trade routes can be set so they follow along roads and railroads? As I recall, this was done in CTP1.
Meitnerium is offline  
Old January 16, 2003, 15:43   #36
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 14:22
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
I'm not quite sire what you mean, but in CTP1 the terrains (and road improvements) had, in addition to a movement cost, a freight cost - I believe this was used for determining the caravan routes (it was the same as the movement cost except over water, where it was smaller) - decreasing the value of this for roads would make trade routes follow them more, but this is no longer possible in CTP2 since there is no such thing to alter.
J Bytheway is offline  
Old January 16, 2003, 16:39   #37
Meitnerium
Settler
 
Local Time: 05:22
Local Date: November 1, 2010
Join Date: Aug 2002
Location: California
Posts: 2
Thanks for the answer. I was hoping that using roads/railroads I would be able to position trade routes in a more logical manner. (Avoiding enemy territory, water, etc.) Also, I think its just simply more accurate to have trade routes follow along roads, railroads, rivers, etc. rather than just the shortest line between two points regardless of terrain. (And it makes the trade route dislpay in ctp2 a cluttered mess.) Too bad the freight/terrain movement costs were taken out of ctp2...
Meitnerium is offline  
Old January 16, 2003, 17:17   #38
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 15:22
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Unfortunatly only the fright cost for terrain exist but not for tile improvement.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old January 16, 2003, 18:08   #39
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 15:22
Local Date: November 1, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Hmm, in that case, could we simulate the effect by terraforming all the terrain underneath roads, railroads, etc to terrain that is identical except for a much lower freight cost?
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old January 16, 2003, 18:28   #40
Martin the Dane
Prince
 
Martin the Dane's Avatar
 
Local Time: 14:22
Local Date: November 1, 2010
Join Date: Feb 2000
Location: Aarhus, Denmark
Posts: 550
Quote:
Originally posted by Martin the Dane
So I can't find out what trade route was pirated And thus can't make my pirating mod work.
Hmm. just had a thought. What if I simply decreased the number of trade points for the player by one if either a set number of piratings had occured or with a set chance.
Like either every tenth pirating against a player resulted in the loss of a tradepoint or a 10% chance of loosing a tradepoint for each pirating insident.

Unless someone has the answer I guess I'll have to look at it, when I get the time.

Btw. if you think lawyers are a nucience in the game, try them in real life.
__________________
Visit my CTP-page and get TileEdit and a few other CTP related programs.
Download and test SpriteEdit development build.
Martin the Dane is offline  
Old January 17, 2003, 18:04   #41
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 15:22
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Martin the Dane
Hmm. just had a thought. What if I simply decreased the number of trade points for the player by one if either a set number of piratings had occured or with a set chance.
The only problem I see here is how you can kill a trader (== removing a trade point)

Quote:
Originally posted by Martin the Dane
Like either every tenth pirating against a player resulted in the loss of a tradepoint or a 10% chance of loosing a tradepoint for each pirating insident.
In CTP1 the trade route was killed in 8 of 10 pirating insidents, here is what the const.txt tells us:

PIRACY_KILLS_TRADER_CHANCE 80

Of course you could increase the number there to 80000 or whatever to get to know this variable has any effect in CTP2.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:22.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team