Bugs relief / pull request

Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
Post Reply
FreeWilly
Posts: 17
Joined: Sat Dec 06, 2014 4:56 pm

Bugs relief / pull request

Post by FreeWilly »

I detected a bug in ai/default/daicity.c which prevented normal building behaviour of AI-players (e.g. taking down wonder production at random) and corrected it. I made a second modification to aihand.c to set maximum tax/res/lux to 80% which mitigates the current bug in AI-administration of these settings.

How do you want me to transfer the code? I made a fork in github and commited local. Should I create a branch and stake a pull request? Or just modify master?
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Bugs relief / pull request

Post by cazfi »

Transferring the code is one thing, but we do need ticket to manage the change. Unfortunately new users cannot register to our ticket tracker now, so unless you have an existing account in hostedredmine, you cannot create the tickets yourself. At the moment (temporarily) the preferred way is that you send an email to freeciv-dev mailing list ( https://www.freelists.org/list/freeciv-dev ) describing the bug / your improvement, and someone creates the ticket based on that.
The code itself can be transferred as a patch file attached to that mail (probably easiest for us), but we can get it from a pull request too.
FreeWilly
Posts: 17
Joined: Sat Dec 06, 2014 4:56 pm

Re: Bugs relief / pull request

Post by FreeWilly »

Posted a pull request.

I tried to implement a few "printf()" traces but without success. Have you somehow disabled this? Second, how can I activate logging output and where can I read it? Thanks!
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Bugs relief / pull request

Post by cazfi »

FreeWilly wrote:I tried to implement a few "printf()" traces but without success. Have you somehow disabled this? Second, how can I activate logging output and where can I read it? Thanks!
Windows? And trying to run client? I don't know why the output doesn't come to the console, but it's annoying. Server isn't affected as far as I know (losing its command prompt would be many times worse than losing client output, still). For the client the workaround is to direct log output to a file with the '-l' command line parameter (try '--help') and to read from that file.
FreeWilly
Posts: 17
Joined: Sat Dec 06, 2014 4:56 pm

Re: Bugs relief / pull request

Post by FreeWilly »

I solved this one. Stupidly I expected the output in the client while it naturally comes in the server, which is a different process in freeciv. As the server output is monitored in the client, but not displayed during the game, perhaps it's a good idea to offer such a window during the game also, maybe as debug program option.
Post Reply