News:

SimuTranslator
Make Simutrans speak your language.

New pakset help

Started by balloonhead66, February 20, 2011, 09:58:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

balloonhead66

ok, i want to make a pakset, but what is needed to make a playable game and how do the .dat files work?
Hello!

rfg123

A dat file is a text file that defines the image file and properties of in-game objects, such as speed for road vehicles, or the intro date for a city building. When using makobj/pakhelper, the image defined in the dat is combined with the parameters you specified to create a pak file. If you want more detail on which parameters are used for each object, use this page.

As for creating a new pakset, I believe the basic objects you need are grounds, fences, a GUI, and a couple others to function. However, I would suggest starting with an existing pakset and replace the objects as needed. For example, if I wanted to create a pak128.USA, I would copy and paste the existing pak128 folder and rename it. Doing so adds it to the list when you start Simutrans. This way I can slowly replace different parts - grounds, trees, roads, trains, tracks, etc. - while maintaining the stability of the pakset. In my experience, this method is much easier than starting from scratch.

jamespetts

As rfg123 suggested, using an existing pakset as a base and changing objects one by one is a good way to start. Some paksets are open-source, so are good for this sort of thing: here are the sources for Pak128.Britain, for example. Have a look at the documentation and resources section of the forum for links to the reference for .dat files.

Take note, though: creating a new pakset from scratch is a project of gargantuan proportions.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

VictorKoehler

Design of large, creating a pakset is no easy task,  rfg123 do as suggested, still join a team for this,
I saw little that you participate in the forum.
Invite people for building alone will have to have experience and end in 2012 to actually do all the functions!


Download of the PAK64.Brasil b3ta here

wlindley

Can we get a few "old hands" to co-operate on a Pak64.Template and Pak128.Template?

I have tried several times to start a Pak128.USA but the size of the task has overwhelmed me.  Ideally I would like to start with Pak128.Britain and remove most everything, to build up again.

It's frustrating that some .dat's call for images in an images/ subdirectory, and some don't. Some paksets use standard command line tools like 'make', and some don't.  Some use tools only available on Windows which precludes my development, whereas linux tools all work on Windows under Cygwin. Some use subversion repositories or github, some don't. None of them seem to permit mere mortal users to have version-control branches to actively participate in development which is exceedingly frustrating.

The requirement to manually re-run TileCutter has to go; makeobj needs to have all that logic in it, so the .dat designer can write it all in once, and the process can be entirely automated.

There needs to be a standardized directory structure for our sanity when we work on multiple paksets.

So... What is the best way to create a couple Template paks, from which I can start pak128.USA and we can all proceed together?

paco_m

Quote from: wlindley on February 21, 2011, 01:49:41 PM
I have tried several times to start a Pak128.USA but the size of the task has overwhelmed me.  Ideally I would like to start with Pak128.Britain and remove most everything, to build up again.

Maybe pak128 would be a better basis as they have already a couple of US diesel rail engines, just in spanish Renfe painting, from around 1950-1960 and 2000 Amtrak bought some spanish waggons that are also in the pak. As the pak128 is open it would just mean changing the painting to get a several trains.
However at the end it is more a personal question of painting styles as pak128.britain and pak128 are very different in this way.

wlindley

I agree, pak128 has a better basis for a USA graphic style, and yes there was even an Amtrak set once that I still hope to salvage (needing a de-compiler for .pak to do so, since the sources were lost).

The question is:  Can we make a single template system, so that the only difference between pak128, pak128.Britain, and pak128.USA will be the actual graphic and dat files, and they will have the same structure and use the same tools?

As for TileCutter -- the various pakset "sources" have png's that are already cut -- which are intermediate files.  These are not the real source files, and would have to be "un-tile-cut" to edit them.  Indeed many of the pngs come from Blender files, for which none of the paksets give the real source.  This makes editing the actual pakset just about impossible.  The proper way to create a pakset would be to have the Blender sources automatically compiled to the pakfile, eliminating all manual intervention.  Otherwise we have the impossibilites of handcrafting that make pakset maintenance just about impossible today.

vilvoh

There's a pakset template called pak64.minimal, if I remember correctly, that shows which is the minimal set of objects to make a functional pakset. You might use it as template for new paksets.

Escala Real...a blog about Simutrans in Spanish...

An_dz


balloonhead66

OK, TileCutter has been mentioned a few times, what is it?
Hello!

Ashley

Quote from: balloonhead66 on February 21, 2011, 05:30:38 PM
OK, TileCutter has been mentioned a few times, what is it?

In Simutrans everything on the game world occupies one or more tiles. A tile is the smallest unit of distance and area. Buildings which occupy more than one tile need to be cut up into tile-size blocks. This is how Simutrans's graphics engine works.

TileCutter is a utility which assists with the process of cutting an image into these tile-size blocks.

For example it would take this input image (in pak64 scale):



And cut it into tiles that look like this:



