Open Spikeone opened 5 years ago
The music is currently loaded from the update server :/ We would need to convert it anyway (the music dat file contains a list of midis and midis can't be "just played")
As for the resource.idx: I wanted to create some "resource definition file" . Basically map a name to some file(s) and metadata so it can be edited as required. However I failed to come up with a good, performant implementation that can also handle changing overrides. It doesn't really apply to resource.idx but generically we would need to support adjustments of the override folder by e.g. addons, game start, ... and reload the affected resources which is hard as all current holders to such a resource need to be "notified" of the change. Choosing a good abstraction there is hard.
Well, those things might be fancy I guess but do we really need that?
Guess for now it'd be enough to simply work with either the original or history edition :)
Guess for now it'd be enough to simply work with either the original or history edition
The question is: How? Currently all those names and indices are hard coded all over the code. One could add a check at every of the 300 places (or how many resources are in resource.idx?) and make the code even more messier and harder to change. Or add an indirection via such a resource definition file and make it easy to e.g. provide a complete, self-made replacement graphics later on and just add another of those definition files.
The same strategy can be used for new races although a bit more elaborate there. Have a look at my draft here: https://github.com/Flamefire/s25client/blob/b92336fc337409fddff5cfabf0b40081d9995eda/RTTR/gamedata/nations/africans/buildings.lua
Well, there are 21 graphics in the resource IDX currently unused (see the 2nd sheet where I listed differences). 28 have a different ID. 4 have a different ID and offset might needs to be changed. 2 are now already cut out and no longer need RttR to do that.
I don't think we should rearrange any index, should we? Simply load them from a different position which would suffice, wouldn't it?
Experiencing same issue as #1490 because of the Ubisoft version – would love to see support for it.
Ich würde mich auch sehr über Hilfe freuen
I really think we should be history edition compatible. Thats why I started comparing files to check if a simple script that unpacks, renames and packs those files would suffice.
Sadly an important file for the interface has proven me wrong. They altered some graphics which need change on our side - of course one could possible write a script that puts together some stuff to make it eventually work - but that'd be suboptimal.
I've listed my current state here: https://docs.google.com/spreadsheets/d/1qf9H4JkB06y2s9eknbjf_igUzpd0OKGgAiREQUvrKUQ/edit?usp=sharing
Edit: As far as I can see, we can detect if history files are used by checking the resource.idx file (or if folders sound and music exist). We need to change some offsets and some indexes for loading the resource.idx but it's not that much. We need to load the music from the music folder instead of converting them. We need to load the sounds from the sound folder instead of converting them.