Page 1 of 1

[SOLVED] Problem with "installing" a tileset

Posted: Tue Jun 11, 2019 9:59 am
by Corbeau
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?

Re: Problem with "installing" a tileset

Posted: Tue Jun 11, 2019 11:18 am
by cazfi
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.

Re: Problem with "installing" a tileset

Posted: Tue Jun 11, 2019 11:34 am
by Corbeau
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"

Re: Problem with "installing" a tileset

Posted: Tue Jun 11, 2019 11:52 am
by Corbeau
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.

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

Posted: Tue Jun 11, 2019 12:11 pm
by Corbeau
While we're at it, does Freeciv code support extending the image size. Meaning, having more than 20 columns and going past x=19 ?

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

Posted: Tue Jun 11, 2019 1:37 pm
by Ignatus
Likely yes. I have not tried but AFAIK nobody have put any limitations as long as PNG allows images this big.

Re: Problem with "installing" a tileset

Posted: Tue Jun 11, 2019 5:03 pm
by cazfi
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.

Re: Problem with "installing" a tileset

Posted: Tue Jun 11, 2019 5:56 pm
by Corbeau
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.

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

Posted: Tue Jun 11, 2019 7:50 pm
by cazfi
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"

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

Posted: Tue Jun 11, 2019 9:39 pm
by Corbeau
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.