bugLordsAWar! - Bugs: bug #63790, 0.3.3-pre2: loading maps or saved...

 
 

bug #63790: 0.3.3-pre2: loading maps or saved games with MAP rewards is broken

Submitter:  Oliver Muth <samwise>
Submitted:  Sat 11 Feb 2023 01:25:14 PM UTC
   
 
Category:  game Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 11 Feb 2023 01:25:14 PM UTC, original submission:  

Whenever a map or a saved game containing ruins with map rewards is loaded, the origin (x,y) of the reward map gets garbled.

Creating a ruin with a reward of type Reward::MAP works fine. Also, when starting a new game with random ruins and random rewards any auto-generated maps look OK.
However, as soon as the map or the saved game is reloaded the x and y parameters of any reward map in the file become garbled.
It looks like an index is off by 1, thus putting the numbers into the wrong vars. x becomes y, and y gets a high number, putting the map origin outside the game map. So your hero gets a map that shows... nothing.

How to reproduce the error:

Create a ruin with a reward of type Reward::MAP, define x, y, width and height. Save the map.
Or:
Start a game with a random map and auto-generated ruins (most likely some will have a map reward).
Save the game.

The sections defining the maps will look like this:

<reward>
  <d_type>Reward::MAP</d_type>
  <d_name></d_name>
  <sightmap>
    <d_name></d_name>
    <d_x>29</d_x>
    <d_y>31</d_y>
    <d_width>15</d_width>
    <d_height>15</d_height>
  </sightmap>
</reward>

Leave the game or Scenario Builder, re-open and load the saved game or the saved map, or create a new game from the saved map.
Save the game without any moves or the unchanged map.

Now these sections look like this:

<reward>
  <d_type>Reward::MAP</d_type>
  <d_name></d_name>
  <sightmap>
    <d_name></d_name>
    <d_x>31</d_x>
    <d_y>21924</d_y>
    <d_width>15</d_width>
    <d_height>15</d_height>
  </sightmap>
</reward>

It makes no difference whether the "name" field is empty or not.

Oliver Muth <samwise>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by samwise (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code