Page 5 of 6

Re: Unit Improvements

Posted: Sun Jun 05, 2022 6:41 pm
by Elefant
Also, is there a way to subtract hit points and movement from a unit in Lua? A way to check the diplomatic state between two nations would also be helpful.

Re: Unit Improvements

Posted: Sun Jun 05, 2022 10:25 pm
by cazfi
Elefant wrote: Sun Jun 05, 2022 6:41 pm Also, is there a way to subtract hit points and movement from a unit in Lua? A way to check the diplomatic state between two nations would also be helpful.
Not 100% sure, but from the top of my head I don't think there is. Be sure to file request tickets about such lua API improvements that you would really need: https://osdn.net/ticket/newticket.php?group_id=12505

Re: Unit Improvements

Posted: Tue Jun 07, 2022 10:29 pm
by Elefant

Re: Unit Improvements

Posted: Wed Jun 08, 2022 1:01 pm
by Elefant
Should a ticket requesting that the bombard_max_range be moved to the units, instead of being game-wide be for 3.1 or 3.2?

Re: Unit Improvements

Posted: Wed Jun 08, 2022 1:38 pm
by cazfi
Elefant wrote: Wed Jun 08, 2022 1:01 pm Should a ticket requesting that the bombard_max_range be moved to the units, instead of being game-wide be for 3.1 or 3.2?
S3_1 ruleset format is in semi-freeze already (meaning that no more changes are expected, but they are still possible to fix critical issues)

Re: Unit Improvements

Posted: Wed Jun 08, 2022 4:11 pm
by Elefant

Re: Unit Improvements

Posted: Mon Jun 13, 2022 10:04 am
by Corbeau
Elefant wrote: Sat Jun 04, 2022 10:23 pm In Realism Invictus, if the number of units in a stack got too large, a logistics penalty was put in place. Maybe something like this would help counter death stack tactics?
Yep.
A new and very important change is a soft STACK LIMIT! This means that, after a certain limit, more military units on the same tile receive a defence penalty. Namely: for every unit above the Limit, all units receive -25% defence penalty. This means that with too many units on the same tile, their defence value may reach zero!

Default Limit is set to 3, except if they are on a Mountain tile, in which case the limit is 2.

Additionally, if units are in a city, Limit is increased by 1 for each 5 city sizes (new Max at 1, 5, 10, 15 and 20).

For your convenience, the limits are placed in a table.

NOTE: Depending on a ruleset and/or a particular game, it may not be possible to build a city on a mountain.

Also, because this is a new and revolutionary feature, it may go through some tweaks so always check this space.
https://freeciv.fandom.com/wiki/Simulat ... tack_limit

Re: Unit Improvements

Posted: Mon Jun 13, 2022 11:53 am
by Ignatus
Elefant wrote: Sun Jun 05, 2022 6:41 pm Also, is there a way to subtract hit points and movement from a unit in Lua? A way to check the diplomatic state between two nations would also be helpful.
If you need it now, unit:move() is able to subtract move points, then you can teleport the unit back. Hit points don't have a kludge as handy, but in 3.1 you can create an enemy diplomat and make it sabotage the unit (maybe you'll need to teleport some units from a nearby tile to spare it and then back).

Re: Unit Improvements

Posted: Mon Jun 13, 2022 11:59 am
by Elefant
I would think that adding or subtracting movement and hit points is an important function that should have a direct implementation, but in the meantime, your solution is a good idea.

Re: Unit Improvements

Posted: Mon Jun 13, 2022 2:10 pm
by vego
I started read your work on fandom site about stack and many more. Its sounds fine. From my experience with strategy games play able are strategies with balance between economy and military. Economy side in freeciv is Great. That is interesting cuz have fun from developing Eco tips. Cities growing gentle. And from this moment when i m starting thinking about military is big bada boom! My city has been conquered in 4th turn. But how?! ... I read and read... moves on rivers was changed but like this?! So ok i play further and see enemy unit on river, so it's easy target but what!? It s unconcuerable?! Defense bonus on river? :/ So its create big stacks on map. I need make 3 units to kill one.