ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Tutorials => Topic started by: Gaderian on February 28, 2022, 10:26:21 PM
-
This was a question about 'tile init' vs. 'tile init NoOverrides' (caps doesn't matter, just easier to read). Here is some information on how what it does and whether one needs it. The general answer today is that yes you need the 'nooverrides' parameter, but more info for those interested...
The UO maps are 'drawn' originally in MUL files with a map and then a statics file for implemented changes. These are found in files like:
map0.MUL
map0x.MUL (this is an index file into the data map0 file above)
Then the sta*.MUL files have the statics. Think about add on changes to the map after the initial world release, like the changes which added stuff which may have existed only depending on a player's subscription expansions.
Anyway, there was a file named 'verdata.mul' (and an index file that I am too lazy to look up). Well, inside easyuo.exe's source it tries to open this 'verdata' file set and hangs waiting on the open. In the absence of this file, Cheffe added a option on the 'tile init' statement to skip opening these 'verdata' files.
I can think of a different way to implement that (test for the files' existence and setting an internal boolean flag to determine how to handle the file data) but it stands the way it was implemented. This override was specifically added for freeshards which initially were missing that file. Technically, the wiki write up on the 'tile' commands over on easyuo is confusing and actually explains it awkwardly (and I believe what that states is the opposite of the functionality in the source code) - it is an appropriate inclusion for easyuo. I am not being critical, because what Cheffe chose to do was to empower the player to control easyuo's behavior - since at the time it was closed source. Here is the url about the tile command, but when it states if you don't know what the VerData.mul file is then you don't need the 'nooverrides' option should instead state that you do need it. http://wiki.easyuo.com/index.php?title=Tile (http://wiki.easyuo.com/index.php?title=Tile)
Empowering the script writer was a theme to Cheffe's work and if you step back to consider it, it makes the most sense. His objectives can be seen with his blunt explanation that giving simple and direct control, where the script may have to include more statements to accomplish something, is more appropriate than making a bunch of commands to do lots of steps behind the scenes. Here is an example over at easyou where Cheffe mentions priority giving control to the script over the parser: http://www.easyuo.com/forum/viewtopic.php?f=2&t=53155&start=45#p431206 (http://www.easyuo.com/forum/viewtopic.php?f=2&t=53155&start=45#p431206)
Fast forward to the UOP file era and nice tools like Neo's to extract MUL files from UOP files, but do not build the now missing verdata file set (there is no verdata*.uop files...) and even the production shard playing no longer has a verdata file. If you had a former copy of the installation to copy forward those files, then you would still have these superfluous files and would never notice the 'tile init' hanging without modifying the statement to now read 'tile init nooverrides'.
Gaderian
-
Thank you, makes sense now!