This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Amaroth

Pages: [1] 2
1
Tutorials / WotLK Tutorials on YT
« on: March 10, 2017, 04:16:28 pm »
Hi, I have already announced this before, but with a new board structure I decided to create a new topic here. I am working on english YT channel with tutorials focused on things I am specialized on. Which means DB, DBC, Noggit, Level and 3D design in general. I also made some tutorials for complete beginners to help them with orientation in WoW modding world. So, if you are interrested in video tutorials, here's my english channel:
https://www.youtube.com/channel/UCCDNjUz3_MCPXY-UwfFdXpA

And here's my older, czech channel (which I probably won't update any longer):
https://www.youtube.com/user/5Striker5

2
Showoff - what you are working on / [3.3.5a] Youtube Tutorial Channel
« on: January 31, 2017, 08:37:49 am »
Some of you probably know that I've got a CZ/SK YT channel. I have decided to start a new ad-free YT channel, which is purely english. You will be able to find tutorials there and some timelapses as well, to promote whole WoW modding a little bit. I hope this works out and that it will be useful for anyone. Right now there isn't much, but I'll keep adding a new content there.

New English channel:
https://www.youtube.com/channel/UCCDNjU ... Y-UwfFdXpA

Original CZ/SK channel:
https://www.youtube.com/user/5Striker5

3
Resources and Tools / [TOOL] [WOTLK] GobDisplayGenerator
« on: November 27, 2016, 12:02:49 pm »


Yet another little tool from me. This one creates gamobject displayIDs and template gameobjects out of listfile, which means that it can create thousands of gameobjects in a few seconds - great for projects making their custom models and retro-porting them from newer expansions. Listfile can be anything containing full paths to files separated by line breaks. It creates gameobjects only for M2 and WMO files, others are ignored. Tool also generates template gameobjects with their model names as names (and optional prefix/postfix), which means that generated models are easily recognisible and that when you find nice-looking model in WMV and want to use it for spawn or for creating some gameobject you need, you can find that gameobject's template generated version just by typing its name into lookup command. This makes this tool viable even for usage on models which already are in WotLK client, as it makes life of spawners much, much easier.

- Generate your GameobjectDisplayInfo's CSV file and put it into directory where GobGenerator is.

- Get or create a listfile. The easiest way of doing so is simply creating an MPQ with all models you want to have gameobjects made of and just extracting its listfile. Note that you can also use listfiles of blizzlike MPQs, if you want to generate gameobjects for all blizzlike models as well.

- Open GobGenerator. Select input listfile (you can also type into model path field, which makes using larger number of listfiles with similiar names in the same path very easy).

- Fill in your database credentials. You may want to test a connection before proceeding.

- Start displayID is being taken from your GameobjectDisplayInfo.dbc (its 1 higher than the highest ID found in DBC). If you happen to see value 1 here, something is really wrong and check if your CSV is OK and in GobGenerator's directory.

- Start entry is by default 400000 and I'd suggest you to keep it that way. There are some gobs on 300000+ entries in blizzlike TC2 DB, thats why I've used 400000. Final entry of generated gameobject will be start entry + gob's displayID. This means that gob with displayID 96835 will have entry 496835 - and that can be sometimes very handy.

- Fill in prefixes and postfixes of gob names. Don't forget to add space behind prefix and in front of postfix, if you want to have it there. Gob's name will be prefix + its model name + postfix. So, if you choose "[Gen] " as prefix and " [DO NOT EDIT]" as postfix, result gob name might be something like "[Gen] mymodel.m2 [DO NOT EDIT]".

- By default INSERT queries are being used, which means that if any gameobject entry is already taken in DB, it will result in error. You can choose REPLACE, which will overwrite whatever might be on entries where gameobjects are to be put.

- Done, click on generate. If you have multiple listfiles, just select the 2nd one and click on generate again and so on.

- If anything goes wrong while SQL queries are being executed, those which weren't successful are being held in a backup file. There is also a file which keeps all possible SQL errors.



Thats all, C# src is, as always, included, and DBC to CSV convertor DBCUtil I use for this kind of quick tasks as well. If you happen to find any critical bug, let me know, but I don't really have a spare time to make source nicer or something like that, so report really only issues with functionality itself.

DOWNLOAD:
https://www.dropbox.com/s/1bk0mn1lkgshr ... r.rar?dl=0

4
Resources and Tools / [TOOL][WOTLK] NPCDisplayGenerator
« on: November 25, 2016, 04:55:59 pm »

A tool for generating CreatureDisplayInfo.dbc, CreatureDisplayInfoExtra.dbc and optionally creature_model_info and creature_template data for a character created in WMV.

How to use:

- Convert your up to date CreatureDisplayInfo.dbc and CreatureDisplayInfoExtra.dbc to CSVs and place them into the folder with this tool.

- Open a WMV. Create your character, and save it as .chr file (F7 hotkey). Also save its texture (by using File>Export Model>X3D... option you'll get texture you want and some mess you can delete). Repeat this step for each character you want to create creature displayID for.

- Open an NPCGenerator. Fill database connection credentials (you need to do so even if you turn off creature_model_info and creature_template generation, because NPCGenerator will need to get item display IDs from your database).

- Now just click on Select .chr file, select your .chr file. Click on Select texture, select your character's texture. Check if there's anything else in window you'd like to change (you'll probably find yourself using all other options with their default values). Click on Generate. Repeat for each character.

- ??

- Profit.



C# src is included. I'm opened to suggestions and feedback, however, I'm quite busy so I'll probably just fix critical bugs if you happen to find any.

DOWNLOAD:
https://www.dropbox.com/s/sytu7mq82jlrv ... r.rar?dl=0

5
Resources and Tools / [TOOL][WOTLK] Item DB<->DBC
« on: November 24, 2016, 08:15:14 pm »


ClientItem is a tool which gets all items from server's item_template table and generates a new item.dbc.csv file and items.csv file. Item.dbc.csv can be then converted into item.dbc which is completely up to date with a database, so you won't have to ever again edit this DBC directly, you can just always generate a new one. Items.csv is to be placed into your WMV's enUS (or similiar) folder, and it will update WMV's local item database as well. WMV can't handle unicode characters, so content of items.csv is unaccented on purpouse. To use simply:

- If you've never done so before, consider running ItemDBCToDB first. Explanation is in that tool's description.
- Run ClientItem.
- Fill your credentials and click on Get data.
- Convert generated item.dbc.csv into DBC by using included DBCtoCSV converter DBCUtil and place it into your MPQ and server's dbc folder.
- Place items.csv into your WMV's enUS (or similiar) folder.
- Done.



ItemDBCToDB is here to get list of all items in item.dbc which are missing in your server's item_template and to insert their generated versions into that item_template. This can be useful if you want to give players possibility to use some items which were made for NPCs, but never for players (for example weapon and shield of gnome king, weapons of NE sentinels...). If you don't use this tool at least once before using ClientItem, you'll LOOSE all these NPC items which aren't present in item_template. This will lead into loosing all items held by NPCs which aren't in item_template, and into server error log spam. So consider running this tool once before ever using ClientItem.

- Get your up to date item.dbc. Create its CSV version.
- Run ItemDBCToDB. Select your item.dbc.csv, fill your credentials and click on Insert data.
- Done.

C# src is included. I'm opened to suggestions and feedback, however, I'm quite busy so I'll probably just fix critical bugs if you happen to find any.

Download HERE:
https://www.dropbox.com/s/z87tfudql9xq4 ... m.rar?dl=0

6
Resources and Tools / [Win][WotLK]WoWMod Launcher 1.1
« on: October 24, 2016, 05:23:14 pm »






Basically a copy of topic:
http://www.model-changing.net/files/fil ... -launcher/

About:


