[SOLVED] Problem with "installing" a tileset

Contribute, display and discuss art and tilesets for use in Freeciv here.
User avatar
Corbeau
Elite
Posts: 991
Joined: Mon Jan 13, 2014 11:13 pm

[SOLVED] Problem with "installing" a tileset

Postby Corbeau » Tue Jun 11, 2019 9:59 am

So...

I have a units.png and units.spec files sorted out, new units are referenced by their positions in the .png file. They are also referenced in the units.ruleset with alt entries, for example:

Code: Select all

graphic       = "u.raiders"
graphic_alt   = "u.warriors"


so if something is wrong, the Warrior graphic should be showing.

But it isn't. What I'm seeing is an "invisible unit", no graphic from unit.png is showing, but the nation shield, health bar and rank are showing (see attachment). Also, the img isn't showing in Civipedia,neither in the Units section nor in the tech tree section.

The person who created new units has no such problems.

Any ideas?
Attachments
invisible.png
invisible.png (13.7 KiB) Viewed 338 times
Last edited by Corbeau on Tue Jun 11, 2019 11:53 am, edited 1 time in total.

cazfi
Elite
Posts: 1709
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem with "installing" a tileset

Postby cazfi » Tue Jun 11, 2019 11:18 am

Corbeau wrote:new units are referenced by their positions in the .png file.

Are the positions correct? Note that the row and column numbers start from 0 ("how many rows/columns from the beginning this row/column is?") If you are not getting an error message, I suspect that you are referencing to an empty part of the .png.

User avatar
Corbeau
Elite
Posts: 991
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem with "installing" a tileset

Postby Corbeau » Tue Jun 11, 2019 11:34 am

I checked that first and it seems fine. For the record, Warriors and Musketeers are showing nicely.

Code: Select all

  0, 18, "u.warriors"
  0, 19, "u.musketeers"
 
  (...)
 
  1, 18, "u.raiders"
  1, 19, "u.arquebusiers"
 
  (...)
 
  2, 18, "u.militia"
  2, 19, "u.skirmishers"
Attachments
units.png

User avatar
Corbeau
Elite
Posts: 991
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem with "installing" a tileset

Postby Corbeau » Tue Jun 11, 2019 11:52 am

Hmmm... Problem solved, effectively. It seems that I can't just ADD another tileset (folder and -spec files) - or, more likely, I can, but some additional files need to be set up - but when I simply pushed the new stuff into the Trident folder, it worked.

User avatar
Corbeau
Elite
Posts: 991
Joined: Mon Jan 13, 2014 11:13 pm

Re: [SOLVED] Problem with "installing" a tileset

Postby Corbeau » Tue Jun 11, 2019 12:11 pm

While we're at it, does Freeciv code support extending the image size. Meaning, having more than 20 columns and going past x=19 ?

Ignatus
Hardened
Posts: 200
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: [SOLVED] Problem with "installing" a tileset

Postby Ignatus » Tue Jun 11, 2019 1:37 pm

Likely yes. I have not tried but AFAIK nobody have put any limitations as long as PNG allows images this big.

cazfi
Elite
Posts: 1709
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem with "installing" a tileset

Postby cazfi » Tue Jun 11, 2019 5:03 pm

Corbeau wrote:I can't just ADD another tileset (folder and -spec files) - or, more likely, I can, but some additional files need to be set up.
.spec files to load are listed in the .tilespec file.

User avatar
Corbeau
Elite
Posts: 991
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem with "installing" a tileset

Postby Corbeau » Tue Jun 11, 2019 5:56 pm

cazfi wrote:
Corbeau wrote:I can't just ADD another tileset (folder and -spec files) - or, more likely, I can, but some additional files need to be set up.
.spec files to load are listed in the .tilespec file.

Actually, I did that. I created trident_sim/ folder (copy of trident/), did everything there, then created trident_sim.tilespec (again, copy of trident.tilespec) and replaced all instances of "trident/" with "trident_sim/". Still didn't work.

But that was after some other meddling so I was slowly giving up and maybe I missed something. Will give it another try later.

cazfi
Elite
Posts: 1709
Joined: Tue Jan 29, 2013 6:54 pm

Re: [SOLVED] Problem with "installing" a tileset

Postby cazfi » Tue Jun 11, 2019 7:50 pm

Also .spec files tell which .png file they describe. Is it possible that you had not updated those references in your copy, but .specs were still referring to trident/*.png?

Code: Select all

[file]
gfx = "trident/units"
->

Code: Select all

[file]
gfx = "trident_sim/units"

User avatar
Corbeau
Elite
Posts: 991
Joined: Mon Jan 13, 2014 11:13 pm

Re: [SOLVED] Problem with "installing" a tileset

Postby Corbeau » Tue Jun 11, 2019 9:39 pm

cazfi wrote:Also .spec files tell which .png file they describe. Is it possible that you had not updated those references in your copy, but .specs were still referring to trident/*.png?

Code: Select all

[file]
gfx = "trident/units"
->

Code: Select all

[file]
gfx = "trident_sim/units"


Bingo!

Thanks again. Mystery solved.

I wasn't even looking at that part. I didn't expect a file would specify a path when pointing to another file in the same directory.