The International Simutrans Forum

 

Author Topic: Adding extra vehicles to the Pakset  (Read 3084 times)

0 Members and 1 Guest are viewing this topic.

Christo

  • Guest
Adding extra vehicles to the Pakset
« 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:

Code: [Select]
"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.
« Last Edit: September 15, 2011, 06:27:00 AM by vilvoh »

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: Adding extra vehicles to the Pakset
« Reply #1 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
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.)

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Adding extra vehicles to the Pakset
« Reply #2 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.
« Last Edit: September 15, 2011, 07:41:02 AM by VS »

Christo

  • Guest
Re: Adding extra vehicles to the Pakset
« Reply #3 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!

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: Adding extra vehicles to the Pakset
« Reply #4 on: September 15, 2011, 03:58:24 PM »
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

  • Guest
Re: Adding extra vehicles to the Pakset
« Reply #5 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....)
« Last Edit: September 15, 2011, 06:05:57 PM by Christo »

Offline The Hood

  • Moderator
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Adding extra vehicles to the Pakset
« Reply #6 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