News:

SimuTranslator
Make Simutrans speak your language.

TileCutter 1.2.2

Started by An_dz, July 15, 2020, 01:26:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

An_dz



New version is out, now with night view and special colours view, the first steps to implementing Shades into TileCutter.

Night view has the same logic from Simutrans so you get the same colours from the game.

The Windows version is now compiled with Nuitka that brings improved performance. And hopefully I'll get a MacOS release compiled with Nuitka too, in the meantime you can download the Linux version and run it by calling libs/tilecutter.pyw from the root path.

The Linux version now comes with a install.sh file that will create an executable .desktop icon in the directory and will also offer the option to add an icon to the Start Menu. Some distros will allow double-clicking this install file but on some you'll need to call from terminal with ./install.sh.

Major fix v1.2.2
- Fix cutting in inverse (what should've been removed remained and what should've remained was deleted)

Major fix v1.2.1
- Fix TileCutter main purpose failing (wxPython bug)
- Fix loading projects before full season support
- Projects created before transparency support now load with transparency off by default

Known issue
Console works but doesn't output messages.

Reporting bugs
You can submit a bug report by posting a reply to this thread or on GitHub with the following information:

1. Clear steps on how to trigger it
2. tilecutter.log and TileCutter.exe.log (if present) - These can be found under "%USERPROFILE%\Application Data\tilecutter\" on Windows, "~/Library/Logs/tilecutter.log" on OSX and "~/.tilecutter/tilecutter.log" on all other platforms.

Download
If upgrading from any version before 1.0 it's advisable to completely delete the old version instead of replacing the files.

All executables are standalones. You only need Python, wxPython and NumPy installed if using from source.

Windows version needs the Visual C++ Redistributable 2015-2019 x64. The latest version at the time of writting was 14.26.28720.3, and you can download the x64 version here (Bottom of the page under "Other Tools and Frameworks").

https://github.com/An-dz/tilecutter/releases/

Future
There are planned features that you can check out on GitHub.

Thanks to Ashley Baldock, the original creator, for all the work and for letting me use the same name. This tools is a time-saver.

RealAmerican1776

Useful feature! I like it.

RealAmerican1776

Whenever I try to create the image and .dat file using the new Tilecutter version, it won't do anything. Am I missing something or am I doing something wrong?

An_dz

Probably a bug, I found some too when loading a project. You'll need to use the previous version for now


An_dz

All good now. Found out it was a bug on wxPython, so I made a workaround for now. I also fixed some bugs on loading old tcp files.

The Windows release is probably more optimised too.

RealAmerican1776

Cool  8) Thank you! Now we need TileCuter to support eight directions instead of four.

Leartin

Quote from: TheRoadmaster1996 on July 28, 2020, 03:13:43 PM
Cool  8) Thank you! Now we need TileCuter to support eight directions instead of four.
What for? Which multitile building supports more than 4 directions?

RealAmerican1776

There are some like those in Pak128.Britain. They have shops and industries that have eight directions.

Mariculous

#9
Eight directions?
I am quite sure you confuse something.
You might be refering to corner buildings?

RealAmerican1776


Leartin

Eight-directional buildings are only an option for res, com and ind - but not if they are larger than 1x1. If they are 1x1, they don't need to be cut.

RealAmerican1776


Vladki

I have two problems wit the 1.2.1 release on linux.

First it does not load saved project:


TileCutter : INFO TC:Menu-File-> Open Project: menuObject.OnOpenProject
TileCutter : INFO TC:Loading project: main.OnLoadProject
TileCutter : DEBUG TC:Check Project for changes - Project Unchanged: project.has_changed
TileCutter : INFO TC:Opening Load Dialog to allow location picking: main.dialog_load
TileCutter : DEBUG TC:directory: /home/vladki/simutrans-dev/pak128.dev/lubak-lihovar, filename: lihovar-tilecutter.tcp: main.dialog_load
TileCutter : DEBUG TC:User picked location: /home/vladki/simutrans-dev/pak128.dev/lubak-lihovar/lihovar-tilecutter.tcp: main.dialog_load
TileCutter : DEBUG TC:Load dialog returned a path: /home/vladki/simutrans-dev/pak128.dev/lubak-lihovar/lihovar-tilecutter.tcp: main.OnLoadProject
TileCutter : INFO TC:Load project from file: /home/vladki/simutrans-dev/pak128.dev/lubak-lihovar/lihovar-tilecutter.tcp: main.load_project
TileCutter : INFO TC:Initialising new TcpReader, file: /home/vladki/simutrans-dev/pak128.dev/lubak-lihovar/lihovar-tilecutter.tcp: tcp.__init__
TileCutter : INFO TC:Loading object from file: tcp.load
TileCutter : DEBUG TC:attempting to load as JSON: tcp.load
Traceback (most recent call last):
  File "/home/vladki/tilecutter/libs/tcui/menuObject.py", line 142, in OnOpenProject
    self.app.OnLoadProject()
  File "/home/vladki/tilecutter/libs/main.py", line 373, in OnLoadProject
    return self.load_project(loadpath)                      # Load the project (returns project object or False depending on success)
  File "/home/vladki/tilecutter/libs/main.py", line 305, in load_project
    project = t_reader.load([self])
  File "/home/vladki/tilecutter/libs/tcp.py", line 98, in load
    loadobj = json.loads(file_content)
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'


