Refuel action

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Refuel action

Post by Lachu »

I think this action can be especially useful for nomadic rulesets, but in other cases too.

Nomads will have fuel and when lost fuel, hp will be decreased over time. When hp is 0, unit die. As I remember, that's normal Freeciv behavior for units with fuel.

But refuel action can be made, when units are on tille with animals or grass for example. I don't know refuel action should take full move point.
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Refuel action

Post by Ignatus »

Lachu wrote:Nomads will have fuel and when lost fuel, hp will be decreased over time. When hp is 0, unit die. As I remember, that's normal Freeciv behavior for units with fuel.
No, spending fuel and losing hp are separate unit properties in Freeciv. When a unit with fuel!=0 ends fuel turns out of refueling point (city, carrier, native base, for some units a tile near coast), it just instantly dies, suffering no ill effects before. And units with hp_loss_pct !=0 in their class just lose some portion of their hits per turn spent out of a city, native base or carrier; this may be neutralized by giving them HP_Regen effect (like Helicopters do have from UN). Behaviour that you have described (but without initial fuel loss) is made by just tying the effect to the terrain (it should work but I have not tested).
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Refuel action

Post by Ignatus »

What I would suggest is an ability for units sometimes collect their supplies from the tiles they are on. E.g., let chivalry units be supplied by a unit of food (additionaly to gold/shields), but if one of them is on a land tile where food can be collected that is not worked by any city, let its horses just eat the grass beneath their legs. This, as a side effect, may either reveal you what tiles do you allies work or steal from them some workable tile. Currently, "Upkeep_Factor" effect is player-range and can't depend on where each unit is.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: Refuel action

Post by nef »

Ignatus wrote: And units with hp_loss_pct !=0 ..... ; this may be neutralized by giving them HP_Regen effect
As suggested I can see no obvious reason why a reqs predicate should not work for terrain (-flag) / resource extra etc. A more general solution (but not so tidy) is to use [base_*] to define refuel and/or regen tiles. Note one turn required for refuel. One or more required for HP - depends on regen rate AND time spent losing HP. A Lua script could place the [base_*] extras. Easily done with fc2.6. Some of the other features may have to wait. (Having a reqs predicate for foreign tile worker would be nice.) If you can do without huts (until fc3.1?) you could even use the Lua script to do all sorts of magic - such as spawning new animals - or growing new nomads. In fact, you could probably do this with huts in fc2.6 but not so clean.
Post Reply