Re: [Freeciv-Dev] [bug #17606] More barbarian players

2016-01-24 Thread Not Given

)Excuse me, still testing my new account settings)

I don't think making any barbarians playable 
(Sea/Land/Animal/Autonomous_police)

Players should be players, and disasters should be disasters.

Peace and health
Imhotep

is not a good thing.
Marko Lindqvist wrote:

Follow-up Comment #13, bug #17606 (project freeciv):

As of S2_6, we have 10 barbarian slots, of which max 3 are in use
(Sea/Land/Animal)

Making (all) barbarian nations playable is not a good idea as then player may
pick them, leading real barbarian player not getting nation.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


  



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #17606] More barbarian players

2016-01-24 Thread Not Given

Please excuse me,

what I contributed on this was more like a gamma than a beta version.
(it picked the barbarians and synthesized new nations (via Cartesian 
product)

by adding the leader name.

By the local police kicking me to the ground, and giving me a concussion
on March 13 2013 I have also been kicked out of so many things, like a job,
just to mention one.

I remember that my intention back then was to have many barbarian tribes,
distinguished by their leader, and it worked, for me, locally, with the then
actual version, as far as I had tried.

I later tried to update, but, halfheartedly, was not even able to get my 
other

contribution to work, and as I have lots of other problems, I didn't invest
much time into that.

peace and health to all of you
Imhotep

Marko Lindqvist wrote:

Follow-up Comment #13, bug #17606 (project freeciv):

As of S2_6, we have 10 barbarian slots, of which max 3 are in use
(Sea/Land/Animal)

Making (all) barbarian nations playable is not a good idea as then player may
pick them, leading real barbarian player not getting nation.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


  



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #17606] More barbarian players

2016-01-24 Thread Not Given

And, as I had to move to a different computer since,
receiving mails to tihs specific accout does not work as of now.
I still, as laways, get mails from the mailing list.

Peace and health
Imhotep

Not Given wrote:

Please excuse me,

what I contributed on this was more like a gamma than a beta version.
(it picked the barbarians and synthesized new nations (via Cartesian 
product)

by adding the leader name.

By the local police kicking me to the ground, and giving me a concussion
on March 13 2013 I have also been kicked out of so many things, like a 
job,

just to mention one.

I remember that my intention back then was to have many barbarian tribes,
distinguished by their leader, and it worked, for me, locally, with 
the then

actual version, as far as I had tried.

I later tried to update, but, halfheartedly, was not even able to get 
my other
contribution to work, and as I have lots of other problems, I didn't 
invest

much time into that.

peace and health to all of you
Imhotep

Marko Lindqvist wrote:

Follow-up Comment #13, bug #17606 (project freeciv):

As of S2_6, we have 10 barbarian slots, of which max 3 are in use
(Sea/Land/Animal)

Making (all) barbarian nations playable is not a good idea as then 
player may

pick them, leading real barbarian player not getting nation.

___

Reply to this item at:

  <http://gna.org/bugs/?17606>

___
  Message sent via/by Gna!
  http://gna.org/


  






___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3775] Potential bodyguard looking for units to protect

2013-05-13 Thread Not Given
Follow-up Comment #8, patch #3775 (project freeciv):

Thanks a lot.
I am open to discussion quite well (I have some bright moments once a day :)
).
What I wanted to point out is that I can't do any coding/inspection reliably.

Discussion as such is fine, it probably even helps me find a way back. If only
those taking part in the discussion are aware of my condition and health and
do not take offense if some response is unduly late or possibly in a strange
way out of topic.

(Btw, as I don't feel able neither to code or even to play freeciv I have
fallen back to nethack. Wasn't even able to do that in the first 4 weeks after
the incident.)

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3775] Potential bodyguard looking for units to protect

2013-05-13 Thread Not Given
Follow-up Comment #6, patch #3775 (project freeciv):

Regrettably, after the police attack of March 13 on me, I still suffer from
the concussion they delivered on me, I have still trouble concentrating and
suffer from very curious forms of "memory leaks" a way I have never known
before.

