Author Topic: Adapting graphics from Chris Sawyer's "Locmotion"  (Read 1801 times)

0 Members and 1 Guest are viewing this topic.

Joe Dobson

  • Guest
Adapting graphics from Chris Sawyer's "Locmotion"
« on: July 10, 2015, 04:23:17 PM »
Hey guys,

I did loads of UK Buses for Chris Sawyers Locomotion and wondered if there would be any way I could get them into Simutrans? I've got hundreds of sprites if anybody is able to code them for me/teach me how to code :)





Joe

Offline pumuckl999

Re: Adapting graphics from Chris Sawyer's "Locmotion"
« Reply #1 on: July 10, 2015, 08:09:47 PM »
Could be ot here and moved to other place...

Further information for creating own objects you can get for example here: http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_Index

At first: You need a graphics file and a dat-file with the parameters for your object.

Graphics: For each vehicle you need at least 8views, in every view the vehicle is turned through 45 degrees. More views are possible, if you wish own graphics from vehicle with loaded freight. Background in graphics is RGB=231,255,255. It´s transparent color in Simutrans.
Each view must size 128x128 pixel (for pak128....britain).
Perspective should match with Simutrans (if you use a 3d-modeller orthograhic projection, cam on x,y,z=100,-100,82 if i remember right)
For the first graphics its hard, to make a right alignment of your vehicle. Best way, i think, you get similar, existing vehicles from the sources (look at https://github.com/aburch/simutrans-pak128.britain) and use it to align your own graphics.

Store your image as .png.

For the dat, best way is also to get and modify an existing from the sources. To edit or create you can use a text-editor.

Code: [Select]
obj=vehicle
name=#name of your vehicle, player can see it in Simutrans
copyright=#name of the creator
waytype=road# for shown vehicles should that always work
freight=Passagiere #if you wish to transport other freight, you have to get the information about the freight-categories from your pakset, every pakset can define own freight, Passagiere (german for passengers) should work with all paksets, i think
payload=#number of passengers (or other fright), your vehicle can load
engine_type=diesel #maybe your vehicle uses other engine: Bio (for animals), sail, steam, diesel, electric, hydrogene, fuel_cell, battery are allowed
power= # value in KW, not HorsePower
speed= # value in kilometers per hour
weight=# value in tons
length=# classification of the vehicle-lenght, more important if you use trailers, therefore maybe you can get sources of existing vehicles from this pak
intro_year=#you should define at least the intro year, first year the vehicle will available in Simutrans, if player has activated timeline
intro_month=
retire_year=
retire_month=
cost=# if you know what your vehicle should cost, multiply this value with 100
RunningCost=# same here - cost per kilometer
sound= # in your pakset exist a folder named sound, you can use the filenames or the numbers from sound.tab
constraint[prev][0]=none #for using trailers or other engines you wish to combine, name of each vehicle to combine is needed
constraint[next][0]=none
# graphics section: Letters in brackets(? , sry, school is out since 30years) is where you view from to your vehicle, in Simutrans always on the lower left is south, imagine, your graphics with all views is a table, you can number the columns and lines, starting from zero, now we need also the name of our grahics, use sheme graphics name.x.y
# x is the vale of the line, y is the value of column, graphics name is the filename without(!) file extension
# you can add here also offset with ,x-value-offset,y-value-offset (in pixel) for each line
EmptyImage[W]=
EmptyImage[NW]=
EmptyImage[N]=
EmptyImage[NE]=
EmptyImage[E]=
EmptyImage[SE]=
EmptyImage[S]=
EmptyImage[SW]=
# only needed, if you have created separate graphics for your vehicle, for passenger transport not often seen
FreightImage[W]=
FreightImage[NW]=
FreightImage[N]=
FreightImage[NE]=
FreightImage[E]=
FreightImage[SE]=
FreightImage[S]=
FreightImage[SW]=

If you created both files, you need program named makeobj from http://sourceforge.net/projects/simutrans/files/makeobj/.
Easy way: Copy your grahics and dats to the folder with makeobj (you can compile more than one objects one times). Start a bash/prompt, change to the makeobj-folder. Type makeobj pak128. That should compile all objects found in current folder. If created a pak-file without errormessage, you can copy the pak(s) into your pakset-folder from simutrans or in the addon-folder of your pakset. Should than available after next gamestart for testing and playing.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15857
  • Total likes: 407
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Adapting graphics from Chris Sawyer's "Locmotion"
« Reply #2 on: July 10, 2015, 08:23:22 PM »
Hello! I have split this from the other thread as that was a to-do list, and this is about adapting graphics from another game.

I do not know much about Chris Sawyer's "Locomotion", so I do not know how the graphics are created there, but one thing important for this pakset is consistent shading, scale and style. They are also based on a tile size of 128x128. Graphics for Pak128.Britain are generally produced by making (very simple) 3d objects in Blender, then rendering them in 8 (or, for buildings, 4) different orientations before replacing the background with the special transparent blue of Simutrans and adding the .dat files and combining them into a .pak file that can be read by the game using Makeobj.

Have you been able to get any of your objects into the game and test to see whether they match the Pak128.Britain shading, scale and style?
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.