things i'd like to be implemented

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
yuh
Posts: 9
Joined: Sat Nov 27, 2021 1:25 pm

things i'd like to be implemented

Post by yuh »

i had some look at the wiki and this forum, but i'm far from understanding what is or has been going on in the community and what has already been discussed or proposed or is being worked at. so i'm sorry, if i repeat stuff you already have an eye on. but maybe and hopefully my suggestions help making freeciv even better.

i'm refering to version 2.5.3. and only single player mode.

1) when adding a settler to some already existing city, the new citizen won't be assigned to work the way new born citizens or the first founding citizen are. would be nice, if they were. especially for new players who haven't figured it out.

2) when loading a saved game or probably just when opening anew tech tree, the most advanced tech known is at the left of the screen. i would like it better if it was on the right of the screen or, probably preferable, if the game just displays it the way it was displayed the last time before saving or closing tech tree.

3) when playing with lots of nations, it's really hard to keep track of the diplomatic states of all those nations to each other. therefore it would be nice to have another report giving a table with each nation in rows as well as columns and all of the diplomatic states in cells (if known by player).

4) i'm quite always going for tech leadership. selling techs to other nations can make you a lot of money, especially when playing with dozens of them. therefore i would appreciate, if there were additional columns in the nations report: a column with the amount of gold owned by a nation and two columns with yes/no/not known, if i have at least one tech that nation hasn't et vice versa.

5) as far as i can see, the amount of gold owned by a nation is always known, if there already had been contact. that's probably a hint for players, telling them how poor or rich they are. and of course, diplomatic proposals are limited to the amount of gold owned by a nation. but it's not quite natural knowing such things about foreign nations - unless having an embassy, maybe. same with diplomatic states: even with no emassy you can know the diplomacy state of another nation even to a nation not known at all by the player. good to know, but not very natural to have that knowledge. so it would be nice to have an option when starting a game, making it possible to have those informations only if there is an embassy.

6) the whole concept of diplomacy could be improved, it seems to me. for example, while i always like to have the map of those other nations, they don't seem to care at all about mine. even if i know quite the whole map and encounter some small nation at the end of the world, it won't care too much about my map. that seems strange. i would like the ai to value every piece of map it could get knowledge about, making it more desirable to get my map the more unknown tiles it reveals and the more unknown nations it includes - probably multiplied by some factor depending on how desirable map knowledge is for that specific nation (maybe by nature of that nation and/or by social-economic state of that nation). the other way around: it should be more costly for me to get a map with many unknown tiles and/or nations than one with only few unknown tiles/nations. selling advanced techs can give you every piece of gold of another nation. i don't think ai should do so. 75 % of the gold for an advanced tech maybe, but not 100 %. if you won't know the exact amount of gold of that nation (see 5), it could be quite difficult to hit that 75 %. all in all i would like to have some additional concept of cultural influence and entanglement that would influence diplomatic trade and bribary. for example, trade routes with a foreign nation, migration, close borders, switching cities should somehow make it more easy to have diplomatic trade. at least, if both nations don't cancel pacts and behave peaceful (at least for some centuries). if they don't, close cultural relations should probably make diplomacy even more complicated. anyway, often i don't even get why ai_love (see https://freeciv.fandom.com/wiki/Diploma ... _behaviour) falls. is it just because i'm too powerful? maybe i built a wonder they desperately wanted to build? or i made a kind treaty with another nation they hate? or another nation tries to make them hate me? often i really don't get it - which is frustrating. so at least it would be nice to have more transparency on why a specific nation has as much ai_love to me it has. an option when starting game to set, whether those ai-nations more tend to peace or war would be nice, too. i can understand, when a peaceful nation hates me, because it wants to grow and it thinks i grabbed its land. but often it's just opaque to me, why they behave so complicated.

7) http://forum.freeciv.org/f/viewtopic.php?f=18&t=91980 made me want to have more types of terrain and more types of resources. speaking generally. specifically, i'd really like to have a differentiation between elevation of terrain and type of terrain. there's no reason, why there shouldn't be forest on hills, for example. and i think the vision of an unit should depend on elevation of terrain, compared to the elevation of surrounding terrain. even more specific, i'd really like to have cliffs, impossible to climb directly or control adjacent tiles, except for archers (and later units) when standing on top of a cliff.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: things i'd like to be implemented

Post by nef »

i'm refering to version 2.5.3...
All of these are still current in fc 2.6.
1) when adding a settler to some already existing city, the new citizen won't be assigned to work the way new born citizens or the first founding citizen are. would be nice, if they were. especially for new players who haven't figured it out.
this is a BUG.
4) i'm quite always going for tech leadership. selling techs to other nations can make you a lot of money, especially when playing with dozens of them. therefore i would appreciate, if there were additional columns in the nations report: a column with the amount of gold owned by a nation and two columns with yes/no/not known, if i have at least one tech that nation hasn't et vice versa.
This (and (3) ) would be really useful. Also a column for government. In the case of simple columns the number is already only just manageable so options such as show dead players (also city report) will likely be needed.

6) the whole concept of diplomacy could be improved, it seems to me. for example, while i always like to have the map of those other nations, they don't seem to care at all about mine. even if i know quite the whole map and encounter some small nation at the end of the world, it won't care too much about my map. that seems strange.
what I find REALLY strange is that just after forming an alliance where you ask for, and get, an embassy and 'vision', the AI will take an arbitrary amount of time asking for the same in return. This does have some gameplay consequences since it appears that while AI's ALWAYS have vision (provided they have the tile mapped) they do not automatically get maps. I have often seen AI players explore territory when all they have to do is ask for 'vision'. Was this some sort of historical baggage well past its use by date?

Much of the rest of (6) could (AND SHOULD) be scripted in Lua ( NOT C). Some of this would only need simple tolua feature such as callbacks and 'mods' like trait mod. Some require new ideas such as scripting agents and advisors in Lua. (In the first instance this may be best implemented using a separate script such as fcdb.)
7) i'd really like to have a differentiation between elevation of terrain and type of terrain. there's no reason, why there shouldn't be forest on hills, for example. and i think the vision of an unit should depend on elevation of terrain, compared to the elevation of surrounding terrain.
This is, in fact, already there but its use is limited to ocean for reasons I don't understand. mapgen already has the code. Why is it not being used for land tiles? The 'forest on hills' bit has often been discussed but dismissed as being too hard on account of the artwork required, but I don`t buy this excuse. There are plenty of talented artists contributing art. Vision dependency on elevation would allow a feature of Civ I to be implemented (i.e. ships with vision 2 see 2 sea tiles (or 1 sea + 1 land) but not 2 land tiles.)
even more specific, i'd really like to have cliffs, impossible to climb directly or control adjacent tiles, except for archers (and later units) when standing on top of a cliff.
My own view here is that this type of feature should be an edge feature well known in CiV III and later commercial releases. At least there should be some sort of ruleset option. (Vertex features should ALSO be considered.)
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: things i'd like to be implemented

Post by Ignatus »

