Page 1 of 1

Modify Spy Ruleset to Land Directly into a City

Posted: Thu May 21, 2015 8:07 pm
by Steve R.
In Civilization a Diplomat/Spy can "jump" directly from a ship into a city. Freeciv apparently does not allow direct entry into a city from a ship.
How can the Diplomat/Spy ruleset be modified to allow a spy to leave a ship to enter a city?

Using Ubuntu.

Re: Modify Spy Ruleset to Land Directly into a City

Posted: Thu May 21, 2015 9:31 pm
by taka
Hi!
I posted the question.
http://gna.org/bugs/?22279#comment2

Re: Modify Spy Ruleset to Land Directly into a City

Posted: Fri May 22, 2015 10:34 am
by sveinung
Freeciv 2.6 will, as taka already pointed out, make it possible to create a ruleset where a unit can perform spy actions from non native terrain. (A spy inside a ship is in non native terrain) Just remove the requirement

Code: Select all

"UnitState", "OnLivableTile", "Local"
from the actor_reqs of the action enablers of the actions you wish to permit. (They live in game.ruleset)
Steve R. wrote:In Civilization a Diplomat/Spy can "jump" directly from a ship into a city. Freeciv apparently does not allow direct entry into a city from a ship.
Do you mean Civilization 1 and/or Civilization 2? If performing a spy action while inside a ship is possible the Freeciv 2.6 version of the civ1 ruleset and/or the civ2 ruleset should be changed. (See this post in the Help wanted forum)

Re: Modify Spy Ruleset to Land Directly into a City

Posted: Fri May 22, 2015 12:44 pm
by Steve R.
Thanks for the quick reply. Always another issue. Grumble. The version of Freeciv that I have is 2.4.4. The advice appears to apply to version 2.6.
I did a search of the file "game.ruleset" for the string "OnLivableTile" with no hits.

Version 2.6 may not be available for running on a desktop computer. Web version only? According to the freecivWiki, version 2.5 was released on March 14, 2015.
I will look into downloading/installing version 2.5 and see if if the spy issue is (has been) resolved or if it can be fixed.

Below is my "units.ruleset". However, it is for version 2.4.4; which may be an obsolete rendition based on the current version 2.5.
[unit_spy]
name = _("Spy")
class = "Land"
tech_req = "Espionage"
obsolete_by = "None"
graphic = "u.spy"
graphic_alt = "-"
sound_move = "m_spy"
sound_move_alt = "m_generic"
sound_fight = "f_spy"
sound_fight_alt = "f_generic"
build_cost = 30
pop_cost = 0
attack = 0
defense = 0
hitpoints = 10
firepower = 1
move_rate = 3
vision_radius_sq = 8
transport_cap = 0
fuel = 0
uk_happy = 0
uk_shield = 0
uk_food = 0
uk_gold = 0
flags = "Diplomat", "IgZOC", "NonMil", "Spy"
PS: Yes, I was playing Civ2 on MS Windows. Now, I have gone to Linux.

Re: Modify Spy Ruleset to Land Directly into a City

Posted: Fri May 22, 2015 2:00 pm
by sveinung
Steve R. wrote:Thanks for the quick reply. Always another issue. Grumble. The version of Freeciv that I have is 2.4.4. The advice appears to apply to version 2.6.
Looks like I was a bit to quick. Version 2.6 is a development version. It isn't released yet. I should have pointed this out.
Steve R. wrote:Version 2.6 may not be available for running on a desktop computer.
You can find the source code in Freeciv's SVN. The branch is called S2_6. If you wish to try it you can compile it your self or find an unofficial compiled version. Maybe there is an Ubuntu ppa that has it?

Re: Modify Spy Ruleset to Land Directly into a City

Posted: Fri May 22, 2015 2:15 pm
by sveinung
Steve R. wrote:Yes, I was playing Civ2 on MS Windows.
I just filed a bug report. I assigned it to myself. That means that I'll try to fix the civ2 ruleset so diplomat/spy actions can be done from ships. I can only fix it for Freeciv 2.6 (and 3.0, the next version).

To be sure that I got you right: Is the Civ2 behavior that a Diplomat/Spy can do any action it is capable of (like inciting a city or bribing a unit) while it is inside a ship?

Re: Modify Spy Ruleset to Land Directly into a City

Posted: Fri May 22, 2015 3:37 pm
by Steve R.
sveinung wrote:To be sure that I got you right: Is the Civ2 behavior that a Diplomat/Spy can do any action it is capable of (like inciting a city or bribing a unit) while it is inside a ship?
I do not believe the Diplomat/Spy can initiate any action external to the ship while inside the ship. I had gone to a plan "B" that avoided the Diplomat/Spy working directly from a ship. Unfortunately, I do not have a game currently open to conduct a quickie test.
sveinung wrote:Maybe there is an Ubuntu ppa that has it?
How To Install FreeCiv 2.4.4 On Ubuntu 14.10, Ubuntu 14.04 And Derivative Systems

Re: Modify Spy Ruleset to Land Directly into a City

Posted: Fri May 29, 2015 1:25 pm
by sveinung
sveinung wrote:
Steve R. wrote:Yes, I was playing Civ2 on MS Windows.
I just filed a bug report. I assigned it to myself. That means that I'll try to fix the civ2 ruleset so diplomat/spy actions can be done from ships. I can only fix it for Freeciv 2.6 (and 3.0, the next version).
The Freeciv 2.6 (and 3.0) version of the civ2 ruleset now allows performing spy actions even if the Spy/Diplomat is inside a ship. Thanks a lot for letting me know what the Civilization II rule was!