I'm sorry if this is an old topic, but so far.
What can we know about this part? What are the items or variables that I could retrieve from a Load?
My idea is to create a global table from turn 1 and feed it with the IDs of some cities.
However, if I load a saved game, this table is reset.
Is there a way to restore it? How?
Thanks
How to restore a table from a saved game? Is there a way?
-
leo.priori
- Posts: 38
- Joined: Mon Jan 01, 2024 3:22 am
-
Molo_Parko
- Hardened
- Posts: 200
- Joined: Fri Jul 02, 2021 4:00 pm
Re: How to restore a table from a saved game? Is there a way?
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
https://forum.freeciv.org/f/viewtopic.p ... 07#p110007
-
leo.priori
- Posts: 38
- Joined: Mon Jan 01, 2024 3:22 am
Re: How to restore a table from a saved game? Is there a way?
Hi Molo_Parko! First of all, I would like to apologize for the delay in
getting back to you. I want to say a HUGE thank you for that
sensational piece of information! It was a real game-changer that
brought me so much joy and allowed me to revive an old project that
had been shelved for a long time.
See you around, and thanks again!
getting back to you. I want to say a HUGE thank you for that
sensational piece of information! It was a real game-changer that
brought me so much joy and allowed me to revive an old project that
had been shelved for a long time.
See you around, and thanks again!