Search found 158 matches

by Molo_Parko
Mon Nov 27, 2023 9:10 pm
Forum: Help wanted
Topic: Destroy a city by a script in 3.0?
Replies: 5
Views: 21189

Re: Destroy a city by a script in 3.0?

The only consideration is that probably barbarians won't be properly unleashed before their onset turn. The onsetbarbs turn not yet having occurred doesn't prevent unleash barbarians via script, it''s just that they won't unleash automatically until that turn or after. But Lua can unleash them any ...
by Molo_Parko
Mon Nov 27, 2023 9:06 pm
Forum: Help wanted
Topic: Destroy a city by a script in 3.0?
Replies: 5
Views: 21189

Re: Destroy a city by a script in 3.0?

^ I don't know what types of stats other players track, but according to the Freeciv Lua Reference manual at https://freeciv.fandom.com/wiki/Lua_reference_manual#Unit_loss_reasons , if the unit is killed with reason "disbanded" then neither the unit's player nor the killer's player scores ...
by Molo_Parko
Mon Nov 27, 2023 3:03 pm
Forum: Help wanted
Topic: Destroy a city by a script in 3.0?
Replies: 5
Views: 21189

Re: Destroy a city by a script in 3.0?

function DestroyCity(x,y) local owner, player, city, tile, nextTile, unit, unitType, BarbarianPlayer tile=find.tile(x,y) city=(tile):city() if ( city == nil ) then log.error("%s","DestroyCity: City not found on tile") return end owner=(city).owner for unit in (tile):units_iterat...
by Molo_Parko
Sat Nov 25, 2023 9:14 pm
Forum: Contribution
Topic: New features via Lua script
Replies: 26
Views: 48616

Re: New features via Lua script

AiTribesCityDefender Forces computer-controlled tribes to keep a unit in every city. If the only unit in a city moves out of the city, it is moved back into the city. If a city has no defender, one is created in the city, and payment in gold is extracted from the computer-controlled tribe -- even i...
by Molo_Parko
Wed Nov 22, 2023 5:43 pm
Forum: Single player
Topic: Shuttling units through sea is a hassle. Are there embarked units?
Replies: 6
Views: 11854

Re: Shuttling units through sea is a hassle. Are there embarked units?

Lua "Embark" script for Freeciv 2.6.4 or later is posted at the following link: viewtopic.php?p=109060#p109060
by Molo_Parko
Wed Nov 22, 2023 5:31 pm
Forum: Contribution
Topic: New features via Lua script
Replies: 26
Views: 48616

Re: New features via Lua script

Embark allows land units to embark for sea travel. Position a land unit next to an Ocean or Deep Ocean tile, disband the unit, and a temporary boat will be created with a new land unit in the boat (the replacement of the disbanded unit.) After the replacement unit leaves the boat, the empty boat wi...
by Molo_Parko
Sun Nov 19, 2023 4:09 pm
Forum: Single player
Topic: Shuttling units through sea is a hassle. Are there embarked units?
Replies: 6
Views: 11854

Re: Shuttling units through sea is a hassle. Are there embarked units?

That could be simulated via Lua script. When a land unit is disbanded on a non-city land tile next to Ocean or Deep Ocean tile... Create an unhomed boat such as a galleon (that unit type has no attack, but for less movement points a trireme might be preferred) and record that Unit ID as value in a t...
by Molo_Parko
Thu Nov 09, 2023 5:39 am
Forum: Contribution
Topic: New features via Lua script
Replies: 26
Views: 48616

Re: New features via Lua script

FadingFootprints leaves a short trail of footprints on tiles as units move around. Very helpful in tracking enemy units, especially in fog. :lol: Various other updates, corrections, and minor changes to prior routines are all included in the attached, playable scenario file for Freeciv 2.6.4 or lat...
by Molo_Parko
Sat Nov 04, 2023 10:40 pm
Forum: Contribution
Topic: New features via Lua script
Replies: 26
Views: 48616

Re: New features via Lua script

CursedTileUnitEffect is now merged into the prior post with CursedTile.
by Molo_Parko
Sat Nov 04, 2023 4:41 pm
Forum: Contribution
Topic: New features via Lua script
Replies: 26
Views: 48616

Re: New features via Lua script

CursedTile and CursedTileUnitEffect : Woe to those tribes which build cities near the cursed land! Another good reason to scout the area prior to building a city. Units may move onto the cursed tile, but they won't be able to leave it (until death or disbanded.) http://imgur.com/L6yDpvE.jpg --#####...