Don't use a table at all (they are broken for reloading), but rather pack the values into a string using a separator such as the pipe symbol ( "|" ), then extract the values by position in the string. Example in post at link.
https://forum.freeciv.org/f/viewtopic.p ... 07#p110007
Search found 200 matches
- Mon Jan 20, 2025 5:18 pm
- Forum: Rulesets and modpacks
- Topic: How to restore a table from a saved game? Is there a way?
- Replies: 1
- Views: 9943
- Thu Dec 19, 2024 5:26 pm
- Forum: Single player
- Topic: Default rules dec 24
- Replies: 2
- Views: 13422
Re: Default rules dec 24
Everything you mentioned in #9 can be accomplished via Lua script (which you create or add) within the game. See "The Shadow Vales" scenario, as an example of wildly different Barbarians, among other things. The computer-controlled tribes vary more when there are more available options and...
- Tue Dec 03, 2024 6:27 pm
- Forum: Contribution
- Topic: Moving Freeciv v1 scenario map to a Freeciv v2.6.x scenario file example
- Replies: 8
- Views: 29308
Re: Moving Freeciv v1 scenario map to a Freeciv v2.6.x scenario file example
I didn't convert any of the options, but rather only "rescued" the map and pasted it into a newly generated v2.6.11 scenario file using the same map dimensions -- so the options in mine are whatever was in use when I generated the new scenario file to hold the map. I only did a "map r...
- Tue Dec 03, 2024 5:20 pm
- Forum: Contribution
- Topic: Moving Freeciv v1 scenario map to a Freeciv v2.6.x scenario file example
- Replies: 8
- Views: 29308
Re: Moving Freeciv v1 scenario map to a Freeciv v2.6.x scenario file example
If a person happens to have functional installs of v2.5 and 2.6 then /scensave is a nice option. If the person doesn't have functional installs then compiling them on some platforms would be a high hurdle! Whereas copy-and-paste of the map layers between files takes about 1 minute ( for me ) and any...
- Tue Dec 03, 2024 5:47 am
- Forum: Contribution
- Topic: Moving Freeciv v1 scenario map to a Freeciv v2.6.x scenario file example
- Replies: 8
- Views: 29308
Moving Freeciv v1 scenario map to a Freeciv v2.6.x scenario file example
http://imgur.com/1Af04HO.jpg I ran across a Freeciv v1 scenario file on the www ( http://www.samiam.org/Civ4/Caulixtla/ ) and wrote a script to convert the map sections for copy-and-paste into a Freeciv v2 scenario file. I think the original Freeciv 1 map was a result of conversion from another for...
- Mon Dec 02, 2024 12:00 am
- Forum: General discussion
- Topic: --Warnings from Freeciv & scenario Lua content vs newer Freeciv versions
- Replies: 10
- Views: 24498
Re: --Warnings from Freeciv
Yes, that makes sense. The scenario script could just detect a version # change and pop-up a message "Your version of Freeciv was created after this scenario. Newer features may alter the scenario game experience. If that occurs try changing the settings for these newer features: "alienenc...
- Sun Dec 01, 2024 11:37 pm
- Forum: General discussion
- Topic: --Warnings from Freeciv & scenario Lua content vs newer Freeciv versions
- Replies: 10
- Views: 24498
Re: --Warnings from Freeciv
^ Right, but as of this point in Lua, it can't determine whether or not Settings entries from a --newer-- version of Freeciv exist in the currently running Scenario. Lua can't "/show all" so there is no way for Lua to get a list of what Settings entries are possible. I'd have to hardcode t...
- Sun Dec 01, 2024 4:28 pm
- Forum: Contribution
- Topic: New features via Lua script
- Replies: 34
- Views: 134484
Re: New features via Lua script
option_names={ "aifill", "airliftingstyle", "allowtake", "alltemperate", "animals", "aqueductloss", "autoattack", "autosaves", "autotoggle", "barbarians", "borders", "citymindist"...
- Sat Nov 30, 2024 8:17 pm
- Forum: General discussion
- Topic: --Warnings from Freeciv & scenario Lua content vs newer Freeciv versions
- Replies: 10
- Views: 24498
Re: --Warnings from Freeciv
I am trying to figure out how to determine (in Lua script) whether the currently running scenario has set all possible optional values for the currently running Freeciv software version in use ( to detect if new features exist which should be disabled for a scenario generated on an older version of ...
- Sat Nov 30, 2024 4:57 pm
- Forum: Tech support
- Topic: problems downloading from cyfuture.dl.sourceforge.net
- Replies: 7
- Views: 15331
Re: problems downloading from cyfuture.dl.sourceforge.net
If sourceforge.net link doesn't work, then try the alternate download link from files.freeciv.org.
Both links are shown on the Downloads page at: https://www.freeciv.org/download.html
Both links are shown on the Downloads page at: https://www.freeciv.org/download.html