This Launcher's main purpouse is to be easy, fast and convenient to use for both players and admins. Players get their client updated by clicking on one buttons, and admins don't have to spam news with patch releases, links to new versions of patches and so on. Launcher is nearly fully configurable and src is included, so you can do basically whatever you want with it. You can also fully translate your Launcher to your native language (or correct any posible mistakes I made since english ins't my mature language :D). You can also create multiple versions with different languages - all this without actually changing a src. If you happen to need to change src anyway, its written in C# (WinForms) and hopefully not too messy or too badly documented for you.

Please note that this is the first version to ever be released (its actually a configurable remake of already released software, but... well). It is possible there are some unhandled exceptions or even bugs. I have been testing this tool for some time and there shouldn't be any real major issues, but one never really knows for sure. Keep a backup of your game client and don't set KeepBackups in config to 0 unless you are really confident this works correctly.

Launcher is capable of following things:


* Deleting Cache folder.
* Removing (I use different word because optionally the most recent backups are being kept) outdated (or on web's filelist missing) MPQs in Data folder.
* Downloading any files specified in web's filelist into any specified local path in WoW's client folder.
* Unziping zipped folders (sadly, only zip is supported, rar, 7z and others not). Useful for AddOns.
* Dividing files into two categories - optional, and non-optional. User can choose which optional files are to be downloaded.
* All files can be organized into LinkedLists. If a file with a LinkedList is optional, it is an optional group. Player can either keep all files from an optional group, or none of them. Optional group can contain both files and zipped folder (AddOns).
* Self-updating, if a new version is released. Version system is based on one simple double-typed version number.
* Using different filelists. Which means you can have separated filelist (and files) for GMs/Devs and for players.
* Launcher also includes Changelog Browser (changelog entries have name, date, description and optionally a picture).
* There is also a Changelog Editor. To access it, you need to enter FTP login information. This serves for authentization of staff members, and also enables Launcher to upload edited changelog to FTP (so you don't have to put it there by hand).
* File downloading fully asynchronously, so users can browse changelog while files are being downloaded. * Download speed, progress bar, percentage and stuff like that are being shown as well.
* Displaying of "hello image" which can for example be an image with some breaking news and stuff like that.

How to configure:


* Rename your Launcher to whatever you want. Something like MyProjectsLauncher.
* Create a folder on your web where web side files will be kept. You can divide multiple things into multiple paths, but I'd recommend you to just have everything at one place. I'll call this a web's root folder (root folder for launcher stuff, not for web as whole, hopefully you understand me).
* Your web's root folder must contain file with current Launcher's version (I use launcherversion.conf). This file must contain only one double-typed number with . as a separator. Version of Launcher I'm releasing here is 1.0. You can change your Launcher's version in Core/Config.cs. If Launcher finds that value in launcheversion file is higher that its version, it attempts to update itself.
* Your web's root folder also must contain a zip file with a Launcher, its LauncherConfig.conf and optionally with its LauncherIcon.ico. I've named it Launcher.zip, again, you can rename it.
* Your web's root folder also should contain changelog.xml. If it is empty or isn't found, a new one will be created when you'll try to create a changelong in Changelog Editor.
* Add a hello image (in my case hello.jpg) into your web's root folder. This image will be displayed in Launcher's main window and will most likely be used by you for displaying some breaking news.
* Add a realmlist.wtf file into web's root folder, if you want Launcher to change realmlist of players to your server.
* Also add the most important file for Launcher to your web's root folder: a filelist. I've called it filelist.conf. You can have multiple filelists on your web and release multiple Launcher versions which use different filelists. By using this technique you can release a Launcher for developers and a Launcher for players, which use different filelists and thus can download different files.
* Set your filelist. Follow examples in my filelist which you can find in an example web root folder I've added into this release. Read instructions very carefully, as filelist syntax should be strictly followed. Launcher can handle some fooled up entrys, but not all, and if filelist isn't succesfully readen (or if any files mentioned in it are missing/paths to those files in a filelist are incorrect), Launcher will simply refuse to update a game client.
* Open a ChangelogConfig.xml. You'll need to change all data in Paths element - make really sure that those paths are correct. By doing this you'll connect a Launcher to your website. Pay especially high attention to FTP path to a folder where changelog.xml is, what it should look lile-
* You may want to change something in Main element. Its not very likely, but take a look there.
MainWindow element contains WindowName subelement. You'll most likely want to edit this.
* ChangelogEditor element contains DateFormat subelement. If you want to change this, DO SO BEFORE YOU CREATE A CHANGELOG. Otherwise you will end up with incompatible changelog and Launcher.
* The rest of ChangelogConfig.xml contains names for UI elements and various messages Launcher can output.
* Create your own icon in PNG format, google some online PNG to ICO converter.
Done. Test if everything works correctly and release a Launcher. Launcher is to be put into WoW's root directory and thats pretty much all.

 

Making this application took really some time and effort, I had to learn a lot of things to make it work and plan to make more tools and apps for WoW development. If you really like my Launcher and want to give me at least something in return to support me back, my Paypal account is:

Amaroth7@seznam.cz

DOWNLOAD LINK HERE:
https://www.dropbox.com/s/bsip16nwimzbb ... e.rar?dl=0
Or in original topic on MC-Net.

REPO ON GITHUB HERE:
https://github.com/Amaroth/WoWMod-Launcher

Changelog


It would be just a waste of effort to write everything on two places. You can always read a changelog here:
http://www.model-changing.net/files/fil ... -launcher/

7
Noggit / [TUTORIAL] Importing models to Noggit
« on: July 28, 2016, 08:57:52 pm »
Different ways how to get your models imported into your map. Copied from MC-Net where's main section for this:
http://www.model-changing.net/tutorials ... to-noggit/

First of all, why the heck do I even bother with something what seems to be so basic? Well, apparently it is not, because there are a few tips and tricks which aren't very commonly known, at least beginners don't know them and there's no tutorial really describing them. I will also link my simple WIP tool which can be very usefull for you here. I will start with things you probably do already know, if that bothers you, just skip to the last heading.

First of all, how can we get models into our map in Noggit? A short list of possibilities:

* Ctrl+c and ctrl+v. No magic hidden here.
* Import from MV.
* Import from a text file (Import.txt).

Import from MV



MV is a model viewer. WoW Model Viewer is an application which enables you to browse WoW models. Great thing, but here comes a problem - current Noggit's import functions aren't compatible with quite a lot of WMV's versions. As far as I know, importing WMOs in general tends to work. In order to import models from WMV, simply change ImportPath in noggit.conf, so it points to log.txt file in userSettings folder in your WMV's folder. An example follows.:

ImportFile = D:ModdingProjektyArathorWMVuserSettingslog.txt

When you have this set, you can simply open a WMV, select a model, then go to Noggit and shift+c to import M2, alt+c to import WMO. There were slightly bugged versions of Noggit where both shortcuts actually imported M2, keep this on mind please. The newest version should have this fixed by now.

If your import functions don't work (mostly M2 tends to not), you can try a different version of WMV. Version which is definitely compatible with Noggit's import function for M2s can be downloaded on Modcraft.:

viewtopic.php?f=48&t=4797

The problem is, that this version is really an ancient one, and tends to crash frequently, especially when it comes to retro-ported stuff.

Import from text file



Import.txt is a file located in Noggit's installation folder. It contains paths to models separeted by line breaks. You can delete models from here simply by opening a file and deleting them. To reload a file, just deselect any model you may have selected in Noggit and go to Assist menu, choose To Text File function, and here you go, Import file is reloaded. If you have any model selected while clicking on To Text File button, its path will be written at the end of the file. This can be very useful when you need to copy a model from different map, or when you need to copy multiple models. To acces list of models in your Import.txt, simply go to Assist menu and click on From Text File. Then you can just start clicking on model names and models will appear on your mouse cursor or in model you have currently selected, or on selected coordinates, if Auto select mode in Edit menu is turned off (does anyone even use this thing?).

So, why this tutorial? Where are those secret tips?



Yep, its a little bit strange to write them at the end of tutorial which was supposed to be dedicated to this, but I needed to explain stuff above. Import.txt is actually quite a powerful thing to use, as long as you can get list of models you want to import into Noggit, separated by line breaks, and filter them. Such lists do exist in WoW - they are called listfiles. In each MPQ, you can find (listfile) (as long as it wasn't made as listfile-free MPQ). (listfile) is a list of all file paths to all files in MPQ. And we will make a good use of this. First of all, download my Toolkit. Its a WIP application and poorly written, I've got to admit, but it works for what we are going to do with it absolutely fine. There's also a simple .bat included.:

https://www.dropbox.com/s/hh8i859hb9ebx ... t.rar?dl=0

Open your WMV. Go to File menu and select Export textures... option. In new panel which appears, make sure that Path preserved option is checked. Then just browse M2s. Everytime you find some you want to use, just click on Export all button in panel which have appeared. In the end, you will have model files in Export folder in WMV's directory, and they will be all in paths into which they belong.

Now, you have basically two options. You can either place cleanup.bat script into Export folder and run it. It will delete all .skin and .blp files in all directories in Export folder. If you want to change list of extensions which should be deleted, simply right-click that cleanup.bat, click on Edit and you surely will figure out how to change it on your own. Then create a new, empty MPQ and place all folders in Export directory into it. The second option is skipping whole cleanup.bat part and continuing to another paragraph of this tutorial.

When you have any sort of MPQ with (listfile) which contains files you don't want to use in Import.txt (like BLPs, SKINs or maybe even more stuff, it may be your server's patch you are giving to players or whatever else), you need to clean that (listfile) from all things you don't want to have there. To do this, just extract (listfile) from that MPQ and place it whenever you like. Then run my Toolkit application and set extracted (listfile) as input file. For this purpouse, you will want to use cleanup filter, which is that big panel on the left. Select extensions you want to keep in listfile (most likely .M2 and Root-only .WMO). You can also select path prefixes to keep only models from certain directory, for example, you can keep only files from World folders. You can also modify filters by using those 2 buttons and text input under filters, so you can add filter to WorldExpansion02 directory, for example. For more info, follow a Manual. When all your settings are done, just click on Cleanup Listfile button and save cleaned listfile whenever you want. If you have made a MPQ which already contains only M2 files, its (listfile) will, obviously, contain also only M2s (and (listfile) and (attributes) most likely), so you can basically use that (listfile)'s content without even filtering it by my Toolkit.

Now just open that cleaned and filtered listfile, press ctrl+a (or select just some particular models you wanted to use), ctrl+c, open Import.txt, ctrl+v, ctrl+s, use To Text File function in Noggit to reload import file and you are done, you have your models in Noggit.

This all can seem a little bit complicated, but when you learn how to do this and won't need to look any manual up for that, you will actually be able to quickly get lists of even hundreds or thousands file paths and filter them by using my Toolbox to get files you wanted, the only problem is exporting model files via WMV, if you need to do that (so, if you need to select just a few certain models rather then just use whole folder for example).

One final tip. You can also create a (listfile) of all file paths in WoW and then just always get only models from some certain directories by using my Toolbox. Lets say you want all WorldExpansion02Coldarra models. If you already have prepared merged (listfile) of all WoW files, my Toolkit is actually very fast and easy way of getting all those models directly into Import.txt. Just open Toolkit, choose merged (listfile) as an input file, write WorldExpansion02Coldarra under filters, click on Add path prefix button, make that filter checked, click on Cleanup Listfile and... done.

And one now really final tip. Extensions filter may be actually used also for ends of file names (like keg.m2, instead of just .m2). Path prefix filter can, on the other hand, be also used for name prefixes, like World/Custom/am_. Sadly, its (for now) limited for use on only one directory. This will get all am_ files, but only in World/Custom/ folder. Both extension and prefix filters aren't case-sensitive.

8
Tutorials / [TUTORIAL] [TC2] [3.3.5a] extracting maps, vmaps, mmaps
« on: June 30, 2016, 06:25:19 pm »
There are actually quite a lot of people who keep having problems just because of either outdated server side maps, or because they can't extract them with modified client properly. So, I've written this tutorial. I know that my way of doing this thing may be rather unclean and someone might point out that those are not things one is supposed to do, BUT they prevent from happening absolutely all kinds of errors and mistakes I've ever encountered so far. TC extractors seem to be not very well written for modded clients, at least they used to be very bad whenever it came to extracting custom stuff.

1 - What are they for?


* maps - Maps are here to let server know where are map tiles and which area IDs are on them (and where). Its possible that they contain even more data (I honestly don't know), but this is the most important basics we commonly need maps for.
* vmaps - Vector maps are here mostly to let server know where are WMOs and their interiors. This gives server possibility to prevent NPCs from attacking players they clearly can't see, for example, NPCs from building's basement won't attack player when he's just going around building. They are just optional, but highly recommended to have.
* mmaps - Movement maps are here to give server information about collisions, so it can make NPCs move in optimal cases only though paths which would be reachable by player as well. So, basically, instead of just jumping on 10yd high rock, they try to find a way up on it. Again, optional, but in most cases good to have.

So, in general, when you don't have up-to-date map files for your custom zones, NPCs can behave in a really buggy and weird way, but what also can't work properly are custom graveyards, fishing loots, who lists, general chats and more area based stuff like that.

2 - Getting extractors


First of all, determine, which maps you want to have on your server. Only maps are really essential, vmaps and mmaps are optional. All 3 maps can be about 2,5-2,7GB big, if you choose to use just maps, they will get much smaller. If you are using repack, you most likely get extractors (or otherwise it sucks even more hard, than most of repacks do) with it. If you've compiled your own core, you should be able to find extractors in folder to which your server binaries were generated. You should get mapextractor.exe, mmaps_generator.exe, vmap4extractor.exe, vmap4assembler.exe from there.

3 - Preparation


I highly recommend to copy your WoW client and make client which will serve only for extracting server side stuff. We'll kinda break some things here and our modified client might even stop working. Otherwise at least make backups of all MPQ's you will edit.

Put all 4 extractors into WoW's root directory (where WoW.exe is located). Go to your Data directory. Make sure there are only following MPQs: common, common-2, expansion, lichking, patch, patch-2, patch-3. Delete (or move out) all other (custom) MPQs you may have there.

Now, normally you should be able to put your stuff into patch-4, but I've already encountered situation when extractors cleverly detected my client as WotLK client and happily ignored patch-4. So, I would recommend you to put all your custom stuff (models, ADTs, WDTs, everything you have in your custom patches) into patch-3. If you are going to use patch-3.mpq, open it and go to Operations menu, choose Change Hash Table Size and increase it to maximum. Otherwise your stuff likely won't fit in it.

There's one more thing you need to do here, in case you have edited any blizzlike maps. What I've encountered in past was that extractors were using blizzlike WDT files (and ADTs in them), while completely ignoring my own custom version of that WDT saved in patch-3. Having multiple versions of map in different MPQs also led commonly to extracting data from outdated versions. So, to make really absolutely sure that extractors will actually read your and not blizzlike stuff and stuff which is up-to-date, you need to do one of the following, depending on what kind of edits you did. If you have...:
*... only edited a few ADTs of a continent, just place them into World/Maps/(mapname)/ folder into MPQ where blizzlike version of those ADTs is.

*... edited WDT of that continent to make it bigger/smaller, extract all blizzlike ADTs and WDT of that continent, delete them from blizzlike MPQs, merge them with your custom and edited ones, delete any ADTs you have deleted if you have deleted any from original map (so you will make one big folder with ALL data of that map which is up-to-date, with both unedited ADTs and all ADTs you have edited) and put it into patch-3.

*... completely deleted all data of some blizzlike map to make wholly new one on its ID, just delete all blizzlike files of that map (even if blizzlike version was in patch-2 itself!), put yours into patch-3 and you're done.

The last thing you need to do is to go to your locale folder in Data folder (enGB, enUS, ruRU, deDE... whatever you have) and open the second last locale MPQ there (patch-enGB-3, patch-enUS-3...). Put all your edited DBCs into its DBFilesClient folder.

4 - Extraction itself


Go to WoW's root folder, open Wordpad and enter into it the following:

Code: [Select]
vmap4extractor.exe
md vmaps
md mmaps
vmap4assembler.exe Buildings vmaps
pause

Save it as whatever with .bat extension, like "extract_vmaps.bat" into WoW's root folder. Now run mapextractor.exe. When its done, run your .bat file you have created. When that is done, run mmapextractor.exe. Ofc, if you don't want to use mmaps or even vmaps at all, skip last or last two steps.


Thats all, copy/upload your maps, vmaps and mmaps folders to your server's data folder and everything should work fine and be up-to-date.

A little note: the newest version of TC2 seems to be working with some new server side files, called cameras. They are supposed to be extracted with maps. If thats what your extractor's have created, just put them into server's data folder as well ofc.

9
Resources and Tools / [TOOL]PlayerBytes calculator 0.1a
« on: June 05, 2016, 11:38:31 am »
Just a simple tool for calculating PlayerBytes and PlayerBytes2 in characters.characters table for WotLK TC2 database (may work with newer or different databases as well, but that needs to be tested). It may be usefull especially for projects where NPCs based on player looks or players based on NPC looks are being used. It is able to get:

*Skin color
*Face
*Hair style
*Hair color
*Facial feature

From PlayerBytes and PlayerBytes2, or it is also capable of doing exactly opposite - getting bytes from character display IDs.

The problem is that alghoritm which core uses for generating PlayerBytes seems to come up with sometimes different values (although they give the same IDs as my alghoritm when being converted back). That may possibly cause some bugs or issues, hopefully not, but I would like to point that out anyway. So, use this tool carefully and feel free to let me know about anything you find out or if it just works fine for you. Getting IDs from bytes should definitely work without any problems, getting bytes from IDs - use that carefully. Thats all.



DOWNLOAD:
https://www.dropbox.com/s/cfe7ybs9ha8rb ... r.exe?dl=0

10
Noggit / Noggit 1.4SDL FAQ +video answers
« on: January 21, 2016, 02:39:41 pm »
Here are some FAQ and answers to them. Most of answers also contain video version. I know my spoken english isn't flawless, but hopefully you will understand me.

IMPORTANT!: While SDL 1.4 is the last public nonBeta release, its over 2 years old. Nearly all issues Noggit has (especially those in FAQs below) are simply no longer present in newer versions of Noggit. If you really don't want/have to use this ancient version, get your hands on as new Noggit version as possible. You can find 3.1408 in my tutorial pack on MC-Net, or get even newer ones from whoever who has a compiled version from repo (if you can't compile that thing on your own).


1. My Noggit crashes/closes itself when I try to run it.


Short answer: Make sure your noggit.conf isn't named noggit.conf.conf, that you have entered correct paths into it and that paths to folders end with . Also be adviced that Noggit is compatible only with WotLK 3.3.5a. However, maps made in Noggit for 3.3.5a can be converted to newer expansions.


2. My Noggit lags very hard and/or I have troubles with bugging selecting models.


Open log.txt and check if your Noggit isn't running on Intel HD Graphics chip. If it is so, go to your 3D graphics settings and make Noggit use your stronger (gaming) graphics card.


3. I can't paint textures in some areas.


Every chunk (red square in grid toggled on by F7) can contain up to 4 different textures. You can use only those 4 textures there. If you want to use another one, you need to replace some of those 4 by your new one via texture swapper, or you can texure that chunk again.


4. When I try to acces my map in game, I get crash.


There can be several possible reasons (for instance corrupted model which you spawned there and so on), but the most common one is marked with code 0023:007B31F8. This error happens when ADT which contains less than 4 textures on some chunk is saved in Noggit. Such ADT might start crashing in game. Filling all chunks with 4 textures is a way around which prevents this from happening.


5. After saving in Noggit, some my models disappear/are duplicated.


All ADTs which contain same models should be always saved together, if you want to modify them. The best way to achieve that is simply always saving a whole map together (for smaller maps) or a whole edited area together (for bigger maps, for instace modified zones of blizzlike world). You should also always restart an application after each save. Because of problem #4 mentioned here, I suggest you to not keep ADTs which are saved by Noggit around ADTs you have directly edited, because they may start crashing and to prevent that, you need to apply 4 textures on them (which means editing them, and that spreads your area which you are modifying, and thats NOT something you want to do in this case).


6. Water disappears from my map when I save it in Noggit.


This should not be a common problem anymore, because it happens only with older versions of Noggit which can't save water (or can't do so properly). Download the newest version (1.4 SDL and newer).

7. Random holes are appearing across my map.


Never click into/drag across holes or gaps in terrain. Use Fix gaps (all adts) function in Assist menu to close gaps and be careful when working around holes created by hole tool. You may want to close holes while working around them and re-create them when you are done with your terrain around them. However, hole creating tool commonly creates 2 holes, one where mouse cursor is, one somewhere in front of you behind place where hole should have (only) been. In such case just turn models off (F1, F6) and close manually holes which were done unintentionally.


8. Some models on my map are invisible in Noggit, what to do?


If you want to just delete those models, there are more ways of doing so, but the only feasible way how to be able to place/move/scale/rotate those models is just swapping invisible model (usually some particle emitter) with some visible model. By doing so, you will see your placeholder in Noggit instead of invisible one, which will enable you to do whatever you want with that model. A video tutorial how to do that without messing around directly in ADT file's structure (which isn't very noob friendly and can corrupt your files if not done properly) follows.:

11
Random / [QUESTION] Deleted topic
« on: January 05, 2016, 12:58:44 pm »
Yesterday I started a topic and I found out it was deleted (and wasn't noticed that my topic was deleted, by who or for what reason). I would like to know who and why deleted that topic.

12
Tutorials / [TUTORIAL] Custom transports, taxis (fly/wind paths)
« on: October 14, 2015, 10:32:23 am »
[paragraph:1vwrp73r]Hello there little whelps, there have been quite a lot of requests for transports tutorial and guy who promised that he will write it didn't do so, so I decided I will write this tut for you on my own.[/paragraph:1vwrp73r]

What are transports?


[paragraph:1vwrp73r]Transports in WoW are in fact gameobjects which are being moved along a path specified in DBCs, which are quite easy to understand and edit, so this should not be anything difficult even for beginners. Players who stand on gameobject working as transport move together with it, until they leave it. It seems there are 20 blizzlike transports in blizzlike TC2 world database and all are ships and zeppelins, it works quite nice for water and air traveling. Sadly, this system doesn't work very well for ground traveling, I will explain why later. Transport system shares DBCs with taxi (fly/wind path/master) system, and is very similiar to it, with just a few differences.[/paragraph:1vwrp73r]

What will you need?


[paragraph:1vwrp73r]- MyDBCEditor (or other WORKING DBC editor, forget Taliis, please)
- any editor for MySQL databases
- TaxiNodes.dbc
- TaxiPath.dbc
- TaxiPathNode.dbc[/paragraph:1vwrp73r]

TaxiNodes.dbc



[paragraph:1vwrp73r]You can see example of my 2 custom TaxiNodes. These nodes are in fact just to specify where destination lays (docks for example), but they have nothing to do with actual paths which transports will follow. Make sure you enter correct map ID (its in hex here, 0x25 is 37 in dec, and thats ID of map I was using here), but X, Y and Z coords don't need to be really exact. Name is in fact just a note for you and last 2 columns specify entry of creature used as mount for taxi path, but have no effect for transports and thus I left them empty.[/paragraph:1vwrp73r]

TaxiPath.dbc



[paragraph:1vwrp73r]This is really fast and simple step, TaxiPath is a connection between two TaxiNodes. Just create a new row with entries of 2 nodes you want to have connected with transport, last column specifies prize for taxi (and we are doing transports, that prize would have no effect even if there was another value than 0). While you can connect only 2 TaxiNodes with one TaxiPath, you may make your transport stop on whatever point of path you wish, it can enter 50 docks and stop there if you want, so both TaxiNodes and TaxiPath aren't important at all - they are there in fact just to make server and client happy and you a little bit more busy.[/paragraph:1vwrp73r]

TaxiPathNode.dbc



[paragraph:1vwrp73r]This will take most of your time. You need to specify path which will be followed by transport. Enter (correct) ID of TaxiPath (which connects 2 of your TaxiNodes) and coordinates of each waypoint into #5, #6 and #7 column (you can get your character's coords by command .gps, path on screen belongs to ship, so Z coord was always 0 for me). Don't forget to assign unique point ID in column #3 for every waypoint of your path, otherwise either your client or server may crash. You can notice that I left all other columns 0, they are rarely used and I am not sure what they are for. There are only 2 exceptions, you can notice those 2 rows with values 2 and 10 in #8 and #9 column. In that case, transport stops at that waypoint and waits there for 10 seconds. You can have more than 2 of such points, as I have already mentioned earlier, so your ship/zeppelin can visit as many docks as you wish and wait there as long as you want for passangers.

You can try to experiment more with last 5 columns in this DBC, hopefully you will find out how at least some of them work.[/paragraph:1vwrp73r]

A few tips and notes for creating path


[paragraph:1vwrp73r]- Every TaxiPath needs to be made of at least 3 waypoints, otherwise you get crash.
- Path itself is made of curves which are being calculated from waypoint positions and distances between them. Its good to keep distances between waypoints even, otherwise you can get unpleasant buggy results. Also don't make too sudden and sharp turns, otherwise your transport can either go very far from waypoints while turning (and even pass through some objects around, and thats obviously quite unpleasant) or bug a little bit and jump/teleport suddenly.

- Mark waypoint you have already entered into DBC with some sort of gameobject or NPC while spawning a path. I use wisp NPC Waypoint (entry 1) for this, because it can fly and is invisible for players. You can delete your marks when you are finished.
- Make damn sure you don't mistype anything while entering coord values into this DBC. One mistype can send your ship across world and you will be there standing like fool, waiting in docks for ship which is basically never coming, because it is following dozens of kilometres long path.
- To make transport follow exact path is very, very difficult, because, like I said, exact path is calculated and calculations are just based on coords of your waypoints. While transport passes waypoints themselves directly, you can't modify its path very easily between waypoints at all. Avoid narrow passages if you can, or create such passages based on already created and finished transport path, not otherwise. For this reason, ground transports just don't work well, they tend to fly above or sink under terrain all the time between waypoints.
- While being in transport, players ignore all collision with world around. You can surround for example your island with impassible flags or with some models which can't be passed by players, but they will always pass them in transports. So you can make players to just have to use transports quite easily.
- If you wish to make transport teleport players from map A to map B (and thats what basically are mostly transports for in blizzlike setting), just make transport move to some waypoint at map A and then enter a new waypoint with mapID of map B into DBC. Thats whole magic around.
- Transports tend to teleport between last and first waypoints of their path. Don't ask me why, I never found out. It seems that transports in fact don't move in circles, they are always respawned after finishing their path. Players are, luckily, not dropped into sea when this happens, but just appear on new transport. Its still a little bit unpleasant effect, especially if you want to have transport travelling around one map without any teleports, but I have never found real solution for this. Just make those last and first waypoints close to each other. Blizzlike transports don't seem to have such problems, I am not sure what is going wrong here.[/paragraph:1vwrp73r]

world.gameobject_template


[paragraph:1vwrp73r]You will need to create your gameobject which will be used by transport. Fields which are not noted here don't seem to be important/working and should be left with base values (0/NULL), but again, you are free to experiment.
- Entry, do I have to explain anything?
- Type needs to be 15 (11 is for elevators, which work with entirely different than transport system).
- DisplayID is up to you, which means that transports don't have to be huge WMO ships, you can use even a small M2 boat doodad, if you want to. Just make sure your model has collisions.
- Name, again, self-explanatory.
- Flags, most transports have flags=40, some have 0, but I would not use 0.
- Size can be used other than 1 for M2s.
- data0 is ID of your TaxiPath
- data1 should be speed but it appears to not work as one would expect. 30 is most common and fine-working value. You can ofc try both lower or higher and see how results will fit to you.
- data2 should be some kind of acceleration modifier...? All blizzlike transports with speed 30 have 1 accelRate.
- data5, I don't know what this field is for.
- data6, specifies ID of group of NPCs spawned onboard and travelling with transport, however, I don't know to what table this field reffers to.
- data7, a few transports have value 3481, again, I have no idea what this is for.
- data8, a few transports have value 1 and again, I have no idea what this is for.
- AIName, ScriptName, you can, obviously, assign any scripts you wish to this gameobject. I have never tryed to assign some, for instance, SmartAI script to transport, but I see no reason why it should not work. One blizzlike transport has SAI scripts.
- VerifiedBuild, you should always everywhere use value 12340 (3.3.5a revision number) to avoid any possible problems.[/paragraph:1vwrp73r]

world.transports


[paragraph:1vwrp73r]And here we go, the last thing to do is to place our transport here. Make sure you have placed your edited DBCs both into server's data folder and into your client's custom MPQ patch, create a new row in this table with new, unique GUID, enter entry of your transport gameobject, name is just for description. Older TC2 revisions have also period field, which appears to specify how long should core wait to respawn transport (put it on start of path), but it was removed and system seems to obtain that value on its own, automatically.

The most easy way to disable transport is just deleting it from this DB table, you don't need to delete its data from DBCs. Your transport should be there, waiting just for you, but it usually takes a few (sometimes dozens) of attempts to make your path smooth, not-running into any terrain or models and clean it of teleport bugs made by too sharp curves or by too big differences of distances between waypoints. Especially making transport really dock properly with proper rotation and position can be pretty terrible task to do.[/paragraph:1vwrp73r]



EDIT: About taxis, just to make this complete:
Quote from: "Amaroth"
[paragraph:1vwrp73r]Someone asked me about taxi systems... They are basically the same. You create TaxiNodes (btw again, if memory serves me well, nodes themselves aren't part of paths of taxis), connect them with TaxiPaths (in this case you might also want to specify prize for TaxiPath in copper), spawn TaxiPath which will, in this case, be not a circle, but straight path from point A to point B. And you are, basically, done.

Taxi pros:
+ you can make player pay for travelling
+ you can link taxis to SmartAI scripts (there is action to send player somewhere by taxi)
+ you don't have to worry so much about boat fitting and sailing around docks without colliding with them, you just need to land on floor and there you go

Taxi cons:
- player on taxi has no collisions, so hello, boat which has just passed across my face
- unlike transport, taxi always connects only 2 points, creating 1 path with 3 docks means creating 2 or 3 TaxiPaths
- players can't travel together in taxi
- more players travelling together mean more taxis... imagine those 20 boats in one, overlapping group
- a map where you select to which TaxiNode you want to be taken never worked for me on maps where no fly masters originaly are, I never found solution, possibly core/LUA issue, I found a way around, you can simply make gossip menu for every fly master where gossip menu options will send you via taxi to wished point, buuut... its not ideal


In general, I found myself still preferring taxi system over transport system, even while taxis have quite a lot of cons. However, taxi system just works better for me while I want to make players pay for travelling and while I want to be able to easily disable some paths from time to time. I also love possibility to assign taxi to SAI script. Being able to have conversation with NPC, during which you will be informed where will you be taken, how long it will take, what are hazards and so on? Sign me in, for RP servers definitely great possibilities. Taxis are also great as part of quests and Blizzard uses them in such manner very often. Its cool and in fact quite simple to make.[/paragraph:1vwrp73r]

13
česky / 06 - WoW Model Viewer (WMV)
« on: September 15, 2015, 02:49:42 pm »
Tento návod bude doplněn co nejdříve, omlouvám se za zmatky s návodem 7, který má na tento navazovat, zatímco zde tento ještě ani nevisí.

14
česky / 07 - retexturování a kopírování modelů (bez úprav modelu)
« on: September 15, 2015, 02:48:55 pm »
[paragraph:3v82psyl]Retexturování nebo také méně korektně, ale lépe přes pusu jdoucí reskinování je proces během kterého - jednoduše řečeno - změníte nějakému modelu texturu (prosím, zde už ale záměrně neříkejme skin). V základu jde o něco velice jednoduchého, nicméně já bych chtěl v rámci tohoto návodu vysvětlit ještě pár věcí "navíc", které by se mohly většině z vás velice hodit a v běžných návodech je jen tak nenajdete. Tento návod, stejně jako ostatní, předpokládá, že jste si v 2. dílu návodu stáhli můj balíček s programy k WoW moddingu, také předpokládá, že umíte s MPQ archivy a s WMV. Budete potřebovat WMV, BLiPster (+ MPQEditor) a libovolný grafický editor, který umí pracovat s PNG formátem a průhledností. Ve volitelné částí návodu budete potřebovat také HxD nebo 010 editor.[/paragraph:3v82psyl]

Typy textur


[paragraph:3v82psyl]Ve WoWku najdete v podstatě 3 typy textur. Podle těchto typů k nim budeme přistupovat. Všechny se ukládají ve formátu .blp, do kterého lze snadno převést libovolný obrázek .png. WoWko vám ještě teoreticky může sežrat .tga, nicméně ten se nepoužívá a jiné formáty už v souvislosti s WoW moddingem ani nemá cenu zmiňovat (ne, to .jpg ve kterým chce snad každý začátečník si strčte víte kam, nebude vám fungovat).

Kromě toho, že můžete používat jen .png máte ještě další omezení, rozměry obrázku nemohou být úplně libovolné. Po pravdě nevím přesně, jaké je omezení (teoreticky by mělo jít o celočíselné násobky 8), nicméně nikdy neuděláte chybu, pokud budete volit mocniny 2 a rozměry, které vídáte běžně u rozlišení obrazovek. Tedy 8, 16, 32, 64, 96, 128, 256, 512, 768, 1024, 2048... Všechna vypsaná čísla jsem už někde viděl a bez problémů použil. Jak říkám, teoreticky by měly jít všechny násobky 8, ale nikdy jsem to nezkoušel. Nyní k našem třem druhům textur.:

1. charakterové - tyto textury najdete pouze u modelů hratelných ras a zcela upřímně řečeno, nevím, jaký je u nich rozdíl od 2. kategorie, nicméně jsou oddělené v konvertoru, který budeme používat a předpokládám, že je tomu tak záměrně.
2. textury oblečení (texturových itemy) - tyto textury najdete pouze u itemů, které jsou "oblékány" na postavu tak, že se pouze jejich textura navlékne na model postavy. Jedná se tedy pouze o 6 itemů - chestka, bracery, rukavice, opasek, kalhoty a boty. Jakékoliv jiné itemy spadají do kategorie 3.
3. všechen zbytek - tyto textury se používají na WMO i M2 modelech vyjma modelů hráčů, tedy na všechno, co vidíte ve světě kolem sebe a dále také na modelové itemy, tedy na pláště, helmy, nárameníky a souhrnně vše, co se drží v rukách.

Do jaké kategorie spadá textura, kterou budeme upravovat (či dokonce vytvářet) budeme potřebovat vědět při konverzi z .png do .blp.[/paragraph:3v82psyl]

Jendoduché retexturnutí čehokoliv


[paragraph:3v82psyl]Přinejmenším ze začátku, pro mnohé z vás bude platit, že většinou či dokonce úplně vždy, budete chtít pouze vzít texturu nějakého modelu či itemu, nějak ji překreslit/přebarvit/cokoliv a její upravenou verzi zase vrátit do hry. Nechcete vytvářet kvůli tomu nový model ani nic podobného, chcete rovnou upravit ten starý. Něco takového přijde na řadu hlavně, když chcete hromadně upravovat už hotovou lokaci či už hotové itemy. Řekněme, že chcete mít zasněžený Hillsbrad - v takovém případě budete chtít upravovat jednoznačně rovnou blizzlike textury, a ne vytvářet vlastní. Nebo máte ve hře sekeru, u které se vám nelíbí její rezavé ostří - chcete nablýskanou a novou verzi, kterou chcete přepsat tu rezavou, starou.

1. za pomoci WMV si vyextrahujte textury, které budete chtít upravovat, do PNG. Připomínám že M2 najdete v Models, WMO ve WMO, libovolné UI (interface) textury či textury terénu musíte dohledat ručně v Images.
2. PNG už je zcela standartní formát, který upravíte snad v libovolném grafickém editoru (prosím, vyjma Malování). Doporučuji Photoshop, nicméně jsou tady i programy jako Zoner, Gimp atd. Návod na tyto editory dělat nebudu, nemyslím si, že by to mělo být něco, čím se zaobírám a mimo jiné jsou mé schopnosti v 2D programech na spíše amatérské úrovni. Nikdy jsem zatím ani nepotřeboval více.
3. Spusťte si BLiPster, vlevo nahoře klikněte na ikonku složky a vyberte texturu, kterou budete chtít konvertovat do BLP (nebo z BLP do PNG, konvertor je oboustranný). Lze vybrat i více textur najednou.
4. Pokud se jedná o textury pro model postavy (1. kategorie), klikněte na Character Texture - ikonka figurky. Pokud se jedná o texturu pro texturový item (2. kategorie), klikněte na Clothing Texture - ikonka klobouku, což je podle mě velice nešťastná volba obrázku, jelikož zrovna headka spadá do 3. kategorie. Pokud nespadá textura ani do 1., ani do 2. kategorie, tedy je z kategorie 3., neodklikávejte už nic.
5. Klikněte na ikonku dvou zelených šipek vlevo nahoře, čímž všechny zvolené PNG/BLP konvertujete do BLP/PNG podle nastavení. Konvertované soubory se objeví ve stejné složce (složkách), v jaké jsou originály.
6. BLP textury vložte do vašeho vlastního patche. Dbejte na to, aby byly ve správné cestě. Pokud chcete z nějakého důvodu texturu přejmenovat, musíte tak učinit ještě před konverzí do BLP (tedy ještě když je v PNG), protože jinak by pak nefungovala.
[/paragraph:3v82psyl]

Odstranění particle efektů (amatérsky, ale jednoduše)


[paragraph:3v82psyl]Particle efekty jsou obecně modely či části modelů, které kolem sebe "plivou" částice, jakési drobné modely, které se neustále objevují, pohybují a zase mizí. V praxi jde o efekty kouře, jisker atd. a také sem zařadím pro naše účely záře. Pokud na vašem objektu něco "svítí" či "kouří" a vy tam tyto věci nechcete, lze je samozřejmě odstranit přímo z modelu samotného, což je korektní, ale technicky náročnější cesta. Máte však ještě možnost pouze upravit texturu samotných částic či záře tak, aby ve hře sice byly, ale aby nebyly vůbec vidět.

Pro tyto účely vyextrahujte všechny textury objektu, jak jste zvyklí a najděte mezi nimi texturu částice/záře. U drtivé většiny najdete nějaký obrázek na průhledném pozadí. Otevřete si jej v grafickém editoru a jednoduše smažte celý obsah obrázku tak, aby z něj byl jen prázdný průhledný čtverec (obdélník). Pokud chcete být pedanti na šetření místa, můžete ještě obrázek zmenšit na velikost 8x8. Pak texturu už klasicky konvertujte a vložte do patche.

U některých částic a září se setkáte s tím, že jejich textury nejsou na průhledném, ale na černém pozadí a WoWko bere onu černou jako průhlednou. V takovém případě obrázek naopak celý zabarvěte čistou černou, průhledný by se v takovém případě totiž vykreslil ve hře jako čistě bílý.

Následující 2 kapitoly se NETÝKAJÍ itemů a NPCček. Pokud chcete vytvářet nové itemy či NPCčka, bude na to jiný návod. Textury itemů jsou totiž nastavovány skrze ItemDisplayInfo.dbc, ve kterém se vytvářejí itemová displayIDčka, textury NPCček se zase nastavují skrze CreatureDisplayInfo.dbc, kde se vytváří NPC displayIDčka. Pokud jste prošli návodem k DBC a tímto návodem až sem, měli byste být schopni podle blizzlike předloh udělat vlastní itemová a NPCčková displayID. Pokud budete mít nějaký problém, bude tu časem specializovaný návod na dělání obojího.[/paragraph:3v82psyl]

Retexturnutí bez úpravy originální textury


[paragraph:3v82psyl]Jakmilese trochu rozjedete v předělávání textur a to zejména textur staveb, zjistíte, že Blizzard s velkou oblibou používá mnohé textury na hladě modelů. Zkuste si na příklad předělat všechny textury použité na naší už zmíněné farm.wmo a pak se proběhněte po Stormwindu. Občas se chcete podobného efektu vyvarovat. K tomu poslouží tato část návodu.

Menší změna bude v exportu z WMV. Budete potřebovat upravit i samotný soubor modelu, takže zvolte při exportu možnost Export All místo Export All to PNG, případně uložte WMO soubor (u WMO vám v tomto případě bude stačit upravit jen kořenové WMO). Textury upravte jak potřebujete a, nyní přijde další drobná změna, přejmenujte je. Pro maximální možnou jednoduchost ale pouze změňte pár znaků v názvu (klidně jen jeden). Jelikož se tady zabýváme jen snadnou a rychlou úpravou, pravděpodobně nechcete překopávat strukturu souboru, zachovejte proto za každou cenu délku názvu textury.

Nyní si otevřete v HxD nebo v 010 M2 soubor nebo kořenový WMO soubor. Stiskněte ctrl+f a do okna, které se vám objeví, vyplňte alespoň část názvu původní upravované textury (stačí i hledat jen .blp). V 010 editoru budete muset nejdříve zvolit, že vyhledáváte Text. Najdete sekci v souboru, kde jsou vyplněné cesty ke všem texturám, které model využívá. Najděte si svou texturu a její název přepište na váš upravený. Jednoduše klikněte před znak, který chcete nahradit a pište, oba editory budou přepisovat původní znaky. Dbejte na to, abyste za žádných podmínek nehnuli s počtem znaků, tedy délkou, souboru, narušili byste strukturu a tím soubor zničili. Po přepsání názvu textury stačí jen vše uložit a vložit do patche.


Upravený model tak bude používat vaši novou texturu místo staré. Tím pádem změníte textury jen na daném modelu a ne na dalších modelech, které originální texturu využívají.[/paragraph:3v82psyl]

Vytvoření nové texturové varianty původního modelu


[paragraph:3v82psyl]Občas se vám může stát, že se vám líbí nějaký model a chcete jeho kopii s jinými texturami, avšak chcete zachovat zároveň i původní model. Na příklad máte ve hře model dřevěného stolu, který se vám moc líbí, chcete jej řekněme ještě v druhém, tmavším a jinak zdobeném vydání, ale zároveň chcete zachovat i originál. Postup je v takovémto případě velice podobný jako v předchozí kapitole.

Nyní budete potřebovat nejen textury a M2/kořenový WMO soubor, ale budete potřebovat i SKIN, případně parciální WMO soubory - tedy úplně vše, co dává dohromady váš model. M2 a všechny SKIN (či případně kořenový a všechna parciální WMO) soubory přejmenujte. Dejte jim libovolný název, v tomto případě zde nejsou žádná omezení, i když bych důrazně doporučil vynechat diakritiku, interpunkci či bílé znaky. Volně přeloženo bez háčků, čárek, mezer, teček (".", ne i) a jiných kravin, který v názvech nemají co pohledávat, ale pravidelně je tam kde kdo cpe pokud mu to Windows dovolí. Věřte, že WoW tak benevolentní jako Windows není. Co už jsem však několikrát zmiňoval, velké a malé znaky nejsou rozlišovány. Co také můžete změnit v tomto případě je i cesta k souboru; můžete si umístit váš nový model do libovolné (klidně i zcela nově vytvořené) složky.

Dodržte jen to, že ve vaší cestě budou všechny části modelu vyjma textur. U textur platí při této metodě, která nepočítá s otevřením modelů v 3D editoru, že musí být ve stejné cestě a se stejným názvem, případně s pozměněným, ale pořád stejně dlouhým názvem. Také nezapomeňte na to, že čísla na konci názvu SKIN a parciálních WMO souborů nejsou jen pro srandu králíkům a musí být zachována. Takže outlandaloetree00.skin přijde přejmenovat na MujVlastniNazev00.skin, NÉ na MujVlastniNazev.skin. Druhá možnost nebude fungovat. Obdobně přijde přejmenovat farm_000.wmo na MujNazev_000.wmo, NÉ na MujNazev.wmo, ani na MujNazev000.wmo. Snad je to jasné (stejně to vždy někdo udělá na poprvé blbě). Jakmile máte nový model, v něm upravené názvy textur a nové textury, můžete textury hodit do BLP a vše hodit do patche. Model by měl fungovat. Pokud chcete nový model jako spawnutelný gameobject, musíte vytvořit nejdříve displayID v GameObjectDisplayInfo.dbc a pochopitelně samotný gameobject v gameobject_template ve world DB.[/paragraph:3v82psyl]

15
česky / 05 - Editace DBC
« on: September 01, 2015, 08:27:11 pm »
[paragraph:3uflqf6t]Herní klient a server používají kromě známější serverové MySQL databáze (nebo přesněji databází) ještě jednu, klientovou databázi, která je uložena v souborech s koncovkou .dbc - odtud tedy označení DBCčka. DBCčka jsou více méně obyčejné tabulky s řádky a sloupci. Mají 2 hlavní úskalí a pak ještě drobnější třetí.

1. neexistuje editor, který by uměl všechna DBCčka bez chyby otevřít, upravit a uložit. Každý si alespoň s některými neporadí.

2. neexistuje editor, který by ovládal masové úpravy (např. nastav všem řádkům co mají v poli č.5 hodnotu 50 do pole č.6 hodnotu 150). Tohle jde částečně obejít konverzí do jiného formátu (např. CSV), na který již existují profesionálnější a normálnější editory, ale osobně jsem ještě neviděl takový konvertor, který by byl 100% spolehlivý.

3. editory DBC neoznačují (nebo případně občas označují, ale často naprosto špatně nebo neúplně) názvy polí v DBC tabulkách, případně jim dávají názvy, které vám řeknou velké kulové. Pracovat v DBC znamená prakticky pořád procházet dokumentaci na naší vývojářské wiki.

Návod vypadá dlouze a složitě, ale nenechte se vyděsit a odradit, po pravdě si ale většinou (a  většina z vás) vystačíte jen s jedním primitivním editorem, ve kterém jsou (bohužel) jen naprosto základní a stejně primitivní funkce. Trik je zde spíše v tom vědět co, kde a na co upravit, abyste dosáhli chtěného výsledku, než v nějakých pokročilých technických schopnostech.[/paragraph:3uflqf6t]

Potřebné programy


[paragraph:3uflqf6t]MyDBCEditor
DBCUtil
Taliis
DBC Editor[/paragraph:3uflqf6t]

Potřebné počáteční znalosti


[paragraph:3uflqf6t]Předpokládá se, že jste si prošli Obecný přehled pojmů a systému hry, Instalace testovacího serveru (nebo máte k dispozici server, na kterém můžete pracovat) a Vytváření a editace MPQ archivů.[/paragraph:3uflqf6t]

Jak na DBC obecně


[paragraph:3uflqf6t]Doteď jste si jen hráli s přípravou, nyní ale už budete schopni reálně dělat klientové úpravy. Než se na ně vrhnete, udělejte jeden, poslední přípravný krok; vytvořte si svůj pracovní adresář, kde budete mít všechny své upravené a pracovní soubory. Můžete mít jeden společný adresář pro všechny své projekty, nebo více adresářů pro jednotlivé projekty, to je čistě na vás, ale tak či onak začněte na jednom. Já mám na příklad, bez většího matlání, složku "Noggit" na ploše. V té mám úplně vše a stačí mi to ke spokojenosti.

Ve svém pracovním adresáři si vytvořte složku DBFilesClient (název není povinný ale doporučený kvůli Noggitu, ke kterému se dostaneme někdy příště). Taktéž tam doporučuji ještě vložit složku DBC, ve které budete mít zálohy všech blizzlike DBC. Ty jste si buďto vyextrahovali sami v 3. díle těchto návodů, nebo si je můžete vypůjčit z návodového balíčku, který je ke stažení v 2. díle (složka Blizzlike335aEnGBDBCs v balíčku). Máte blizzlike DBCčka, máte adresář kam si budete dávat svoje upravené verze blizzlike DBCček, je čas se pustit do editování.

1. určete si, co chcete upravovat. Podle názvů u většiny DBCček poznáte, na co asi jsou. Řekněte si, co chcete udělat (na příklad vytvořit displayID pro NPCčko) a hledejte. V našem modelovém příkladě budete chtít upravit DBC CreatureDisplayInfo. Jakmile najdete DBC, ve kterém se chcete hrabat (nebo pokud jste našli nějaké DBC, které vás z nějakého důvodu zajímá a nevíte, na co je), jděte na bod 2.

2. otevřte si Google a do vyhledávače zadejte ideálně celý název vašeho DBC (ideálně i s koncovkou .dbc) a najděte si k němu dokumentaci. Dávejte přednost WoW Dev wiki, je ve správě komunity Modcraftu a najdete v ní obvykle nejvíce (korektních) informací. Dávejte si pozor, abyste koukali do té části dokumentace, která je pro vaši verzi hry (tedy pro většinu to bude 3.3.5a rev 12340). Nepovažujte ji však za svatou, občas v ní něco chybí nebo je něco trochu chybně. Dávejte si také pozor na číslování sloupců, některé editory a články na wiki číslují 1. sloupec jako 0, jiné jako 1 a tím se vše posouvá. MyDBCEditor může na a z zero-based číslování přepínat.

3. zkopírujte si DBC, které chcete editovat, do DBFilesClient, tedy adresáře na upravená DBCčka. Ještě jednou doporučuji mít vždy snadno po ruce zálohu těch blizzlike a mít je skutečně striktně oddělená od upravených.

4. upravte DBC za pomocí jednoho z níže uvedených programů. Podle dokumentace většinou poznáte, co je na co a co jak funguje, pokud si nevíte rady, vždy se ještě můžete podívat, jak je uděláno něco blizzlike. Používejte techniku tzv. reverse engineeringu - sledujte hotové věci a postupně rozebírejte část po části, jak jsou vlastně poskládané. Tak se naučíte ve WoWku nejvíce.

5. upravená DBC přijdou do vašeho vlastního MPQ patche (viz. 4. díl návodů) do cesty /DBFilesClient/, pokud úpravy vyžadují, aby bylo změněné DBCčko k dispozici hernímu klientu (tedy zejména pokud jsou úpravy vizuálního rázu). U úprav, které se nějak týkají mechanismů ve hře, musíte DBC vložit do složky dbc ve složce s daty, kterou používá serverový emulátor. Nikdy neuděláte chybu, pokud svým upraveným DBCčkem přepíšete blizzlike/starší verzi DBCčka jak na serveru, tak ve hře, tedy ve vašem patchi. DBC úpravy na serveru vždy vyžadují restart serveru, aby se správně projevily.

6. některé úpravy, jako například zmíněná tvorba displayIDček NPCček, vyžadují také nějaké úpravy v databázi. Na databázi platí stejný postup jako na DBCčka - prohledejte tabulky, podle názvů a dokumentace dohledejte, které jsou ty, které vás zajímají a upravte je. Návod na to, jak se pracuje s MySQL databázemi tady uvádět moc nebudu, protože jednak nejsem žádný odborník na MySQL, druhak potřebné základy už jsou zmíněny v 3. dílu návodu, kde se během přípravy databází naučíte prakticky vše, co potřebujete do začátku. Je rozhodně užitečné se časem naučit i co nejvíce z jazyka SQL.


Malý tip k hledání správných tabulek: pokud nevíte, kde je něco uloženo, nahlédněte do dokumentace tabulky, která danou věc využívá. NPCčka jsou z velké části v creature_template ve world databázi. Pokud víte tohle, můžete se podívat do dokumentace creature_template, kde zjistíte, že modelid NPCčka jsou v creature_model_data ve world databázi. V dokumentaci k této tabulce už byste měli najít odkaz na to, že je zde používáno CreatureDisplayInfo.dbc. Když půjdeme ještě dál, zjistíte, že toto DBC používá také nějaká data z CreatureModelData.dbc a CreatureDisplayInfoExtra.dbc. WoW je hodně propojené - drtivá většina tabulek v DB odkazuje na další tabulky v DB a na alespoň jedno DBC, drtivá většina DBC pak odkazuje ještě na alespoň jedno jiné DBC. Vzniká tak rozsáhlý systém vzájemného odkazování se z tabulky na tabulku. Často je třeba projít až několik referencí, než se dostanete k místu, kde je upravováno, co chcete upravit.[/paragraph:3uflqf6t]

MyDBCEditor


[paragraph:3uflqf6t]MyDBCEditor je preferovaným editorem pro úpravy DBC. Je nejspolehlivější, dokáže nejvíce DBCček otevřít, upravit a uložit aniž by je nějak poškodil či bugnul. Ostatní editory a cesty, jak upravovat DBC, vám mohou někdy usnadnit práci a mohou fungovat v případech, kdy MyDBCEditor selže (některá DBC totiž na příklad vůbec neumí otevřít, hodí u nich error), nicméně pro změnu běžne bugují DBCčka, která v nich uložíte. Proto je preferovaný tento.

MyDBCEditor má dvě hlavní vady, pomineme-li, že nedokáže otevřít úplně všechna DBC. Nepodporuje žádnou cestu jak dělat jakékoliv masové úpravy - tedy žádné scripty, podmínky, hromadné příkazy, dokonce ani napsání stejné hodnoty do  sloupců - zapomeňte na podobný "neskutečně nadstandartní" luxus. Čeká vás nimrání se jedno políčko po jednom políčku. A druhá věc je fakt, že MyDBCEditor nemá žádné klávesové zkratky. Pokud chcete na příklad zkopírovat řádek, musíte kliknout pravým na řádek, pak kliknout na Copy Row a pak napsat číslo řádku, kam se má kopie hodit. Tedy hodně štěstí s vytvářením i třeba jen hloupých 50ti nových řádků. Omlouvám se za dávku arogantního sarkasmu, ale MyDBCEditor je jednoduše peklo na zemi, a co je nejhorší, je pořád prakticky to nejlepší, co máme.

Ještě poznámka na závěr, v MyDBCEditoru se spoustu hodnot zobrazuje zapsaných v hexadecimální (šestnáckové) soustavě. Mnohé bitové masky, ale i některá normální čísla se tak zobrazují a naopak, některé bitové masky se kdo ví proč zobrazují jako normální čísla. Pokud ale někde nějaké číslo upravujete nebo vyplňujete, vždy zadávejte desítkovou verzi čísla. O číselných soustavách a o tom, jak se pracuje s bitovými maskami (nebo také flagami) je poslední sekce tohoto článku.

Níže jsou alternativní cesty, jak DBC soubory upravovat. Před zvolením jakékoliv z nich doporučuji si udělat zálohu DBC, které se chystáte upravit. Tyto cesty totiž mají rozhodně větší než zanedbatelnou šanci DBC nějak poškodit během ukládání.[/paragraph:3uflqf6t]

Taliis


[paragraph:3uflqf6t]Pokud vám nějaké DBC nejde otevřít v MyDBCEditoru, záložní cestou je Taliis. Ten najdete v návodovém balíčku ze složce Nezarazene. Taliis je napsaný v Javě, takže ji budete potřebovat k jeho spuštění. Tento program sice dokáže otevřít více různých typů souborů a umí všechno možné, problém je ale v tom, že je silně zastaralý, dělaný pro TBC. Většina věcí v něm tedy nefunguje a DBCčka v něm upravované se nezřídka bugnou, proto jej berte jen jako záložní, používejte jej s opatrností a dělejte si zálohy. Taktéž se může stát, že se bugne i přímo Taliis a nejde v něm DBCčko upravovat apod. - pár restartů aplikace a pokusů znovu mi tohle zatím vždy dokázalo vyřešit.[/paragraph:3uflqf6t]

DBCUtil


[paragraph:3uflqf6t]DBCUtil je konvertor, který vám DBC, které na něj přetáhnete myší, upraví na CSV soubor. CSV je jednoduchý typ tabulky, podobně jako je třeba TXT jednoduchý typ textového souboru. Kromě toho, že můžete CSV upravovat ve WordPadu, poznámkáči nebo čemkoliv podobném na něj existují také editory, které jej otevřou jako tabulku. Tyto editory dokonce podporují i (mnohdy i dost pokročilé a hezké) hromadné úpravy a mělo by také jít dostat CSV přímo do MySQL serveru jako DB tabulku. Vše věci, které se mohou velice hodit. CSV soubor přetažený myší na DBCUtil je zase konvertován na DBC verzi. Jaký je v této cestě jak upravovat DBCčka háček? Více méně jen ten, že DBCčka vytvořená DBCUtilem občas nefungují jak mají nebo nefungují vůbec. To jde s trochou štěstí opravit, pokud se vyznáte přímo ve struktuře DBC a ovládáte úpravy skrze hexa editory, ale to je čistě něco pro programátory. Když už to tady naťukávám, dokumentace ke strukturám jednotlivých souborů užívaných ve WoW také najdete na WoW Devu. Kdyby se někdo měl k sestavení skutečně pořádného DBC editoru, má od komunity snad 1000 sušenek.

Pokud chcete jen upravit jedno číslo někde v jednom řádku, je konverze do CSV a pak zpátky zbytečně zdlouhavá.[/paragraph:3uflqf6t]

DBC Editor


[paragraph:3uflqf6t]V podstatě obdoba MyDBCEditoru, fungující velice podobně, jen s tím rozdílem, že ovládá alespoň úplně základní seřazování řádků podle hodnot v jednom sloupci. DBC Editor však bohužel občas blbne, viděl jsem jej několikrát poškodit DBCčko během ukládání, což mi MyDBCEditor nikdy neudělal, pokud něco už dokázal alespoň otevřít. V praxi jej vůbec nepoužívám a sem jej dávám spíše jen pro pořádek a jako naprosto záložní cestu.[/paragraph:3uflqf6t]

Na závěr něco k bitovým maskám


[paragraph:3uflqf6t]Věc, se kterou lidé, kteří nemají zkušenosti s programováním, často zápasí, jsou bitové masky. Najdete je v dokumentaci označené jako bitMask u typu proměnné ve sloupci. Někde jsou také označovány jako takzvané flagy. Pokud máte zkušenosti zejména s úpravami NPCček a částečně i itemů v DB, jistě jste se s nimi už setkali, i když o tom třeba nevíte.

Bitová maska je vždy celé číslo, které vyjadřuje, které možnosti vyjádřené maskou jsou "zaškrtnuté", a které ne. Jako modelový příklad použijeme třeba hratelné rasy.:
1. Human
2. Orc
3. Dwarf

Tyhle 3 nám budou pro ukázku stačit. Budeme mít bitovou masku, která nám každou z těchto 3 možností buďto zapne, nebo vypne. Přiřadí ji tedy 0 (vypnuto), nebo 1 (zapnuto). Z našich 3 možností některé náhodně označím jako zapnuté:
1. Human - 1
2. Orc - 0
3. Dwarf - 1

Dejme tomu, že naše bitová maska vyjadřuje, jaké rasy mohou používat item. Náš item můžou používat lidé a trpaslíci, ale orkové ne, mají nastavenou 0. Problém systému, který je výše je ten, že pro 3 možnosti potřebujeme 3 políčka, do kterých napíšeme 0 nebo 1. Pro 10 možností bychom potřebovali těch políček 10. Bitová maska nám vše zjednoduší do jednoho políčka, a to následovně.:

Hodnoty z masky se zapíšou od poslední po první za sebe. Tedy nejdříve hodnota u trpaslíka, pak u orka a pak u člověka. Tedy 1 0 1. Vznikne nám tak jedno číšlo. Toto číslo je v binární soustavě. Než začnete vyděšeně řvát, k čemu je binární číslo a že jim nerozumíte, pokud jste se s nimi nikdy nesetkali, převést binární číslo do klasického, decimálního, na jaká jsme zvyklí, je velice jednoduché.

Každou cifru v čísle použijete jako číslo u řádu. Malinko odbočím, ukažme si třeba číslo 153. Toto číslo můžeme rozložit na řády jako 1 stovka, 5 desítek a 3 jednotky. Když chceme toto číslo zase složit, stačí jen počet u každého řádu vynásobit hodnotou toho řádu - tedy 1×100 + 5×10 + 3×1 = 153. A úplně stejně to jde i u jiné než desítkové soustavy. V binární (dvojkové) soustavě vše funguje stejně, jen máme jiné hodnoty řádů. Jednotky jsou všude jednotky, ale místo desítek máme dvojky, místo stovek čtyřky, místo tisíců osmičky... šestnácky, 32ky, 64ky... A tak dále. Takže číslo 1 1 1 0 1 je v desítkové soustavě 1×16 + 1×8 + 1×4 + 1×0 + 1×1 = 29. Pokud chápete tohle, je dost jednoduché zjistit, co je číslo 1 0 1 v desítkové soustavě - je to 5, jedna čtyřka, nula dvojek a jedna jednotka. Číslo 5 vložené jako hodnota do bitové masky znamená, že 1. a 3. možnost jsou zapnuté, všechny ostatní vypnuté.

Je tu ještě jedna výjimka (tedy, ona to žádná výjimka není pokud rozumíte problematice z pohledu programátora, ale pro laika to nazývejme výjimkou) pro usnadnění. Hodnota -1 znamená vše zapnuto.

Proč tohle ukazuju? Mno, protože bitmapy nebo flagy se používají velice často. Podívejme se třeba na AreaTable.dbc. V tomto DBC se nastavují názvy lokací v mapě a jejich další nastavení. Můžete si všimnout, že sloupec číslo 5 je označený jako Flags s tím, že jednotlivé flagy, možnosti k zapínání a vypínání v bitové masce, jsou vypsány a vysvětleny níže. V tabulce nadepsané "enum AREATABLE_FLAGS" jsou všechny tyto možnosti napsány pod sebou.

Čísla, která jsou u jednotlivých možností jsou pro zkušenější s převody mezi číselnými soustavami usnadněním - jsou označena na začátku 0x, což vyjadřuje, že jde o čísla zapsaná v hexadecimální (šestnáckové) soustavě. Pro vás budou ale asi jen ošklivě matoucí. Bystřejší z vás si odvodí podle návodu k binární soustavě, jak funguje hexadecimální (tip pro opravdu hloubavé, ale vysvětlovat to tu už ani nebudu - každá 1 pozice v hexadecimální soustavě se dá zapsat přesně 4mi pozicemi v soustavě binární, tedy 0x10 je 0 0 0 1  0 0 0 0, tedy 1×16 = 16), ti méně matematicky založení si mohou prostě ručně odpočítat u každé možnosti k zapnutí, kolikátá je.

Řekněme, že budu chtít, aby měla má zóna zapnuto "AREA_FLAG_SNOW", "AREA_FLAG_ARENA" a z nějakého důvodu i "AREA_FLAG_SLAVE_CAPITAL". Chci sněžnou arénu co je hlavní město otroků. SNOW je 1. možnost, SLAVE_CAPITAL je 4. možnost a ARENA je 8. možnost. Binární číslo píšu odzadu (nezapomínat) a bude mít tedy 1čku na 1., 4. a 8. místě od zadu. Tedy 10001001. 9. a další možnosti zapínat nebudu, takže začátek čísla by byla jen dlouhá řada 0, nemusím ji tedy ani psát. 10001001 převedu do desítkové soustavy, tedy na 1×128 + 1×8 + 1×1 = 137. 137 je číslo, které zapíšu do 5. políčka v DBC, a to bude vyjadřovat, že zóna, ke které to napíšu, je SNOW, SLAVE_CAPITAL a ARENA.

Drobný tip: Truice, pokud jej máte, počítá hodnoty bitových masek za vás, pouze v něm zaškrtáváte možnosti. Můžete si přes něj výpočty hodnot usnadnit.

<- 04 - Vytváření a editace MPQ archivů
-> 06 - WoW Model Viewer (WMV)[/paragraph:3uflqf6t]

Pages: [1] 2