|
Author
|
Topic: Ignorance...Palaces/capitals Current Date/Time:
May 24, 2000 23:25:30
|
moseslei Settler Falls Church VA USA May 2000
|
 |
posted May 13, 2000 08:20
  |
 |
 |  |
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 |
CapTVK Prince Voorburg, the Netherlands, Europe b.02-15-99
|
 |
posted May 13, 2000 09:41
  |
 |
 |  |
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...  |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 13, 2000 13:37
 |
 |
 |  |
try http://www.freeciv.org/lxr/source/server/unittools.c#L239 and http://www.freeciv.org/lxr/source/server/cityturn.c#1468 and http://www.freeciv.org/lxr/source/server/citytools.c#458 |
CapTVK Prince Voorburg, the Netherlands, Europe b.02-15-99
|
 |
posted May 13, 2000 19:00
  |
 |
 |  |
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).] |
Kumiorava Warlord of the Elastic Mammals b.02-15-99
|
 |
posted May 13, 2000 19:24
 |
 |
 |  |
This post was full of shit.  [This message has been edited by Kumiorava (edited May 17, 2000).] |
CapTVK Prince Voorburg, the Netherlands, Europe b.02-15-99
|
 |
posted May 17, 2000 10:03
  |
 |
 |  |
To get things back on topic, what's the reason for settlers going half-price? |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 17, 2000 10:29
 |
 |
 |  |
No idea  Maybe because settlers are ordinary people far from home, they are less hardy than dedicated soldiers? |
Kumiorava Warlord of the Elastic Mammals b.02-15-99
|
 |
posted May 17, 2000 19:06
 |
 |
 |  |
Ooops... looks like I misread your previous post, CapTVK. A bit.  My last post is full of shit. 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. |
CapTVK Prince Voorburg, the Netherlands, Europe b.02-15-99
|
 |
posted May 19, 2000 18:23
  |
 |
 |  |
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).] |
paulz Freeciv Host/Webmaster San Diego, CA, USA May 2000
|
 |
posted May 19, 2000 20:26
  |
 |
 |  |
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.) |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 20, 2000 06:58
 |
 |
 |  |
That mailing list is a pain to search, you have to search it 3 months at a time... |
CapTVK Prince Voorburg, the Netherlands, Europe b.02-15-99
|
 |
posted May 20, 2000 15:40
  |
 |
 |  |
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. |
taw Settler pl May 2000
|
 |
posted May 21, 2000 03:59
 |
 |
 |  |
Reason why settlers has discount is that bribing settlers shouldn't be much more expensive than bribing small city |
CapTVK Prince Voorburg, the Netherlands, Europe b.02-15-99
|
 |
posted May 21, 2000 05:11
  |
 |
 |  |
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... |
Kumiorava Warlord of the Elastic Mammals b.02-15-99
|
 |
posted May 24, 2000 23:25
 |
 |
 |  |
Ummm... How about raising the price of the cities, maby?  |