Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-03-13 23:13:22, last edited by Tomahawk (2016-03-14 18:23:39)

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

[Help] Special Blocks

Is there a quick and convenient way to check if a certain block ID has extra parameters for things like rotation?

If there's an updated list of all special blocks buried in someone's source, that would be great.

I'll accept a .dll if I must.

EDIT:
I'd prefer a method that didn't need a deserialiser or some form of block tracking.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#2 2016-03-13 23:29:24

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: [Help] Special Blocks

Tomahawk wrote:

Is there a quick and convenient way to check if a certain block ID has extra parameters for things like rotation?

If there's an updated list of all special blocks buried in someone's source, that would be great.

I'll accept a .dll if I must.

When you load all the blocks, store all the parameters in a object[] and then check the length of the object[]. Idk if that answers your question, i may be misunderstanding it.


If you would like me to make a bot for you, go here.

Offline

#3 2016-03-13 23:41:13

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Help] Special Blocks

Jabatheblob1 wrote:

When you load all the blocks, store all the parameters in a object[] and then check the length of the object[]. Idk if that answers your question, i may be misunderstanding it.

I'd do that, but I'm using the deserialiser from Captain9's EEPhysics, which doesn't support direct access to the block array. It's currently bugged in that the additional parameters for a coordinate aren't reset when the block there is deleted, so I need a different way to check.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#4 2016-03-14 00:07:57

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [Help] Special Blocks

Create your own deserializer, copy processors one, or, like me, copy it and understand how it works so you can more easily use it yourself and edit where needed.

Offline

#5 2016-03-14 00:39:27

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Help] Special Blocks

den3107 wrote:

Create your own deserializer, copy processors one, or, like me, copy it and understand how it works so you can more easily use it yourself and edit where needed.

I've taught several people how EE's mapdata is serialised, and how to deserialise it. The only reason I'm using the one in EEPhysics (which is actually Processor's InitParse) and not the one I coded myself is because I don't need two in the same bot. I can't stop the dll from tracking blocks, as all the packets go into one "HandleMessage" function.

That's kinda beside the point. It's entirely plausible that a bot coder without a deserialiser will want to check whether a block has extra params or not, and therefore an alternate method is required. Ideally some kinda collection of all special block IDs.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#6 2016-03-14 13:45:03, last edited by den3107 (2016-03-14 13:46:25)

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [Help] Special Blocks

Well, as stated yourself, you can't access the block array from EEPhysics. So you'll have to get it yourself, or are you wondering how you can get the block's data THROUGH EEPhysics?

Also: The whole point of EEPhysics is to track blocks, it's be a very inefficient idea to use the dll just for deserialisation.

Edit: No, I'm not accusing you of using the DLL incorrect, was just general information.

Offline

#7 2016-03-14 18:25:14

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Help] Special Blocks

den3107 wrote:

Well, as stated yourself, you can't access the block array from EEPhysics. So you'll have to get it yourself, or are you wondering how you can get the block's data THROUGH EEPhysics?

Also: The whole point of EEPhysics is to track blocks, it's be a very inefficient idea to use the dll just for deserialisation.

Edit: No, I'm not accusing you of using the DLL incorrect, was just general information.

I've edited my original post to specify that I don't want to solve this with a deserialiser.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#8 2016-03-14 20:47:51

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: [Help] Special Blocks

If you don't want to read with a deserialiser. How would you get them then?

Offline

#9 2016-03-14 20:52:58

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Help] Special Blocks

Well, I'm now guilty of asking for help with something I could've done myself in the time between my original post and this one.

I've gone and scraped the FG block list from Processor's BotBits with a pro bit of regex to get all the IDs.

Anyone who wants the txt file of all special block IDs (accurate for EE v207) can find it on Pastebin, here.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Tomahawk1457985178588703

Board footer

Powered by FluxBB

[ Started around 1732436743.9685 - Generated in 0.052 seconds, 12 queries executed - Memory usage: 1.49 MiB (Peak: 1.64 MiB) ]