Currently Online

Latest Posts

Topic: Savegame contains ware queues of production sites?

QCS

Topic Opener
Joined: 2009-12-29, 21:47
Posts: 256
Ranking
Tribe Member
Posted at: 2015-09-09, 16:27

Hi, it's me again.

I just noticed that a savegame contains not only the status of the production site's ware queues (which I do not doubt is correct), but also which queues are there at all.
Result: I added a ware to the output of an existing production site, loaded a game, and the production sites do not have the new ware queue. A new building has the correct queues.

Is this as designed/expected or a bug?

Thanks,
QCS


CMake is evil.

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-09-09, 18:17

I think that this might be by design - what would happen if you removed a ware queue instead of adding one? The game would not know what to do with the wares in the queue.


Busy indexing nil values

Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-09-09, 20:02

You overlooked something probably, I think. I dont know this part of code, but such modification of a productionsite should not doable face-smile.png


Top Quote
QCS

Topic Opener
Joined: 2009-12-29, 21:47
Posts: 256
Ranking
Tribe Member
Posted at: 2015-09-10, 07:07

> *Tibor wrote:*
>
> You overlooked something probably, I think. I dont know this part of code, but such modification of a productionsite should not doable :)

Hm, I am not sure if I understand correctly. You think I overlooked something when writing the .conf file of the production site? What modification should not be doable?

I think there is not much to do to add to the .conf to have it queue up another ware (in fact, it is one line, if I don't want to do something with it). I believe I even can't forget anything ;-)
That, and the fact that a new building (after loading the savegame) gets the correct (new) queues, made me think that the queues are restored from savegame.


CMake is evil.

Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-09-10, 19:03

QCS wrote:

Tibor wrote:

You overlooked something probably, I think. I dont know this part of code, but such modification of a productionsite should not doable face-smile.png

Hm, I am not sure if I understand correctly. You think I overlooked something when writing the .conf file of the production site? What modification should not be doable?

I am sorry, it was too late, it should had been "...a productionsite should be doable"

I think there is not much to do to add to the .conf to have it queue up another ware (in fact, it is one line, if I don't want to do something with it). I believe I even can't forget anything ;-) That, and the fact that a new building (after loading the savegame) gets the correct (new) queues, made me think that the queues are restored from savegame.

In fact, I was not aware that your had been modifying conf file, I believed you did some changes to C++ code. Usually such a change must be implemented on multiple places to work properly.

But now, the mentioned behaviour looks good to me. But mainly, it does not make sense to redefine a building during a game? Or is exactly this your goal? Be able to redefine buildings on the fly?


Top Quote
QCS

Topic Opener
Joined: 2009-12-29, 21:47
Posts: 256
Ranking
Tribe Member
Posted at: 2015-09-11, 06:01

What I was trying to do was simply add another ware as input to the smelters (scrap metal) ;-)

I do not want to do that on the fly while in game, I just want to change the behaviour completely.

It works perfectly when I start a new game, or when I load a game where I did not have a smelter built yet, and it also works perfeclty for every new smelter I build.

BUT (and that's the problem I see): If I load a game which already has smelters built (which may happen in real life ;-) ), those "old" smelters do not have input queues for the scrap metal. I have to burn them down and rebuild them to have a scrap metal smelter. That's what I see as problem, as it makes redefining existing buildings from widelands build x to widelands build y impossible (I would say, a "soft" case of save game incompatibility). And I wanted to know if that's known, by design, a bug or whatever... :-)


CMake is evil.

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-09-11, 08:07

If you can find a way to safely implement not saving which queues there are in the savegame, this would certainly solve this soft case. I'd say it's pretty low priority at the moment, because we are breaking savegame compatibility during this release cycle anyway.

If you wish to make sure that the older games can't be loaded any more, you can increment the relevant packet version number in game_io/map_io.


Busy indexing nil values

Top Quote