hide small wonders from build list

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

hide small wonders from build list

Post by meynaf »

Hi,

Ok i finally decided to create an account and come grumbling here ;)
So i'm new here, but having started playing Freeciv since version 1.9.0 (and civ1 much earlier !), i'm not exactly a newbie either.

Merely playing did not cause too much trouble (a few glitches in gtk2 client maybe) but there is something I do _NOT_ like about civ (all versions).
It is when some other player (in my case, computer AI - i'm a too easy prey for seasoned human players) builds a wonder of the world.
Even if you had started it, you're out of it - it becomes permanently forbidden. No amount of research or military strength will change that.
I know, i know, historically wonders have only been built once and not rebuilt even if destroyed. But nevertheless. This is a game, after all.

Taking the guilty enemy city "fixes" the problem but AIs put their cities any old how (at least, rarely at the place i would have put them myself !).
Therefore I just empty them and destroy them. Yeah i can be brutal sometimes :lol:
Perhaps the option to allow rebuilding destroyed wonders could be enough. But it does not look like if it's there...

However there is something called SmallWonders in actual Freeciv. Looked exactly like what i needed !

Full of hope, i started doing my own ruleset. Ending up changing many more things than initially anticipated.
So far, so good. However, even though opponents can no longer "steal" them from me, they remain in the available building list even after they're done, so that i just can't know which ones i've built and which ones i've not !
I'm supposed to be able to move them from one city to another, but i don't want to. And i did not find a way to achieve what i wanted. There is no option to hide small wonders that have been already built.

In buildings.ruleset i tried this to prevent the building from being available if it's already there :

Code: Select all

[building_colossus]
name		= _("Colossus")
genus		= "SmallWonder"
reqs	=
    { "type", "name", "range"
      "Tech", "Bronze Working", "Player"
    }
nreqs   =
    { "type", "name", "range"
      "Building", "Colossus", "Player"
    }
graphic		= "b.colossus"
graphic_alt	= "-"
obsolete_by	= "None"
build_cost	= 200
upkeep		= 0
sabotage	= 0
sound		= "w_colossus"
sound_alt	= "w_generic"
helptext	= _("\
Each tile around the city where this wonder is built that is already\
 generating some trade produces one extra trade resource.\
")
... but it didn't work. My "nreqs" keeps getting ignored.
This turns what i've always wanted since old civ1 into a nightmare...

Any pointers ?
Or isn't it just impossible to do and i have to jump by the lake ?

Btw. I hope "rulesets and modpacks" are the right place to post this. If not, sorry :oops:
wieder
Elite
Posts: 303
Joined: Thu Jul 27, 2017 10:43 am

Re: hide small wonders from build list

Post by wieder »

There should be info tab on the production page. On there it should read "Built" instead of SmallWonder in case that wonder was already built in some other. city.

if you are making lots of changes to the ruleset, you might want to take a look at other rulesets with lots of changes. Here is a link to one we are using to play games with lots of human players:

https://github.com/longturn/games/commits/master/LT40

It's probably not one you would like to use for single player games but there might be ideas and examples of how to do stuff.
Akechi
Posts: 34
Joined: Thu Dec 07, 2017 12:17 pm

Re: hide small wonders from build list

Post by Akechi »

I suppose Freeciv 2.6 or after will work as you think.
In 2.6 or after, nreq is deprecated, so multiplayer ruleset may good to reference for you.
https://github.com/freeciv/freeciv/blob ... gs.ruleset

See also:
https://web.archive.org/web/http://gna.org/bugs/?24431
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: hide small wonders from build list

Post by meynaf »

wieder wrote:There should be info tab on the production page. On there it should read "Built" instead of SmallWonder in case that wonder was already built in some other. city.
Indeed there is. Not exactly what I wanted, but makes the situation more bearable. Thanks 8-)

wieder wrote: if you are making lots of changes to the ruleset, you might want to take a look at other rulesets with lots of changes. Here is a link to one we are using to play games with lots of human players:

https://github.com/longturn/games/commits/master/LT40

It's probably not one you would like to use for single player games but there might be ideas and examples of how to do stuff.
Lots of changes, not exactly, as it's nothing really new. I'm just mixing features from existing rulesets and changing a few details.
So i started from standard ruleset, then copy-pasted things from other rulesets and changed values here and there.

Akechi wrote:I suppose Freeciv 2.6 or after will work as you think.
In 2.6 or after, nreq is deprecated, so multiplayer ruleset may good to reference for you.
https://github.com/freeciv/freeciv/blob ... gs.ruleset
Seems so ! But is 2.6 stable enough for everyday use ?
Furthermore, how to convert a ruleset from 2.5.9 to 2.6 ? Will I have to redo every change ??

Right, it looks like that.
Akechi
Posts: 34
Joined: Thu Dec 07, 2017 12:17 pm

Re: hide small wonders from build list

Post by Akechi »

meynaf wrote:Seems so ! But is 2.6 stable enough for everyday use ?
Furthermore, how to convert a ruleset from 2.5.9 to 2.6 ? Will I have to redo every change ??
I think 2.6 is stable to work...this is only my opinion. :?
How to update ruleset 2.5 to 2.6 is, see this page:
http://freeciv.wikia.com/wiki/How_to_up ... 2.5_to_2.6
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: hide small wonders from build list

Post by meynaf »

Ok but 2.6 will probably have to wait a little, as the download page says :
Windows packages for the latest beta are not available yet.

EDIT: Got the exe and it installs the game nevertheless. Thought it was just the program's exe alone :lol:

Now wondering if it won't conflict with previous version, which i want to keep.
User avatar
dunnoob
Elite
Posts: 327
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: hide small wonders from build list

Post by dunnoob »

meynaf wrote: Furthermore, how to convert a ruleset from 2.5.9 to 2.6 ? Will I have to redo every change ??
Short answer, yes, example:

Your rules Y for 2.5 are based on some shipped rules X for 2.5, you get shipped rules X' for 2.6, you copy X' to Y', and then you compare the differences between old Y and old X, and the differences between the shipped new X' and old X, and you edit your new Y' until the differences between your new Y' and your old Y match what you want.

PITA, took me weeks, but it's the last time, there will be a tool loading an old working ruleset, and saving it as new (hopefully still) working ruleset later (starting with 2.6 as old, not for your 2.5). Of course you won't get completely new features with rule-up.
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: hide small wonders from build list

Post by meynaf »

Speaking of new features, if it's about redoing my changes (hopefully i noted them in a list !), i'd like to check if something new could be added as well.
So where could i find a complete list of things that are new (really new, not things that are simply done otherwise) and examples of how to do them ?
They are kinda documented in the readmes and the .ruleset themselves, but i dunno if this is exhaustive.

For what i did, i started with classic and compared it with civ1/civ2/civ2civ3/multiplayer/experimental, integrating changes i saw fit and the ones that were easy (i.e. just changing a number, a name or true/false, sometimes adding new reqs/nreqs or deleting old ones).
But, i may even have missed interesting features already there in 2.5...

For example, it's easy to set when barbs start, but not when they stop. In original civ1 they did that after a while (but it didn't go in save game and they returned upon reloading !). It would be good to be able to vanquish them once and for all (without having to set them off manually). Doable ?
Also looking for a way to allow conversion of oceans to land without destroying special resources, in a way more logic than what very old freeciv did.
Something good would be to have victory not when enemies are dead OR spaceship is successful, but when enemies are dead AND spaceship is successful. Or perhaps other conditions. Would prevent having to leave some filthy ai alive ;)
Old civ1 allowed playing when all opponents are dead but it was either a savegame hack or a bug abuse.
Freeciv allows sending the spaceship and still play after. But i'm afraid that even in 2.6 we can't delete other nations completely...
User avatar
dunnoob
Elite
Posts: 327
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: hide small wonders from build list

Post by dunnoob »

meynaf wrote: i may even have missed interesting features already there in 2.5...
No, you checked experimental, that's where interesting new features used to be until 2.5. Starting with 2.6 that will be sandbox. For other stuff looking in the alien ruleset is also interesting, but unsuited for copy+paste. ;)

Skipping your Barbarian question: Dunno, never tried that.
Also looking for a way to allow conversion of oceans to land without destroying special resources, in a way more logic than what very old freeciv did.
If you are forced to transform an ocean tile with whales or fish to swamp while building a land bridge, you can transform this swamp back to ocean later. If many tiles are converted (global warming or nuclear winter) it's hard to fix it, if you don't recall where the special resources were.

But you could save + leave the game, load an older state to check the map, quit that + load the last manually saved game again, then try to fix the damage. Some damages can't be fixed, e.g., there's no way to get a lost glacier or a lost jungle back (in the classic ruleset), but you can transform tundra to desert, and if the tundra was glacier with arctic oil you will get desert with desert oil.
Something good would be to have victory not when enemies are dead OR spaceship is successful, but when enemies are dead AND spaceship is successful. Or perhaps other conditions.
The AND doesn't work, but there will be other conditions in 2.6, like a cultural victory, and "victory" as an effect. In 2.5 and IIRC 2.4 you can decree "victory" in a script, e.g., in my rules a city of size 100 counts as "victory".

Simple conditions based on the score or demographics are not possible, or rather, I don't know how to do this. The cultural points and cultural victory and achievements (1) did not work for me for unknown reasons, (2) are anyway not what I want, because I like to destroy 2 of 3 conquered cities (=losing accumulated cultural points in 2.6). Achievements as some kind of quest should be fun, but maybe not yet (in 2.6). :?:

About the small wonders, you can build them again in another city, they are unique per player, but can be moved (by building elsewhere) if you want that. The list of possible buildings (per city) shows "already built" for a small wonder, if you have it already in another city: Works as designed.
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: hide small wonders from build list

Post by meynaf »

dunnoob wrote:No, you checked experimental, that's where interesting new features used to be until 2.5. Starting with 2.6 that will be sandbox. For other stuff looking in the alien ruleset is also interesting, but unsuited for copy+paste. ;)
Ok so i just need to check all rulesets again...

dunnoob wrote: If you are forced to transform an ocean tile with whales or fish to swamp while building a land bridge, you can transform this swamp back to ocean later. If many tiles are converted (global warming or nuclear winter) it's hard to fix it, if you don't recall where the special resources were.

But you could save + leave the game, load an older state to check the map, quit that + load the last manually saved game again, then try to fix the damage. Some damages can't be fixed, e.g., there's no way to get a lost glacier or a lost jungle back (in the classic ruleset), but you can transform tundra to desert, and if the tundra was glacier with arctic oil you will get desert with desert oil.
I did not know special resources could return if the tile gets converted back !
However it is not the point.
Sometimes a city has ocean tiles but isn't coastal either. So i just destroy their ocean tiles and make nice grassland or plains instead. And it's just a pity special resources get removed in the process, while in freeciv 1.12.0 they got converted to another type (which is crazy but useful).
Another, more important reason is when wanting to build a city in a particular location, in a largepox game where cities must be placed regularly so no space is wasted... and damned city must be put where whales were.
In some older game i have converted all ocean tiles to land and covered the whole map with my cities :)
I like the hex maps quite a lot because there is no conflict/waste anymore.

dunnoob wrote: The AND doesn't work, but there will be other conditions in 2.6, like a cultural victory, and "victory" as an effect. In 2.5 and IIRC 2.4 you can decree "victory" in a script, e.g., in my rules a city of size 100 counts as "victory".

Simple conditions based on the score or demographics are not possible, or rather, I don't know how to do this. The cultural points and cultural victory and achievements (1) did not work for me for unknown reasons, (2) are anyway not what I want, because I like to destroy 2 of 3 conquered cities (=losing accumulated cultural points in 2.6). Achievements as some kind of quest should be fun, but maybe not yet (in 2.6). :?:
I know other conditions may be possible, it all started with civ3, but i just don't like this. I like to do everything that's doable in a game, not just choose one way to win. Matter of taste only, of course :geek:

I would just love it if we could found new cities on Alpha Centauri and fight with aliens :mrgreen:

dunnoob wrote: About the small wonders, you can build them again in another city, they are unique per player, but can be moved (by building elsewhere) if you want that. The list of possible buildings (per city) shows "already built" for a small wonder, if you have it already in another city: Works as designed.
I know, but they are still parasiting the list. A simple check box to hide these from production list would be enough...
Post Reply