Incidencia #42133

Land units cannot enter hut

Abrir Fecha: 2021-05-02 09:25 Última actualización: 2022-05-07 17:08

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
2

Details

Running server and gtk3.22 client from master branch on macOS X 10.13.6 High Sierra, starting a server with either the classic or civ2civ3 ruleset (I'm not sure), my early-game land units cannot enter huts (minor tribe villages). I send worker, diplomat, settler, and warrior to the hut, and they do not enter. They don't display an error message, but they don't enter.

I understand from the in-game documentation on minor tribe villages that any land unit should be able to enter a village.

I have --log and --debug 3 set on both server and client. I don't see any messages that appear to explain why these units cannot enter.

Which ruleset? I'm not sure. The in-game documentation describes this as the "civ2civ3" ruleset, but the log entries from the client have entries like:

3: in secfile_from_input_file() [registry_ini.c::299]: Reading registry from "data/classic/techs.ruleset".

That refers to the directory data/classic/, which makes me think maybe it is the "classic" ruleset.

To reproduce:

  1. start a game.
  2. In editing mode, create a minor tribal village (hut) right next to your initial units.
  3. Try to send each of the initial units (explorer, worker, diplomat, settler) into the village.

Observed behaviour:

None of the initial units are able to enter the village.

Expected behaviour:

Any of the initial units can enter the village.

Ticket History (3/26 Histories)

2021-05-02 09:25 Updated by: jdlh
  • New Ticket "Land units cannot enter hut" created
2021-05-03 17:16 Updated by: kvilhaugsvik
Comentario

It looks like the ruleset you are using doesn't have "Enter Hut" action enablers. Could an old ruleset have ended up in your FREECIV_DATA_PATH - say from an old installation?

2021-05-04 04:52 Updated by: jdlh
Comentario

Thank you for your response!

Could an old ruleset have ended up in your FREECIV_DATA_PATH - say from an old installation?

Yes, this is possible. When I observed this bug I was running Freeciv from the build directory, without using the ./fcgui wrapper. I do have old installations, from testing and from an ordinary install of Freeciv via MacPorts. I will try to reproduce the bug while running with the ./fcgui wrapper, and after installing Freeciv using make install, and see if I can still reproduce the problem.

2021-05-04 14:31 Updated by: jdlh
Comentario

I _think_ I have now ruled out an old FREECIV_DATA_PATH.

I configured and made the master branch of freeciv with these parameters:

% ./autogen.sh --disable-silent-rules --enable-fcdb=sqlite3 --with-readline --enable-sdl-mixer --enable-fcmp=all --enable-client=all --prefix=$HOME/opt/freeciv 
% make
% make install
export PATH="$HOME/opt/freeciv/bin:$PATH"
FREECIV_DATA_PATH=$HOME/opt/freeciv/share/freeciv FREECIV_SAVE_PATH=$HOME/tmp/freeciv-dev/master/saves FREECIV_SCENARIO_PATH=$HOME/opt/freeciv/share/freeciv freeciv-gtk3.22 --debug 4 --log $HOME/tmp/freeciv-dev/master/fc_master.log

The result was still that none of the land units were able to enter a hut.

Does this ensure that the correct ruleset is in my FREECIV_DATA_PATH? If so, then we need to look for another explanation of this bug.

2021-05-04 14:40 Updated by: cazfi
Comentario

I don't know how well you know the game mechanics, so sorry if this is laughable idea, but do we have the same idea what "entering" a hut means? (You just referred to the documentation saying that you should be able to enter a village).

Unit that enters a tile with a hut gets some bonus from it (this should usually show up a message) and the hut disappears (so you can't get bonus multiple times).

2021-05-04 15:39 Updated by: jdlh
Comentario

Thank you, it is wise to clarify. I do understand that one moves onto the square containing a village, the village disappears, and the player gets some kind of bonus. That is not the behaviour I am seeing.

What I observe is that none of my units may move onto the square containing the village. The unit starts in a square next to the village. I give the unit a move command, The unit does not move onto the square containing the village. The village does not disappear. There is no bonus. Nor do I see any sound or log message about any problem with the move.

2021-05-04 16:47 Updated by: kvilhaugsvik
Comentario

Reply To jdlh

What I observe is that none of my units may move onto the square containing the village. The unit starts in a square next to the village. I give the unit a move command, The unit does not move onto the square containing the village. The village does not disappear. There is no bonus. Nor do I see any sound or log message about any problem with the move.

There is no action selection dialog popping up to let you choose what to do to the tile? That may be the bug.

If you choose the action to perform before ordering the unit to move the action selection dialog isn't needed. Try the menu Unit -> Go to and... -> Enter Hut then click on the tile with the hut. Did this work?

2021-05-05 06:25 Updated by: jdlh
Comentario

Try the menu Unit -> Go to and... -> Enter Hut then click on the tile with the hut. Did this work?

Yes! With each kind of land unit, I was able to select Unit -> Go to and... -> Enter Hut, then steer the unit to the village. The unit entered the village, I got the reward from the village, and the village disappeared.

So this appears to confirm your suspicion:

There is no action selection dialog popping up to let you choose what to do to the tile? That may be the bug.

Also, for what it's worth, none of my units are drawing on the map view. I see each unit in the left pane, when it is their turn to move. But I see no unit on the main map view itself. I suspect that is a different bug.

2021-05-05 21:39 Updated by: chippo
Comentario

Reply To jdlh

What I observe is that none of my units may move onto the square containing the village.

I've seen this from time to time, in various branches with various clients. It also sometimes happened with entering/leaving transports and entering cities (for attack or trade). What ALWAYS worked in all these situations, was to use the numeric keypad to move the unit - just a workaround in case you're trying to test something else.

2021-05-06 01:56 Updated by: chippo
Comentario

Ha! I just fired up S3_1 (3.0.93.6-alpha e82eaca70f) with no config, defaults everything (except difficulty) and I have the same problem. The Explorer won't enter a village with a 'g' followed by a mouse click. When I use the numeric keypad, I get the pop-up dialog.

The problem exists for both qt and gtk3.22 clients.

2021-05-06 03:09 Updated by: chippo
Comentario

I also have the same problem in master (3.1.90.2-dev c90b739f53). Qt and gtk clients.

2022-03-13 02:25 Updated by: dark-ether
Comentario

i also found this problem in the latest development version(r27325.eb81ae5877) , the units didn't enter the hut when i just pressed g and clicked on the tile, but if i was close to the tile and pressed d, and then clicked the hut tile i could enter huts with the enter hut action and they worked normally. have any of you tested the enter hut action with d, did it show? if it is the same bug i don't think this bug is ruleset related as i had this one when i was playing with the alien ruleset and the civ2civ3 ruleset. looking at the behaviour of other actions like the embark one, what should happen when you press g and then click the hut is, your unit shouldn't move and then the action selection dialog should appear. which if i am not mistaken is different than it worked previously, in the 2.6 version embarking and entering huts happened automatically on using g so if for some reason the action popup didn't appear it would probably confuse most people

(Edited, 2022-03-13 02:37 Updated by: dark-ether)
2022-04-25 17:35 Updated by: alain_bkr
Comentario

Hit the bug too

My units (explorer, settler, soldier...) cannot enter huts, but AI players units can.

commit c2fc5f4e9a3af36ebd8f908301ea363696756548 (HEAD -> S3_1, origin/S3_1)
Date:   Wed Apr 13 03:18:07 2022 +0300
If i remember, something similar happened for S3_0 and was fixed.

(btw as 3.1 reached alpha status, maybe several merge/backport/rebase with S3_0 could be done ?)
2022-04-25 17:56 Updated by: cazfi
Comentario

Reply To alain_bkr

(btw as 3.1 reached alpha status, maybe several merge/backport/rebase with S3_0 could be done ?)

Bugfixes are usually pushed to all applicable branches simultaneously, so there should not be anything belonging to S3_0 too only in S3_1 / master.

2022-04-25 18:01 Updated by: cazfi
Comentario

Reply To dark-ether

the action selection dialog should appear.

If that's not happening, is the unit at least showing the "action_decision_want" (Question mark) on top of it?

2022-04-25 18:18 Updated by: alain_bkr
Comentario

Nothing is shown (no question mark or message)

additional info : i run freeciv on linux

(Edited, 2022-04-25 18:19 Updated by: alain_bkr)
2022-04-25 18:34 Updated by: cazfi
Comentario

Got it reproduced when using goto. Seems not to happen when moving with the keyboard (single step at a time). Happens with goto even when it's for a single step.

Comparing handling of e.g. Disembark action (which works with goto) and Enter Hut action in the source code, latter seems to be missing code to automatically select it in unit_move_handling(). Adding that is likely enough to fix the bug.

2022-04-25 18:47 Updated by: cazfi
  • Hito Update from (Ninguno) to 3.1.0 (cerrado)
  • Componente Update from Rulesets to Server
2022-04-25 20:31 Updated by: cazfi
Comentario

This brings up more general question of the design that actions work that differently for goto than for individual steps. How are people without keypad supposed to get the action selection dialog at all, even if they knew not to use goto for such a move?

2022-05-01 21:36 Updated by: cazfi
Comentario

Reply To cazfi

How are people without keypad supposed to get the action selection dialog at all, even if they knew not to use goto for such a move?

I guess the mindset here has been still the same as the need for which the goto was first introduced (a long time ago) - that it's a helper for long, multiturn, noninteractive movement.

I don't think that's accurate any more, but people are using it also for short moves, assuming more interactive behavior.

2022-05-01 21:44 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
Comentario

Reply To cazfi

Enter Hut action in the source code, latter seems to be missing code to automatically select it in unit_move_handling(). Adding that is likely enough to fix the bug.

Attached patch does that, so fixes this specific ticket (entering hut works like other movement actions on goto). I will open a new ticket about the general approach of handling keyboard move and single step goto differently.

2022-05-02 07:21 Updated by: jdlh
Comentario

Reply To cazfi

Reply To cazfi

How are people without keypad supposed to get the action selection dialog at all, even if they knew not to use goto for such a move?

I guess the mindset here has been still the same as the need for which the goto was first introduced (a long time ago) - that it's a helper for long, multiturn, noninteractive movement. I don't think that's accurate any more, but people are using it also for short moves, assuming more interactive behavior.

About that mindset: I have only ever played freeciv on Mac laptop computers, which have never had numeric keypads. I have no way to do anything via a keypad. When I want to make a unit move one cell, or attack, I always use the Goto via the 'g' key (at least as far as I can recall). It would be helpful to have a design principle which recognises that some users have no numeric keypad at all. Nor a centre or right mouse button, either.

2022-05-02 08:53 Updated by: cazfi
Comentario

Reply To cazfi

I will open a new ticket about the general approach of handling keyboard move and single step goto differently.

-> #44496

2022-05-07 17:08 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar