Jump to content

Error in the Summary window (Resources tab) after adding 5 resources.[SOLVED]


mod_3d
 Share

Recommended Posts

The resource was added according to the official tutorial (adding a new resource to the game) and in the game behaves correctly, but in the summary window there is an error.

resources_error.thumb.png.9ec285b91b1e9470a9b23e3fd7fb7001.png

Edited by mod_3d
Link to comment
Share on other sites

  • mod_3d changed the title to Error in the Summary window (Resources tab) after adding 5 resources.[SOLVED]

Bug fix.

Modify the files in the summary folder by path:

gui/summary

summary.js file

var g_MaxHeadingTitle = 9; replace the value with 10 (if 1 new resource is added)

 

summary.xml file

there are several such lines

<repeat var="x" count="9"> replace value by 10(if 1 new resource is added)

Link to comment
Share on other sites

I believe they are saying the docs might be outdated rather than a bug in the code itself. They added a new resource following the docs, and some information was missing, causing errors.

  • Like 1
Link to comment
Share on other sites

On 27/04/2024 at 11:51 AM, mod_3d said:

Steps when adding a resource and a mod file:

new_resource.thumb.png.7ad3f75c34244e90d45ba63f11770d78.png

 

3 hours ago, Stan&#x60; said:

I believe they are saying the docs might be outdated rather than a bug in the code itself. They added a new resource following the docs, and some information was missing, causing errors.

Indeed, for there is no longer a "gui/common/setup_resources.xml" file, but an entire folder instead. Just one example.

And then, how and what to edit in the listed files? Just says to edit them, but not in what way or which lines. 

 

Link to comment
Share on other sites

The screenshot of the tutorial , was shown only for general understanding, where the information was taken from while adding the resource to the game.

 

gui/summary

is the folders in the mod the full path may look like this:

summary.thumb.png.ff65da0cf06e7ec3db6e8be5e67fa5fc.png

 

summary.js file

/home/.local/share/0ad/mods/Name of your mod/gui/summary/summary.js

var g_MaxHeadingTitle = 9; replace the value with 10 (if 1 new resource is added)

summary.js.thumb.png.aac864a6692483ccf7fd95333103411c.png

 

summary.xml file

/home/.local/share/0ad/mods/Name of your mod/gui/summary/summary.xml

<repeat var=“x” count=“9”> replace value by 10(if 1 new resource is added)

there are 5 such lines in the file

summaryxml.thumb.png.f2a771d14d596cd0cff8c8053a8adb98.png

  • Like 1
Link to comment
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
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.

 Share

×
×
  • Create New...