Sigmur

Members
  • Content Count

    7
  • Joined

  • Last visited

Everything posted by Sigmur

  1. Version 0.1.11a

    406 downloads

    Ground effects are the little plants and rock that the game display on certain parts of your map. They're referenced in GroundEffectTexture.dbc, you can find a lot if various tutorials on how to edit this DBC. On an ADT, you have 16*16 chunks, each chunk can hold up to 4 texture and on each texture you can link one ground effect id from the GroundEffectTexture.dbc. Very important to understand if you want to use the tool. This program doesn't automatically : place ground effects where you used a specific texture put ground effects everywhere, if you clear a chunk in noggit, you'll need to set ground effects again. On a chunk you can : Set which ground effect goes with which texture Set on an 8 by 8 representation of the chunk, where each ground effect will be used Set on an 8 by 8 representation of the chunk, where no ground effect at all will be displayed Toggle ground effect display on/off on a whole chunk Fill a whole chunk with a ground effect On a full ADT you can : Export the current ground effect settings of all chunks Import ground effect settings from previous export. Even if you repaint in Noggit and a texture doesn't have the same index, it'll match the previous texture and apply the ground effect datas. Command line usage : ./"Sigmur's Ground Effect Editor.exe" [x|i] [target_path] (mge_file_path) [x|i] : export datas from ADT to file or import datas from file to ADT [target_path] : on export and import with no source, this can be a path with wildcard selection (see examples) (mge_file_path) : optional, used only for import. If no mge_file_path is specified, import will look for .mge files with the same name as the adt (see example) examples : ADT folder for our examples : "E:\Wow 3.3.5\world\maps\azeroth" containing "azeroth_30_30.adt" and "azeroth_30_31.adt" - Exporting ground effects datas form every ADTs ./"Sigmur's Ground Effect Editor.exe" x "E:/Wow 3.3.5/world/maps/azeroth/*.adt" - Exporting ground effects datas form specific ADT ./"Sigmur's Ground Effect Editor.exe" x "E:/Wow 3.3.5/world/maps/azeroth/azeroth_30_30.adt" - Importing ground effect datas to every ADTs, will look for same file name with extention .mge instead of .adt ./"Sigmur's Ground Effect Editor.exe" i "E:/Wow 3.3.5/world/maps/azeroth/*.adt" - Importing ground effect datas to specific ADT ./"Sigmur's Ground Effect Editor.exe" i "E:/Wow 3.3.5/world/maps/azeroth/azeroth_30_30.adt" - Importing specific ground effect datas to specific ADT ./"Sigmur's Ground Effect Editor.exe" i "E:/Wow 3.3.5/world/maps/azeroth/azeroth_30_30.adt" "E:/Wow 3.3.5/world/maps/azeroth/azeroth_30_30_specific_file.mge" !important : this progam uses QT5 to parse paths, this means you can use forward and backward slashes in them, even on windows. You can even mix backward and forward slashes ("E:/Wow 3.3.5\world\maps/azeroth\azeroth_30_30.adt" is a valid path) Technical datas : Ground effect datas are stored in MCNK header as a uint2[8][8] layer map (128 bits) and an uint1[8][8] (64 bits) toggle map. The data starts right after the holes datas, offset 64 from the MCNK header, 72 from the MCNK magic word beginning. The first 128 bits (4 uint32) are the layer map. It's composed of an 8 x 8 representation of the chunk, each point is a number between 0 and 3. These numbers are indices to MCLY datas, this define what ground effect id (contained in the targeted MCLY) will be displayed at the target subchunk X/Y. The next 64 bits (2 uint32), often miscalled predTex & noEffectDoodad, are used for a no effect bitmap. It's another 8 x 8 representation of the chunk that contains where no effects will be shown. Since the effect map can only have numbers between 0 and 3, they needed another map to tell where not to put stuff on. Each point is a single bit that tells the game if you want to hide ground effect on X/Y or not. Code used to access/save datas : (made in QT5, so quint16 = uint16_t) quint16* effect_layer_map[8]; //8*8 map of uint2 - uint16 = 16 bits, we'll use 2 bits per point, 1 uint16 = 8 points quint8* effect_toggle_map[8]; //8*8 map of uint1 - uint8 = 8 bits, 1 bit per point, ez quint8 layer_map_edit[8][8]; //8*8 map of uint8 - easier to use bool toggle_map_edit[8][8]; //8*8 map of bool - wich subchunk is toggle or not easier to use char* pos = raw_mcnk_datas_starting_after_magic_and_size; //I store a copy of the raw MCNK data in the structure that loads it and edit it directly pos += 64; //Skip everything until effect layer map //Put every pointers at the right position for (int i = 0; i < 8; i++) effect_layer_map[i] = (quint16*)(pos + (i * 2)); pos += 16; //go to toggle map begin, toggle map equiv to 2 uint32 for (int i = 0; i < 8; i++) effect_toggle_map[i] = (quint8*)(pos + i); //Parse layer & toggle maps for (int mx = 0; mx < 8; mx++) { quint16 tmp = *effect_layer_map[mx]; for (int my = 0; my < 8; my++) { layer_map_edit[mx][my] = (tmp & 1) + (tmp & 2); tmp = tmp >> 2; toggle_map_edit[mx][my] = (*effect_toggle_map[mx] & (1 << my)); } } // Here you can edit your maps using the _edit versions //Save the stuff back to the adt for (int mx = 0; mx < 8; mx++) { //Rewrite ground effect maps quint16 layer_map_row = 0; quint8 toggle_map_row = 0; for (int my = 7; my >= 0; my--) { //Going in reverse this time, or your world will be ass backward if (toggle_map_edit[mx][my]) toggle_map_row += 1; layer_map_row += layer_map_edit[mx][my]; if (my > 0) { layer_map_row = layer_map_row << 2; toggle_map_row = toggle_map_row << 1; } } //Put the rewritten line in the corresponding map *(effect_layer_map[mx]) = layer_map_row; *(effect_toggle_map[mx]) = toggle_map_row; }
  2. Version 1.0.0

    45 downloads

    BE CAREFUL - WORK FOR SOME CHUNKS BUT NOT FOR OTHERS WHER IT FUCKS UP LIQUIDS This is an old tool i made in 2015 and never realy used. You can edit and fine tune water on adts, chunk by chunk, subchunk by subchunk (8x8 water map on every chunk), set transparency, type, height, etc etc. Idk if it's useful at all nowadays, there is probably another tool for that released years ago. Tested on 3.3.5 adts (v18), it will probably not work for other versions. Usage example :
  3. Well i've got the code to do this, i'll see what i can do tomorrow.
  4. Proof of concept only, not for distribution. A chest/independent inventory system for wow 3.3.5. Pretty much like chests in minecraft or other games. No security (anyone can access), but can be added. This system allow you to put items in a "world" inventory, handled kinda like guild banks but with its own storage in database. I had to hack wow interface heavily and add handlers for custom packets to use the default bag frame, addons that change bag interface will probably break this client side. Bags are sync between players, like loot bags, item movement is (hopefully) securely handled server side and instantly persisted in database. Split and merge, are not implemented and you can only move items from/to player inventory bags (not bank etc). All can be implemented too with more work. It was a fun challenge, i did not expect it to be so hard. Wow is really not designed for this.
  5. Proof of concept only, not for distribution. It was a personal challenge, build a simple persistent farming system for wow. I used 3.3.5 because i'm more familiar with it and i built a lot of editing tool for it over the years. Seed items can be used on special land plots to grow crop. Crop speed was 5s/state for this demo but is fully customisable. Once the crop reached the final state of growth, you can harvest it using another spell. It triggers a loot frame, once everything is looted the crop despawn. Crops are persistents : crop evolution state is saved in DB Fully customizable : crops have 5 evolution states with 4 differents timers and gameobject ids for the skin Loots are generated by the system, not linked in the last gameobject, looted amount are scaled on the crop fertilisation level The example show only one seed, different seed items can be used
  6. Hi, i made a little tool to set water on an adt. As of now, everything i expected works fine, you can set liquid & liquid type chunk by chunk, define the subchunks where you want to set liquids and even specify the height of your liquid to make non planes rivers, like the waterfals in the grizzly hills and set liquid transparency. There is still one thins i do not manage with this, it's the UV map. According to http://www.pxr.dk/wowdev/wiki/index.php?title=ADT/v18#Case_0.2C_Height_and_Depth_data In some case, the chunks can have an uv map, defined like so : struct uv_map_entry { uint16_t x; uint16_t y; };I found it using 010 editor, and it match the description, an uv map is a set of two coordinates, u and v, to place a 2d texture on a 3d object. But i do not see how uint16 can be used for the job. I've joined the 010 template updated with the right water structures since it wasn't mine in the first place. WoWADT.bt
  7. Well the UV maps exists and are used in a lot of WoTLK adts. I will probably never use them but it's the last thing in the MH2O that i do not cover. My tool allow you to do more than just editing existing water. You can add water and subchunks of water in any ADT, edit everything, export and import the water data from an adt to a file, ect, ect. Since there is no real water tool out there i made my own. Right now i jut load and save the existing uv map, whitout touching them, i just want to know how i can modify them and what does the values means.