News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Building names

Started by prissi, April 02, 2010, 08:53:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prissi

I just looked at the britan128 source and found citybuildings with names like KG_RES_xx_yy

Every pakset maintainer, please avoid this!

Buildings must start with RES, IND, COM and end with the level number. Otherwise the building replacer (when buildings are left out or are added to a newer version of the pak) get thouroughly confused on load time.

(Not sure, if this is the right board, I admit.)

VS

By "replacer" you mean the code that allows "compatibility" when buildings are missing?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi


The Hood

OK, so replacing everything to RES_[author]_xx_level would be OK?

neroden

I have a large patch for pak.Britain.experimental which should do most of this rename automatically -- replacing stuff like KG_RES_ with RES_KG_.  (It doesn't handle the issue of buildings which do not end with the level number, as I wasn't able to write a perl script to do that, and I wasn't sure which ones ended with the level number and which ones didn't. :) )  This is in citybuildings.diff

As a side-effect I generated an entire list of renames which can be added to compat.tab if the replacer is clever enough to accept that -- and it appears to be clever enough, based on testing; this is in building_replace.txt.

This will probably work for pakBritain standard too as the buildings are much the same.  A few cleanups will be needed for buildings which don't end with the level number or for stuff which is different in experimental, but that should be all.  This should be the worst of it done.

The Hood

Should have said I've actually already manually made the changes but not had any time in the last week to test and make the change on my working copy nor upload the changes to SVN, but thanks anyway.  If my attempt hopelessly fails, I will try yours :)

neroden

Quote from: The Hood on April 22, 2010, 07:31:57 AM
Should have said I've actually already manually made the changes but not had any time in the last week to test and make the change on my working copy nor upload the changes to SVN, but thanks anyway.  If my attempt hopelessly fails, I will try yours :)

OK.  :)  Mine was generated by fully automated methods so it didn't take that long to do.... and is verified to work.  :)  Yours, however, probably has the changes to make sure each name ends in _level.

The Hood

That's right.  I'll cross-check them when I get time, as I don't want to break any saves and there are a lot of name changes to get right...

The Hood

Should now be fixed in SVN, so please report any problems with existing saves or anything else related... (should be in next nightly, or build from source yourself)