Just Be Yourself

So there I was, just minding my own business.

Part 1

I was working this morning on making craft bot keep track and store not just new piles of loot but changed piles of loot also. The code was done, it wasn’t a big change, and it actually worked. It recognized changed piles, reported the difference as new loot in the bot window, sent the storage request and the full piles ended up in storage. But it also crashed the client. Somehow. Not in the newly written code, somewhere after.

I looked at the code, studied it. Studied the diff. No clue. I put in some debug statements and fired the client back up. But the client thought I was a different player. Known issue. Happens occasionally. If you keep playing like that the client ends up sending ever more conflicting data to the server. Stuff messes up.

So I logged out and back in. Same problem. I tried again. Several times. Then several dozen. Then I realized that I didn’t remember why I was trying to log in. Then I got pissed off.

Part 2

I have no idea how this got started, but back in the day there was this legend that my pancakes were even more delicious when I made them while 'stressed out'. When you have that many ankle biters kicking around, these things are bound to happen. Of course, they don’t tell you about it, they just whisper in hushed tones and try to intentionally irritate you while you’re making the griddles sing.

Eventually one of them tipped their hand by grinning at me and asking if I was stressed yet.

For all I know it’s actually true.

Part 3

src/client/gui/pawscharpick.cpp(154) One line to save name at auto login
//if this is the name we have requested for autologin
//choose it immediately
if(!connecting && ( requestedAutoPickId == i ||
				(requestedAutoPickId == -1 && name == lastCharName) ||
				name == requestedAutoPickName))
	connecting = true;
	psCharacterPickerMessage msg(name);
+	psEngine::playerName = name;

src/client/gui/pawscharpick.cpp(374) One line to save name at normal login
    // Send the name of the character to the server.
    csString charname(1->GetText() );

    psCharacterPickerMessage msg(charname);
+   psEngine::playerName = charname;

src/client/pscelclient.cpp(262) One
if statement to check the name
// Extra steps for a controlled actor/the main player:
if(!local_player || local_player->GetEID() == msg.entityid)
+	if (!psEngine::playerName.Compare(msg.name))
+	{
+		Error1("Ignoring Actor message. The main player Actor must be loaded first.");
+		return;
+	}

	// This triggers the server to update our proxlist

	//update the window title with the char name

Diana Coman - 2018-10-03 09:10:01

Yes! Hopefully this IS part of the released bot bundle, right?

Mocky - 2018-10-04 02:06:29

No, it’s separate. But I can add it to future builds.

  1. pawsButton*)FindWidget(name []

Tags: ,

Leave a Reply