Search found 244 matches

by nef
Mon Sep 13, 2021 4:24 pm
Forum: Wishlist
Topic: A few ideas relating to units
Replies: 10
Views: 3800

Re: A few ideas relating to units

I can't imagine loading any of my units on an ally's ship. I do it with caravans when I`m in a rush to set up routes before they do (and/or before railroad). If they have just delivered a caravan I will try to fully stack their ship. It will almost certainly return home to ferry ONE more caravan to...
by nef
Mon Aug 09, 2021 5:50 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

Very generous, but I have the advantage of not having to write anything in c. I read your script (in the patch) with some interest and I had a real sense of deja vu since many of the features had been considered, but in the end, only a few survived as I progressively discovered the treacherous traps...
by nef
Mon Aug 02, 2021 6:11 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

Everything to this point has been developed on the experimental version of fc 2.6.0 but has been qualified on fc 2.6.5 using my civ1 ruleset. I see no reason for any problems to occur with any 2.6 ruleset, or indeed, any 3.x ruleset as currently formulated.
by nef
Mon Aug 02, 2021 6:10 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

In developing the replacement _freeciv_state_dump I discovered a character limit for log.normal() likely due to a limit in the client/server protocol but could be anywhere. The new vars script easily runs into this limit so I am also providing a function to print the script in pieces. This function ...
by nef
Mon Aug 02, 2021 6:03 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

There are three reasons for considering this new version: 1. It doesn`t crash (AFAIK). 2. Much better facilities: a. correctly reconstructs Nonexistent b. tables can be saved 3. It is in clear text: a. you can see what`s going on, b. you can change it as you see fit. fsd.txt The replacement version ...
by nef
Mon Aug 02, 2021 6:00 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

Design notes for saving tables. The first point to note is that in Lua any data type (except nil) can be used for the key, as well as the value for any table field. The replacement version of _freeciv_state_dump() UNDERSTANDS THIS. (The distro version does not!) The next is to realise that some data...
by nef
Mon Aug 02, 2021 5:55 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

Nonexistent. Warning: this is long and boring meant only for the tragic Lua scribe. So first, what is this subtype? Well the idea appears to be that when fc data is destroyed it is replaced by a tolua analogue of the Lua type nil. What happens is that the original subtype (Player, City, Unit) is cha...
by nef
Mon Aug 02, 2021 5:50 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

Userdata: Before discussing the issues it is worth briefly discussing the natue of userdata. In fc the userdata can be classified into two distinct classes: data and metadata. The distinction between these is that data is created, modified, and (typically) destoyed by in-game events. The userdata su...
by nef
Mon Aug 02, 2021 5:48 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

Tables: Yes, this replacement version can be used to save tables!!! The idea of saving tables is not straight forward because it needs to be selective. 'System' tables provided by Lua and tolua are established before script.lua and default.lua are run and there is no need to interfere, in fact, quit...
by nef
Mon Aug 02, 2021 5:47 pm
Forum: Contribution
Topic: A Tale of Two Fixes.
Replies: 13
Views: 893

Re: A Tale of Two Fixes.

_freeciv_state_dump() This function has a number of problems starting with: A. As for listenv() _freeciv_state_dump chokes when it encounters key types it does not expect. In fact it is a little worse since the vars script it prepares assumes that all keys are identifiers. B. Implementation of userd...