<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
    <channel>
        <title>Bound's site</title>
        <link>http://www.byond.com/members/Bound</link>
        <description></description>
        <lastBuildDate>Fri, 10 Feb 2012 17:37:57 +0000</lastBuildDate>
        <language>en-us</language>
    
                <item>
            <title>Player Names</title>
            <link>http://www.byond.com/members/Bound?command=view_post&amp;post=138818</link>
            <guid>http://www.byond.com/members/Bound?command=view_post&amp;post=138818</guid>
            <pubDate>Sun, 06 Nov 2011 09:20:12 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Bound?command=view_comments&amp;post=138818#comments</comments>
            
            <description>Found a weird little quirk using DMIFonts, and other text name libraries for that matter...&lt;br&gt;
&lt;br&gt;
I'm using DMIFonts to add player names above their player icons and I'm also using a statpanel to display online players, but their names are being scrunched over their icons in the panel, which covers up a part of their icon in the panel.&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
mob&lt;br&gt;    Login()&lt;br&gt;        namefont.QuickName(src, src.name, rgb(255,255,255), &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;#000&amp;quot;&lt;/span&gt;, top=1)&lt;br&gt;        ..()&lt;br&gt;&lt;br&gt;mob/Stat()&lt;br&gt;    statpanel(&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Online&amp;quot;&lt;/span&gt;)&lt;br&gt;    &lt;span class=&quot;dmkeyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/mob/M &lt;span class=&quot;dmkeyword&quot;&gt;in&lt;/span&gt; world)&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(M.ckey)&lt;br&gt;            Stat(M)
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
That's basically the gist of the code right there. The name displays properly in the map, but once you switch to the Online tab, their icons have the names jumbled up over them. I'm trying to get the names to be removed before being displayed in the list of online players, but I'm also trying to keep the rest of their overlays on as well. I've been testing this with other libraries too and they all have the same problem. I haven't figured it out yet, but I was wondering if there was something I'm missing or if there's already a solution to this problem. If there is one, I haven't found it yet.&lt;br&gt;
&lt;br&gt;
If you want to get a look at what I mean, simply add the code I wrote from mob/Stat() into any one of the demos in the libraries and make sure the text color has some contrast to the background color of the panel if it isn't being outlined. I recommend testing it in DMIFonts just because it's a great demo.&lt;br&gt;
&lt;br&gt;
Worst comes to worst, I'll redo the online panel somehow. I'm extremely tired at the moment, so I apologize if this is easily solvable and I'm just posting out of desperation.</description>
        </item>
                <item>
            <title>Icon Overlays - In General</title>
            <link>http://www.byond.com/members/Bound?command=view_post&amp;post=138828</link>
            <guid>http://www.byond.com/members/Bound?command=view_post&amp;post=138828</guid>
            <pubDate>Mon, 31 Oct 2011 06:02:11 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Bound?command=view_comments&amp;post=138828#comments</comments>
            
            <description>&lt;b&gt;Code:&lt;/b&gt;&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
mob&lt;br&gt;    Player&lt;br&gt;        Login()&lt;br&gt;            &lt;span class=&quot;dmcomment&quot;&gt;// Blah blah&lt;/span&gt;&lt;br&gt;            overlays.Cut()&lt;br&gt;            overlays = SaveOverlays&lt;br&gt;&lt;br&gt;        Logout()&lt;br&gt;            &lt;span class=&quot;dmcomment&quot;&gt;// Blah blah&lt;/span&gt;&lt;br&gt;            SaveOverlays = overlays.Copy()&lt;br&gt;            &lt;span class=&quot;dmcomment&quot;&gt;// overlays.Cut()?&lt;/span&gt;&lt;br&gt;            .=..()&lt;br&gt;            &lt;span class=&quot;dmkeyword&quot;&gt;del&lt;/span&gt;(src)&lt;br&gt;&lt;br&gt;    &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;&lt;br&gt;        list/SaveOverlays = list()&lt;br&gt;&lt;br&gt;obj&lt;br&gt;    Shields&lt;br&gt;        Wooden_Shield&lt;br&gt;            icon = &lt;span class=&quot;dmstring&quot;&gt;'WoodenShieldOverlay.dmi'&lt;/span&gt;&lt;br&gt;            layer = FLOAT_LAYER-1&lt;br&gt;&lt;br&gt;    &lt;span class=&quot;dmkeyword&quot;&gt;verb&lt;/span&gt;&lt;br&gt;        Equip()&lt;br&gt;            usr.overlays += src&lt;br&gt;            usr &amp;lt;&amp;lt; &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Equipped &lt;/span&gt;&lt;span class=&quot;dmbrace&quot;&gt;[src]&lt;/span&gt;&lt;span class=&quot;dmstring&quot;&gt;.&amp;quot;&lt;/span&gt;&lt;br&gt;        Unequip()&lt;br&gt;            usr.overlays -= src&lt;br&gt;            usr &amp;lt;&amp;lt; &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Unequipped &lt;/span&gt;&lt;span class=&quot;dmbrace&quot;&gt;[src]&lt;/span&gt;&lt;span class=&quot;dmstring&quot;&gt;.&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Problem description:&lt;/b&gt;&lt;br&gt;
&lt;br&gt;
Recently I've been reading up on overlays in order to implement them into the game I've been working on.&lt;br&gt;
&lt;br&gt;
What's the most efficient way to implement overlays and save/load them correctly? I've read the debates as to which method is more efficient than all the rest and I'd really like some clarification.&lt;br&gt;
&lt;br&gt;
In my game, the overlays are equipment items that can be equipped and unequipped whenever the player wants, so the overlays are normally kept on when a player logs out.&lt;br&gt;
&lt;br&gt;
I posted what I believe to be is the most relevant code I have pertaining to the matter... It's quite a simple system for the time being. I'm really just trying to get everything into a working state.&lt;br&gt;
&lt;br&gt;
I'm sure there are many flaws with the way I'm doing things right now. I know that during Logout(), I don't empty the list of overlays and as a result they're saved in the savefile. I can equip/unequip the shield with no trouble until I logout. Once I log back in, the shield is stuck and can't be removed. I've read all the posts about the same issue and I've tried to fix it many, many times. I'm not ignorant, I'm just unable to implement a proper solution. :(&lt;br&gt;
&lt;br&gt;
I'm also using Deadron's Character Handling and Shadowdarke's HUDmeter library, just in case that helps. I also believe the HUDmeters are being saved to the savefile as well and I'm not sure how that can be fixed, but for now my primary concern is the equipment overlays. Thanks for taking the time to help me!</description>
        </item>
                <item>
            <title>Character Handling Name Check</title>
            <link>http://www.byond.com/members/Bound?command=view_post&amp;post=138833</link>
            <guid>http://www.byond.com/members/Bound?command=view_post&amp;post=138833</guid>
            <pubDate>Thu, 27 Oct 2011 06:10:54 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Bound?command=view_comments&amp;post=138833#comments</comments>
            
            <description>&lt;b&gt;Code:&lt;/b&gt;&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
    ProcessForm()&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/mob/creating_character/player = usr&lt;br&gt;&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/ckey_name = ckey(name)&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt; (!ckey_name || ckey_name == &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;)&lt;br&gt;            player.error_text = &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Your name must have alpha-numeric characters in it!&amp;quot;&lt;/span&gt;&lt;br&gt;            DisplayForm()&lt;br&gt;            &lt;span class=&quot;dmkeyword&quot;&gt;return&lt;/span&gt;&lt;br&gt;&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/list/characters = usr.client.base_CharacterNames()&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt; (characters.Find(ckey_name))&lt;br&gt;            player.error_text = &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Name already taken.&amp;quot;&lt;/span&gt;   &lt;span class=&quot;dmcomment&quot;&gt;// Won't find ckey_name? ----------&lt;/span&gt;&lt;br&gt;            DisplayForm()&lt;br&gt;            &lt;span class=&quot;dmkeyword&quot;&gt;return&lt;/span&gt;&lt;br&gt;&lt;br&gt;        &lt;span class=&quot;dmcomment&quot;&gt;// Everything is okay, so create the new mob based on the class they chose.&lt;/span&gt;&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/mob/new_mob&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;switch&lt;/span&gt;(class)&lt;br&gt;            &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Player&amp;quot;&lt;/span&gt;)       new_mob = &lt;span class=&quot;dmkeyword&quot;&gt;new&lt;/span&gt; /mob/Player()&lt;br&gt;&lt;br&gt;        &lt;span class=&quot;dmcomment&quot;&gt;// Set the new mob's attributes.&lt;/span&gt;&lt;br&gt;        new_mob.name = name&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;switch&lt;/span&gt;(gender)&lt;br&gt;            &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Male&amp;quot;&lt;/span&gt;)     new_mob.gender = MALE&lt;br&gt;&lt;br&gt;        &lt;span class=&quot;dmcomment&quot;&gt;// Log their client into the new mob.&lt;/span&gt;&lt;br&gt;        usr.client.mob = new_mob&lt;br&gt;&lt;br&gt;        &lt;span class=&quot;dmcomment&quot;&gt;// And finally, blank out their web page since they don't need it now.&lt;/span&gt;&lt;br&gt;        new_mob &amp;lt;&amp;lt; browse(null, &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;window=NewCharacter&amp;quot;&lt;/span&gt;)&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;return&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Problem description:&lt;/b&gt;&lt;br&gt;
&lt;br&gt;
I'm working on creating my game's login screen, and in doing so have implemented Deadron's Character Handling and the htmllib library to help ease the task. I quickly put up the code to see how it would function and after some tinkering, as well as stripping the options down to the bare minimum, I found that one can easily create a character with the same name, leading to potential disasters later on down the road. I've searched the forums for well over an hour and tried various fixes for this block of code, but still can't seem to come up with a solution.&lt;br&gt;
&lt;br&gt;
This block of code is where the form for creating a new character is processed and I've tried creating a conditional that will catch the exception, which I commented. I've seen a similar fix in other people's code so I figured it would work here as well.&lt;br&gt;
&lt;br&gt;
When I run this code and use a name that matches another one of my character names it ignores the exception and carries out the rest of the process normally, creating the new mob and overwriting the previous one.&lt;br&gt;
&lt;br&gt;
I also looked into the library itself to find the process &quot;base_CharacterNames()&quot; just to get an idea of how it comes up with the list. From what I know, that would be the correct proc to use in order to check if a name is already taken.&lt;br&gt;
&lt;br&gt;
Any suggestions as to go around solving this would be of great help. Thanks.</description>
        </item>
            
    </channel>
</rss>