nef wrote:
1) when adding a settler to some already existing city, the new citizen won't be assigned to work the way new born citizens or the first founding citizen are. would be nice, if they were. especially for new players who haven't figured it out.
this is a BUG.
I won't call it a bug, just a lame feature. An added citizen always becomes a default specialist (not even the city's configured new citizen). But if CMA is not triggered here, it IS a bug.
4) i'm quite always going for tech leadership. selling techs to other nations can make you a lot of money, especially when playing with dozens of them. therefore i would appreciate, if there were additional columns in the nations report: a column with the amount of gold owned by a nation and two columns with yes/no/not known, if i have at least one tech that nation hasn't et vice versa.
This (and (3) ) would be really useful. Also a column for government. In the case of simple columns the number is already only just manageable so options such as show dead players (also city report) will likely be needed.
I would like to have some report on what happened in the world during tc (new wars, alliances, revolutions etc.). Maybe such a report could be better formed by a script with some API, that can be client-side and/or server-side. Also, a graphic diagram of diplomatic and trade relations like in CivIII would be nice.
6) the whole concept of diplomacy could be improved, it seems to me. for example, while i always like to have the map of those other nations, they don't seem to care at all about mine. even if i know quite the whole map and encounter some small nation at the end of the world, it won't care too much about my map. that seems strange.
what I find REALLY strange is that just after forming an alliance where you ask for, and get, an embassy and 'vision', the AI will take an arbitrary amount of time asking for the same in return. This does have some gameplay consequences since it appears that while AI's ALWAYS have vision (provided they have the tile mapped) they do not automatically get maps. I have often seen AI players explore territory when all they have to do is ask for 'vision'. Was this some sort of historical baggage well past its use by date?
AI always use autoexplore agent for their explorers that means going around the 'black' tiles, they are too stupid to ask for a map instead, and autoexploring is deliberately separated from global AI goals system since actually AIs are omniscient and don't really need any maps (in newer versions, they get some interest in maps just as what they can sell to a human player).
7) i'd really like to have a differentiation between elevation of terrain and type of terrain. there's no reason, why there shouldn't be forest on hills, for example. and i think the vision of an unit should depend on elevation of terrain, compared to the elevation of surrounding terrain.
This is, in fact, already there but its use is limited to ocean for reasons I don't understand. mapgen already has the code. Why is it not being used for land tiles? The 'forest on hills' bit has often been discussed but dismissed as being too hard on account of the artwork required, but I don`t buy this excuse. There are plenty of talented artists contributing art. Vision dependency on elevation would allow a feature of Civ I to be implemented (i.e. ships with vision 2 see 2 sea tiles (or 1 sea + 1 land) but not 2 land tiles.)
Remaking vision areas into something other than circles of a specific radius would be a lot of work, I even never have dared to approach it... Elevation (and likewise temperature) is indeed used in mapgen (not only for seas, also for mountains and hills) but after the map is generated this information is completely forgotten. We could have terrains "hills", "plains" and extras "forest", "jungle" that can be present or not on it, the mapgen can't currently place nice looking biomes but a script doing it on "map_generated" signal looks possible and not too difficult; I just don't know how "foliage" parameter should be configured in the terrain set for "amount of forests" mapgen setting to be ignored.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: things i'd like to be implemented

Post by nef »

4) i'm quite always going for tech leadership. selling techs to other nations can make you a lot of money, especially when playing with dozens of them. therefore i would appreciate, if there were additional columns in the nations report: a column with the amount of gold owned by a nation and two columns with yes/no/not known, if i have at least one tech that nation hasn't et vice versa.
Try this Lua script.
techtrade.txt
(1.11 KiB) Downloaded 150 times
See this thread for general comments, but note the following:

A. No tiles are involved so there are no hotlinks in 'messages'.

B. tolua offers no facility to determine if you have an embassy with another player such as:
  • (boolean) player1:has_embassy_with (player2)
This causes two problems -
  • 1. When run from a server command (/lua file ...) there will be an intelligence leak. Not a big deal in SP. All you have to do is not cheat.
    2. When run in the client console, if you do not have an embassy with a player you will get silly numbers. Fairly easy to identify so is also no big deal.
