Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: instig on October 23, 2014, 12:20:49 pm

Title: [SOLVED]  Custom Dungeon Modification
Post by: instig on October 23, 2014, 12:20:49 pm
Hi,

I have a question regarding converting an existing dungeon from Normal to Heroic mode. In this example, I will use Ragefire Chasm and Utgarde Pinnacle.

Overview: whenever you enter a dungeon, you see a red banner at the top, under the mini-map which shows the total amount of players in the dungeon. For example, Ragefire chasm will display the number '5' on normal under the red banner; Utgarde Pinnacle will show the number '5' along with a skull underneath it, to show it is heroic.

I have converted Ragefire Chasm to Heroic, so I enter the game, change the difficulty to heroic and enter the new dungeon, and I now have an heroic dungeon with a blank map.

Question: when I enter this heroic dungeon, the red banner at the top displays the number '0' , while still displaying the skull underneath, representing it is heroic. How do I change this number '0' to represent the number '5', similar to other heroic dungeons, such as Utgarde Pinnacle Heroic?

Thanks for the replies!
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: schlumpf on October 23, 2014, 01:00:44 pm
Quote from: "instig"
I have converted Ragefire Chasm to Heroic,
This is the part where "how?" is the relevant question, as you obviously did something wrong here.
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: instig on October 23, 2014, 02:04:29 pm
Hi there,

My apologies for not clarifying further.

Essentially, I have went into my MapDifficulty.dbc and essentially copied the Normal version and then changed the difficulty in the next column to 1 (illustrating heroic) from 0. So now I have two maps with Ragefire Chasm; one for normal and one for heroic (0 and 1).

I do not know the full details of what I have changed, as I don't currently have access to it.

I want to clarify further that, the dungeon does work. I can add creatures, objects, etc. I can change the difficulty to Heroic mode and I am able to enter, with a blank version of the dungeon. However, I am wondering why the heroic version of Ragefire Chasm displays the number '0' instead of the number of players '5'.

EDIT: I have also added the MapDifficulty and Map.dbc files into a custom MPQ patch file. It is currently added in the game, so that is not an issue.

Furthermore, I have edited the access requirements in a 'mysql' database, so the heroic is definitely changed on the database side.

Not sure whether it is something done through the .dbc files or something else.

Thanks
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: schlumpf on October 23, 2014, 02:14:12 pm
Have you properly changed maxPlayers of http://pxr.dk/wowdev/wiki/index.php?tit ... iculty.dbc (http://pxr.dk/wowdev/wiki/index.php?title=MapDifficulty.dbc" onclick="window.open(this.href);return false;)?
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: instig on October 23, 2014, 02:20:09 pm
Indeed. This was the first item I looked at before I even started modifying any .dbc files. A unique ID was created, the map id matches 389 (Rage Fire Chasm) and the difficulty matches 1 for the second Ragefire Chasm identity. The max players I have is 0x5 - which is a maximum of 5 players.

This has been tested in game; if more than 5 players enter, it states instance is full.
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: schlumpf on October 23, 2014, 03:11:43 pm
According to the interface code, that size comes from GetInstanceInfo(). I sadly don't know where that function gets the data from, but it seems not to be in mapdifficulty. Possibly that is a change in MoP though. I'm not sure here. Might also be maxPlayers from map.dbc.

Sorry, but I can't help you but to re-check all databases and all fields. :/ Also, there might be something on server side which you have not seen.
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: instig on October 23, 2014, 03:49:10 pm
Okay, thanks for your help. I will continue to check the code to identify whether that may be an issue - which I have not done before, for GetInstanceInfo() - this could be a factor.

However, if this still does not work, hopefully someone else may have the answer. But thank you thus far, for your response.
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: Ascathos on October 23, 2014, 10:48:25 pm
TrinityCore server ? If so, make sure you add a heroic instance to the db.
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: instig on October 23, 2014, 11:33:38 pm
Hi there,

When you say "make sure it is in the database" could you justify that further?

The only database I have edited, is the Access_Requirement Database. Is there any others I need to modify? This may be a pending factor in this issue.

Edit: Additional Information about Server:

Trinity Core Revision: 51f3dcd2cd54 2014-10-11 (latest)
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: Ascathos on October 24, 2014, 12:36:39 am
`world`.´instance_template´, `world`.´instance_encounters´

Check those
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: instig on October 24, 2014, 07:27:49 pm
I could not identify the problem. I will give several links to my Map.dbc, MapDifficulty.dbc, World_Access Database and Instance Template, to see what you all think.

It might be easier checking these files, as I might have missed something.

Note: The dungeon I am trying to make heroic is Ragefire Chasm.
Title: Re: [QUESTION] Custom Dungeon Modification
Post by: instig on October 24, 2014, 07:38:04 pm
If you cannot read the above attachment, here is a written version of the files:

Map.dbc
Column 1 - 48
Column 2 - Orgrimmar Instance
Column 3 - 1
Column 4 - 1
Column 5 - 0
Column 6 - Ragefire Chasm
Column 40 - 0xFF01FC
Column 57 - 0xFF01FC
Column 58 - 195
Column 59 - 1.0
Column 60 - 1
Column 61 - 1816.75585938
Column 62 - -4423.37158203
Column 63 - -1
Column 64 - 0x0
Column 65 - 0x0
Column 66 0xA

MapDifficulty.dbc (a new row has been created for Ragefire Chasm Heroic, as follows)
Column 1 - 800
Column 2 - 389
Column 3 - 1
Column 4 - Heroic Difficulty String
Column 20 - 0xFF01FE
Column 21 - 0x15180
Column 22 - 0x5
Column 23 - Dungeon Difficulty String

Instance Template (no modifications)
Map: 389
Parent 1
script instance_ragefire_Chasm
allowMount 0

- Nothing has been changed here. Weren't sure what to add.

Access Requirement (added heroic version)
MapID - 389
difficulty - 1
level_min - 80
level max - 0
item level - 0
item - 0
item 2 - 0
quest_done_A - 0
quest_done_h - 0
completed achievement - 0
quest_failed_text - null
comment - Heroic Orgrimmar Instance
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 09, 2014, 08:36:36 pm
It's been a few weeks since anyone has replied.

Does no-one know what the answer is to why the banner is not showing the number '5'. Instead, the banner is showing the number '0'

Instig
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 09, 2014, 10:38:39 pm
If you still can't solve it, a temporary hack fix would be to just overwrite the display for your custom dungeon by editing the client side interface code.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 10, 2014, 12:21:35 am
Would you be able to explain what I should edit exactly In the server side code.

Secondly, when you mention server side code, do you mean editing the dbc files and adding a patch, or do you mean editing the code its self by going into the trinity core code and editing the cpp files?

Thanks,

Instig
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 10, 2014, 01:08:31 pm
Quote from: "instig"
Would you be able to explain what I should edit exactly In the server side code.

Secondly, when you mention server side code, do you mean editing the dbc files and adding a patch, or do you mean editing the code its self by going into the trinity core code and editing the cpp files?

Thanks,

Instig

You would modify where GetInstanceInfo() is called in the client side interface code. See what the return values are, if it's the incorrect values for that map then change what is displayed. This is going to be in the InterfaceFrameXML files.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 10, 2014, 07:00:20 pm
I have tried looking for GetInstanceInfo() in the cpp files. It apparently doesn't exist.

The only files I have is:

- instance_<name>
- MapInstanced
- InstanceScript
- InstanceSaveMGR

Apart from these, it doesn't exist.

I don't know what you mean by "InterfaceFrameXML" Files. The only interface Folder I have is:

- World of Warcraft > Interface > Addons >  Blizzard Calender.... AuctionUI... InspectUI.... and so on.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: phantomx on November 10, 2014, 07:07:54 pm
Quote from: "instig"
- World of Warcraft > Interface > Addons >  Blizzard Calender.... AuctionUI... InspectUI.... and so on.

He means the folders inside of your MPQ files not the Wow directory.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 10, 2014, 07:16:52 pm
Ah right! Thanks.

I am in the MPQ patch file, and found FrameXML. However, I have not found anything related to dungeons or instances, unless I am looking for the wrong item, or at the wrong thing.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 10, 2014, 07:38:48 pm
Quote from: "instig"
Ah right! Thanks.

I am in the MPQ patch file, and found FrameXML. However, I have not found anything related to dungeons or instances, unless I am looking for the wrong item, or at the wrong thing.

Open all of them with notepad++, search all open files for that function to see where it is called.

I cannot look at this right now, won't be at my home environment for a while.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 10, 2014, 07:41:59 pm
Ugh that will take a long time. There is like 40.

Will be easier just to create an algorithm to look through all the text files for that particular word.

Thanks anyway, if I can't find it, I'll tell you.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 10, 2014, 08:00:49 pm
I've looked through each file in "FramesXML".

Unfortunately, I have found nothing relating to "getInstanceinfo()".

I have found somethings related to instance, but that has been:

- get number of players (get whether user is in party or not)
- get reset timer
- get party number

Nothing has related to what I am looking for.

Just a question here: how will this be relevant to helping me with the dungeon? Bare in mind, that normal dungeons already show the number '5' on the banner. It is only when the dungeon is converted to heroic (custom heroic dungeon) that is when it is 0.

I have tried in looking for it, but I will wait for your response, since you will know exactly what to change.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 10, 2014, 08:36:51 pm
Quote from: "instig"
I've looked through each file in "FramesXML".

Unfortunately, I have found nothing relating to "getInstanceinfo()".

I have found somethings related to instance, but that has been:

- get number of players (get whether user is in party or not)
- get reset timer
- get party number

Nothing has related to what I am looking for.

Just a question here: how will this be relevant to helping me with the dungeon? Bare in mind, that normal dungeons already show the number '5' on the banner. It is only when the dungeon is converted to heroic (custom heroic dungeon) that is when it is 0.

I have tried in looking for it, but I will wait for your response, since you will know exactly what to change.

Notepad++ has search in all open documents:

(http://i.imgur.com/pBG8Spu.png)

Makes searching easy. I said that function name because Schlumpf said it is the function that is called. If you are able to find where this function is called then you can also check what map the player is on and artificially change the variable to what it should display in those conditions. This is a hack, not a very good solution.

I can look at it better when I get home tomorrow afternoon ish.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 10, 2014, 09:06:36 pm
Hmm, I don't like the word 'not a good solution' - is there a way to add this to a new patch, i.e. Patch 4, add that to the MPQ folder.

I have used the search function on each one, and it doesn't seem to exist, however, I might have missed it going through so many.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 10, 2014, 10:14:08 pm
Quote from: "instig"
Hmm, I don't like the word 'not a good solution' - is there a way to add this to a new patch, i.e. Patch 4, add that to the MPQ folder.

I have used the search function on each one, and it doesn't seem to exist, however, I might have missed it going through so many.

It comes from the MPQs so obviously goes back into them.

Extract FrameXML folder -> open it -> ctrl A to select all files -> right click, 'edit with notepad++'.

Now press ctrl F, type in what you want to search, then click 'search in all open documents'.

There is no need to search each file one at a time.

Again, I can see if this can be hacked together another day. It is not a good solution but that is why I said it could be a last resort if you can't figure out the proper way to do it.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 11, 2014, 06:12:50 pm
I have done what you asked and getinstanceinfo doesn't exist.

What would you suggest now?
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 11, 2014, 09:53:42 pm
Quote from: "instig"
I have done what you asked and getinstanceinfo doesn't exist.

What would you suggest now?

See what schlumpf was talking about / find the correct area of code. I have a tight deadline to meet @ uni tonight so I cannot look but will when I get a chance.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 15, 2014, 07:37:36 pm
So you didn't look in the code that well as I just had a peek.

(http://i.imgur.com/B9Ggmo7.png)

This function returns a lot of variables:

Code: [Select]
name, type, difficultyIndex, difficultyName, maxPlayers, dynamicDifficulty,
    isDynamic, mapID = GetInstanceInfo()

So if name == your custom map, or mapId == your custom map, then set the variables as you want, else let the normal code run.

A hacky but easy solution.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 17, 2014, 02:03:13 pm
Oh, interesting.

I will have a look at that tonight.

I have been busy myself with assignments, so I have not had time to check.

Thank you for your help thus far.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 17, 2014, 07:35:04 pm
I have looked over the Lua file, with no success.

I have made sure the values in my MapDifficulty match up to the values it states in the Lua file.

It still displays the value 0.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 18, 2014, 06:07:19 pm
Working fine for me.

My test:

(http://i.imgur.com/vcbaWLk.png)

Code:

Code: [Select]
function MiniMapInstanceDifficulty_OnEvent(self)
local _, instanceType, difficulty, _, maxPlayers, playerDifficulty, isDynamicInstance = GetInstanceInfo();
MiniMapInstanceDifficultyText:SetText(999);
MiniMapInstanceDifficultyTexture:SetTexCoord(0, 0.25, 0.0703125, 0.4140625);
MiniMapInstanceDifficultyText:SetPoint("CENTER", 0, -9);
self:Show();
end

What your code could look like:

Code: [Select]
function MiniMapInstanceDifficulty_OnEvent(self)
local name, instanceType, difficulty, _, maxPlayers, playerDifficulty, isDynamicInstance = GetInstanceInfo();
        print(name)
        if name == "My Custom Map" then

   MiniMapInstanceDifficultyText:SetText(999);
   MiniMapInstanceDifficultyTexture:SetTexCoord(0, 0.25, 0.0703125, 0.4140625);
   MiniMapInstanceDifficultyText:SetPoint("CENTER", 0, -9);
   self:Show();
            return
        end
  .......
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 18, 2014, 08:18:26 pm
Still has not worked.....

Here is my code:

if(name == "Ragefire Chasm" or name == "OrgrimmarInstance") then
                  
            MiniMapInstanceDifficultyText:SetText(5);
                                MiniMapInstanceDifficultyTexture:SetTexCoord(0, 0.25, 0.0703125, 0.4140625);
            MiniMapInstanceDifficultyText:SetPoint("CENTER", 0, -9);   
            self:Show();
               return
               
            end

I have tried all possible names for the dungeon, with no success.

- I have deleted cache
- I have deleted WTF

No success.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on November 18, 2014, 08:39:34 pm
I may have found the problem. It was not applying to the game. I was only adding it to Patch 2, instead of Patch 3.

I will test it on Patch 3, and see if it works.

Update: every time I try and replace my Minimap.Lua files, the game then says "Your game interface files are corrupt. Please remove your InterfaceFrameXML folder"

So I have to revert the changes in order for it to work, Not sure why.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: stoneharry on November 18, 2014, 11:19:57 pm
You need to run this on your Wow.exe:

http://www.xup.in/dl,16488336/wow_unsig(12340 (http://www.xup.in/dl,16488336/wow_unsig(12340" onclick="window.open(this.href);return false;)).zip/

From: http://www.ownedcore.com/forums/world-o ... mover.html (http://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/291383-patch-sig-md5-protection-remover.html" onclick="window.open(this.href);return false;)

Allows you to modify the GlueXML and FrameXML files.
Title: Re: [NOT SOLVED] Custom Dungeon Modification
Post by: instig on December 20, 2014, 06:50:49 pm
Sorry for the long response.

This does not directly solve my issue. It is only a temporary fix for JUST me accessing that dungeon. What if multiple people wanted to access that dungeon? That client modification would not work.

Essentially, I want it so the number 5 would show for every single person in the dungeon, not just that person.
Title: Re: [SOLVED]  Custom Dungeon Modification
Post by: instig on January 06, 2015, 07:41:59 pm
I finally solved it, and It was actually my own fault.

I had a Trinity Core compile, while using the .dbc files from Jeutie's Repack.

When editing these files, it wasn't changing the server side files. To solve this, I had to use the TrinityCore's .dbc files, and then modify the Map and MapDifficulty files, add that to the patch, and it worked.

Thanks for everyone's help.