• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Adding a simple query to a self made farm field?

Started by FrankU, March 22, 2011, 09:22:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FrankU

I am working on a quite large project considering a fairly large amount of new farm lots and the belonging farm fields.
There is just one thing that bothers me: my fields do not show any query. But I'd like to add one that says what crop is growing on the field. Nothing fancy, just a simple text. Could someone give me a clue to how I can accomplish this?

I made the fields in PIM-X. I dragged a blank prop onto the "Agricultural field" property. This gave me a desc-file. I then clicked on the option: make a growable lot. Then Lot Editor and then I put existing props on the field. Sometimes the fields that grew showed a query with the name (probably the query is part of the prop exemplar?), sometimes they didn't. I'd like to have a query with my own text in it. Do I need to make a new exemplar? And if yes, what should I edit or add for the new query?

Simcitler

If I understand you correctly:
Open PIM-X; select the "agricultural field" you want to add a "name"; right click; select "convert Item/Exemplar name to LTEXT" (don't know how it is called in english exactly) ; ->SAVE ; underneath a green bar you'll find "User Visible Name Key" double click it and fill in what ever you want to appear ingame.
You can add different LTEXTs for different languages by right click and "add LTEXTs for User Visible Name Key"

Hope that helps!
~Simcitler

FrankU

Well, I don't know if you understood me or not. It did not work.
Funny enough.

I think there is something weird with agricultural fields. Normally a building shows indeed the Ltext file if queried. Somehow I have the idea that this does not work with agricultural fields. Art least not in this case.
Also the props don't show their own name when queried.

Do I overlook something? I feel stupid, because I guess the answer is simple, but somehow I don't see it.

Andreas

#3
Unfortunately, PIM-X seems to have a slight bug when creating custom fields, which makes them basically useless in the game. I had a pretty hard time when creating the SFBT Vineyards a few months ago, and finally found the culprit after lots of comparing (see here: http://sc4devotion.com/forums/index.php?topic=11981.msg364131#msg364131). It's an easy fix that can be done in the Reader. Apart from that, have a very good look at the vineyard lots, then you should be able to replicate what I did.
Andreas

FrankU

Hi Andreas,

That I know. As you could have seen, because I replied in that thread. This problem is overcome and my farm fields grow where I want them and they look the way I want them. There is just something very funny with the queries.
Sometimes when I query a lot I see the name of the prop. On other lots this does not happen. On certain other lots I query and get the name of the lot (building or lot exemplar?). On some lots I only see that the land is assigned to farms.

I guess this makes not much sense to you. I have to investigate furter.

Anyway, there are:
1. The building exemplar with an exemplar name,
2. the lot exemplar with an exemplar name and
3. the prop exemplar with an exemplar name.

Then there are exemplars that have a "user visible name key" entry, and some don't.
Som have an Ltext file with a name, and some don't.

It's really not very simple here!

I just want one thing: when I click/query my farm field I want to see the name that I want to! How to accomplish this?

Andreas

#5
I didn't check the replies in said thread, but just used the search feature to find my posting. Well, good to know that you were aware of said issue. :)

As for the descriptions, there are two kinds of query, the query window (referenced via the "Query exemplar GUID" property) that appears when clicking the lot with the query tool, and the hover query, that appears when hovering the cursor with the query tool activated. The name that appears in the query window is the name that is assigned in the building exemplar file, either via an "Item Name" property (directly inside the exemplar file) or an LTEXT file that is referenced via the "User Visible Name Key" property. I recommend using an LTEXT file rather than the "Item Name" property, since it supports multiple languages, accented characters and such.

The hover query is controlled by the prop exemplar file. You can either use the same name that is assigned to the building, this can be achieved by adding a "User Visible Name Key" property, set the IDs to "0x00000000, 0x00000000, 0x00000000", and set "Query as main building" to "True" (0x01). If you want a separate caption (say, "Sunflowers", "Wheat" and such), add an LTEXT file, put the ID of that in the "User Visible Name Key" property, and set "Query as main building" to "False" (0x00).
Andreas

FrankU

Hi Andreas,

You helped me out.
The first query you meant, the one you should get when you click the lot, does not appear. Propably because ther is none made for these lots. Isn't there a standard maxis query for this? At the moment I have no idea how I should add such query, and I will leave this issue as is.

Anyway, I decided to use the hover query for the name I want. The props show the name of the building now. Very nice. And one nice thing: when the field is empty, because it's winter and the seasonal crops are not there, there is nothing to hover, so no info. And that is exactly what is going on. The query shows the crops that grow: in winter nothing grows, so no query info. Just the fact that the field is assigned to farming.

Very nice and thanks for your help!

Andreas

I don't know if there's a Maxis UI for the farm fields, but I figure you could pick any of the available UIs and edit it to your liking, assign a new ID and add it via the "Query exemplar GUID" property in the building exemplar file of the farm field. This is what I have done for the SFBT vineyards.
Andreas