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 2015-07-28 16:26:48, last edited by Tomahawk (2015-07-28 16:37:58)

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

Block names and their respective IDs

In the super secret soon-to-be-released bot I'm writing I display EE blocks and smileys in PictureBoxes, where the item PNGs are stored in and retrieved from the application's resources folder.
All the block images are saved with their IDs for the file name (Credz to ZeldaXD and Jesse for the images themselves). The problem is that I'd like to access a block or a set of blocks by its PayVault name (e.g. "bricksign" or "brickbgcanvas"), and it's a little too time consuming to do manually write and maintain a list to connect the two.

In short, I want some way to associate a block or block pack with its name, so in future I can simply do:

int portalID = getIDFromName("brickportal");
int[] glassBlockIDs = getPackageFromName("brickglass");

N.B.
I'm aware of ParadoxInTheVoid's list of block packs and IDs at http://forums.everybodyedits.com/viewtopic.php?id=29119, but it's not complete.
I'm not intending to use CupCake or any other SDK for this, so gtfo Processor.


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 2015-07-28 20:23:34

ParadoxInTheVoid
Member
From: ̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺
Joined: 2015-02-18
Posts: 341

Re: Block names and their respective IDs

I made the list for my bot, I have plans to complete it but if anyone else would do so that would be great.


signature.png

Offline

#3 2015-07-28 21:55:56

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

Re: Block names and their respective IDs

ParadoxInTheVoid wrote:

I made the list for my bot, I have plans to complete it but if anyone else would do so that would be great.

If you could share it on a github or a pastebin we can finish it for you, otherwise not.

Offline

#4 2015-07-28 22:01:56

ParadoxInTheVoid
Member
From: ̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺
Joined: 2015-02-18
Posts: 341

Re: Block names and their respective IDs

den3107 wrote:
ParadoxInTheVoid wrote:

I made the list for my bot, I have plans to complete it but if anyone else would do so that would be great.

If you could share it on a github or a pastebin we can finish it for you, otherwise not.

Not sure how pastebin is gonna work, but here is what I have for now:
http://pastebin.com/1n8V52Mp


signature.png

Offline

#5 2015-07-29 22:49:22

eeisold
Member
Joined: 2015-06-14
Posts: 202

Offline

#6 2015-07-30 12:01:18

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

Re: Block names and their respective IDs

eeisold wrote:

I'm sure you decompiled EE's source and saw the list of blocks

Where be this list within the source?


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

Offline

#7 2015-07-30 19:32:54, last edited by den3107 (2015-07-30 19:56:14)

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

Re: Block names and their respective IDs

Took the liberty of looking through the source and finding the list for you.

As far as I can tell it contains all smileys, blocks but not the aura's and all aura's.
Every item is also categorized for every package.

I got the method that contained all the items in RAW CODE here:
http://pastebin.com/fDtjQLRa

It may require a bit difficult parser/stripper to put the content into a format you prefer, so be prepared to get working.


I will write a parser and parse the list myself, but since you want it pretty soon it might be smarter to just do it yourself right now.
The parsed list I'm going to make will be public too all, but the people would be stuck with my format, which would be another reason why you might want to do it yourself.

Offline

Wooted by:
Wooted by:

#9 2015-07-30 23:20:53

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

Re: Block names and their respective IDs

den3107 wrote:

I got the method that contained all the items in RAW CODE here:http://pastebin.com/fDtjQLRa

eeisold wrote:

Try this for fun.

Awesome! Ty both.


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

Offline

#10 2015-07-31 01:58:30, last edited by capasha (2015-07-31 02:39:50)

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

Re: Block names and their respective IDs

I generated a list self. But it doesn't have the special blocks.
Regexp <3
http://pastebin.com/pW87Qi23

The tool to extract the as-file with: http://www.mediafire.com/download/ipnri … ractor.zip
Sourcecode: http://www.mediafire.com/download/x7yop … ractor.zip
Awesome Tool to test regexp in: http://www.regexbuddy.com/

Offline

Wooted by:

#12 2015-07-31 02:13:02

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

Re: Block names and their respective IDs

eeisold wrote:

I really should take on some RegExp. However, it's too much to take in with 5 minutes. Lol
I just used some C# splits and such.