Excuse me, but it feels like it will still take a long time until I will be
able to valuably contribute by coding or anything that needs code inspection.
I'm not sure if I can give general advise or if I simply lack the
retrospective to see what I meant as advise is really purest crap.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3775] Potential bodyguard looking for units to protect

2013-05-13 Thread Not Given
Follow-up Comment #4, patch #3775 (project freeciv):

I was developing a ruleset based on Ancients. The AI does a bad job on it so I
went into the code and this patch is just one of many things I came across.
The discussion of it is now already way out of proportion of any harm or
benefit from that patch.

So let's instead concentrate on what SHOULD be done for a proper, general
solution for bodyguard assignment.

You have mentioned some points that make bodyguard assignment complex, and I
will add some:

1) unit types move differently according to terrain
2) unit types move differently according to terrain modifications (roads,
rivers, others?)
3) unit types have different needs for fuel or are susceptible to hit point
loss
4) units may have extra move points depending on veteran status
5) different unit types may have different behavior on transport or
airlifting
6) movement points may vary on technologies researched

7) some units ignore zones of control, others don't

8) unit defense strength may vary greatly with terrain/modifications
9) strong attacking units might provide better protection than those strong in
defense
10-20) I probably missed some

So in total, in some rulesets there might be some kind of guardian angel that
can follow wherever you go, but generally this will not be the case.

>From what I recon, there is no way around assigning bodyguards dynamically,
more than one (to send one ahead while the other keeps rearguard, essential
when the master-plan involves airlifting), and checking on every move if the
guards can follow.

The routine that assigns bodyguards will need to receive some insight of the
planed moves, that is, a path to target, and the unit that should be protected
has to check on every move if the guard(s) can follow or if some guards are
already at the tile where it wants to move to.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3775] Potential bodyguard looking for units to protect

2013-05-13 Thread Not Given
Follow-up Comment #2, patch #3775 (project freeciv):

Of course, with the new terrain features things get much more complicated for
the AI. Think of a ruleset where tanks can not cross swamps (they drown), but
are fast enough to find a path around and so still could keep pace with, say,
a caravan.

The proposed patch addresses the classical rulesets, where it gives little
improvement with very little code change.

In view of rulesets that make extensive use of the new terrain features, AI
should check all unit types once when the ruleset is loaded, construct a "can
follow" relationship (a partial order) and use this if possible, but fall back
on some crude heuristics if now bodyguards could be found this way.

The protected unit would have to check before moving if the bodyguard can
follow.
If a king is to be protected because of GameLoss attribute, it should stay put
behind city walls and movement type of bodyguard does not matter at all.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-21 Thread Not Given
Follow-up Comment #18, bug #20577 (project freeciv):

> - Updated to apply on svn HEAD (r22531) 

Thank you for that. I guess it would have been exceedingly more trouble for me
than it was for you.
(I have found other ways tho apply patches than "svn patch" but, I haven't
tried them yet and I see a risk to mess up my working copy with all of my
current changes.)

So now, how do we proceed? I see you fixed that capstr, too.

Can I do anything now on this topic, or should I wait for your comments after
you did some testing?

(It worked for me on many games, but I don't have the latest version from
trunk, and I have quite a lot of other changes in my working copy by now.
There was a typo in my last post, instead of "I have /no/ more than one patch"
it should read "I have /now/ more than one patch" ... .)

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-19 Thread Not Given
Follow-up Comment #16, bug #20577 (project freeciv):

OK, here comes the next try.

It still doesn't contain the capstr thing, and still is against r22446.

Last time I updated to the trunk version it took me short of a day to cope
with all the changes and to get everything working again, so I am very
reluctant here.

Further, I have no more than one patch and many debugs in my working copy, so
I have to clean each svn diff manually, which naturally is error prone. (No,
svn patch does not work on my system.)

