Announcement

Collapse
No announcement yet.

Loosing Trade routes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    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.

    Comment


    • #32
      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

      Comment


      • #33
        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.

        Comment


        • #34
          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!"

          Comment


          • #35
            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.

            Comment


            • #36
              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.

              Comment


              • #37
                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...

                Comment


                • #38
                  Unfortunatly only the fright cost for terrain exist but not for tile improvement.

                  -Martin
                  Civ2 military advisor: "No complaints, Sir!"

                  Comment


                  • #39
                    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

                    Comment


                    • #40
                      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.

                      Comment


                      • #41
                        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)

                        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!"

                        Comment

                        Working...
                        X