[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Make the way in which the costs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Note that you can get the whole tree (I think stealth-technology is at
> the top of the tree) using style 0 with about 20k bulbs. If you use
> style 1 you only need about 13k bulbs.
>
> To give the user more info (especially who the costs of a tech
> decrease) I added some text. What do you think about the attached
> patch?
It's a bit misleading if I understand the tech system correctly.
[...]
> + if (get_invention(game.player_ptr, i) != TECH_KNOWN) {
> + sprintf(buf + strlen(buf),
> + _("%d bulbs %s are required for this tech only."
> + "Total costs are %d bulbs. " "Depends on %d other techs. "
> + "You need to research %d other techs first.\n"),
> + base_total_bulbs_required(game.player_ptr, i),
> + tech_has_fixed_cost(i) ? _("(constant)") : "",
> + total_bulbs_required_for_goal(game.player_ptr, i),
> + advances[i].num_reqs - 1,
> + num_unknown_techs_for_goal(game.player_ptr, i));
> + }
1. If tech i is not currently available then base_total_bulblbs_required
will give a wrong unswer (pplayer->research.techs_researched needs
adjustment). Thus I would suggest removing the first sentence
altogether.
2. I would also suggest changing "constant" to "" and changing "" to "may
vary".
3. You don't have to be so laconic. It's a help text, not an order. So I
suggest
"To reach $NAME_OF_TECH we need to obtain $NUM_REQ other technologies
first. The whole project will require $TOTAL_BUBLBLBLS to complete.
This number may vary depending on what other players will research."
Best,
G.
> +
> for(gov=0; gov<game.government_count; gov++) {
> struct government *g = get_government(gov);
> if (g->required_tech == i) {
> Index: common/tech.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/common/tech.c,v
> retrieving revision 1.32
> diff -u -r1.32 tech.c
> --- common/tech.c 2002/01/11 13:50:49 1.32
> +++ common/tech.c 2002/01/11 13:56:10
> @@ -414,6 +414,17 @@
> }
>
>
>
/**************************************************************************
> + Returns true if the costs for the given technology will stay constant
> + during the game. False otherwise.
>
+**************************************************************************/
> +int tech_has_fixed_cost(Tech_Type_id tech)
> +{
> + return ((game.rgame.tech_cost_style == 1
> + || game.rgame.tech_cost_style == 2)
> + && game.rgame.tech_leakage == 0);
> +}
> +
>
+/**************************************************************************
> Returns the number of technologies the player need to research to
> make the goal technology _reachable_. So to get the benefits of the
> goal technology the player has to reseach
> Index: common/tech.h
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/common/tech.h,v
> retrieving revision 1.27
> diff -u -r1.27 tech.h
> --- common/tech.h 2002/01/11 13:50:50 1.27
> +++ common/tech.h 2002/01/11 13:56:10
> @@ -104,6 +104,7 @@
>
> int total_bulbs_required(struct player *pplayer);
> int base_total_bulbs_required(struct player *pplayer,Tech_Type_id
> tech);
> +int tech_has_fixed_cost(Tech_Type_id tech);
>
> int num_unknown_techs_for_goal(struct player *plr, Tech_Type_id goal);
> int total_bulbs_required_for_goal(struct player *pplayer, Tech_Type_id
> goal);
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
|
|