(file #17450)
___

Additional Item Attachment:

File name: gamelossStyle22446_v4.patchSize:12 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-19 Thread Not Given
Follow-up Comment #14, bug #20577 (project freeciv):

Excuse me, I had a concussion and still have trouble concentrating, so I
probably make even more mistakes as from natural dumbness alone.

I try to include missing packets_gen but fail, because it "is not under
version control", not even when I use the original code:

$ cp common/packets_gen.h common/Imhotep_packets_gen.h
$ svn up -r22446 packets_gen.h
At revision 22446.
$ svn diff  server/unittools.c server/ruleset.c server/maphand.c
server/maphand.h server/barbarian.c server/barbarian.h server/plrhand.c
common/packets_gen.h common/fc_types.h > gamelossStyle22446_v4.patch
svn: 'common/packets_gen.h' is not under version control


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17606] More barbarian players

2013-03-18 Thread Not Given
Follow-up Comment #12, bug #17606 (project freeciv):

The patch seems to work now even when reloading saved game.

As I have never done anything with translations there may probably remain some
errors here but should not prevent playing/testing.

This patch may not work without patch https://gna.org/patch/?3776 

Whenever in a nation ruleset the option split=TRUE is given, the nation is
split into several "war clans" each named " led by ". It is intended for land and sea barbarians but should work with
ordinary nations, too.

The split option is used in the ruleset file only, so there should be no need
to change anything outside ruleset.c to recognize this special option.

As for my one time testing, the proposed
reqs =
{ "type", "name", "range"
"AI", "Barbarian", "Player"
} 
does not work.

(file #17448)
___

Additional Item Attachment:

File name: multipel_nations_22446_v2.patch Size:9 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20628] Server crashes when loading saved game on wrong ruleset

2013-03-17 Thread Not Given
Follow-up Comment #1, bug #20628 (project freeciv):

I revoke this bug report.
Looks like the player names are wrong due to the patch mentioned.

Sorry.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20628] Server crashes when loading saved game on wrong ruleset

2013-03-17 Thread Not Given
URL:
  

 Summary: Server crashes when loading saved game on wrong
ruleset
 Project: Freeciv
Submitted by: imhotep
Submitted on: Sun 17 Mar 2013 03:54:57 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

I'm not 100% if this truly a bug or only a cumbersome feature.

This http://gna.org/bugs/?17606 allows multiple barbarian players.

It works fine as long as the game continues.
As soon as a game is saved and reloaded the server crashes.

As far as I see, this is because the saved game is loaded onto a different
ruleset before the correct ruleset is applied.

When the first ruleset doesn't have the nations reqired by the ruleset of the
saved game, nations are assigned to the players according to not quite
transparent rules, and, if no nation is found, the server crashes.

This is the server for Freeciv version 2.4.99-dev
with revision 22446, modified with the above mentioned patch, but I'm sure
this happens without this patch as soon as it is played whth any ruleset that
has sufficiently different natins.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17606] More barbarian players

2013-03-13 Thread Not Given
Follow-up Comment #11, bug #17606 (project freeciv):

Just an "as is" patch for those "brave at heart".
With no cleanup done to any style issues.

May not work without patch https://gna.org/patch/?3776

&Imhotep



(file #17429)
___

Additional Item Attachment:

File name: multipel_nations_22446.patch   Size:10 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3776] server/barbarian.c:create_barbarian_player fix deficencies

2013-03-13 Thread Not Given
Follow-up Comment #3, patch #3776 (project freeciv):

Sorry, I just had a bloody encounter with the local police.
(Bloody on my side, violence one-directional.)

Don't know when I'll be able to contribute.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-13 Thread Not Given
Follow-up Comment #12, bug #20577 (project freeciv):

OK, I see we were talking about different things.

But I still have no idea how this patch would affect any client side
capabilities.

All new features, as far as I can see, are handled exclusively on the server
side.

Or has it to do something  with the synchronizing issue I mentioned?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-13 Thread Not Given
Follow-up Comment #10, bug #20577 (project freeciv):

This "submit" is clearly an error, I fixed it in my working copy.

The effect is that the cities submitting are not randomly chosen, as intended,
but, after the first one, picked in the sequence order the iteration
provides.
So the game is playable as it is.

I will submit the correction together with potential future corrections or for
this change aalone, if anyone urges me to.

I doubt if the capstr change is really worth it.

