SFTtech / openage-data

Free (as in freedom) media files for openage.
Other
56 stars 16 forks source link

human readable asset names and dummy assets #6

Open CapsAdmin opened 8 years ago

CapsAdmin commented 8 years ago

At the moment sound effects (and possibly other assets?) are named by numbers. As someone who wants to make sound effects this becomes really cumbersome to manage.

The ideal solution for me would be if each sound had a readable name. Such that data/sound/5032.opus was instead data/sound/castle.opus.

Additionally it would also be nice if there were dummy assets so one can see what needs to be done. There could be a todo extension like this data/sound/castle.todo and so when I add a sound I delete the zero byte todo file.

TheJJ commented 8 years ago

Very good suggestion. Unfortunately, we have no infrastructure in place loading this data pack at all, currently. It mainly depends on nyan being integrated and support for datapacks. Until that point, we can have any folder structure in this repo, and then rename files to the final layout.

castilma commented 7 years ago

Do we have any limitations on the filename length? iirc, the original filenames had only 8 characters or so in the original game. and how does our engine load the right files? where does it look for the filenames?

TheJJ commented 7 years ago

No, we only have to watch out for the filesystem limits (ext4, btrfs, $applefilesystem, ...), the engine doesn't care about the lengths.

Currently it loads the files partially hardcoded and partially from the csv files in the assets/converted directory. In the future it will be described by nyan which files to load.

castilma commented 7 years ago

Do you have any suggestion, how to name the files right now, so that the change, when nyan is ready to use, is as simple as possible?

TheJJ commented 7 years ago

Basically all the media filenames in the assets directory can be renamed by the convert script already. You can use other data in the empires.dat tree to generate better filenames. The only problem is that in the empires.dat many graphics etc are reffered to by their id, and if we rename the graphics file, we'd need to rename all the references as well. We need this after we have nyan anyway, but we will have transform the data tree in a big manner then.

The generation of the data pack is done in the openage project, so we should move the discussion over there. However, if you have motivation you may start the data transformation already. It makes no sense using a new csv format or tree structure by now because we will switch to nyan sooner or later. But in order to create the nyan data pack, we require total data transformation which we have to implement some day.

Total transformation means mapping the gamedata-struct hierarchy to nyan and purging any redundancy and mistakes. To get an idea how that will look:

# current csv-style entry of the archer unit
30,4,2.03,12345.png

# after transforming the filenames, the unit type, etc:
# new nyan-style entry
Archer(RangedUnit):
    hp = 30
    attack = 4
    rate_of_fire = 2.03
    speed = 0.96
    projectile_graphic = file("arrow.png")
    # and more

Yes, nyan is like 4 times more verbose and memory consuming, but it's actually human readable and we can create a xz/gzip/whatnot compressed pack for those who wanna save some memory. Then it'll be smaller than before.

CapsAdmin commented 5 years ago

Does the pull request #9 look fine? I'm fine with 5032_castle.opus.

If asset ids are unique for each category and all the files start with an id we could just recursively find all files and capture the id with regex or something but skip the .todo extensions. For example (\d+)[_]?(.*)\.(.+) you'd capture id, friendly_name (optional) and extension

CapsAdmin commented 4 years ago

any news on this?

heinezen commented 4 years ago

@CapsAdmin The new plan is to ditch the .todo files and instead structure the repository directories like the actual modpack that is loaded into the engine. As an alternative we'll make a (human-readable) list of sounds that are in the game, so everyone can see what's missing and what's already finished.

I guess we'll also separate sound source files (Audacity files or whatever is used) into another repository and only keep the final sound files here, like we did with openage-data-3dmodels.