Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reading from the original unmodified tilemap #570

Open
ohrrpgce-bugbot opened this issue Jan 16, 2008 · 8 comments
Open

reading from the original unmodified tilemap #570

ohrrpgce-bugbot opened this issue Jan 16, 2008 · 8 comments
Labels
new feature Something new that we would like to add scripts Script commands or interpreter. See also "hspeak" or "script import" labels

Comments

@ohrrpgce-bugbot
Copy link

[bz#570]

In relation to the bug I just filed Bug bz⁠#569, I thought a good remedy to the for/do problem with the chain of "write map blocks" would be to write the hard coded tile for that same position on the new map to fix the wrecked tile.

Problem is, the only two commands I could find in the plotscript dictionary that could use "set variable" to overwrite the bad tile (read map block and current display tile, which are both frighteningly similar) only read what's written there now, not what's originally placed there in CUSTOM.

So I'd like to see a plotscript command that can read a map block based on what's in the tileset (for that position), not what's on the map.

read tile (x,y,layer) maybe?
read from tileset (x,y,layer)?

Anything like this will increase flexibility on the matter.

From: Jeremy Bursey <zippywings>
Operating system: Windows XP
Severity: feature request

@ohrrpgce-bugbot
Copy link
Author

Comment author: @bob-the-hamster

I am slightly confused by this request.

"tileset" is the palette of available tiles from which a tilemap is built... but from the context it sounds like you are using the word "tileset" to talk about the "tilemap"... but I am not sure... Can you clarify?

@ohrrpgce-bugbot
Copy link
Author

Comment author: Jeremy Bursey <zippywings>

Okay, to elaborate, my understanding of "read map block" is that it reads the map tile of the stated position. If the x,y position reveals a floor tile, then "read map block" will return the number of the floor tile. But if the script changes the floor tile to a carpet tile, then "read map block" will return the number of the carpet tile. This has been my experience, anyway.

What I'm asking for is that assuming the floor tile is the default tile for that spot, I'd like to see a "read tile (x,y,layer)" command that will always read the floor tile, regardless of what's setting there now.

Normally, "read map block" should initially be stored in a variable in instances like this anyway, but it's unrealistic to retrofit every map to find this default block before a looping script messes it up upon entrance into the map. So I think it would be nice to have a function that can reverse the negative effects of badly written tiles. Reading the default tile for that position would be nice.

@ohrrpgce-bugbot
Copy link
Author

Comment author: @bob-the-hamster

Okay, I understand what you want now. I would probably name the command "read default map block"

Although I am confident that your problem with the looping script can be resolved by checking "current map" and breaking out of the loop if it changes.

@ohrrpgce-bugbot
Copy link
Author

Comment author: Jeremy Bursey <zippywings>

My response to Bug bz⁠#569 explains why the current solution of breaking out of a loop doesn't work here. I still maintain that "read default map block" is needed for the plotscript dictionary, and partly needed to fix this problem.

@ohrrpgce-bugbot
Copy link
Author

Comment author: @rversteegen

"reset map state (map state: tilemap)" will reset the map's tilemap to it's original condition. However, if you call that every tick, things might slow down.

@ohrrpgce-bugbot
Copy link
Author

Comment author: Jeremy Bursey <zippywings>

Reset Map State helped for the time being. Thanks.

@ohrrpgce-bugbot
Copy link
Author

Comment author: @rversteegen

(renaming bug to avoid confusion)

James mentioned adding the ability to load a map layer from any map as a plotslice, I suppose this could go in hand with that?

@ohrrpgce-bugbot
Copy link
Author

Comment author: @rversteegen

(bah, here's a better bug name)

@ohrrpgce-bugbot ohrrpgce-bugbot added scripts Script commands or interpreter. See also "hspeak" or "script import" labels new feature Something new that we would like to add labels Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Something new that we would like to add scripts Script commands or interpreter. See also "hspeak" or "script import" labels
Projects
None yet
Development

No branches or pull requests

1 participant