The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: Ranran(retired) on August 08, 2022, 09:05:08 AM

Title: Nightly site distributes old themes :/
Post by: Ranran(retired) on August 08, 2022, 09:05:08 AM
http://bridgewater-brunel.me.uk/downloads/nightly/themes/
The update date seems to be new, but the content is old. This is pretty old, probably over a year old. Simutrans-Extended-Complete.zip has the old theme as well.
The master branch source is correctly updated. So I wonder what and how it provides what it builds.
It may not build from themes.src, just copy what is placed in the simutrans folder. In other words, I think that even if the source is updated, it will continue to provide the same thing forever.

It would be helpful if James could look into this.
Title: Re: Nightly site distributes old themes :/
Post by: Mariculous on August 08, 2022, 10:37:53 AM
Where are the themes located and how should these be built?
I suspect the build tool chain shipped with the simutrans repository might not be set up to build the themes alongside the game binary.
Title: Re: Nightly site distributes old themes :/
Post by: Matthew on August 29, 2022, 11:03:42 PM
This is a duplicate of  an earlier bug report (https://forum.simutrans.com/index.php/topic,21690.msg200826.html#msg200826).

I have tried to build a theme using the new symbols today but it did not work.

I built a theme .pak using the makeobj-extended generated by GitHub Actions (https://github.com/jamespetts/simutrans-extended/actions/runs/2938818222) and it did not report any errors in the terminal. But when I ran the game, it does not display the new symbols that Ranran has recently introduced, even though they are present in themes.src/newstandard/symbols.png and themes.src/newstandard/newstandard.dat refers to them:

(https://i.imgur.com/bGo361Q.png)

I believe that some of the convoys should ReverseArrows symbols because they are running in reverse, while the "Service frequency" text should have been replaced by the TravelTime symbol.

Ranran, could you please share a Linux makeobj-extended that you believe is working correctly?

I did consider using the makeobj-extended for Linux on Bridgewater-Brunel , but it is several months out of date (http://bridgewater-brunel.me.uk/downloads/nightly/linux-x64/). If BB isn't building an up-to-date makeobj, then that would explain why themes are failing to build. You would think it would stop building the other .paks too,  but perhaps there haven't been any relevant changes in that time??

I also downloading a theme .pak from B-B, which seemed to show the new symbols on on 2022-06-27 (https://forum.simutrans.com/index.php?msg=200826). It no longer does so.

Earlier I tried to build a theme .pak using a makeobj-extended that I built myself, I get a ton of warnings about unknown objects. This is almost certainly a problem at my end that I should sort out myself - perhaps I might need have a look at the Makefile to see whether everything is right there.  But I have attached the output just in case it's helpful. But it's probably unconnected.




Title: Re: Nightly site distributes old themes :/
Post by: Ranran(retired) on September 16, 2022, 08:29:53 AM
@Matthew I can assure you that your guess is completely wrong. Your approach to updating makeobj makes absolutely no sense. Because that patch doesn't involve any changes to Makoobj(=object writer), theme object creation for extended should work fine even with standard's makeobj. The change in the patch is that unique icons that were previously output as the same attribute as the season icon have been changed to the same attribute as the theme parts (eg the button that closes the window), makeobj does not need to be changed. Just change the attributes of the object in the dat file. The point is whether the defined object can be read by Simutrans(=object reader). Strictly speaking, reading with reader will not be a problem. because makeobj is not changed. It is important that it is "registered" correctly. That means the symbol must be registered as one of the theme objects. Although themes for extended can be read in standard, extended unique symbols are not registered, so it cannot be seen in the game, but there is no possibility of preventing it from booting.

The writer hasn't changed, and judging by the fact that the correct theme I created works, the reader is working as well. So, as I have said many times before, the theme currently distributed on the download server is still old, and I think that the file is not generated or the old file is just copied from simutrans folder.

QuoteEarlier I tried to build a theme .pak using a makeobj-extended that I built myself, I get a ton of warnings about unknown objects.
The error indicates that it can't even find images of old theme objects, which means it's your problem.
Title: Re: Nightly site distributes old themes :/
Post by: Matthew on September 16, 2022, 03:02:54 PM
Quote from: Ranran on September 16, 2022, 08:29:53 AM@Matthew I can assure you that your guess is completely wrong. Your approach to updating makeobj makes absolutely no sense.

Thank you for your honesty! It is helpful so that your time and James' time is not wasted. I still have a lot to learn about Extended.

QuoteBecause that patch doesn't involve any changes to Makoobj(=object writer), theme object creation for extended should work fine even with standard's makeobj. The change in the patch is that unique icons that were previously output as the same attribute as the season icon have been changed to the same attribute as the theme parts (eg the button that closes the window), makeobj does not need to be changed. Just change the attributes of the object in the dat file. The point is whether the defined object can be read by Simutrans(=object reader). Strictly speaking, reading with reader will not be a problem. because makeobj is not changed. It is important that it is "registered" correctly. That means the symbol must be registered as one of the theme objects. Although themes for extended can be read in standard, extended unique symbols are not registered, so it cannot be seen in the game, but there is no possibility of preventing it from booting.

Thank you for this explanation. It helps me to understand the changes that you have made and why they can't be causing this issue. It has also given me the idea to try building the theme files with a Standard makeobj, to see if the output gives any hints as to my problem.

QuoteThe writer hasn't changed, and judging by the fact that the correct theme I created works, the reader is working as well. So, as I have said many times before, the theme currently distributed on the download server is still old, and I think that the file is not generated or the old file is just copied from simutrans folder.

Yes. The interesting thing is why the file is not generated.

QuoteThe error indicates that it can't even find images of old theme objects, which means it's your problem.

I agree it's very likely that the problem is something about my setup. But I'm not certain that the problem is being unable to find the images. The error messages don't clearly say that, do they? It looks to me as though the error message is itself broken. The most common error message says:

Skipping unknown  object
This error message is generated by this line (https://github.com/jamespetts/simutrans-extended/blob/6888b29a3581106b89117590768cdcffabd37a9a/descriptor/writer/obj_writer.cc#L46) in obj_writer.cc:

printf("Skipping unknown %s object %s\n", type, name);
So it seems to me that the error message should be printing the type of object affected as well. But it is not. And it's the same with the other common error message:

Warning: andard look:   Entry "#=Image[8]=> button.0.7" ignored (check spelling)
That message is generated by this line of code:

dbg->warning( obj_writer_t::last_name, "Entry \"%s=%s\" ignored (check spelling)", i.key, i.value.str );
The error message is printing "andard look", which is part of the boilerplate (https://www.oxfordlearnersdictionaries.com/definition/english/boilerplate?q=boilerplate) comment at the top of all the theme .dat files. I also notice that there are lots of # symbols printed in the error messages. So it seems as though makeobj is somehow unable to separate out the comments. I wondered if it was a problem with Unix line endings vs Windows line endings, but converting the line endings to Unix didn't seem to fix the problem.
Title: Re: Nightly site distributes old themes :/
Post by: Ranran(retired) on September 17, 2022, 01:46:56 PM
Quote from: Matthew on September 16, 2022, 03:02:54 PMBut I'm not certain that the problem is being unable to find the images. The error messages don't clearly say that, do they? It looks to me as though the error message is itself broken.
The line break issue made me mis-advise without looking at the whole thing.
The error file shows that same object description is read twice. So your dat has a duplicate description, the 1st load is fine with no major errors, but the 2nd one is completely broken which is unnecessary.
A second broken theme may be overwriting. It's probably your problem that there is a second corrupted dat and makeobj is loading it. I recommend checking your folder and file structure.
Title: Re: Nightly site distributes old themes :/
Post by: Ranran(retired) on September 25, 2022, 05:05:48 AM
@Matthew
I've verified that a similar error to yours is printed when using the makeobj generated by the git action.
So this is not your problem, suggesting that makeobj is broken.
I was able to confirm that the file was generated correctly even though an error was output. So this seems to be your problem. please confirm the file structure.
Title: Re: Nightly site distributes old themes :/
Post by: jamespetts on November 05, 2022, 11:07:09 AM
I have identified and fixed an error in the build scripts on the server that seems to have been causing the themes not to build. The latest built themes are now on the server. Can anyone verify that these are the correct themes?
Title: Re: Nightly site distributes old themes :/
Post by: Ranran(retired) on November 05, 2022, 11:26:42 AM
Quote from: jamespetts on November 05, 2022, 11:07:09 AMThe latest built themes are now on the server. Can anyone verify that these are the correct themes?
http://bridgewater-brunel.me.uk/downloads/nightly/themes/
I haven't checked everything, but the themes here look like the latest. I was able to confirm that the flat theme is new.

The way to tell it's a new theme is if these symbols are visible on the UI.
https://github.com/jamespetts/simutrans-extended/blob/master/themes.src/flat/symbols.png

In particular, you should check for the presence of the magscope icon and the comfort icon on the depot dialog.
(https://i.imgur.com/rhyESo2.png)
Title: Re: Nightly site distributes old themes :/
Post by: jamespetts on November 05, 2022, 11:53:36 AM
Excellent, thank you for confirming.