[SOLVED] Problem with "installing" a tileset

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

[SOLVED] Problem with "installing" a tileset

Post 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?
Attachments
invisible.png
invisible.png (13.7 KiB) Viewed 8484 times
Last edited by Corbeau on Tue Jun 11, 2019 11:53 am, edited 1 time in total.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem with "installing" a tileset

Post 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.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem with "installing" a tileset

Post 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"
Attachments
units.png
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem with "installing" a tileset

Post 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.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

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

Post 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 ?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

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

Post by Ignatus »

Likely yes. I have not tried but AFAIK nobody have put any limitations as long as PNG allows images this big.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem with "installing" a tileset

Post 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.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem with "installing" a tileset

Post 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.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

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

Post 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"
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

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

Post 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.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Post Reply