And also output a .dat file containing the array of information that Makeobj (the utility which compiles objects in Simutrans' .pak format) requires to index the individual tile images. E.g.:

Obj=building
Name=test_1
Type=cur
Passengers=100
intro_year=1900
chance=100
dims=3,3,1
BackImage[0][0][0][0][0][0]=images/output.0.0
BackImage[0][0][1][0][0][0]=images/output.0.1
BackImage[0][0][2][0][0][0]=images/output.0.2
BackImage[0][1][0][0][0][0]=images/output.1.0
BackImage[0][1][1][0][0][0]=images/output.1.1
BackImage[0][1][2][0][0][0]=images/output.1.2
BackImage[0][2][0][0][0][0]=images/output.2.0
BackImage[0][2][1][0][0][0]=images/output.2.1
BackImage[0][2][2][0][0][0]=images/output.2.2


Quote from: wlindley on February 21, 2011, 01:49:41 PM
The requirement to manually re-run TileCutter has to go; makeobj needs to have all that logic in it, so the .dat designer can write it all in once, and the process can be entirely automated.

You need only to run TileCutter in GUI mode once for any individual object. You can save a TileCutter project (.tcp) file which can then be used with TileCutter from the command line to repeat the actions you previously took. You don't even need to store the intermediate "cut" image as this is created every time you run TileCutter and there is a command line flag that permits creation of the intermediate "cut" image in a temporary directory. This command-line functionality is detailed in the TileCutter documentation here:

http://entropy.me.uk/tilecutter/docs/#CommandLineUsage

Quote from: wlindley on February 21, 2011, 03:01:47 PM
As for TileCutter -- the various pakset "sources" have png's that are already cut -- which are intermediate files.  These are not the real source files, and would have to be "un-tile-cut" to edit them.  Indeed many of the pngs come from Blender files, for which none of the paksets give the real source.  This makes editing the actual pakset just about impossible.  The proper way to create a pakset would be to have the Blender sources automatically compiled to the pakfile, eliminating all manual intervention.  Otherwise we have the impossibilites of handcrafting that make pakset maintenance just about impossible today.

I don't know about scripting Blender (I assume it can be fairly easily) but as I have already said TileCutter is fully capable of being automated (indeed I added this functionality at the behest of pakset maintainers who wanted to do exactly what you describe).
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

The Hood

Scripting blender is possible I gather, but there is a significant problem in going straight from blender to pak file fully automated in that many of the images need cleaning up and tweaking by hand.  I'm not at all a fan of pixel-pushing, but unfortunately blender doesn't have a "please read my mind and do this" module which therefore necessitates some processing by hand.

balloonhead66

OK, now I understand what TileCutter is, but what is open pak128, pak128 gone open source? what is it?
Hello!

Zeno

Well, that's it. Pak128 was not open source (sources were not available), but as all the other paks were open source or were moving to open source status (sources are available for everyone to download and modify) and the game itself is open source, the Pak128 staff decided also to move to open source status. As you can guess, that's still in process ;)

balloonhead66

so why can't they just upload the entire thing, why is it taking so long?
Hello!

An_dz

Cause to be opensource you need the pak file creator permission to share its work.

paco_m

Quote from: balloonhead66 on February 21, 2011, 11:10:35 PM
so why can't they just upload the entire thing, why is it taking so long?

Good question :D
Actually the openpak nightlies you can download from the nightly builds contains only graphics of authors that agreed to make them opensource and they already offered the complete sources for it in the pak128 forum for download - search for it or ask VS; as far as I know it is just a question of not automated uploads of the sources that it isn't as accessible as pak64 sources at the moment ;)

balloonhead66

Quote from: paco_m on February 21, 2011, 11:30:27 PM
Good question :D
Actually the openpak nightlies you can download from the nightly builds contains only graphics of authors that agreed to make them opensource and they already offered the complete sources for it in the pak128 forum for download - search for it or ask VS; as far as I know it is just a question of not automated uploads of the sources that it isn't as accessible as pak64 sources at the moment ;)
so you mean like simupakopen128-1150.zip from the nightly page?  How long would it take for the entire thing to go open?

== EDIT ==
I want to know because I am planing on making pak128.HD, but I need the images.  The original point of this thread was to see what I would need to draw off of screenshots, but now that it is open, it seems eaisier.

If you hake looked at my old thread from a year ago, that was when pak128 was closed source.
Hello!

paco_m

Quote from: balloonhead66 on February 22, 2011, 12:01:48 AM
so you mean like simupakopen128-1150.zip from the nightly page?  How long would it take for the entire thing to go open?
The not open graphics are already removed from this snapshots so the current target is to draw new (open) ones for those that had been removed for legal questions, however this work seems to be almost completed - actually there is much more stuff in here as in the last official release. The balancing work for all that (revenues, running costs, ...) is still going on so it won't be in just a few days and consider that the contributors and maintainers are doing all this in their freetime. When they consider it ready it will be released, I guess that nobody can confirm you a day for it ;)