Second is that it produces the cut image in some sort of inverse logic. The tile that should be there is completely transparent, while the surroundings are there. Tried with and without transparency, niether worked.

Also while creating the project, it somehow messed up paths to original images, and at first attempt created blank image. Then I entered absolute paths and it worked but produced wrong result as attached.

Geotrans

Quote from: Vladki on November 14, 2020, 03:07:57 PMI have two problems wit the 1.2.1 release on linux.

First it does not load saved project:

I think I have the same Problems:
INFO main.<module>: WX version is: 4.1.0 gtk3 (phoenix) wxWidgets 3.1.4
INFO translator.__init__: Begin loading translation from file: languages/tc_ce.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_fi.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_ko.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_ro.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_cn.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_en.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_es.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_id.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_dk.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_tr.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_fr.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_hr.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_de.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_ja.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_cz.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_hu.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_pl.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_zh.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_nl.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_et.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_sk.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_no.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_lt.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_pt.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_it.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_sv.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_gr.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_ca.tab
INFO translator.__init__: Begin loading translation from file: languages/tc_ru.tab
INFO translator.__init__: Language setting found in config file - Setting active translation to German
INFO main.<module>: configuration source is unix auto location
INFO main.<module>: configuration loaded from file: /home/georg/.tilecutter/tilecutter.config
DEBUG main.<module>: {'debug_on': True, 'debug_level': 2, 'logfile': '/home/georg/.tilecutter/tilecutter.log', 'logfile_platform_default': True, 'transparent': [231, 255, 255], 'transparent_bg': [[153, 153, 153], [103, 103, 103]], 'default_paksize': 64, 'valid_image_extensions': ['.png'], 'OFFSET_NEGATIVE_ALLOWED': False, 'window_size': [1920, 1171], 'window_position': [0, 29], 'window_maximised': True, 'last_save_path': '/home/georg/Win-Shared/Sketchup/Biobauernhof', 'last_image_path': '', 'negative_offset_allowed': False, 'default_image_path': '', 'path_to_makeobj': '/usr/lib/simutrans/', 'write_dat': True, 'default_language': 'German'}
DEBUG main.run: sys.argv says: ['/home/georg/Programme/tilecutter/libs/tilecutter.pyw']
INFO main.run: options: {'pak_output': False, 'dat_output': True, 'cli': False, 'png_directory': None, 'png_filename': None, 'dat_directory': None, 'dat_filename': None, 'pak_directory': None, 'pak_filename': None, 'verbose': None}
INFO main.run: args: []
INFO main.run: Init - Creating app with GUI
INFO main.OnInit: Starting...
INFO main.OnInit: Create default project
DEBUG project.init_save_location: as: <bound method Project.save_location of <project.Project object at 0x7f460a9842e8>>, datfile_location: <bound method Project.datfile_location of <project.Project object at 0x7f460a9842e8>>, pngfile_location: <bound method Project.pngfile_location of <project.Project object at 0x7f460a9842e8>>, pakfile_location: <bound method Project.pakfile_location of <project.Project object at 0x7f460a9842e8>>
INFO main.update_title_text: New title text
DEBUG project.has_changed: Check Project for changes - Project Unchanged
DEBUG main.update_title_text: Setting title_text to: (New Project) - TileCutter
INFO main.OnInit: Show main frame
INFO viewMain.__init__: Creating main frame
INFO menuObject.__init__: Creating menu
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.add_menu_item: Adding item
INFO menuObject.translate: Translating Menu
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO controlSeason.__init__: Create season controls
INFO controlImage.__init__: Creating image controls
INFO controlFacing.__init__: Creating facing direction controls
INFO controlDims.__init__: Create dimension controls
INFO controlOffset.__init__: Creating offset controls
INFO viewImage.__init__: Create image display area
INFO controlImageFile.__init__: Creating image location controls
INFO filePicker.__init__: Create file picker
INFO viewImage.translate: Translate UI
INFO controlImageFile.translate: Translate UI
INFO controlFiles.__init__: Creating files locations controls
INFO filePicker.__init__: Create file picker
INFO viewMain.translate: Translate UI
INFO viewImage.translate: Translate UI
INFO controlImageFile.translate: Translate UI
INFO controlSeason.translate: Translate UI
INFO controlImage.translate: Translate UI
INFO controlFacing.translate: Translate UI
INFO controlDims.translate: Translate UI
INFO controlOffset.translate: Translate UI
INFO controlFiles.translate: Translate UI
INFO menuObject.translate: Translating Menu
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO menuObject.gsc: Keyboard shortcuts
INFO viewMain.set_title: Set new title text
DEBUG viewMain.translate: previous panel size: (907, 785), previous window size: (907, 838)
DEBUG viewMain.translate: minimum panel size is: (907, 785)
DEBUG viewMain.translate: new panel size is: (907, 785), new window size is: (907, 838)
DEBUG main.OnInit: Bind Quit Event
DEBUG main.OnInit: Init window sizes
DEBUG main.OnInit: Init window position
DEBUG main.OnInit: Completed!
INFO viewMain.update: Update UI
INFO controlSeason.update: Update controls
INFO controlImage.update: Update controls
INFO controlFacing.update: Update controls
DEBUG controlFacing.update: self.app.activeproject.directions = 1
INFO controlDims.update: Update controls
INFO controlDims.OnPaksizeSelect: Changed Paksize
INFO controlOffset.update: Update controls
INFO controlFiles.update: Update paths
INFO viewImage.update: Update controls and context
INFO controlImageFile.update: Update controls
INFO viewImage.OnPaint: Painting
INFO viewImage.refresh_screen: Update view
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
DEBUG viewImage.refresh_screen: Done
INFO viewImage.OnPaint: Painting
INFO viewImage.refresh_screen: Update view
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
DEBUG viewImage.refresh_screen: Done
INFO menuObject.OnOpenProject: Menu-File-> Open Project
INFO main.OnLoadProject: Loading project
DEBUG project.has_changed: Check Project for changes - Project Unchanged
INFO main.dialog_load: Opening Load Dialog to allow location picking
INFO viewImage.OnPaint: Painting
INFO viewImage.refresh_screen: Update view
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
DEBUG viewImage.refresh_screen: Done
DEBUG main.dialog_load: directory: /daten_ssd/Simutrans_Sourcen/2021/Factory/Biohof, filename: biohof.tcp
DEBUG main.dialog_load: User picked location: /daten_ssd/Simutrans_Sourcen/2021/Factory/Biohof/biohof.tcp
DEBUG main.OnLoadProject: Load dialog returned a path: /daten_ssd/Simutrans_Sourcen/2021/Factory/Biohof/biohof.tcp
INFO main.load_project: Load project from file: /daten_ssd/Simutrans_Sourcen/2021/Factory/Biohof/biohof.tcp
INFO tcp.__init__: Initialising new TcpReader, file: /daten_ssd/Simutrans_Sourcen/2021/Factory/Biohof/biohof.tcp
INFO tcp.load: Loading object from file
DEBUG tcp.load: attempting to load as JSON
DEBUG tcp.load: JSON load successful, attempting to load in object
DEBUG project.save_location: Set to /daten_ssd/Simutrans_Sourcen/2021/Factory/Biohof/biohof.tcp
DEBUG project.on_change: Root on_change triggered, sending message to App
INFO main.update_title_text: New title text
DEBUG project.has_changed: Check Project for changes - Project Unchanged
DEBUG main.update_title_text: Setting title_text to: (New Project) - TileCutter
INFO viewMain.set_title: Set new title text
INFO viewMain.update: Update UI
INFO controlSeason.update: Update controls
INFO controlImage.update: Update controls
INFO controlFacing.update: Update controls
DEBUG controlFacing.update: self.app.activeproject.directions = 1
INFO controlDims.update: Update controls
INFO controlDims.OnPaksizeSelect: Changed Paksize
INFO controlOffset.update: Update controls
INFO controlFiles.update: Update paths
INFO viewImage.update: Update controls and context
INFO controlImageFile.update: Update controls
DEBUG project.load_dict: Processing node with key value: images
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: [[[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_2.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_4.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_3.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]]]
DEBUG project.load_dict: Validation succeeds, using value: [[[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_2.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_4.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_3.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]]] from input
DEBUG project.load_dict: Processing node with key value: transparency
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: True
DEBUG project.load_dict: Validation succeeds, using value: True from input
DEBUG project.load_dict: Processing node with key value: dims
DEBUG project.load_dict: Dict-type object in both validators and input, recursing to process subset of keys: {'directions': 4, 'frames': 1, 'frontimage': 0, 'paksize': 64, 'seasons': {'autumn': 0, 'snow': 0, 'spring': 0, 'winter': 0}, 'x': 6, 'y': 4, 'z': 1}
DEBUG project.load_dict: Processing node with key value: x
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 6
DEBUG project.load_dict: Validation succeeds, using value: 6 from input
DEBUG project.load_dict: Processing node with key value: y
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 4
DEBUG project.load_dict: Validation succeeds, using value: 4 from input
DEBUG project.load_dict: Processing node with key value: z
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 1
DEBUG project.load_dict: Validation succeeds, using value: 1 from input
DEBUG project.load_dict: Processing node with key value: paksize
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 64
DEBUG project.load_dict: Validation succeeds, using value: 64 from input
DEBUG project.load_dict: Processing node with key value: directions
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 4
DEBUG project.load_dict: Validation succeeds, using value: 4 from input
DEBUG project.load_dict: Processing node with key value: frames
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 1
DEBUG project.load_dict: Validation succeeds, using value: 1 from input
DEBUG project.load_dict: Processing node with key value: seasons
DEBUG project.load_dict: Dict-type object in both validators and input, recursing to process subset of keys: {'autumn': 0, 'snow': 0, 'spring': 0, 'winter': 0}
DEBUG project.load_dict: Processing node with key value: snow
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 0
DEBUG project.load_dict: Validation succeeds, using value: 0 from input
DEBUG project.load_dict: Processing node with key value: autumn
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 0
DEBUG project.load_dict: Validation succeeds, using value: 0 from input
DEBUG project.load_dict: Processing node with key value: winter
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 0
DEBUG project.load_dict: Validation succeeds, using value: 0 from input
DEBUG project.load_dict: Processing node with key value: spring
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 0
DEBUG project.load_dict: Validation succeeds, using value: 0 from input
DEBUG project.load_dict: Done processing this level, returning properties dict: {'snow': 0, 'autumn': 0, 'winter': 0, 'spring': 0}
DEBUG project.load_dict: Processing node with key value: frontimage
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: 0
DEBUG project.load_dict: Validation succeeds, using value: 0 from input
DEBUG project.load_dict: Done processing this level, returning properties dict: {'x': 6, 'y': 4, 'z': 1, 'paksize': 64, 'directions': 4, 'frames': 1, 'seasons': {'snow': 0, 'autumn': 0, 'winter': 0, 'spring': 0}, 'frontimage': 0}
DEBUG project.load_dict: Processing node with key value: files
DEBUG project.load_dict: Dict-type object in both validators and input, recursing to process subset of keys: {'datfile_location': 'biohof.dat', 'datfile_write': True, 'pakfile_location': '', 'pngfile_location': 'biohof.png'}
DEBUG project.load_dict: Processing node with key value: datfile_location
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: biohof.dat
DEBUG project.load_dict: Validation succeeds, using value: biohof.dat from input
DEBUG project.load_dict: Processing node with key value: datfile_write
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: True
DEBUG project.load_dict: Validation succeeds, using value: True from input
DEBUG project.load_dict: Processing node with key value: pngfile_location
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: biohof.png
DEBUG project.load_dict: Validation succeeds, using value: biohof.png from input
DEBUG project.load_dict: Processing node with key value: pakfile_location
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data:
DEBUG project.load_dict: Validation succeeds, using value:  from input
DEBUG project.load_dict: Done processing this level, returning properties dict: {'datfile_location': 'biohof.dat', 'datfile_write': True, 'pngfile_location': 'biohof.png', 'pakfile_location': ''}
DEBUG project.load_dict: Processing node with key value: dat
DEBUG project.load_dict: Dict-type object in both validators and input, recursing to process subset of keys: {'dat_lump': 'name=Biohof\nObj=factory\nDistributionWeight=1\nProductivity=28\nRange=5\nelectricity_boost=100\npassenger_boost=500\nmail_boost=200\nmax_fields=15\nmin_fields=5\nprobability_to_spawn=100\npax_level=3\nneeds_ground=1\nMapColor=95\nLocation=Land\ncopyright=Daniel P./Geotrans\nclimates=mediterran,temperate\nanimation_time=1000\nfields[1]=cow_fields\nproduction_per_field[1]=2\nspawn_weight[1]=50\nfields[0]=gemuese_fields\nproduction_per_field[0]=2\nspawn_weight[0]=50\nOutputGood[1]=Schlachtvieh\nOutputFactor[1]=80\nOutputCapacity[1]=300\nOutputGood[2]=milk\nOutputFactor[2]=110\nOutputCapacity[2]=300\nOutputGood[0]=Gemuese\nOutputFactor[0]=60\nOutputCapacity[0]=200'}
DEBUG project.load_dict: Processing node with key value: dat_lump
DEBUG project.load_dict: Callable object in validators dict, this is a node, running validation on data: name=Biohof
Obj=factory
DistributionWeight=1
Productivity=28
Range=5
electricity_boost=100
passenger_boost=500
mail_boost=200
max_fields=15
min_fields=5
probability_to_spawn=100
pax_level=3
needs_ground=1
MapColor=95
Location=Land
copyright=Daniel P./Geotrans
climates=mediterran,temperate
animation_time=1000
fields[1]=cow_fields
production_per_field[1]=2
spawn_weight[1]=50
fields[0]=gemuese_fields
production_per_field[0]=2
spawn_weight[0]=50
OutputGood[1]=Schlachtvieh
OutputFactor[1]=80
OutputCapacity[1]=300
OutputGood[2]=milk
OutputFactor[2]=110
OutputCapacity[2]=300
OutputGood[0]=Gemuese
OutputFactor[0]=60
OutputCapacity[0]=200
DEBUG project.load_dict: Validation succeeds, using value: name=Biohof
Obj=factory
DistributionWeight=1
Productivity=28
Range=5
electricity_boost=100
passenger_boost=500
mail_boost=200
max_fields=15
min_fields=5
probability_to_spawn=100
pax_level=3
needs_ground=1
MapColor=95
Location=Land
copyright=Daniel P./Geotrans
climates=mediterran,temperate
animation_time=1000
fields[1]=cow_fields
production_per_field[1]=2
spawn_weight[1]=50
fields[0]=gemuese_fields
production_per_field[0]=2
spawn_weight[0]=50
OutputGood[1]=Schlachtvieh
OutputFactor[1]=80
OutputCapacity[1]=300
OutputGood[2]=milk
OutputFactor[2]=110
OutputCapacity[2]=300
OutputGood[0]=Gemuese
OutputFactor[0]=60
OutputCapacity[0]=200 from input
DEBUG project.load_dict: Done processing this level, returning properties dict: {'dat_lump': 'name=Biohof\nObj=factory\nDistributionWeight=1\nProductivity=28\nRange=5\nelectricity_boost=100\npassenger_boost=500\nmail_boost=200\nmax_fields=15\nmin_fields=5\nprobability_to_spawn=100\npax_level=3\nneeds_ground=1\nMapColor=95\nLocation=Land\ncopyright=Daniel P./Geotrans\nclimates=mediterran,temperate\nanimation_time=1000\nfields[1]=cow_fields\nproduction_per_field[1]=2\nspawn_weight[1]=50\nfields[0]=gemuese_fields\nproduction_per_field[0]=2\nspawn_weight[0]=50\nOutputGood[1]=Schlachtvieh\nOutputFactor[1]=80\nOutputCapacity[1]=300\nOutputGood[2]=milk\nOutputFactor[2]=110\nOutputCapacity[2]=300\nOutputGood[0]=Gemuese\nOutputFactor[0]=60\nOutputCapacity[0]=200'}
DEBUG project.load_dict: Done processing this level, returning properties dict: {'images': [[[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_2.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_4.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]], [[[{'offset': [0, 1], 'path': '../../../../../home/georg/Win-Shared/Sketchup/Biobauernhof/Biohof_135_3.png'}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]], [[{'offset': [0, 0], 'path': ''}, {'offset': [0, 0], 'path': ''}]]]], 'transparency': True, 'dims': {'x': 6, 'y': 4, 'z': 1, 'paksize': 64, 'directions': 4, 'frames': 1, 'seasons': {'snow': 0, 'autumn': 0, 'winter': 0, 'spring': 0}, 'frontimage': 0}, 'files': {'datfile_location': 'biohof.dat', 'datfile_write': True, 'pngfile_location': 'biohof.png', 'pakfile_location': ''}, 'dat': {'dat_lump': 'name=Biohof\nObj=factory\nDistributionWeight=1\nProductivity=28\nRange=5\nelectricity_boost=100\npassenger_boost=500\nmail_boost=200\nmax_fields=15\nmin_fields=5\nprobability_to_spawn=100\npax_level=3\nneeds_ground=1\nMapColor=95\nLocation=Land\ncopyright=Daniel P./Geotrans\nclimates=mediterran,temperate\nanimation_time=1000\nfields[1]=cow_fields\nproduction_per_field[1]=2\nspawn_weight[1]=50\nfields[0]=gemuese_fields\nproduction_per_field[0]=2\nspawn_weight[0]=50\nOutputGood[1]=Schlachtvieh\nOutputFactor[1]=80\nOutputCapacity[1]=300\nOutputGood[2]=milk\nOutputFactor[2]=110\nOutputCapacity[2]=300\nOutputGood[0]=Gemuese\nOutputFactor[0]=60\nOutputCapacity[0]=200'}}
WARNING tcp.load: Loading as JSON failed, attempting to load as pickle (legacy format)
WARNING tcp.unpickle_object: pickle-style .tcp projects are considered a legacy format!
ERROR tcp.load: Loading as pickle also fails, this isn't a valid .tcp file!
ERROR tcp.load: Traceback (most recent call last):
  File "/home/georg/Programme/tilecutter/libs/tcp.py", line 106, in load
    main, _, _ = version
