Changes in what a 2.6 rule set can do

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Changes in what a 2.6 rule set can do

Post by cazfi »

This feature is not strictly about what a modpack can do, but meant for modpack authors anyway:
Emitting warnings about deprecated constructs in the modpacks. Such constructs have been the right way to do something in older freeciv version, work in current one though better way to do the same thing exist, and are going to stop working in future versions. Warnings about them can come handy when updating modpack from freeciv version to another - things that still work might need adjusting to make them to use the new better way, that will also work in the future.
These warnings are only emitted when commandline parameter (to client, server, or both, depending which deprecations one wants to follow) '--warnings' has been given. It's recommended that modpack authors use that option, but the end-user is not annoyed with those warnings when running without the parameter.
This is still work-in-progress in current S2_6 codebase, so if your modpack comes warnings-clean now it's worth checking it again later when more things are being checked.
It's a known issue that freeciv's own helpdata gives some warnings that custom modpack author can do nothing about. Just ignore those for now.
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 2.6 rule set can do

Post by sveinung »

The actor_reqs requirement vector of the action enablers actors performed by a unit can now check city stuff (patch #7039)

The city stuff is checked against the city the actor unit is inside. If the actor unit is outside a city the requirement isn't there.

Example: any unit that has the user unit type flag LowMoraleExploiter and is behind City Walls can bribe a low HP enemy unit outside the walls.

Code: Select all

[actionenabler_bribe_unit_city_walls]
action = "Bribe Unit"
actor_reqs    =
    { "type",   "name", "range"
      "UnitFlag", "LowMoraleExploiter", "Local"
      "DiplRel", "War", "Local"
      "UnitState", "OnLivableTile", "Local"
      "MinMoveFrags", "1", "Local"
      "Building", "City Walls", "City"
    }
target_reqs    =
    { "type",   "name", "range", "present"
      "UnitFlag", "Unbribable", "Local", FALSE
      "CityTile", "Center", "Local", FALSE
      "Gov", "Republic", "Player", FALSE
      "Gov", "Democracy", "Player", FALSE
      "MaxUnitsOnTile", "1", "Local", TRUE
      "MinHitPoints", "6", "Local", FALSE
    }
The above action enabler assumes that the user unit type flag LowMoraleExploiter is defined. It can be translated to English as: It is also legal to bribe a unit if the actor unit has the LowMoraleExploiter unit type flag, the actor unit's owner is at war with the target unit, the actor unit can live outside a transport at its current tile, the actor unit has 1 or more move fragments left, the actor unit is inside a city with City Walls, the target unit isn't unbribable, the target unit isn't inside a city, the target unit doesn't belong to a Republic, the target unit doesn't belong to a Democracy, the target unit is alone at its tile and the target unit doesn't have 6 or more hit points.
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 2.6 rule set can do

Post by sveinung »

You can now turn of automatic help text generation for an action (patch #7046)

You can now prevent automatic help text generation about what enables or disables an action. Use this if you already have documented it by hand.

Example: you have documented unit bribing and city inciting. (What units can do it, who it can be done to, who are immune etc)

Code: Select all

quiet_actions = "Bribe Unit", "Incite City"
bard
Veteran
Posts: 121
Joined: Fri Jun 14, 2013 2:00 pm

Re: Changes in what a 2.6 rule set can do

Post by bard »

Is it possible to allow units to survive after they perform an action? For example diplomats that survive when they "Investigate City".
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 2.6 rule set can do

Post by sveinung »

bard wrote:Is it possible to allow units to survive after they perform an action? For example diplomats that survive when they "Investigate City".
A unit with the "Spy" flag will survive "Investigate City". I didn't get around to fine grained action by action control. I hope to do it as a part of generalized actions in 3.0.
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: Changes in what a 2.6 rule set can do

Post by JTN »

A summary of the new 2.6 stuff available to modders can now be found in NEWS-2.6.0.
Wahazar
Elite
Posts: 362
Joined: Mon Jul 02, 2018 1:49 pm

Re: Changes in what a 2.6 rule set can do

Post by Wahazar »

What is a current state of art of Policy Multipliers sliders? Is it implemented for all clients? How to define policy icon?
Augmented2 ruleset/modpack for freeciv2.6: http://forum.freeciv.org/f/viewtopic.php?f=11&t=91047
Wahazar
Elite
Posts: 362
Joined: Mon Jul 02, 2018 1:49 pm

Re: Changes in what a 2.6 rule set can do

Post by Wahazar »

I tried to use Multiplier Policies:

Code: Select all

[multiplier_liberal]
name      = _("Liberal Economy")
reqs = { "type", "name", "range"
         "Tech", "Economy", "Player"
         "Building", "Slavery Abolition", "Player"
       }
start     = 1
stop      = 3
step      = 1
default   = 1
}
Unfortunately reqs part seems to be not implemented - slider is available and active no matter if reqs. are fulfilled.
I lack also possibility of using Multiplier value as requirement.
Augmented2 ruleset/modpack for freeciv2.6: http://forum.freeciv.org/f/viewtopic.php?f=11&t=91047
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Changes in what a 2.6 rule set can do

Post by cazfi »

Multiplier reqs are a freeciv-3.1 feature
Wahazar
Elite
Posts: 362
Joined: Mon Jul 02, 2018 1:49 pm

Re: Changes in what a 2.6 rule set can do

Post by Wahazar »

Seems that Qt client doesn't recognize policy start/stop value - it always set start to 0,
so they are broken (they usually need to start from 1, because are multipliers):
Image
First two policies have

Code: Select all

start     = 1
stop      = 3
step      = 1
default   = 1
while third have

Code: Select all

start     = 0
stop      = 2
step      = 1
default   = 0
Qt client treat them all like 0..2.

Gtk client works fine:
Image
Augmented2 ruleset/modpack for freeciv2.6: http://forum.freeciv.org/f/viewtopic.php?f=11&t=91047
Post Reply