Effectively a bug: unit disbandment during peace

Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
User avatar
Corbeau
Elite
Posts: 1057
Joined: Mon Jan 13, 2014 11:13 pm

Effectively a bug: unit disbandment during peace

Postby Corbeau » Thu Jan 03, 2019 1:28 am

When going from Armistice to Peace, all units in the other nation's territory are disbanded.

However, this is what just happened: some of my units were along the border, on my territory. And then my neighbour's city grew, the border moved and my units ended up disbanded without really moving.

Lachu
Elite
Posts: 393
Joined: Sat May 04, 2013 2:19 pm

Re: Effectively a bug: unit disbandment during peace

Postby Lachu » Thu Jan 03, 2019 1:48 pm

I can understood why this happens (in historical/political aspect). Imagine A lead rebellion and B lead royalist. When rebellion surrender, it was disarmed. Maybe relation between two country is quite different, but that's not at 100% a bug.

User avatar
Corbeau
Elite
Posts: 1057
Joined: Mon Jan 13, 2014 11:13 pm

Re: Effectively a bug: unit disbandment during peace

Postby Corbeau » Thu Jan 03, 2019 2:18 pm

You missed the "Peace" part.

Ignatus
Hardened
Posts: 258
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Effectively a bug: unit disbandment during peace

Postby Ignatus » Fri Jan 04, 2019 12:11 pm

Maybe better would be just expel the units from peaceful territory, something like what happens in CivIII. But in the current rules, it's just a common danger to get your units trapped by growing peaceful territory and then disbanded. Maybe we should have a turn to try moving them out (somehow like again in CivIII), e.g. when you get a Legion from a hut exploring peaceful lands with an Explorer, you can move it out if the border is just near. If we don't want to deal with the order of things happening during a turn, we can just change the behaviour of mil.unit at peaceful territory from "disband immediately" to "try bounce around and disband only if no success" (the way we actually handle stack conflicts).

Lachu
Elite
Posts: 393
Joined: Sat May 04, 2013 2:19 pm

Re: Effectively a bug: unit disbandment during peace

Postby Lachu » Fri Jan 04, 2019 3:40 pm

Maybe add new diplomacy state called 'pre-peace'. Player offer to sign pace in some turns (default 10) and after this number of turns, players are in pre-pace. In this diplomacy state, unit will move automatically to nearest alliance city or player must move it to nearest alliance city. If some units stay on territory of pre-peace player, other side will have an casus belli.

nef
Hardened
Posts: 180
Joined: Mon Jun 25, 2018 5:01 pm

Re: Effectively a bug: unit disbandment during peace

Postby nef » Mon Jan 14, 2019 2:04 pm

Can anyone spell out exactly what happens in any of the commercial games?

Freeciv often has its own ideas and equally often they are idiomatic sometimes to the point of being idiotic. I personally think the interaction between expanding borders and "peace" falls into this last category. There are two key issues:
    a. disbanding a unit when the transition from armistice to peace occurs simultaneously with borders expanding
    b. the entrapment of units when the border expands AFTER the transition
The way I see it is that the main purpose of "peace" is to prevent intrusion and this works just fine (IMHO). It is the disbanding process that is half baked, but one has to do something about units inside the 'at peace' player's territory. In the first place I think the two situations should be equivalent. To this end I would suggest that mil units should be given ownership of the terrain they are on - but only as long as they are on it and only if the tile was not already claimed by another player. This would solve the first problem.

The second is less tractable. My ideas on this were to provide some sort of shadow in tile ownership. That is, as another player's border enlarges the presence of your own unit claiming a tile will also claim nearby tiles. Competing claims could then be resolved in a way to allow most units to escape an expanding border. In those situations where the unit is deep into someone else's territory and is trapped by multiple expanding borders I would think a barbarian like retirement would be in order.

Note if one is careless enough to leave a unit inside an armistice border then disbandment would still apply on transition. If only someone could tell auto eXplore about this - it is currently more grist for the 'gotcha' mill - and another reason not to use eXplore.

Ignatus
Hardened
Posts: 258
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Effectively a bug: unit disbandment during peace

Postby Ignatus » Mon Jan 14, 2019 3:10 pm

nef wrote:Can anyone spell out exactly what happens in any of the commercial games?

CivIII: units of different nations neither can stack nor are disallowed to enter any spare tile on any DiplRel. If your unit (even worker) is on another player territory (and in this game everything inside and something around borders is visible), an AI may complain and ask you to go away or declare war. If your units are inside for more than one turn, AI may insist on it; if you don't delare war, your units will be automatically expelled over the nearest border (don't know if third states are respected in process but probably yes). To avoid diplomatic complications, you may sign mutual pact about Right of Passage (embassy needed, may ne peacefully cancelled after 20 turns).

nef
Hardened
Posts: 180
Joined: Mon Jun 25, 2018 5:01 pm

Re: Effectively a bug: unit disbandment during peace

Postby nef » Mon Jan 14, 2019 4:41 pm

Seems that Civ III is somewhat more civilized about this. What I really don't like about fc is the hyper aggressive settler attacks from 'allies' so the ability to reject ANY unit would be a welcome relief. Comments about 'right of passage' have come up before - is this in addition to alliance or instead of? If it is in addition then what extra do you get with alliance?

I would expect
we can just change the behaviour of mil.unit at peaceful territory from "disband immediately" to "try bounce around and disband only if no success" (the way we actually handle stack conflicts).
together with right of passage should not be to difficult to implement in the near term. Perhaps instead of "mil.unit" we could have a unit (class?) flag - expellable - so I could put it on settlers.

Ignatus
Hardened
Posts: 258
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Effectively a bug: unit disbandment during peace

Postby Ignatus » Mon Jan 14, 2019 8:45 pm

nef wrote:Comments about 'right of passage' have come up before - is this in addition to alliance or instead of? If it is in addition then what extra do you get with alliance?
...
Perhaps instead of "mil.unit" we could have a unit (class?) flag - expellable - so I could put it on settlers.

The Civ3 RoP is a separate diplomatic clause; an "alliance" there is just a mutual obligation to make no peace to a common enemy, and there is also "mutual protection pact" that sides automatically declare war on any third party attacking one of them.

In Freeciv 3.0 we are going to have expelling in another way (as many things, done by units rather than by nation in Civ3) - a foreign unit can be expelled to its capital (if it exists), in sandbox ruleset it is possible for military units against non-military ones at peace (Freeciv alliance is a thing to think twice and than again, and then refuse).

Wahazar
Hardened
Posts: 289
Joined: Mon Jul 02, 2018 1:49 pm

Re: Effectively a bug: unit disbandment during peace

Postby Wahazar » Tue Jan 15, 2019 8:34 pm

Currently, boundary growth is totally annoying, for example allied city grow is borders beyond its workable scope and grab land from my small city, making this land unusable for both.

In my opinion, border can't be moved into tile occupied by another military unit, if more than half of tiles surrounding this unit doesn't belong to the growing city nation, regardless of their diplomatic state.

If such feature would be implemented, we can for example protect certain border line by row of military units (Grenshutz), to avoid unexpected border movement. It is, what military units during peace are for :)
It also would prevent bugs like described above, except of corner cases, when unit is trapped in enclave or corridor.
Augmented2 ruleset/modpack for freeciv2.6: viewtopic.php?f=11&t=91047