Announcement

Collapse
No announcement yet.

Ignorance...Palaces/capitals

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

  • Ignorance...Palaces/capitals

    I haven't looked far enough into the code, I guess... what happens when a civilization has no capital? Palace sold, or captured by another player? I guess my question is, how are things like bribe cost and corruption calculated when there is no palace?

    Moses

  • #2
    Don't know enough about the inner workings of FreeCiv yet to answer that question. But I do know that when your capital is destroyed in Civ2, the distance from capital is set at 33 for all your cities until you've build another palace. FreeCiv seems to work the same way. I destroyed the Mongol capital and most other cities could be bribed much easier. Although there's always the chance your dip gets caught if you've already done something in that city, even when bribing! Civ2 doesn't have this feature.

    Needless to say it becomes a bribefest when your capital is destroyed whether it's Civ1/2 or FreeCiv. And that's my final verdict...
    Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

    Elie A. Shneour Skeptical Inquirer

    Comment


    • #3
      try http://www.freeciv.org/lxr/source/se...ittools.c#L239
      and http://www.freeciv.org/lxr/source/se...ityturn.c#1468
      and http://www.freeciv.org/lxr/source/se...itytools.c#458
      http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

      Comment


      • #4
        Thanks Thue,
        I found the bribing part, here it is:

        Code:
        /**************************************************************************
        232  calculate how expensive it is to bribe the unit
        233  depends on distance to the capital, and government form
        234  settlers are half price
        235 
        236  Plus, the damage to the unit reduces the price.
        237 
        238 **************************************************************************/
        239 int unit_bribe_cost(struct unit *punit)240 {  
        241   struct government *g = get_gov_iplayer(punit->owner);242   int cost;
        243   struct city *capital;244   int dist;
        245   int default_hp = get_unit_type(punit->type)->hp;246 
        247   cost = (&game.players[punit->owner])->economic.gold+750;
        248   capital=find_palace(&game.players[punit->owner]);249   if (capital) {
        250     int tmp = map_distance(capital->x, capital->y, punit->x, punit->y);
        251     dist=MIN(32, tmp);252   }253   else254     dist=32;
        255   if (g->fixed_corruption_distance)
        256     dist = MIN(g->fixed_corruption_distance, dist);
        257   cost=(cost/(dist+2))*(get_unit_type(punit->type)->build_cost/10);
        258   /* FIXME: This is a weird one - should be replaced */
        259   if (unit_flag(punit->type, F_CITIES)) 260     cost/=2;261 
        262   /* Cost now contains the basic bribe cost.  We now reduce it by:263 
        264      cost = basecost/2 + basecost/2 * damage/hp265      266    */267   
        268   cost = (int)((float)cost/(float)2 + ((float)punit->hp/(float)default_hp) * ((float)cost/(float)2));
        269
        270   return cost;
        271 }
        272
        Seems very similar to the original bribing in Civ1 (+750 in the formula, dist to capital etc..) But why are settlers only half price? Wouldn't those units be very vulnerable this way?
        [This message has been edited by CapTVK (edited May 13, 2000).]
        Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

        Elie A. Shneour Skeptical Inquirer

        Comment


        • #5
          This post was full of ****.
          [This message has been edited by Kumiorava (edited May 17, 2000).]

          Comment


          • #6
            To get things back on topic, what's the reason for settlers going half-price?
            Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

            Elie A. Shneour Skeptical Inquirer

            Comment


            • #7
              No idea
              Maybe because settlers are ordinary people far from home, they are less hardy than dedicated soldiers?
              http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

              Comment


              • #8
                Ooops... looks like I misread your previous post, CapTVK. A bit.
                My last post is full of ****. Disregard it.

                I wonder what the deal with the settlers is, but if it disturbs you, just edit the source and be done with it.

                Comment


                • #9
                  Man, through what sort of coloured glasses do you look at posts? Brown ones?

                  Anyway, about the settlers bit. Yes, I could probably edit this part myself and figure out how to compile it for Windows or Linux the hard way. But that's not the point, the point is that I'm browsing through the source to see what similarities there are between Civ1/2 and FreeCiv.
                  If I find something strange/different/interesting I'll post comment or question about it, settlers going at a 50% discount is one of them. I just want to know what the reason for this discount, gamebalance? personal taste of the programmer? et...

                  There's nothing better than constructive criticism....
                  [This message has been edited by CapTVK (edited May 19, 2000).]
                  Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

                  Elie A. Shneour Skeptical Inquirer

                  Comment


                  • #10
                    quote:

                    Originally posted by CapTVK on 05-19-2000 06:23 PM
                    If I find something strange/different/interesting I'll post comment or question about it, settlers going at a 50% discount is one of them. I just want to know what the reason for this discount, gamebalance? personal taste of the programmer? et...


                    You will probably get more and better answers to questions about the code on freeciv-dev@freeciv.org. I have been reading the mailing lists for quite a long time and I don't ever remeber this one coming up. The (Great) Danes may have coded it this way in the beginning and no one questioned it. You could also check the archives of course, http://arch.freeciv.org but that only goes so far back. (The mailing lists were hosted somewhere else before.)
                    --
                    Paul Zastoupil

                    Comment


                    • #11
                      That mailing list is a pain to search, you have to search it 3 months at a time...
                      http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

                      Comment


                      • #12
                        quote:

                        Originally posted by paulz on 05-19-2000 08:26 PM
                        You will probably get more and better answers to questions about the code on freeciv-dev@freeciv.org. I have been reading the mailing lists for quite a long time and I don't ever remeber this one coming up. The (Great) Danes may have coded it this way in the beginning and no one questioned it. You could also check the archives of course, http://arch.freeciv.org but that only goes so far back. (The mailing lists were hosted somewhere else before.)


                        Thanks, I'll try it out. I'm curious for the reason.
                        Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

                        Elie A. Shneour Skeptical Inquirer

                        Comment


                        • #13
                          Reason why settlers has discount is that
                          bribing settlers shouldn't be
                          much more expensive than bribing small city

                          Comment


                          • #14
                            quote:

                            Originally posted by taw on 05-21-2000 03:59 AM
                            Reason why settlers has discount is that
                            bribing settlers shouldn't be
                            much more expensive than bribing small city


                            So it's a quick hack to fix a problem.

                            Problem is that this 'solution' leads to another problem that you now can bribe settlers for the same price as one/two-size cities. And knowing what bribing is capable off in Civ2MP I would have made bribing smaller cities more difficult instead of lowering the price for settlers. Lowering the bribe price of settlers is only counter intuitive thinking: "Bribing settlers is far more expensive than bribing small cities so we should make settlers cheaper to bribe!" hmmmmm...
                            Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

                            Elie A. Shneour Skeptical Inquirer

                            Comment


                            • #15
                              Ummm...
                              How about raising the price of the cities, maby?

                              Comment

                              Working...
                              X