'User Action 1' not working

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: 'User Action 1' not working

Post by Ignatus »

Like, for effects of 1 turn duration you can put an extra with disappearance chance 10000. If I see it correctly, extras disappear after all turn's cities collect their production points.
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: 'User Action 1' not working

Post by Ignatus »

leo.priori wrote: Wed Jan 03, 2024 3:42 pm Action: Heal Unit in range
Can promote
Effect: Heal unit immediately (And gain experience with that)
Easy to do... but alas yet not done in hard code part, we don't have convenient ways of multitile actions other than nuking, health manipulation and promotion control. For healing a unit, you probably need a Lua callback to create another friendly unit with Heal Unit ability, make it to perform the action and then destroy the healing unit. For promotion by actions that are not terrain work, diplomatic or combat, you can try applying randomly

Code: Select all

u:transform(u.utype, -1)
(or do we have a better way now?) And for multitile splash, you just take one tile target and use an iterator.
G) Unit Constructors (Probably easy too)
flag "Unique"
Action: Help to build Buildings, not units or wonders.
Disband after action
Effect: Same as 'Disband with Recover', but only effects in buildings production
You can just use local "BuildingGenus" req in target_reqs of the action. What I specifically want is CivIII great people ability to finish a building with exactly the necessary number of shields transferred to the city's stock.
Using LUA to mark a tile every time a unit or a city is lost, i could make this special one:
Hehe I long ago thought about giving Explorers the ability to dig Ruins! There must be some better storage of Lua data in savegames to store the needed information, and somewhere on the forum you can find nef's posts with the necessary rewriting of _freeciv_state_dump function to save Lua tables.
leo.priori
Posts: 15
Joined: Mon Jan 01, 2024 3:22 am

Re: 'User Action 1' not working

Post by leo.priori »

cazfi wrote: Tue Jan 02, 2024 10:52 pm So I think you mean "50", not "-50"
You are definitely right. This is perfectly describe in README file. My bad!
leo.priori
Posts: 15
Joined: Mon Jan 01, 2024 3:22 am

Re: 'User Action 1' not working

Post by leo.priori »

Ignatus wrote: Wed Jan 03, 2024 4:18 pm Like, for effects of 1 turn duration you can put an extra with disappearance chance 10000. If I see it correctly, extras disappear after all turn's cities collect their production points.
Hmmmm i will dig in that aproach, maybe for all units. Good idea Ignatus. thanks
leo.priori
Posts: 15
Joined: Mon Jan 01, 2024 3:22 am

Re: 'User Action 1' not working

Post by leo.priori »

Ignatus wrote: Wed Jan 03, 2024 4:41 pm You can just use local "BuildingGenus" req in target_reqs of the action
Greeeeat Ignatus! Maybe this unit Constructors has a future. Case solved. ;)
leo.priori
Posts: 15
Joined: Mon Jan 01, 2024 3:22 am

Re: 'User Action 1' not working

Post by leo.priori »

Ignatus wrote: Wed Jan 03, 2024 4:41 pm Easy to do... but alas yet not done in hard code part, we don't have convenient ways of multitile actions other than nuking, health manipulation and promotion control. For healing a unit, you probably need a Lua callback to create another friendly unit with Heal Unit ability, make it to perform the action and then destroy the healing unit.
Well. I dont like to visit a Doctor anyway!
Doctors will wait
leo.priori
Posts: 15
Joined: Mon Jan 01, 2024 3:22 am

Re: 'User Action 1' not working

Post by leo.priori »

Ignatus wrote: Wed Jan 03, 2024 4:41 pm Hehe I long ago thought about giving Explorers the ability to dig Ruins! There must be some better storage of Lua data in savegames to store the needed information, and somewhere on the forum you can find nef's posts with the necessary rewriting of _freeciv_state_dump function to save Lua tables.
Didnt know that! :o
A lot of plans just flushed away in the toilet! :P
leo.priori
Posts: 15
Joined: Mon Jan 01, 2024 3:22 am

Re: 'User Action 1' not working

Post by leo.priori »

Guys, maybe the problem is my OS.

I believe this function 'Disrupt Lines Suplly' that came from sandbox is working just fine right? Thats because it is already set up, no need further configuration required, right?

But as I told you, it never showed to me. Not even once
I've always played Freeciv in Linux. Never in Windows or Mac
Now I'm using Xubuntu 23.10.

Do you mind to tell me what OS are you testing?
Actually seeing this function 'Disrupt Lines Suplly' in range or entering a city!
And how can you run an action that is in range? Is there another way than press 'D'?

See you tomorrow!
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: 'User Action 1' not working

Post by cazfi »

leo.priori wrote: Wed Jan 03, 2024 6:07 pmDo you mind to tell me what OS are you testing?
Mainly Debian Testing (currently Trixie), but somewhat (mainly building) also several Virtual Machines:
virt_machines.png
virt_machines.png (99.16 KiB) Viewed 211834 times
No *ubuntu-23.10 in the list at the moment, but I'll confirm Disrupt Supply Lines behavior on Ubuntu-24.04 development version.
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: 'User Action 1' not working

Post by cazfi »

Ignatus wrote: Wed Jan 03, 2024 4:18 pm Like, for effects of 1 turn duration you can put an extra with disappearance chance 10000. If I see it correctly, extras disappear after all turn's cities collect their production points.
For multi-turn duration this won't work, and I don't know what would in freeciv-3.1. In freeciv-3.2, if one more planned patch lands, you could use lua controlled city counter (count turns since extra was added) and remove the extra when counter hits desired value.
Saving lua-tables would help too. I guess that's something I overlooked (lost track of what of nef's scripts features I've ported to freeciv proper, and what should still be ported)
Post Reply