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

human readable asset names and dummy assets #6

Open
CapsAdmin opened this issue Jun 9, 2016 · 8 comments
Open

human readable asset names and dummy assets #6

CapsAdmin opened this issue Jun 9, 2016 · 8 comments

Comments

@CapsAdmin
Copy link
Contributor

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
Copy link
Member

TheJJ commented Jun 12, 2016

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
Copy link

castilma commented Oct 4, 2016

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
Copy link
Member

TheJJ commented Oct 4, 2016

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
Copy link

castilma commented Oct 4, 2016

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
Copy link
Member

TheJJ commented Oct 4, 2016

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.

@detrumi detrumi mentioned this issue Feb 4, 2017
9 tasks
@CapsAdmin
Copy link
Contributor Author

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
Copy link
Contributor Author

any news on this?

@heinezen
Copy link
Member

heinezen commented Nov 3, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants