What is the purpose of the "pictures=" parameter in certain graphics conf files?

Asked by Chuck Wilder

While reviewing the conf files of numerous graphic objects, I note that some, but not all, farm "field" and "resi_x" pngs as well as the "ashes", "destroyed_building" and "ship_construction" graphics contain a "pictures=" parameter that references a single image file. (For example the parameter is found in the conf files for the empire field0, field0s and field0t objects, but not in the field1 and field 2 objects.)

The file referenced is typically the idle_00.png or its equivalent.

With a conversion to spritemaps which can yield one image map file v.s. multiple single images, the need for support of this picture parameter comes into question.

So, what does/did it do? Is it still needed?

Question information

Language:
English Edit question
Status:
Solved
For:
widelands Edit question
Assignee:
No assignee Edit question
Solved by:
SirVer
Solved:
Last query:
Last reply:
Revision history for this message
SirVer (sirver) said :
#1

I think you mean 'pics='. This is an optional field that can be skipped - if not present, the default "<sectionname>_??" will be used. So if the section is [idle], than pics is implicitly pics=idle_??.png. This was a bad design decision - it would have been better if we did not allow to change the names of the images and always used the default.

I'd like to get rid of this parameter completely if possible - for the packed animations, we can use animations.png. This fits in with the menu.png that we have all over the place already. What do you think?

Revision history for this message
Chuck Wilder (chuckw20) said :
#2

Thanks for your answer, however it is the "picture=" parameter I question
as found in the current release's conf file for the barbarian field0 object:
-----------------------------------------------------------------------
size=small
program=program
picture=field0m_00.png

[program]
animate=midd 50000
transform=field1

[midd]
pics=field0m_??.png
fps=5
hotspot=15 12

---------------------------------------------------------

>I'd like to get rid of this parameter completely if possible - for the
>packed animations, we can use animations.png. This fits in with the
>menu.png that we have all over the place already. What do you think?

I am of two minds about it. Today, unless one sees a file within its
context (i.e. pathname or parent folder) you don't know what you have until
you open it. Whereas with a more descriptive name (possibly prefixed or
suffixed with the object name) it can be recognized as a stand-alone.

On the other hand, there is always a strong argument for standardization.

The spritemap concept pushes me more toward unique naming because,
conceivably, one container could hold ALL of the images associated with an
object and dispense with the need of a folder hierarchy. Which may or may
not be a good thing depending on existing assumptions.

On Fri, Mar 29, 2013 at 12:56 PM, SirVer <
<email address hidden>> wrote:

> Your question #225437 on widelands changed:
> https://answers.launchpad.net/widelands/+question/225437
>
> Status: Open => Answered
>
> SirVer proposed the following answer:
> I think you mean 'pics='. This is an optional field that can be skipped
> - if not present, the default "<sectionname>_??" will be used. So if the
> section is [idle], than pics is implicitly pics=idle_??.png. This was a
> bad design decision - it would have been better if we did not allow to
> change the names of the images and always used the default.
>
> I'd like to get rid of this parameter completely if possible - for the
> packed animations, we can use animations.png. This fits in with the
> menu.png that we have all over the place already. What do you think?
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/widelands/+question/225437/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/widelands/+question/225437
>
> You received this question notification because you asked the question.
>

Revision history for this message
Best SirVer (sirver) said :
#3

Oh, I am sorry. These seem to be only used in the Editor (for animals, and immovables like trees) for the menu so that the user knows what is clickable - I think they can be removed too (in the spritemap branch this should be pretty easy), but it needs some coding - maybe turning this into a bug report?

Revision history for this message
Chuck Wilder (chuckw20) said :
#4

Thanks SirVer, that solved my question.

Revision history for this message
Chuck Wilder (chuckw20) said :
#5

That supports my suspicions about the parameter. I will submit a bug report to have it addressed in the spritemaps effort.

Thanks.