<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Manually changing the sessionId &#x2F; persistent character]]></title><description><![CDATA[<p>What are the options in Colyseus for creating a persistent character that remains in the state once the client leaves? More specifically, I want to use the same character once the player reconnects. My first thought is to use a sessionId that is linked to the account of the player in colyseus/social, however, I am not able to find a way to modify the sessionId. Any ideas about how I might achieve this? Thank you in advance.</p>
]]></description><link>http://discuss.colyseus.io/topic/369/manually-changing-the-sessionid-persistent-character</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 23:00:18 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/369.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 May 2020 21:58:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Manually changing the sessionId &#x2F; persistent character on Tue, 12 May 2020 22:03:14 GMT]]></title><description><![CDATA[<p>What are the options in Colyseus for creating a persistent character that remains in the state once the client leaves? More specifically, I want to use the same character once the player reconnects. My first thought is to use a sessionId that is linked to the account of the player in colyseus/social, however, I am not able to find a way to modify the sessionId. Any ideas about how I might achieve this? Thank you in advance.</p>
]]></description><link>http://discuss.colyseus.io/post/1214</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1214</guid><dc:creator><![CDATA[virtumonde]]></dc:creator><pubDate>Tue, 12 May 2020 22:03:14 GMT</pubDate></item><item><title><![CDATA[Reply to Manually changing the sessionId &#x2F; persistent character on Invalid Date]]></title><description><![CDATA[<p>Hi !</p>
<p>If your room is set to <code>autoDispose = false</code> (<a href="https://docs.colyseus.io/server/room/#autodispose-boolean" rel="nofollow">https://docs.colyseus.io/server/room/#autodispose-boolean</a>) the state is kept, so can keep your character data in. And then with a reconnection, the data can be retreived with the session id.</p>
<p>but the data will still be lost if the <code>Room</code> is closed and you cant change that... A room is a temporary instance of your game, thats why you should store your informations on a dedicated database :)</p>
]]></description><link>http://discuss.colyseus.io/post/1226</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1226</guid><dc:creator><![CDATA[SauceCodeFr]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Manually changing the sessionId &#x2F; persistent character on Invalid Date]]></title><description><![CDATA[<p>Hey, <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/677">@SauceCodeFr</a> I use the exact same concept but the problem I am experiencing (just noticed I didn't clarify this in my post) is that on every reconnection the client uses a different sessionId and I am not able to change it.</p>
]]></description><link>http://discuss.colyseus.io/post/1227</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1227</guid><dc:creator><![CDATA[virtumonde]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Manually changing the sessionId &#x2F; persistent character on Sun, 24 May 2020 10:27:36 GMT]]></title><description><![CDATA[<p>This behaviour is normal, a session id means not an id attribued to your user, just an id attribued to his session. If you want to keep an id across browser restarts you must implement authentication !</p>
<p>And store data assigned to the user email address or something. You may also want to use <a href="https://docs.colyseus.io/server/authentication/" rel="nofollow">https://docs.colyseus.io/server/authentication/</a> for retreiving user informations. But it need to store this in another database than your room state.</p>
]]></description><link>http://discuss.colyseus.io/post/1234</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1234</guid><dc:creator><![CDATA[SauceCodeFr]]></dc:creator><pubDate>Sun, 24 May 2020 10:27:36 GMT</pubDate></item><item><title><![CDATA[Reply to Manually changing the sessionId &#x2F; persistent character on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/677">@saucecodefr</a> I am doing exactly this but I do not know how to tell the client what his sessionId is. I cannot override it onJoin.</p>
]]></description><link>http://discuss.colyseus.io/post/1235</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1235</guid><dc:creator><![CDATA[virtumonde]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Manually changing the sessionId &#x2F; persistent character on Invalid Date]]></title><description><![CDATA[<p>Why overriding <code>sessionId</code> by forcing yours ? Just add another variable send via the state or message, something like <code>userId</code>. Session should be volatile, but user id should be persistent.</p>
]]></description><link>http://discuss.colyseus.io/post/1236</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1236</guid><dc:creator><![CDATA[SauceCodeFr]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>