Changes in what a 3.1 ruleset can do

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Sat Nov 16, 2019 9:57 am

Wahazar wrote:Is it possible to use such effect for load/unload actions?

No. Loading and unloading isn't action enabler controlled yet. With that said: one of my motivations for Action_Success_Actor_Move_Cost was to use it for those actions once they become action enabler controlled.

sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Sat Nov 23, 2019 11:04 am

Successful action target movement cost control See hrm Feature #848435

The new effect Action_Success_Target_Move_Cost allows you to subtract a certain amount of move fragments from a unit after it has been the target of a successfully performed action. This comes on top of the movement point penalty the action itself. The movement cost being the target of "Expel Unit" has been fully moved to the ruleset.

You can now add a move fragment penalty to a unit for being the target of "Heal Unit".

sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Sun Nov 24, 2019 10:48 am

Exit transport to same tile action enabler control. See hrm Feature #848430 and hrm Feature #848492

Exiting a transport to the same tile is now action enabler controlled. Enabler control for exiting to a different tile and for exiting to another transport is not done yet. Enabler control for entering a transport is also not done yet.

"Transport Alight" controls cargo initiated transport exit. "Transport Unload" controls transporter initiated transport exit.

You can now forbid some unit kinds from alighting or from being unloaded outside a city. You can also use the effects Action_Success_Target_Move_Cost and Action_Success_Actor_Move_Cost to set a move cost for having a unit alight from you, for unloading a unit, for alighting from a transport and for being unloaded from a transport.
Last edited by sveinung on Sun Nov 24, 2019 11:21 am, edited 1 time in total.

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

Re: Changes in what a 3.1 ruleset can do

Postby Ignatus » Sun Nov 24, 2019 11:06 am

sveinung wrote:Enabler control for exiting to a different tile and for exiting to another transport is not done yet. Enabler control for entering a transport is also not done yet.

"Transport Alight" controls cargo initiated transport exit. "Transport Unload" controls transporter initiated transport exit.

So there will be 3 enablers for unloading a unit, possibly contradicting each other?

sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Sun Nov 24, 2019 12:02 pm

Ignatus wrote:
sveinung wrote:Enabler control for exiting to a different tile and for exiting to another transport is not done yet. Enabler control for entering a transport is also not done yet.

"Transport Alight" controls cargo initiated transport exit. "Transport Unload" controls transporter initiated transport exit.

So there will be 3 enablers for unloading a unit, possibly contradicting each other?


Not sure I understand what you mean here. Are you asking if a ruleset can enable "Transport Unload" but not "Transport Alight"? In that case: yes. A Bomb unit that can't alight but must be unloaded by its transport is now possible. Was my post unclear that "Transport Alight" is performed by the cargo and "Transport Unload" is performed by the transport? Are you familiar with actions and enablers? If not I'll explain it here: If an action has more than one enabler only one enabler needs to be active to enable the action. If one action is enabled while another action isn't enabled then the enabled action is enabled while the other isn't. Where you asking about something else?

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

Re: Changes in what a 3.1 ruleset can do

Postby Ignatus » Sun Nov 24, 2019 1:39 pm

sveinung wrote:Not sure I understand what you mean here. Are you asking if a ruleset can enable "Transport Unload" but not "Transport Alight"? In that case: yes. A Bomb unit that can't alight but must be unloaded by its transport is now possible. Was my post unclear that "Transport Alight" is performed by the cargo and "Transport Unload" is performed by the transport? Are you familiar with actions and enablers? If not I'll explain it here: If an action has more than one enabler only one enabler needs to be active to enable the action. If one action is enabled while another action isn't enabled then the enabled action is enabled while the other isn't. Where you asking about something else?

I mean: let there is a Musketeer in a Trireme on Hills/River. "Transport Alight" can prevent the musk to disembark on a rough terrain while "Transport Unload" may let the trireme kick him out anywhere (on a livable tile), and disembarking by movment is a third enabler with possibly another rules, and something more abut loading into differen trireme on the same or a neighbour tile... Just when I tried to imagine it before I thought that there should be rules for U1 embarking to/disembarking from U2 from T1 to T2, so just two operations to enable, but I could not fit this simple scheme into our actor-target enabling mechanism as unloading may be performed by both sides. This is not much a complaint, just request for clarification of the developers' vision.

sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Sun Nov 24, 2019 2:26 pm

Ignatus wrote:Just when I tried to imagine it before I thought that there should be rules for U1 embarking to/disembarking from U2 from T1 to T2, so just two operations to enable, but I could not fit this simple scheme into our actor-target enabling mechanism as unloading may be performed by both sides. This is not much a complaint, just request for clarification of the developers' vision.


Thank you for the clarification. I'll attempt to put my vision into words. My vision is to simplify automatic(/"machine") understanding of the Freeciv rules and to make new Freeciv ruleset defined rules possible by replacing imperative rule code and non general parts of the ruleset format with a few general concepts in a declarative ruleset format.
Last edited by sveinung on Tue Nov 26, 2019 3:45 pm, edited 1 time in total.

sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Tue Nov 26, 2019 8:50 am

New action "Surgical Strike Building". See hrm Feature #848643

"Surgical Strike Building" destroys a player selected building in the target city. You can adjust its odds with Action_Odds_Pct. You take away move fragments when the action is successfully performed with Action_Success_Actor_Move_Cost.

The usefulness of this action is unfortunately mostly limited to scenarios like "make the game loss unit powerful enough to tempt the player to use it". It is too powerful. You can't specify that certain buildings, like great wonders, can't be destroyed. A player can't use a unit to automatically defend against this action. (Combining autoattack, combat_rules.will_never and Provoking may work but that will be triggered once the actor unit moves next to the city, not when its starts doing "Surgical Strike Building").

Example. Allows the Leader to destroy visible buildings in enemy cities. Price of success: all moves. Probability of success: 50%

sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Wed Nov 27, 2019 1:25 am

New action "Transport Disembark". See hrm Feature #848682

"Transport Disembark" now controls exiting a transport to a different tile. Enabler control for exiting to another transport is not done yet. Enabler control for entering a transport is also not done yet.

sveinung
Elite
Posts: 459
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.1 ruleset can do

Postby sveinung » Mon Dec 02, 2019 7:16 am

Enter transport action enabler control. See hrm Feature #848637 and hrm Feature #850022

"Transport Embark" controls cargo initiated transport entry to a transport at an adjacent tile. "Transport Board" controls cargo initiated transport entry to a transport at the same tile. Note that these actions also cover cargo initiated transfer from transport to transport.

You can now
  • ban transport to transport transfer of cargo.
  • charge move fragments at transport entry

With generalized actions or with fake generalization of these actions you could define two actions. One would be enabled only when the actor unit is transported, the other only when it isn't. You could then give transport to transport transfer a different ui name and charge all move fragments on transport to transport transfer to prevent a unit moving across the map in one turn by using a chain of transports. If you wish one (or both) of these actions to be fake generalized if generalized actions aren't ready for Freeciv 3.1 request it here or, even better, here.