Announcement

Collapse
No announcement yet.

Loosing Trade routes

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

  • #16
    Well with the way the trade system is set up you loose anyway, the profit from a given route dekreases over time, so at some point you'll have to break the route.

    In real life trade-companies would find new markets and move there.

    A more natural way would be to have a certain chance each turn for a given trade-route to "crash" with the loss of some of it's capacity. Make this relative to the time the route has been in effect.

    Plus pirating a route should result in loss of more than the cargo, some limit to the number of times a route can be pirated befor it looses one of the caravans and breaks.
    Something like 10%-20% chance each time of loosing a caravan, and if the route is stil there after the tenth pirating it breaks and looses a caravan.

    I think it's stupid that pirating never results in loss of a caravan.
    Visit my CTP-page and get TileEdit and a few other CTP related programs.
    Download and test SpriteEdit development build.

    Comment


    • #17
      hmmm, losing caravan only under piracy is a great idea

      Comment


      • #18
        There is a Event KillTradeRoute, but unfortunatly it needs an invalid slic argument so it can be triggered. So far I don't know a way so it can be used.

        Another question Martin: If I remember correctly a trade route that was created with the Freight Transport should remove 3 trade points if it was canceled, did you test this?

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

        Comment


        • #19
          Martin:
          No I only tested using caravans, guess I'll have to test a bit more.

          I was looking at the slic pages, but never found anything there that could make the pirating stuff work as I would like it to. But then again I'm not much of a slic-programer, the only modding I ever made was to the gui and terrain files in ctp1.

          Now that I have finaly bought ctp2 I'll have more of a chance to get into modding, but I think I'll just stik to what I do best: gui and tools for modders, but at least I kan now test them myself, befor shipping them.
          Visit my CTP-page and get TileEdit and a few other CTP related programs.
          Download and test SpriteEdit development build.

          Comment


          • #20
            Originally posted by Martin the Dane
            I was looking at the slic pages, but never found anything there that could make the pirating stuff work as I would like it to. But then again I'm not much of a slic-programer, the only modding I ever made was to the gui and terrain files in ctp1.
            The slic code should be something like this:

            Code:
            HandleEvent(SetPiratingArmy)'MG_KillTradeRoute'post{
                Event:KillTradeRoute(traderoute[0],0);
            }
            If this code works then it will kill a trade route if it is priated but I doubt that it will work. If you try it I guess you will get an error message, that the first argument of the KillTradeRouteEvent should be of type traderoute_t. If you try to initialize something like this you will get an error message. But I think there is also another way to achieve this you want. But I need some time to work this out.

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

            Comment


            • #21
              Well two things Martin:

              1. Yes trade routes created using Freight Transporst do loose 3 trade points when canceled.

              2. I get a traderoute unknown error when trying your pirating code
              Visit my CTP-page and get TileEdit and a few other CTP related programs.
              Download and test SpriteEdit development build.

              Comment


              • #22
                Originally posted by Martin the Dane
                1. Yes trade routes created using Freight Transporst do loose 3 trade points when canceled.
                I guess in that case you know what to do, just using some part of my first code. Or will every trade route canceled after the invention of Freight Transporsts loose three trade points. However there is only a function that checks how many trade points are in use and no one that gives me the total number of trade points.

                Originally posted by Martin the Dane
                2. I get a traderoute unknown error when trying your pirating code
                That looks like there is no traderoute array, even if there is a improvement array that you actual can't use. The odd think of this event is that I can use everything as first argument I don't get any error message, the second argument must be an int but I have no idea what the int should be. Unfortunatly my other idea didn't work.

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

                Comment


                • #23
                  Well the trouble is that the number of lost trade points depends on wheter they are from Caravans or Freight Transports, so unless we can determin that, giving back TF's after inventing them could create additional tradepoints, and that's worse than losing some.

                  If you have a mix, and you most likely have if you have built any FT's, there is no way of telling which is used for any given trade route. It seems like it is most likely that caravans will be used for routes requring less than 3 points, but this is not a fixed rule.

                  I gave myself 5 FT's created some trade routes and broke them again, this resulted in the loss of 2 points/route (one returned from the function). Now I had a mix, so I repeated the create-break. This time I sometimes lost 2 point/route sometimes not, and usually not if the route used less than 3 point.

                  So I guess the good old German word "schade" is apropriate here.
                  Visit my CTP-page and get TileEdit and a few other CTP related programs.
                  Download and test SpriteEdit development build.

                  Comment


                  • #24
                    I just checked the slic section, there is a function INT TradePoints(player) that acording to the list gives the number of caravans the player has, but it could be the number of tradepoints available.

                    Unfortunately I don't know how to test this, but I'll try to find out. I would like to popup a message saying "you have # tradepoints" or something similar.
                    Visit my CTP-page and get TileEdit and a few other CTP related programs.
                    Download and test SpriteEdit development build.

                    Comment


                    • #25
                      Originally posted by Martin the Dane
                      I just checked the slic section, there is a function INT TradePoints(player) that acording to the list gives the number of caravans the player has, but it could be the number of tradepoints available.
                      I wonder why I can't find it in the function reference here on Apolyton, maybe because the code of that shtml file is c****y. But I hope it will indeed return the number of total tradepoints. So the code should look like this:

                      PHP Code:
                      int_t MGGlobalTraders;

                      HandleEvent(KillTradeRoute)'MG_CountTrader'pre{
                          
                      MGGlobalTraders TradePoints(g.player);
                      }

                      HandleEvent(KillTradeRoute)'MG_GiveTraderBack'post{
                          
                      location_t MGLoc;
                          
                      int_t MGTraders;
                          
                      int_t MGplay// g.player must be passed as a int_t
                          
                      int_t i;
                          
                      MGTraders MGGlobalTraders TradePoints(g.player);
                          
                      MGPlay g.player;
                          for(
                      i=0i<MGTradersi=i+1){
                              
                      Event:CreateUnit(MGPlayMGLoc0UnitDB(UNIT_CARAVAN), 1);
                          }

                      Disclaimer: Untried, untested, maybe buggy.

                      Originally posted by Martin the Dane
                      Unfortunately I don't know how to test this, but I'll try to find out. I would like to popup a message saying "you have # tradepoints" or something similar.
                      Yes it is possible to put it into a message box, but I think this has to wait until, tommorw.

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

                      Comment


                      • #26
                        It works, I havn't played with it, but I did a cheat test.

                        No matter what combination I used I ended up with the same amount of trade routes.

                        So now we just have to figure out how to make that pirating stuff work.

                        What about just make it at chance for the player to loose a trade point, if that's acheaveable.

                        I'll look into it
                        Visit my CTP-page and get TileEdit and a few other CTP related programs.
                        Download and test SpriteEdit development build.

                        Comment


                        • #27
                          2. I get a traderoute unknown error when trying your pirating code
                          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?

                          Comment


                          • #28
                            Welcome to modding Martin the Dane. You started the modification of the features you dislike
                            Like the rest of us modders
                            "Kill a man and you are a murder.
                            Kill thousands and you are a conquer.
                            Kill all and you are a God!"
                            -Jean Rostand

                            Comment


                            • #29
                              Thanks for the welcome Pedrunn,

                              I have a simple question for you and other seasoned slic'ers: Is there an arguments array for functions and events that can be accessed from within the function/handler?
                              Visit my CTP-page and get TileEdit and a few other CTP related programs.
                              Download and test SpriteEdit development build.

                              Comment


                              • #30
                                You mean something like this or this?
                                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                                Comment

                                Working...
                                X