The patch is on an already old version of the quickly changing trunk, probably
the whole patch will need extensive rework for the version it will finally be
merged to.
(The trouble I had upgrading to r22446 was nearly more than the time it took
to write the code. (I'm working on a separate modpack.))

The change is downward compatible in that a missing parameter just works out
as if 0 was given, for the "classic" style.
Old versions will silently ignore this option.

So as I see it, a new capsrting will only harass any modpack developers, being
forced to do replacements in many files, untimely, and, without any benefit
for the final standard users.

I am more concerned about the synchronizing issue. An observer would not see a
new palace nor any new GameLoss units until the next turn.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3776] server/barbarian.c:create_barbarian_player fix deficencies

2013-03-12 Thread Not Given
Follow-up Comment #2, patch #3776 (project freeciv):

comment #1

It may be that this patch is ahead of its time.

I don't see any code preventing more than one barbarian/pirate nation (may be
only because I did not look at the right places).

I agree on the point that there currently is /popper randomness/ in choosing
one out of only one possible barbarian nations per type ;-)

But as soon as this limitation is lifted, it fails, possibly with segmentation
fault.



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17606] More barbarian players

2013-03-12 Thread Not Given
Follow-up Comment #9, bug #17606 (project freeciv):

It seems that there is a tiny bit of a problem there.
Some rulesets (I didn't check many) have a No_Diplomacy effect with
reqs=
{ "type",   "name", "range"
  "Nation", "Barbarian", "Player"
}

As of now I don't see if there is some way to rewrite this to work like
reqs=
{ "type",   "name", "range"
  "BarbarianType", "Land", "Player"
}


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3776] server/barbarian.c:create_barbarian_player fix deficencies

2013-03-11 Thread Not Given
URL:
  

 Summary: server/barbarian.c:create_barbarian_player fix
deficencies
 Project: Freeciv
Submitted by: imhotep
Submitted on: Mon 11 Mar 2013 07:51:58 PM GMT
Category: None
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

This patch is for 2.4.99-dev r22446

Aside from the fact that the name is misleading (it does not normally create a
new barbarian),, the function server/barbarian.c:create_barbarian_player lacks
randomness and prefers recycling of already existing barbarians before
creating new ones.

Existing code:
If there is a barbarian player of the requested type, it is reused.
If there is more than one of them, the first found by iterating the list is
returned. Which one that is might be implementation dependent but in all cases
lacks proper randomness.

Only if no barbarian of the requested type is found, a new one is created.

If for some reason the pick_a_nation-function returns NULL, the server crashes
with segmentation fault.

Patch (intended behavior, probably needs review and more testing): 
One of the existing barbarians with requested type is chosen truly random from
the existing ones.
If an new barbarian player of that type can be created, it is chosen with a
probability equal to the already existing ones.

If there is no available nation for the new barbarian, it is not considered.

Reason for the patch:
the patch removes some hidden bugs (the code where the server crashes is not
reached in the original code only because no new barbarians are created once
one of each type is present).

In view of http://gna.org/bugs/?17606 there will be more than one barbarian
nation for each type, making the random choose more complex than the present
"choose one out of one".

In view of the new gameloss_style options ( https://gna.org/bugs/?20577 ),
when there is only one barbarian this one and only gets far too strong.

Other issues:
In the preexisting code, when an existing barbarian player is reused, it gets
100 gold extra. I don't know if this is really intended, but as I don't know
otherwise, I ported this feature to the new code.

Have a lot of fun.

BTW: I have not found out yet how to see a preview of a submit nor a
description on how to do some common features, so as to cite previous posts or
properly include links. So, until someone cares to give me a hint on any
errors, you all will have to live with my self-made style.





___

File Attachments:


---
Date: Mon 11 Mar 2013 07:51:58 PM GMT  Name:
create_barbarian_player_22446.patch  Size: 4kB   By: imhotep



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17606] More barbarian players

2013-03-11 Thread Not Given
Follow-up Comment #8, bug #17606 (project freeciv):

What about automatically creating a war clan (technically: a nation) for each
leader (when the nation rule has flag barbarian)?