Isn't splits just a lazy way? //forums.everybodyedits.com/img/smilies/tongue

Offline

#14 2015-08-02 12:15:25

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

Re: Block names and their respective IDs

capasha wrote:

I generated a list self. But it doesn't have the special blocks.

Being stubborn me, I'm going to make a list myself c:

capasha wrote:

Awesome Tool to test regexp in: http://www.regexbuddy.com/

Personally prefer https://www.debuggex.com/ because of all the nice visuals.

eeisold wrote:

ETbh, too complicated for this setup. Now, if we needed to find dates, or special looking sets of strings, etc...

Once you know how to user regex, it's really simple and done in literally 5 seconds (at least, it is for me).

Offline

#15 2015-08-03 19:16:37

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

Re: Block names and their respective IDs

den3107 wrote:

Personally prefer https://www.debuggex.com/ because of all the nice visuals.

Yeah I guess we prefer different regex test tools. I found regexbuddy in a regex book.
Tried it and like it really much.


den3107 wrote:

Being stubborn me, I'm going to make a list myself c:

Awesome. Are you going to share that list?

Offline

#16 2015-08-03 21:20:35, last edited by den3107 (2015-08-03 21:22:23)

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

Re: Block names and their respective IDs

capasha wrote:
den3107 wrote:

Being stubborn me, I'm going to make a list myself c:

Awesome. Are you going to share that list?

Due to work I don't have as much free time, and I don't want to put all of it into coding when I'm probably not going to use the libs cus I don't have any ideas for them (thinking about a public bot, but shouldn't know what special things to add).

But yes, I am going to upload the list, though in a bit different fashion:
I'm going to make 2 versions:

1) a class using your method, with prefilled arrays (though I'm gonna work with Lists cus I prefer those), where a textual version of those Lists can be put in the class when an update is required.
Less bit of this method is that it requires you to recompile your program, shouldn't be too much of a problem, but meh, mostly when using it for releases.

2) a class using my method, a CSV-file where the class contains a de-parser and for the rests works the exact same as the other class.
Less bit of this is that, when you work with public releases, it might be a bit fiddling the first time to include the file to your releases easily.


In both cases the class will be fully equipped with all kinds of functions to read the lists and find elements in the lists in several ways etc. etc. etc.
Just to make life easier for others and keep me occupied for a little longer.

Offline

#18 2015-08-04 17:16:28

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

Re: Block names and their respective IDs

eeisold wrote:

"5 seconds regex" ok sounds good

Can't wait for that 5-second list of blocks :3

They're easy to write (when you know how it works) but hard to read.
Aside from that I kinda do all kinds of stuff around it which slows the process.

Offline

#19 2015-08-05 14:36:20

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

Re: Block names and their respective IDs

Alright, so made the lists and the class that uses the pre-made list.

List with all items (smileys, auras and blocks) formatted:
http://pastebin.com/aebghZaE

List with all blocks in a list, put into object created for a specific class:
http://pastebin.com/7wtsaWvj

The specific class I talked about earlier, this class contains some methods that should allow you to search for every parameter a block has in every way:
http://pastebin.com/8YThj57t


P.S. Yes, I really like Lists, now don't go ask why I didn't use arrays...

Offline

Wooted by:

#20 2015-08-05 18:11:58

ParadoxInTheVoid
Member
From: ̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺
Joined: 2015-02-18
Posts: 341

Re: Block names and their respective IDs

den3107 wrote:

Alright, so made the lists and the class that uses the pre-made list.

List with all items (smileys, auras and blocks) formatted:
http://pastebin.com/aebghZaE

List with all blocks in a list, put into object created for a specific class:
http://pastebin.com/7wtsaWvj

The specific class I talked about earlier, this class contains some methods that should allow you to search for every parameter a block has in every way:
http://pastebin.com/8YThj57t


P.S. Yes, I really like Lists, now don't go ask why I didn't use arrays...

Very good on all of this, I probably never would of done this.


signature.png

Offline

ParadoxInTheVoid1438794718527253

Board footer

Powered by FluxBB

[ Started around 1732786475.2372 - Generated in 0.158 seconds, 13 queries executed - Memory usage: 1.74 MiB (Peak: 1.99 MiB) ]