Jump to content
Age of History
Marerjh

The map editor does not respect resource IDs specified in Resources.json

Recommended Posts

If you specify random IDs for resources in the Resources.json and then assign these resources to provinces, the editor will assign the wrong resources to the provinces.

Example of Resources.json:
Resource1, ID 0
Resource2, ID 214
Resource3, ID 2

In the map editor, these resources will be placed in a list, and their IDs will depend on their position in the list. (Indexing starts at 0, obviously)
0. Resource1, ID 0
1. Resource2, ID 1
2. Resource3, ID 2

When I assign Resource2 to a province, the game will record that this province contains resource ID 1, not resource ID 214.
This results in:

  • The game misunderstands what resource is available in the province
  • Incorrect resource icon
  • Complicates the work for the creators of modifications. If I want to remove just one original resource, I need to change the IDs for all the other resources, as well as change the icon names, and the link between resource buildings and the resource.

Also, the game seems to completely ignore the ImageID, instead using the false resource ID to choose the icon. The game should either respect the values specified by the human or not allow them to be changed at all. 

Here i removed some original resources:

image.png.73e4f121e71e5b6ff210122ae2e35ebe.png

Edited by Marerjh

Share this post


Link to post
Share on other sites

P.S. I'm not sure, but it seems that the game code provides the ability to assign custom indexes to buttons («setCurrent» function). If «Current» value does not affect the position of the button in the list, then I think it will be enough to change the function argument from «i» to «ListResources.get(i).ID»🤔

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Age of History Games