The nation name could be generated as "Barbarians lead by Attila" etc.

They would not be distinguishable by flags.
But then, these are barbarians. If you see them you either run or fight, not
really a need to distinguish them.

This would not prevent having really different nations declared as barbarians,
with different flags.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3775] Potential bodyguard looking for units to protect

2013-03-09 Thread Not Given
URL:
  

 Summary: Potential bodyguard looking for units to protect
 Project: Freeciv
Submitted by: imhotep
Submitted on: Sat 09 Mar 2013 11:56:09 PM GMT
Category: ai
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

in ai/default.aiunits.c:look_for_charge
the unemployed unit checks potential units if it is worthwhile.

One check is the move_type. This is, I suppose, to prevent a sea unit to
protect a land moving unit and vice versa. But a unit with UMT_BOTH shouldn't
be so picky as to reject an otherwise valuable unit with different move_type.



___

File Attachments:


---
Date: Sat 09 Mar 2013 11:56:09 PM GMT  Name:
aiunit_look_for_charge_22446.patch  Size: 671B   By: imhotep



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-09 Thread Not Given
Follow-up Comment #8, bug #20577 (project freeciv):

And again a new version.

On server start, not only the requested ruleset is loaded but another one
before that. I was not aware of that and don't know if this is a bug, but it
really did cost me a lot of time.

I still have no idea what to do with "network capstr bump needed".

Palace is removed when the cities are transferred. There is code to build a
new one for the new player, along with any GameLoss units. New Palace is even
built for barbarians, and I'm not definitive if this is really a good idea.

One known bug is that the Palace as well as the GameLoss unit(s) are only
visible next turn. They are effectively there, but invisible. I haven't yet
fond the proper functions to call for synchronization.

The player was killed ("pplayer->is_alive = FALSE;") even before I touched the
code. But the civil_war-method won't work for a dead player.

The entry in game.ruleset now looks like

gameloss_style =
"GAMELOSS_STYLE_BARB|GAMELOSS_STYLE_LOOT|GAMELOSS_STYLE_CWAR"

and I don't know how to get rid of the "GAMELOSS_STYLE_" prefix in the ruleset
but keep it in the code (without introducing something new that probably
already exists somewhere).


