Deleting Maps and Music

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Meatballsub
Liquid Metal Slime
Posts: 996
Joined: Mon Oct 15, 2007 6:39 pm
Location: Northwest Georgia
Contact:

Deleting Maps and Music

Post by Meatballsub »

Is there currently a way to delete maps and music completely? I know when you delete music, it doesn't remove the entry completely. Just curious because I could condense my music list significantly if I could actually do that. The same goes for maps as well. Thanks.
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

You can delete maps from the end of the list, but you can't delete map from the middle. So for example, there is no way to delete map 9 without first deleting map 10.

However, if you want to get rid of unwanted maps to save space, here is what I suggest

1) Use the "Erase Map Data" option in the map editor, and pick "Erase all map data"

2) Change the map name to something like UNUSED so you can easily tell it apart from other maps in the map list

3) Resize the map down to the minimum size of 16x10

The map data files will still exist, but they will waste as little space as possible. Next time you need a new map for something, you can re-use one of these maps instead of creating a new one.

One additional thing to be careful about, is that if you delete the data in a map, it will not delete any doorlinks from other maps that point to the one you are deleting, so if any exist, you will have to remove them manually.

EDIT: Oops! I forgot to answer about the music!

If you are working on your game unlumped as a .rpgdir then you may need to manually delete the music files yourself. If you are working on your game as a normal lumped .rpg file then you don't need to worry about this.

When you delete a song, the enemy entry is left behind in the music list, but this is harmless, and the amount of space it takes up is very small. You can just re-name the deleted songs to something like UNUSED so you can spot them easily when scanning the list.
Last edited by Bob the Hamster on Wed Jun 26, 2013 9:04 pm, edited 1 time in total.
User avatar
Meatballsub
Liquid Metal Slime
Posts: 996
Joined: Mon Oct 15, 2007 6:39 pm
Location: Northwest Georgia
Contact:

Post by Meatballsub »

Thanks sir!
User avatar
Jack
Slime Knight
Posts: 266
Joined: Tue Oct 16, 2007 2:39 pm
Location: Maine
Contact:

Post by Jack »

Do you think this will change in the future, or is there something hardcoded that prevents it? Would it be possible in the future to change each maps (or music pieces) position on the list (for organization)?
Last edited by Jack on Thu Jun 27, 2013 12:14 am, edited 1 time in total.
User avatar
Sparoku
Metal Slime
Posts: 308
Joined: Tue Jun 18, 2013 3:19 pm
Location: Dairy Queen
Contact:

Post by Sparoku »

Jack wrote:Do you think this will change in the future, or is there something hardcoded that prevents it? Would it be possible in the future to change each maps (or music pieces) position on the list (for organization)?
I sure hope so. Because that would be a very handy feature.
"One can never improve enough nor should one stop trying to improve."
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

If it was just a matter of changing the order of the data records, it would not be difficult

What makes re-ordering data in the OHRRPGCE difficult is the fact that the ID number of data is the same as the order the data appears in the file, and that ID number is used everywhere that refers to that data.

Music, for example, is referenced by maps and by battle formations, and by text boxes and by scripts.

Suppose you delete song ID 10, and all the song ID numbers for the rest of the music after that gets reduced -1 song 11 becomes 10, song 12 becomes 11, song 13 becomes 12, and so-on.

custom would then need to search through every map and update the ID numbers of any songs that changed. Then it would have to search through every battle formation and update song id numbers. then it would have to search through every text box an update song id numbers....

Those are actually not hard to update. it might be slow, but we are only talking a second or two.

The tricky part is scripts. Custom could search through each script, and in each script it could search through the instructions looking for the "play song" command. If it was playing a song id number (which it almost always is) then it could patch the script to use the new id number... but if the "play song" command was using a song id number returned from a script, or a song id number that is the result of some math, then the job of patching the script with the new id number becomes vastly more complicated (not impossible, but really unpleasantly complex)

So you can see why I am not eager to support this type of data re-ordering :)

Now there is another method of re-ordering data that would be much more practical, and that is by adding a layer of indirection.

The order in which data is stored does not actually need to match up with the data's ID number. Consider files that have been converted to RELOAD format. In RELOAD there is no need to store any data for a record has been deleted. The RELOAD format does not require that the ID numbers appear in-order, nor does it require that all the ID numbers exist.

Since hero data has already been converted to RELOAD, it would not be too difficult for me to make it so you could delete heroes from the middle of the list, or that browsing the list of heroes would skip deleted entries-- however, the hereo ID numbers could not change for the same reasons I layed out above, so in this scheme, if you deleted hero ID 10, none of the hero ID's after it would have to be renumbered, but then browsing through the list of heroes would skip directly from 9 to 11

What would be more useful (and this is something that is part of my plan for the Editor-Editor) is the ability to present a list of heroes in some order other than ID number order, like alphabetical order. Then when you add a new hero, it gives them the next un-used ID number, but their position in the list changes depending on what name you give them.

This could apply to maps also, even though converting them to RELOAD is (mostly) not an option. Maps could be presented in some other order, such as alphabetical, or sorted according to a sort-order number that is unrelated to the map's ID number.

Does any of this make sense? I guess:

tldr; Re-ordering data? Yes, later, kinda, sorta, eventually, possibly.
User avatar
Master K
King Slime
Posts: 1899
Joined: Sat Jun 11, 2011 9:40 pm
Location: A windswept rock in the Atlantic Ocean

Post by Master K »

Do you think this will change in the future, or is there something hardcoded that prevents it? Would it be possible in the future to change each maps (or music pieces) position on the list (for organization)?
This would be a godsend for Illusions. I have to work on maps linearly, and it annoys me.
Post Reply