Page 1 of 1

The code patches for LT46

Posted: Sat Aug 25, 2018 1:30 pm
by wieder
Some of this stuff is already in and some is not. This is a list where the planned and implemented code changes can be seen in one place.

New multipliers for global warming and nuclear winter:
https://github.com/longturn/freeciv-S2_5/pull/2/files


New caravan bonus style and trade routes:
https://github.com/freeciv/freeciv/comm ... 778206c52e


Changes diplomat chance of stealing tech to use new diplchance_steal game setting:
https://github.com/longturn/freeciv-S2_ ... e168648963


Don't get techs when conquering cities
https://github.com/longturn/freeciv-S2_ ... f48a6d7868


Commenting out a line from diplomats.c for preventing stealing techs when inciting a city:

from:

bool diplomat_incite(struct player *pplayer, struct unit *pdiplomat,
struct city *pcity, const struct action *paction)

/* You get a technology advance, too! */
steal_a_tech(pplayer, cplayer, A_UNSET);

Posted: Sat Aug 25, 2018 9:28 pm
by Corbeau
I will repeat this once again. I think that changing the global warming rate is simply indulging the lazy players. If you have 20% of your land covered in pollution, yes, you should have incoming global warming. So, why not cancel global warming altogether?

Posted: Sun Aug 26, 2018 7:18 am
by Corbeau
Also,
wieder wrote:Some of this stuff is already in and some is not. This is a list where the planned and implemented code changes can be seen in one place.
They can be seen if you know what you are looking for. For those of us who don't, can you list what exactly the changes are?

Posted: Sun Aug 26, 2018 9:04 pm
by wieder
I'll give better summary when I myself really know what that stuff does :P

This is actually a list of stuff we have and it's a reminder to me and others who might be interested. It will be translated to less technical English at a later time :)

Here is however a tip for understanding code:

If something on the freeciv code is entered between /* and */ it's a comment and doesn't affect the program. Also, if there are characters // on a line all the stuff after that line is considered a comment and doesn't affect the program.

Now there are these lines on a file called diplomats.c

/* You get a technology advance, too! */
steal_a_tech(pplayer, cplayer, A_UNSET);

The first line is a comment that doesn't affect the program. It's a comment for coders so they have better changes for understanding what happens where. The change we will do looks like this:

/* You get a technology advance, too! */
// steal_a_tech(pplayer, cplayer, A_UNSET);

The second line actually steals a tech and it's inside a part where the player incites a city. When we comment it out by adding // in the beginning of the line it's no longer a part of the program. Meaning that we simply remove functionality there and it's one of the most simple code changes there is.

Knowing that makes it more easy to read the code if you ever want to take a look at it :)

And yes, I doubt anyone not familiar with freeciv would understand every line of the code just by taking a casual look at it. Not even good coders :)

Posted: Sun Aug 26, 2018 9:11 pm
by Corbeau
wieder wrote:This is actually a list of stuff we have and it's a reminder to me and others who might be interested. It will be translated to less technical English at a later time :)
Understood. Thanks.