ValueError: not enough values to unpack (expected 3, got 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/georg/Programme/tilecutter/libs/tcp.py", line 116, in load
    legacyobj = self.unpickle_object(file_content)
  File "/home/georg/Programme/tilecutter/libs/tcp.py", line 184, in unpickle_object
    obj = pickle.loads(pickle_str)
_pickle.UnpicklingError: invalid load key, '{'.

ERROR main.load_project: Loading failed!
INFO viewMain.set_status_text: setting field: 0 to string: ERROR: Failed to load project!
INFO viewImage.OnPaint: Painting
INFO viewImage.refresh_screen: Update view
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
DEBUG viewImage.refresh_screen: Done
INFO viewImage.OnPaint: Painting
INFO viewImage.refresh_screen: Update view
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
INFO viewImage.tile_to_screen: Converting tile coords to screen coords
DEBUG viewImage.refresh_screen: Done


The second problem is false images after cutting:




with tilecutter 0.6.1 it works:


pleas let me know if you need further informatione.

_Hajo_

Similarily to the former two posters I have a problem with Tilecutter 1.2.1 on Linux.

I'm working on a 48 pixel pak set. The attached image should tile nicely as 2x2 building in 48 pixel raster, but the png and dat files that Tilecutter produces do not result in proper display in the game.

prissi

Tilecutter is also broken for me. I still use the old version 0.3d, which works correctly. But so does https://forum.simutrans.com/index.php/topic,9111.0.html It seems to run also with a more modern python.

Looking through the hard disk, I found also a java utility tilemaster from you. I am not sure if it actually cuts tiles though.

KneeOn

Sadly the windows link is dead on there.

_Hajo_

Quote from: prissi on January 17, 2022, 12:13:21 PM
Looking through the hard disk, I found also a java utility tilemaster from you. I am not sure if it actually cuts tiles though.

I had written a plugin to cut 2x2 and 3x3 tiles, but I as far as I can emember, there were bugs in it.The official Tilecutter seemed to be more powerful, so I tried that. I can try to fix the plugins, but I don't want to bring up competition. Tilecutter was around so long and used so widely.

An_dz

Sorry for taking so long. I promised that I would fix this so here's the update that finally puts TileCutter to a working state. Do note that wxPython 4.1.1 seems to have another bug on the cutting, so stick with 4.1.0.

As for not loading older projects, please point to the file that is not loading as I don't have one here that fails.

https://github.com/An-dz/tilecutter/releases/

_Hajo_

Thank you. I've downloaded TileCutter 1.2.2 and a first test on Windows was successful (a 2x2 building with transparent (alpha) background.