Page 3 of 15

Re: [2.6] Augmented ruleset modpack

Posted: Wed Jan 30, 2019 11:47 am
by Wahazar
Thanks for sprites, looks much better than actual ones.
I'm afraid it is not possible to change unit 'on fly' (maybe using lua script? I'm not familiar with).
Currently slaves are produced in city with small wonder called Yasir (slave market). Yasir is obsoleted both by Slavery Abolition (player level) or United Nation (world level), but existing slaves remain intact.
They have cheaper upkeep than workers, but can't be promoted and cost 1 pop when created.
Can be also used like migrants or be added to wonder construction (migrants and caravans are unique units).

Re: [2.6] Augmented ruleset modpack

Posted: Wed Jan 30, 2019 1:26 pm
by Ignatus
Wahazar wrote:I'm afraid it is not possible to change unit 'on fly' (maybe using lua script? I'm not familiar with).

You bind to the signal "unit_lost" a function creating a new unit of the Slave type on certain conditions via edit.create_unit(). If unscripted behaviour is capturing, then you should remove the old unit; the AI may be disinformed in stats of the unit got in such an action, but since current capture support is awful any way, this is not a problem to care here.

Re: [2.6] Augmented ruleset modpack

Posted: Wed Jan 30, 2019 6:19 pm
by Wahazar
Whre I can read about lua scripts? Is it possible to convert slaves to workers, if certain wonder/tech/gov exists?

Re: [2.6] Augmented ruleset modpack

Posted: Wed Jan 30, 2019 7:56 pm
by Lachu
I think converting unit is possible through action enabler. Action enabler can get list of requirements, such as effects. I can't provide example or give you better tip, because I don't create any bigger ruleset yet.

But convert action probably are accessible in Freeciv 3.0.

Re: [2.6] Augmented ruleset modpack

Posted: Wed Jan 30, 2019 8:35 pm
by Ignatus
Wahazar wrote:Whre I can read about lua scripts? Is it possible to convert slaves to workers, if certain wonder/tech/gov exists?

Wikia, and examples in default.lua/script.lua. I don't know any ruleset highly dependent on scripts, the API is still rather poor and AI mostly can't know about scripted rules, but unit conversion should be possible.
Lachu wrote:I think converting unit is possible through action enabler.

Action enablers say what player can do. Here events are discussed that happen automatically on the server, even if triggered by some action; it's where you use signals. Here is a brief tutorial.

Re: [2.6] Augmented ruleset modpack

Posted: Wed Jan 30, 2019 8:40 pm
by Lachu
Ignatus wrote:
Wahazar wrote:Whre I can read about lua scripts? Is it possible to convert slaves to workers, if certain wonder/tech/gov exists?

Wikia, and examples in default.lua/script.lua. I don't know any ruleset highly dependent on scripts, the API is still rather poor and AI mostly can't know about scripted rules, but unit conversion should be possible.
Lachu wrote:I think converting unit is possible through action enabler.

Action enablers say what player can do. Here events are discussed that happen automatically on the server, even if triggered by some action; it's where you use signals. Here is a brief tutorial.

I understood the difference between signals, with is emited automatically and action enabler (you must also take in mind, that some action could been fired automatically, like anti-aircraft unit will attack an plane). I suggest to use actionenabler, because there's change Freeciv developers will teach AI how to use convert actionenabler and AI could calculate converting slave to worker is good solution.

Re: [2.6] Augmented ruleset modpack

Posted: Thu Jan 31, 2019 4:48 am
by Ignatus
Lachu wrote: I suggest to use actionenabler, because there's change Freeciv developers will teach AI how to use convert actionenabler and AI could calculate converting slave to worker is good solution.

On the first hand there should be a mechanism to persuade AI that a slave is better than a worker, because by its stats it is worse; it looks like a bad kludge. In this particular case, maybe the most straightforward solution would be just to make a requirement for unit nationality for an effect that if you are at war with its original owner it works worse (in Civ3, foreign workers always work worse). Additionally, you could also make an effect that changes unit graphics on a requirement (in the same Civ3, workers look different in civilizations that have reached different eras). But in the actual development stage of the game, replacing by script is a solution that works and hardly makes anything worse.

Re: [2.6] Augmented ruleset modpack

Posted: Fri Feb 01, 2019 11:06 pm
by Wahazar
I got following messages:

Code: Select all

In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

Any idea, what can be a cause?

Re: [2.6] Augmented ruleset modpack

Posted: Sat Feb 02, 2019 10:14 am
by Ignatus
Something GUI-related, not from specific Freeciv code. Probably, worth sending more thorough description to HRM.

Re: [2.6] Augmented ruleset modpack

Posted: Sun Feb 03, 2019 3:47 pm
by Wahazar
New version 2.6.8 was released.

Most noticeable change is removing maglevs and adding highways. highways can be build by engineers once Automobile advance is achieved.
Super Highways improvement increase trade for tiles with highways, they also increase shield production to by factor 25%, similar to railroad.
Highways increase speed by factor 6 (unpaved roads 3, rivers 2), and are drawn parallel to the railway or unpaved road:
Image
I used images found in hexemplio roads.png, not sure who is an author and what was purpose to create it.

The reasons of such change were as follows:
1. Maglevs are available at the end of tech tree, when engineers have lot of other tasks, and are limited to the Small Land/Infantry units.
2. Transporting units by train have some pros (transporting whole stack without loose mp and dispersion due to different speeds, evacuation of wounded units) and cons (micromanagement, train unit needed), thus alternatively highways can be used instead.

Another change is École Spéciale Militaire de Saint-Cyr small wonder - successor of Sun Tzu Academy (and better one, increase v level of wheeled units as well). DARPA increase v level of Big Land and autoreplace obsoleted unit, like Leonardo (but only 1/turn).

Some governments were tweaked, changed parameters in govs.xls file.
And of course some improved graphics thanks to XYZ.