Loading ...
Sorry, an error occurred while loading the content.

4.0.10i : minor issues

Expand Messages
  • jmbnr
    Hello all, I was upgrading my current code with the 4.0.10i patch (yep I m late :) ) and I found some little issues in the modified market code. Nothing
    Message 1 of 2 , Jul 9, 2003
    View Source
    • 0 Attachment
      Hello all,

      I was upgrading my current code with the 4.0.10i patch (yep I'm
      late :) ) and I found some little issues in the modified market code.
      Nothing important, but just discrepancies into the process of market
      creation. I don't know how the 5.0 version fix them and I don't
      locate any comment from the group on it, so I put them here.

      In the aregion.cpp code,
      @@ -498,8 +516,13 @@

      +// finished goods have a higher offset than raw goods
      Market * m = new Market (M_BUY, i, price, 0,
      - 1000+population, 4000+population, 0, amt);
      + population+cap+offset, population+citymax+offset, 0, amt);
      +// Offset added to maxamt too to reflect lesser production capacity
      +// the more items are on sale.
      markets.Add(m);

      1- The comment is irrelevent cause the first
      population+citymax+offset value is minpop and the second one is
      maxpop, maxamt is last value (amt).

      2- I'm not sure about the desired effect but the maxpop should be
      keep to population+citymax.


      @@ -537,8 +565,11 @@
      price = ItemDefs[ i ].baseprice;
      }

      -Market * m = new Market (M_SELL, i, price, 0, 2000+population,
      - 4000+population, 0, amt);
      +cap = (citymax *3/4) - 1000;
      +if(cap < citymax/2) cap = citymax / 2;
      +offset = (citymax/20) + ((citymax/5) * (magic++ +1));
      +Market * m = new Market (M_SELL, i, price, amt/6, population+cap,
      + population+citymax, 0, amt);

      3- The minpop should be population+cap+offset.


      Jean-Michel
    • Jan Rietema
      ... Typo. I meant maxpop (but really this affects the maximum amount of goods that will be on sale in the city). ... No. The desired effect was to make the
      Message 2 of 2 , Jul 10, 2003
      View Source
      • 0 Attachment
        > In the aregion.cpp code,
        > @@ -498,8 +516,13 @@
        >
        > +// finished goods have a higher offset than raw goods
        > Market * m = new Market (M_BUY, i, price, 0,
        > - 1000+population, 4000+population, 0, amt);
        > + population+cap+offset, population+citymax+offset, 0, amt);
        > +// Offset added to maxamt too to reflect lesser production capacity
        > +// the more items are on sale.
        > markets.Add(m);
        >
        > 1- The comment is irrelevent cause the first
        > population+citymax+offset value is minpop and the second one is
        > maxpop, maxamt is last value (amt).

        Typo. I meant maxpop (but really this affects the maximum amount of goods
        that will be on sale in the city).

        > 2- I'm not sure about the desired effect but the maxpop should be
        > keep to population+citymax.

        No. The desired effect was to make the reduce the overall amount of goods on
        sale for each item beyond the first (and the offset was a simple but
        indirect way to do this).

        > @@ -537,8 +565,11 @@
        > price = ItemDefs[ i ].baseprice;
        > }
        >
        > -Market * m = new Market (M_SELL, i, price, 0, 2000+population,
        > - 4000+population, 0, amt);
        > +cap = (citymax *3/4) - 1000;
        > +if(cap < citymax/2) cap = citymax / 2;
        > +offset = (citymax/20) + ((citymax/5) * (magic++ +1));
        > +Market * m = new Market (M_SELL, i, price, amt/6, population+cap,
        > + population+citymax, 0, amt);
        >
        > 3- The minpop should be population+cap+offset.

        You're right. I was sloppy about the magic items! Tsk, tsk. Not that I know
        any game where magic items are enabled on the markets... :)

        Thanks Jean-Michel!

        Jan
      Your message has been successfully submitted and would be delivered to recipients shortly.