News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Adding extra vehicles to the Pakset

Started by Christo, September 14, 2011, 11:56:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Christo

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.

sdog

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
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.)

VS

#2
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.

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!

Christo

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!

sdog

The compatibility table is a good idea!

here's a link to pak britain 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.

Christo

#5
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....)

The Hood

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