C. The script does not identify those tech that can not be traded (e.g. on account of root_req`s). From practical experience I find it not too difficult to make mental adjustments. In any event, this will not be an issue with distro rulesets.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: things i'd like to be implemented

Post by nef »

3) when playing with lots of nations, it's really hard to keep track of the diplomatic states of all those nations to each other. therefore it would be nice to have another report giving a table with each nation in rows as well as columns and all of the diplomatic states in cells (if known by player).
This one too could be done in Lua, but in addition to :has_embassy_with() tolua support is actually needed. This could be something simple such as:
  • (string) player1:dipl_relation(player2)
but better, MUCH BETTER, would be the introduction of a new userdata subtype Dipl_Relation so that the method would be:
  • (Dipl_Relation) player1:dipl_relation(player2)
Dipl_Relation here is metadata so in addition to the regular finder (find.dipl_relation(...)), the following two methods would be needed:
  • (string) (Dipl_Relation):rule_name()
    (string) (Dipl_Relation):name_translation()
(Dipl_Relation).id would also be needed for iteration purposes. The rule_name would be the string similar to the first option. The text of these strings could be chosen from that used in ruleset reqs predicates and/or the headings in the client intelligence report. Note that in the latter list "team" appears to be exclusive. If so then there is a case to make the ruleset reqs the same. Relations not in the client report are non exclusive so should be individual attributes in the form player1:...(player2) in the same manner as :has_embassy_with() and :dipl_relation(). Note that the syntax is already asymmetric so not all relaions will be needed.

One might hope that there would come a time when these (exclusive) relations are softcoded (e.g in game.ruleset) so that Cease Fire, Armistice, and Alliance could be removed from the civ1 ruleset. Furthermore, many features could then be softcoded as well including some that are presently server options. Some might see this last bit as a backward step but server options are often clumsy and are easily broken.

While I am on this subject there appears to be one painfully obvious omission from the list of non exclusive relations: Contact. In fact this can be considered a third type of 'embassy' making four in all (i.e. including "None") suggesting that 'embassy' be also made into userdata with the current list of rule_name`s being No Contact, Contact, Temporary, Permanent {plus two more). So instead of
  • (boolean) player1:has_embassy_with (player2)
one would have
  • (Embassy_Type) player1:embassy_type(player2)
Softcoding these would allow the ruleset to specify what can be done with each type (for example be able to see gold and tech being researched). One could add others to the list such as Stale Contact.

There is clear precedent for adding metadata like this: Government and Direction for example, but the difference is that there is the opportunity to get it right from the start.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: things i'd like to be implemented

Post by nef »

In summary, the suggestion in the short term is to provide three new types of userdata (*). All three are metadata and require at a basic minimum the following tolua functions:
  • Finders find.**(rulename|id) (** = lower(tolua.type(*)))
    Field *.id
    Method *:rule_name()
    Method *:name_translation()
    Accessor player1:**(player2) where player1,2 are Player userdata
The userdata subtypes are
  • Embassy. rule_name`s "No Contact", "Contact", "Temporary", "Permanent", "Team", "Self". Some of these are asymmetric so player1 is the subject, player2 the object. E.g. for "Permanent" player1 will have the embassy with player2.

    Dipl_Relation. rule_name`s "Never Met", "War", "Cease-fire", "Peace", "Armistice", "Alliance". The last one on this list would be the default for "Team" and "Self"

    Attitude. rule_name`s "Genocidal", "Belligerent", "Hostile", "Uncooperative", "Uneasy", "Neutral", "Respectful", "Helpful", "Enthusiastic", "Admiring", "Worshipful"
In addition to these three we also have Vision. Presently this is binary with no complications. In this case userdata would be overkill and a simple boolean accessor would be quite sufficient - e.g.
  • player1:has_vision(player2)
With the first two in place the script techtrade can be tidied and the script relations can be written.

Add the second two, and two more scripts can be written (and/or combined with relations).

In the medium term, the first two metadata should be moved to the ruleset, so that at the very least, "Cease-fire", "Armistice", and "Alliance" can be disabled for the civ1 ruleset. Other options for softcoding diplomacy issues could be considered.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: things i'd like to be implemented

Post by nef »

In the previous post, I have referred to all player-player relationship data that I know of. This leaves the 'linear' data relating to an individual player.

I will address those that appear in the Nations report and/or Intelligence reports.

Nations Report

Name, Nation, AI, and in part, State are already provided.

Username, Team, remaining parts of State (???), Host, Idle, Ping are of no particular interest to SP users so are beyond the scope of this thread (and my interest). MP users may wish to pursue these.

Flag and Border have little relevance to Lua (IMO).

Difficulty Level. Not reported in the nation report. A little ironic since you can actually change the level for individual players from the report. For purposes of compatibility with Civ I, a difficulty level associated with the human player would be useful. The general (default) difficulty level would suffice (albeit a little clumsy but adequate). One accessor with the optional argument of player would do for both general and individual cases - game:difficulty(player?) - return value could be string but better would be to make it userdata. A callback on change of difficulty level is needed (for one of my projects).

This leaves Score. Since this can be broken down to components this could be userdata - or more simply - a regular Lua table, so the accessor could be:
  • (table) player:score()
One might start with the field .total.
[/list]

Intelligence Report (Overview)

Player name, Gold already provided.

Player title - could be useful in reports.

Government - current ticket but note there are plenty of backchannel hacks (effects with gov. predicates). As it happens I have not yet needed Government userdata in any project BUT I could use a callback for change of goverment as I do for change of difficuly level.

Capital - can be determined but the method is clumsy.

Tax, Science, Luxury. No urgent need?

Researching. The first of these three (Tech name, current bulbs, needed bulbs), tech name is needed for a project. Considering the plethora of tech related methods the absence of these three is strange.

Intelligence Report (Diplomacy)

These have all been discussed.

Intelligence Report (Techs)

Already provided.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: things i'd like to be implemented

Post by nef »

Ignatus wrote:I won't call it a bug, just a lame feature. An added citizen always becomes a default specialist (not even the city's configured new citizen). But if CMA is not triggered here, it IS a bug.
I had forgotten about the option triplet on the summary tab mostly because I could never get it to work. During the week I remembered so I was expecting to be corrected, but now that I have investigated, I will now say that it is a bug (but for a different reason).
  • A. As you say "not even the city's configured new citizen" - that is the option triplet is ignored when you add a settler.
    B. When you get natural growth you get a tile worker - that is the option triplet is ignored but you get a different result
    C. There is no fourth option - tile worker
yuh was ahead of me in accurately describing the problem.
The key point is that if you forget to set the CMA and you add settlers you get a dysfunctional result.
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: things i'd like to be implemented

Post by Dino the Dinosore »

Intelligence Report (Overview)

Player name, Gold already provided.

Player title - could be useful in reports.

Government - current ticket but note there are plenty of backchannel hacks (effects with gov. predicates). As it happens I have not yet needed Government userdata in any project BUT I could use a callback for change of goverment as I do for change of difficuly level.

Capital - can be determined but the method is clumsy.

Tax, Science, Luxury. No urgent need?
Don't forget culture - should be included if culture victory is enabled.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: things i'd like to be implemented

Post by cazfi »

nef wrote:
Ignatus wrote:I won't call it a bug, just a lame feature. An added citizen always becomes a default specialist (not even the city's configured new citizen). But if CMA is not triggered here, it IS a bug.
I had forgotten about the option triplet on the summary tab mostly because I could never get it to work. During the week I remembered so I was expecting to be corrected, but now that I have investigated, I will now say that it is a bug (but for a different reason).
  • A. As you say "not even the city's configured new citizen" - that is the option triplet is ignored when you add a settler.
    B. When you get natural growth you get a tile worker - that is the option triplet is ignored but you get a different result
    C. There is no fourth option - tile worker
yuh was ahead of me in accurately describing the problem.
The key point is that if you forget to set the CMA and you add settlers you get a dysfunctional result.
Yeah, I think the "default specialist" has meaning only in the case where there is no more space for additional worker when the city grows. That's also why your (C) makes no sense.

The biggest bug with the option (for some versions already) is that it's so hardcoded for three specialists with a specific properties, which might not be completely unsuitable for the ruleset in question. Things like maintaining savegame compatibility make it hard to completely rewrite it. I did some minor adjustments, as a first step of a migration to a new setup, before 3.0 datafile formats were frozen.
Post Reply