The International Simutrans Forum

PakSets and Customization => Pak128.Britain => Topic started by: Christo on September 14, 2011, 11:56:30 PM

Title: Adding extra vehicles to the Pakset
Post by: Christo on September 14, 2011, 11:56:30 PM
Hello

Forgive n00bishness, but I am having trouble with adding vehicles (notably aircraft) to my Pak128.Britain. I intended to just take the aircraft from the normal Pak.128, and stick those in with the other .paks. However, I'm having trouble with this - when I try this, I get the following error:

"FATAL ERROR:
obj_reader_t::resolve_xrefs
cannot resolve 'GOOD-Holz'
PRESS ANY KEY"


I got the same error when I decompiled the BritBoat.pak, then re-compiled it with some added boat .paks, using PakHelper3.3.

Is anyone else having this problem, and how does one get around it?

Thanks for your time!  :)

P.S: I'm using Simutrans 110.0.1, and pak128.Britain_1-0-8_0-102 on a Windows 7 computer.
Title: Re: Adding extra vehicles to the Pakset
Post by: sdog on September 15, 2011, 12:16:21 AM
The error is caused by adding vehicles for a cargo type not available in pak-britain.

There are two straightforward approaches to this:
A) only import vehicles with goods types available in pak britain. (most likely passengers and mail)

B) import the goods types required from pak128 too. For pak128 this would be in Base/goods-128.dat (https://github.com/pak128svn/simutrans-pak128/blob/master/base/goods-128.dat)
Since all goods are in this file, you might run into trouble with having some goods like passengers defined twice, once from pak128.britain and once from pak128. I'm not sure if you run in other dependencies too. (You could create a new goods dat file, with makeobj but that leads a bit too far perhaps.)
Title: Re: Adding extra vehicles to the Pakset
Post by: VS on September 15, 2011, 07:34:30 AM
B) Is not exactly a solution, as it would only make the game start. The vehicle would stay useless anyway.

C) You could download the sources, change Holz to "wood" or something (please look up the internal name yourself) and compile the vehicle as a British edition :)

I would add another - untested - possibility...

D) Use compat.tab to turn "Holz" into the freight type you want. It would likely require the least work - if it works, that is.
Title: Re: Adding extra vehicles to the Pakset
Post by: Christo on September 15, 2011, 01:28:55 PM
Thanks for the prompt reply!

I think the problem is in the .set.paks of the aircraft for Pak128. Should I decompile these with PakHelper, and then use the compat.tab to avoid the code problem?

What and where is compat.tab? Either it's well hidden, or I'm just being thick...

I transferred fewer files, and got "GOOD-Goods" rather than "GOOD-Holz". Either way, it's still irritating! :)

Thanks for the help!
Title: Re: Adding extra vehicles to the Pakset
Post by: sdog on September 15, 2011, 03:58:24 PM
The compatibility table is a good idea!

here's a link to pak britain compat.tab (https://github.com/jamespetts/pakbritain-experimental/blob/master/compat.tab)

It allows backward compatibility of new pak-sets with older savegames when the savegame removed or renamed paks. The old one is an entry, the new one replacing it is the entry below.
Title: Re: Adding extra vehicles to the Pakset
Post by: Christo on September 15, 2011, 05:36:50 PM
Thanks for the link, sdog! Unfortunately, I don't understand how to make those changes at all...

What I did do was add the following in the compat.tab:

###Freight Planes
goods
piece goods
#

When that didn't work immediately, I deleted all the .paks with the words "goods" explicitly in the name. I now have all passenger aircraft from pak.128, and several freight planes too! (from the sets). I need to do more testing to see whether this works, but at least it's an interim....

(I can now transport passengers! I used the airport buildings and stuff from pak128, it's working OK for the moment....)
Title: Re: Adding extra vehicles to the Pakset
Post by: The Hood on September 15, 2011, 06:39:36 PM
The problem would be the good "Holz" is not defined in pak128.Britain.  You would need something on the lines of:

###Goods
Holz
Bucher

as "Bucher" is a defined good in pak128.Britain