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!

Menu

Author Topic: [QUESTION:Wrath]  New Dungeon Difficulty  (Read 4427 times)

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #15 on: August 09, 2016, 11:02:23 pm »
Quote from: "Nupper"

Gameobject_Template
Code: [Select]
GAMEOBJECT_TYPE_DUNGEONDIFFICULTY = 31

    data0: mapID (From Map.dbc)
    data1: difficulty

     

     

0 5 man normal, 10 man normal
1 5 man heroic, 25 normal
2 5 Man Epic (Possibily), 10 man heroic
3 25 man heroic


Sorry, I copied the wrong line. I updated my post to fix it.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Nupper

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 339
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #16 on: August 09, 2016, 11:23:31 pm »
Quote from: "Grymskvll"
Quote from: "Nupper"

Gameobject_Template
Code: [Select]
GAMEOBJECT_TYPE_DUNGEONDIFFICULTY = 31

    data0: mapID (From Map.dbc)
    data1: difficulty

     

     

0 5 man normal, 10 man normal
1 5 man heroic, 25 normal
2 5 Man Epic (Possibily), 10 man heroic
3 25 man heroic


Sorry, I copied the wrong line. I updated my post to fix it.

I Renamed it to Mythic
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Nupper

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 339
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #17 on: August 09, 2016, 11:49:20 pm »
Additional Known Issues

Welcome message displays Heroic

Code: [Select]
Welcome to [Dungeon name] (5 Player (Heroic)). Instance locks are scheduled to expire in [Time Remaining]instead of
Code: [Select]
Welcome to [Dungeon name] (5 Player (Epic)). Instance locks are scheduled to expire in [Time Remaining]
Fixed issue with Instance Portals
When making a new portal 5-man Epic = Data1: 2
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #18 on: August 10, 2016, 12:05:01 am »
Quote from: "Nupper"
Additional Known Issues

Welcome message displays Heroic

Code: [Select]
Welcome to [Dungeon name] (5 Player (Heroic)). Instance locks are scheduled to expire in [Time Remaining]instead of
Code: [Select]
Welcome to [Dungeon name] (5 Player (Epic)). Instance locks are scheduled to expire in [Time Remaining]

You need to change the last field in MapDifficulty.dbc to "DUNGEON_DIFFICULTY_5PLAYER_EPIC"


Edit: Oh, I get it! Sorry, I completely misinterpreted an earlier post. So to fix invisible portals, see this post: http://modcraft.io/viewtopic.php?p=56547#p56547 (it refers to the mysql world.gameobject_template table)
« Last Edit: August 10, 2016, 12:13:21 am by Admin »

Nupper

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 339
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #19 on: August 10, 2016, 12:08:38 am »
Quote from: "Grymskvll"
Quote from: "Nupper"
Additional Known Issues

Welcome message displays Heroic

Code: [Select]
Welcome to [Dungeon name] (5 Player (Heroic)). Instance locks are scheduled to expire in [Time Remaining]instead of
Code: [Select]
Welcome to [Dungeon name] (5 Player (Epic)). Instance locks are scheduled to expire in [Time Remaining]

You need to change the last field in MapDifficulty.dbc to "DUNGEON_DIFFICULTY_5PLAYER_EPIC"

Quote
Fixed issue with Instance Portals
When making a new portal 5-man Epic = Data1: 2

Could you elaborate?

Mythic Mode (Epic) Instance portal
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #20 on: August 10, 2016, 12:13:46 am »
Sorry, I misinterpreted your earlier post  :D
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Nupper

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 339
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #21 on: August 10, 2016, 09:51:28 am »
Quote from: "Grymskvll"
Sorry, I misinterpreted your earlier post  :D
i assume the spawn Masks would follow suit...
0
   

Not spawned

1
   

Spawned only in 10-man-normal versions of maps (includes maps without a heroic mode)

2
   

Spawned only in 25-man-normal versions of maps (or heroics Dungeons)

4
   

Spawned only in 10-man heroic versions of maps (or Epic Dungeons (Untested))

8
   

Spawned only in 25-man-heroic versions of maps

15
   

Spawned in all versions of maps
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #22 on: August 24, 2016, 08:47:00 pm »
To add a custom tooltip line for Epic difficulty items, you need to make some changes to Wow.exe (or alternatively do some Lua tooltip modding).

This is for WotLK 3.3.5 12340

Backup your Wow.exe.

Also, this probably requires that you've already patched Wow.exe to load custom interface files.

Open up notepad and copy this over:
Code: [Select]
OFFSET_1 =
OFFSET_2 =
OFFSET_3 =
OFFSET_4 =
OFFSET_5 =
OFFSET_6 =

Open Wow.exe in OllyDbg.
Right click, search for -> All referenced strings
In the strings window, hit ctrl+f and find "ITEM_HEROIC".
Double click it and it'll take you to something that looks like this (the addresses might be slightly different):
Code: [Select]
00627BA3      F641 18 08               TEST BYTE PTR DS:[ECX+18],08
00627BA7      74 24                    JE SHORT 00627BCD
00627BA9  |> /56                       PUSH ESI
00627BAA  |. |6A FF                    PUSH -1
00627BAC  |. |68 4866A200              PUSH OFFSET 00A26648         ; ASCII "ITEM_HEROIC"
00627BB1  |> |E8 8A211F00              CALL 00819D40
00627BB6  |. |83C4 0C                  ADD ESP,0C
00627BB9  |. |56                       PUSH ESI
00627BBA  |. |68 402DAD00              PUSH OFFSET 00AD2D40
00627BBF  |. |68 402DAD00              PUSH OFFSET 00AD2D40
00627BC4  |> |56                       PUSH ESI
00627BC5  |. |50                       PUSH EAX
00627BC6  |> |8BCF                     MOV ECX,EDI
00627BC8  |. |E8 F382FFFF              CALL 0061FEC0              ; Wow.0061FEC0
00627BCD  |> |3975 F0                  CMP DWORD PTR SS:[EBP-10],ESI
Right click the first "PUSH ESI" line (2 higher than the line with the ASCII comment), Edit->Copy address
Paste the address after OFFSET_1 in Notepad
Do the same for "CALL 00819D40" as OFFSET_2
Do the same for "CMP DWORD PTR SS:[EBP-10],ESI" as OFFSET_3

Now scroll to the bottom where you just see a bunch of lines that say "DB 00" (you can press Page Up/Down to advance one page at a time).
Pick a nice empty spot with 60 empty bytes. I chose 009DE3C0
Write down the address you choose as OFFSET_4
Calculate OFFSET_4 + 0x13 (http://www.miniwebtool.com/hex-calculator/), write it down as OFFSET_5.
Calculate OFFSET_4 + 0x24, write it down as OFFSET_6
Starting at your OFFSET_4, enter these lines, replacing OFFSET_# with your addresses:
Code: [Select]
TEST BYTE PTR DS:[ECX+18],01
JE SHORT OFFSET_5
PUSH ESI
PUSH -1
PUSH OFFSET_6
JMP OFFSET_2
TEST BYTE PTR DS:[ECX+18],08
JE OFFSET_3
JMP OFFSET_1

Press ctrl+G and go to OFFSET_6.
Right click the highlighted line, go to Edit -> Binary edit
Put your cursor at the leftmost place in the HEX field, right click and paste this (make sure "Keep size" is UNCHECKED):
Code: [Select]
49 54 45 4D 5F 48 45 52 4F 49 43 5F 45 50 49 43
5F 43 55 53 54 4F 4D 00 00 00 00

This will turn into ASCII "ITEM_HEROIC_EPIC_CUSTOM", which will be the name of our global Lua variable that holds the string we want to show in the tooltip.

Select all the red lines, right click -> Edit -> Copy to executable.
Don't close the popup, minimize it or drag it to the side so you can still find it.

Go back to the main window.
Press ctrl+G and go to OFFSET_1.
Select the two lines above it that say "TEST..." and "JE SHORT..."
Right click, Edit->Fill with NOPs
Then, with the red NOP lines still selected press space to edit them to:
Code: [Select]
JMP OFFSET_4
NOP

Select these 2 red lines, right click -> Edit -> Copy to executable.

Now go to the popup from before, right click -> Save to file...
Choose a name you'll recognize, like Wow_tooltip_test.exe.
Close OllyDbg.

Next you just need to add a string for ITEM_HEROIC_EPIC_CUSTOM to GlobalStrings.lua

Extract the most up-to-date GobalStrings.lua from your game archives (or if you've already modified it, grab your modified one).
Open GlobalStrings.lua, search for "ITEM_HEROIC_EPIC".
Under it, add this line, replacing the string with whatever you like
Code: [Select]
ITEM_HEROIC_EPIC_CUSTOM = "Epic Dungeon loot";

Save and pack into a custom MPQ or load it straight from WowInterfaceFrameXML

Finally, to create an item with this new tooltip line, set the 0x01 flag for the item in world.item_template.
If you're changing an existing item, remember to delete your client cache (WowcacheWDB).

If you don't know how to change the flag properly, take the old "flags" value from your world.item_template item row, convert to hex, add 0x01, convert back to decimal and enter it back into your database.

A warning is due, though. The 0x01 flag isn't used and its purpose is unknown, but it's possible that it will interfere with something. If the mod works but it crashes at a (random?) point, or has some other weird behavior, let me know. If this happens and you want to try to fix it, check documentation for the "flags" field in world.item_template and see which other flags are unused. You'll need to modify the condition we added for the 0x01 flag and update item flags.

Here's the result:
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Nupper

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 339
    • View Profile
Re: [QUESTION:Wrath]  New Dungeon Difficulty
« Reply #23 on: August 27, 2016, 02:02:07 am »
ITEM_HEROIC_EPIC is already in Exe...if i can find the flags for it its easy :P
« Last Edit: January 01, 1970, 01:00:00 am by Admin »