(file #17415)
___

Additional Item Attachment:

File name: gamelossStyle22446_v3.patchSize:11 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-07 Thread Not Given
Follow-up Comment #7, bug #20577 (project freeciv):

 > As new value is transferred to client side, this changes network protocol
-> network capstr bump needed

I don't have even an idea on where to look for a clue on this ... is there a
working example that I can study?

Meanwhile, I did a lot of changes to my working copy, not only on the ticket
here.

Latest thing that drives me mad is that game.info.gameloss_style is set
correctly in ruleset.c, but when lightning strikes the enemy leader it
evaluates to 0, and no effect takes place at all.

I guess I have to do a whole lot of time consuming try&error debugging.

In the faint hope that anyone out there has had this problem before I post
*all of my diffs* as a "patch".



(file #17405)
___

Additional Item Attachment:

File name: diff22446.patchSize:28 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3770] better defense when GameLoss is a military unit

2013-03-07 Thread Not Given
Follow-up Comment #2, patch #3770 (project freeciv):


 > Is this somehow connected to the primary change in this ticket?

Yes, it is, but only "somehow". When no DefendGood units can be built, AI
leaves cities (and thus the Leader within it) unprotected.

So the first part won't have any effect without the second.
(AI still leaves cities alone when they think there would be no danger.)

The deeper problem with the DefendGood thing is that AI relies on the hints
given. They should rather analyze the ruleset to establish a "better than"
hierarchy once at game start  from where they can get the current best
available each time. But that sure won't be a one-liner.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-06 Thread Not Given
Follow-up Comment #4, bug #20577 (project freeciv):

ouch, yes, right one comes here

(file #17399)
___

Additional Item Attachment:

File name: gamelossStyle22446_v2.patchSize:9 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-03-05 Thread Not Given
Follow-up Comment #2, bug #20577 (project freeciv):

here is a new version of the patch

I did a lot of debugging on other issues and I hope I did not mix in other
changes, or leave out something.

There is still a known bug: neither the new GameLoss unit nor the new Palace
are visible immediately but only after the next turn.

I would like a feedback soon because I am on other things and want to settle
this matter to "clear my table" before differences to the trunk will make new
changes necessary, and, before I get confused with the many changes on the my
local version.

(file #17395)
___

Additional Item Attachment:

File name: gameloss_defend_22446.patchSize:0 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20591] AI does not take effects into account that are based on techs only

2013-03-05 Thread Not Given
URL:
  

 Summary: AI does not take effects into account that are based
on techs only
 Project: Freeciv
Submitted by: imhotep
Submitted on: Tue 05 Mar 2013 04:30:12 PM GMT
Category: ai
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Background:
I have a modpack where a lot of effects require only techs, not improvements
(For example the knowledge Barter or Pottery reduce waste directly, without
the need of any additional building.)

Problem:
All tech assessment is done for improvements only.

Effects that don't have an improvement in the req list are ignored.

I would like to try to get a patch for this, but it looks like I will have to
get some other things (bugs?) out of the way, first.
(I'm thinking of aicity.c:improvement_effect_value, especially, which, ohm,
doesn't look like it was the final perfect version.)




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3770] better defense when GameLoss is a military unit

2013-03-04 Thread Not Given
URL:
  

 Summary: better defense when GameLoss is a military unit
 Project: Freeciv
Submitted by: imhotep
Submitted on: Mon 04 Mar 2013 10:38:17 AM GMT
Category: ai
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

Background:
I modified Ancients modpack so that the Leader is a weak military unit, to
incite human players to take a bit of a risk and make the game more
interesting.

Unfortunately, this works for AIs, too. To win, I only have to wait until all
AI leaders are killed by barbarians.

Patch (against Freeciv version 2.4.99-dev r22446):
This little hack prevents AIs from using the Leader to defend cities (so other
units will be produced to do this).

Second, if no DefendGood units can be produced, DefendOk will do.



___

File Attachments:


---
Date: Mon 04 Mar 2013 10:38:17 AM GMT  Name: gameloss_defend_22466.patch 
Size: 817B   By: imhotep



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20577] new parameter gameloss_style in game.ruleset

2013-02-27 Thread Not Given
URL:
  

 Summary: new parameter gameloss_style in game.ruleset
 Project: Freeciv
Submitted by: imhotep
Submitted on: Wed 27 Feb 2013 06:18:26 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 22446
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

When I tried to make a new modpack based on Ancients, I stumbled on an option
"gameloss_style".
According to the comment, cities conquered from players still alive were given
back to the previous owner. (So far, I found this already coded).
Depending on the parameter value, the remaining cities are either destroyed or
fall to the hands of some barbarians.

On a local copy based on version 2.4.99-dev, revision 22214, I implemented
some code to do this.

There is also code to have civil war (before any cities fall to barbarians or
vanish without a trace).
The new player gets a palace of its own, and, a Leader (it would be unfair if
the AI had no GameLoss unit to trigger all this features when we have chased
them down).

Also, I coded some benefits for the player "who liberates the oppressed people
from the enemy leader":

up to 3 techs are stolen

a random amount of gold is taken ("in compensation of the war efforts"), from
0 to the amount of gold the victim has had

using some interrogation, we press a (distorted) map from the captured leader

a random number of cities (about a quarter on average, with lesser probability
on higher numbers) can be convinced to "join the righteous cause" of the
victor

It worked on my copy on a few games, but probably has lots of yet unknown bugs
(I'm new to the code and this is my first try).




___

File Attachments:


---
Date: Wed 27 Feb 2013 06:18:27 PM GMT  Name: gamelossStyle22446.patch  Size:
11kB   By: imhotep



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20569] "Trying to put -1 into 16 bits" in transfer_city

2013-02-27 Thread Not Given
Follow-up Comment #1, bug #20569 (project freeciv):

with r22446 I get the message:

1: Trying to put 98979 into 16 bits

98979 is the build_cost for the Leader

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev