EclipseCommunity Posted June 3, 2011 Author Share Posted June 3, 2011 This will change it so that player and npc names only appear when you hover the mouse over their character.**CLIENT**Find **' Draw player names** and **' Draw npc names**Replace both sections with the following:``` ' draw player names For i = 1 To Player_HighIndex If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then If CurX = Player(i).x And CurY = Player(i).y Then Call DrawPlayerName(i) End If End If Next ' draw npc names For i = 1 To Npc_HighIndex If MapNpc(i).num > 0 Then If CurX = MapNpc(i).x And CurY = MapNpc(i).y Then Call DrawNpcName(i) End If End If Next```You may wish to extend this feature by adding the option to turn it on and off from the options box. Link to comment Share on other sites More sharing options...
Dzastin Posted June 3, 2011 Share Posted June 3, 2011 Thanks. Link to comment Share on other sites More sharing options...
computer212 Posted June 10, 2011 Share Posted June 10, 2011 Uhm. You put what to search for within the file but you didn't say what file it is in. Could you please inform me as to what file im looking for the draw lines in? Link to comment Share on other sites More sharing options...
Derryl Posted June 10, 2011 Share Posted June 10, 2011 Client side > modDD7\. You need VB6 to compile/save your changes. Link to comment Share on other sites More sharing options...
MrKris Posted June 15, 2011 Share Posted June 15, 2011 Good feature, bad tutorial. You didn't say where to search for the code, lots of new programmers would be really confused by this. Link to comment Share on other sites More sharing options...
Derryl Posted June 15, 2011 Share Posted June 15, 2011 @Smore:> Good feature, bad tutorial. You didn't say where to search for the code, lots of new programmers would be really confused by this.> Find ' Draw player names and ' Draw npc namesIf they don't know how to search then they shouldn't bother programming. Link to comment Share on other sites More sharing options...
adammack Posted June 15, 2011 Share Posted June 15, 2011 Nice and easy to do, thanks! Link to comment Share on other sites More sharing options...
EclipseCommunity Posted June 16, 2011 Author Share Posted June 16, 2011 @Smore:> Good feature, bad tutorial. You didn't say where to search for the code, lots of new programmers would be really confused by this.There's only 1 ' Draw player names and ' Draw player names in the whole client code. If you're too incapable to search, then you shouldn't even be trying to program. Simples. Link to comment Share on other sites More sharing options...
BugSICK Posted June 18, 2011 Share Posted June 18, 2011 xlithan do u know how to add this in the option menu? Link to comment Share on other sites More sharing options...
EclipseCommunity Posted June 21, 2011 Author Share Posted June 21, 2011 There's an OptionsRec in modTypes, add **HoverNames As Byte** to the bottom.Add 2 option buttons to the options window on the main interface (Call them whatever you want).For the option button that keeps names shown at ALL times, add this code to the sub routine:**Options.HoverNames = 0**And for the option that only shows names on mouse hover:**Options.HoverNames = 1**Then replace that whole block of code posted above to this:``` ' draw player names For i = 1 To Player_HighIndex If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then If Options.HoverName = 1 Then If CurX = Player(i).x And CurY = Player(i).y Then Call DrawPlayerName(i) End If End If End If Next ' draw npc names For i = 1 To Npc_HighIndex If MapNpc(i).num > 0 Then If Options.HoverName = 1 Then If CurX = MapNpc(i).x And CurY = MapNpc(i).y Then Call DrawNpcName(i) End If End If End If Next```Not tested but should work. Link to comment Share on other sites More sharing options...
Savents Posted June 23, 2011 Share Posted June 23, 2011 I found a bug, when you are using this edit, you can no longer see the damage you deal, receive, doge, block, parry and exp from other players or NPCs. Link to comment Share on other sites More sharing options...
EclipseCommunity Posted June 23, 2011 Author Share Posted June 23, 2011 I'll rewrite it another way then. Link to comment Share on other sites More sharing options...
Darth Tyllo Posted June 23, 2011 Share Posted June 23, 2011 There is a problem with it, if you put it on the Options menu. If it's set on Off, and off is Option.HoverNames = 0, it makes it so you never see names, not always, although i may have misunderstood and was supposed to put it on 'On'. Also, you get a compile error if you use the lower code, you need to change```If Options.HoverName = 1 Then```to```If Options.HoverNames = 1 Then``` You need to add the s to the end. Link to comment Share on other sites More sharing options...
Darth Tyllo Posted June 23, 2011 Share Posted June 23, 2011 Sorry for the double-post, but also, make sure you add HoverNames= 1 or 0 to your config.ini, depending if you want this feature on or off by default, you also need to add``` ' save to config.ini SaveOptions```beneath the Options.HoverNames = 0 and Options.HoverNames = 1\. I tried this, although it didn't work and i don't know why, I'll investigate after I finish my essay(damned AP classes)EDIT: Alright, I found the problem(as to why it doesn't save in config.ini). Go to ModDatabase, and search``` Call PutVar(fileName, "Options", "Debug", Str(Options.Debug))```and add this below``` Call PutVar(fileName, "Options", "HoverNames", Str(Options.HoverNames))``` Now it will save the player's preference in config.ini. Link to comment Share on other sites More sharing options...
EclipseCommunity Posted June 24, 2011 Author Share Posted June 24, 2011 Thanks. Like I said, I never tested it so didn't know if it would definitely work. Link to comment Share on other sites More sharing options...
Darth Tyllo Posted June 24, 2011 Share Posted June 24, 2011 Yeah, np, I'm gonna see if I can edit it so it shows the names all the time, although I doubt I'll be able to with my knowledge of vb6.Edit:I figured it out, swap Xlithan's code with this one, when your option for On is Option.HoverNames = 1, and Off is Option.HoverNames = 0. Setting it to On will make it so you have to hover over the character to see their name, while turning it off will display their name all the time.``` ' draw player names For i = 1 To Player_HighIndex If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then If CurX = Player(i).x And CurY = Player(i).y And Options.HoverNames = 1 Or Options.HoverNames = 0 Then Call DrawPlayerName(i) End If End If Next ' draw npc names For i = 1 To Npc_HighIndex If MapNpc(i).num > 0 Then If CurX = MapNpc(i).x And CurY = MapNpc(i).y And Options.HoverNames = 1 Or Options.HoverNames = 0 Then Call DrawNpcName(i) End If End If Next``` Make sure you also addedHoverNames= either 0 or 1 depending on if you want names displayed all the time or not by default to the bottom of your config.ini, and``` ' save to config.ini SaveOptions```below Option.HoverNames = 0 or 1 in both parts of frmMain. And finally, search ModDatabase for``` Call PutVar(fileName, "Options", "Debug", Str(Options.Debug))```and under it add``` Call PutVar(fileName, "Options", "HoverNames", Str(Options.HoverNames))``` and that should be it. Please, tell me if I've forgoten anything in my previous posts, you need all of it. Link to comment Share on other sites More sharing options...
Darth Tyllo Posted June 26, 2011 Share Posted June 26, 2011 Hey guys, I found one other thing you need to add before this is complete. In ModDatabase, you need to search for```Options.Debug = 0```(its the only one, but if you want to be sure, check that you're in Sub LoadOptions) but anyways, search for that, and under it add```Options.HoverNames = 1``` Link to comment Share on other sites More sharing options...
EclipseCommunity Posted July 6, 2011 Author Share Posted July 6, 2011 Extension to my tutorial. Credits to Terrakion for posting.http://www.touchofdeathforums.com/smf/index.php/topic,73328.0.html Link to comment Share on other sites More sharing options...
Medleyy Posted July 26, 2011 Share Posted July 26, 2011 Awesome edit, thanks for this :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now