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.

#26 2015-03-25 21:02:59, last edited by madiik (2015-03-25 21:05:22)

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: [Tool] The (best) World Deserializer!

Tried the newest version, still doesn't let me assign variable in the "init" event, also it gives me an IndexOutOfRange exception. or idk.

Dunno what am I doing wrong though.

 private async void EECoin()
        {
            Random Coin = new Random();

            var roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];
            var chunks = InitParse.Parse(initM);
            foreach (var chunk in chunks)
            {
                foreach (var pos in chunk.Locations)
                {
                    roomData[chunk.Layer, pos.X, pos.Y] = chunk.Type;
                }
            }
            world = roomData;
            while (conn.Connected == true)
            {
                if (world != null)
                {
                    await Task.Delay(5);
                    int CoinX = Coin.Next(1, SizeX - 1);
                    int CoinY = Coin.Next(1, SizeY - 1);
                    try
                    {
                        if (world[2, CoinX, CoinY] == 0)
                        {
                            await Task.Delay(100);
                            conn.Send(worldkey, 0, CoinX, CoinY, 100);
                            await Task.Delay(2000);
                            conn.Send(worldkey, 0, CoinX, CoinY, 0);
                        }
                    }
                    catch (IndexOutOfRangeException err)
                    {
                        MessageBox.Show(err.ToString(), "Error");
                    }
                }
            }
        }

someone guide me to the light that i do not see


shh i have returned

Offline

#27 2015-03-25 23:50:51, last edited by DarkDragon4900 (2015-03-27 12:14:27)

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: [Tool] The (best) World Deserializer!

while (conn.Connected == true)

You can just use

while (conn.Connected)

-

if (world[2, CoinX, CoinY] == 0)

You're supposed to replace "2" with the layer; in this case, "0".

Offline

#28 2015-03-26 13:32:25

912468
Member
Joined: 2015-02-21
Posts: 212
Website

Re: [Tool] The (best) World Deserializer!

DarkDragon4900 wrote:
while (conn.Connected == true)

You can just use

while (conn.Connected == true)

Do you mean this:

while (conn.Connected)

Because you wrote two times the same.


vF0MA5o.png

Offline

#29 2015-03-27 12:15:25, last edited by DarkDragon4900 (2015-03-27 12:18:33)

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: [Tool] The (best) World Deserializer!

912468 wrote:

Do you mean this:

while (conn.Connected)

Mhmm.
Apologies, fixed.

[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks :p

Offline

#30 2015-03-27 14:11:55

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: [Tool] The (best) World Deserializer!

No, I haven't fixed the bot yet. The solution didn't seem to work.


shh i have returned

Offline

#31 2015-03-27 14:40:41

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [Tool] The (best) World Deserializer!

madiik wrote:

No, I haven't fixed the bot yet. The solution didn't seem to work.

//at your variables thingy add:
//uint[,,] world;
private async void EECoin()
        {
            Random Coin = new Random();

            var roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];
            world = new uint[2m, initM.GetInt(12), initM.GetInt(13)];
            var chunks = InitParse.Parse(initM);
            foreach (var chunk in chunks)
            {
                foreach (var pos in chunk.Locations)
                {
                    roomData[chunk.Layer, pos.X, pos.Y] = chunk.Type;
                    world[chunk.Layer, pos.X, pos.Y] = chunk.Type;
                }
            }
            //world = roomData; //no don't use this. Just make one equal to roomData instead of defining it to roomData var wich is private.
            while (conn.Connected == true)
            {
                if (world != null)
                {
                    await Task.Delay(5);
                    int CoinX = Coin.Next(1, SizeX - 1);
                    int CoinY = Coin.Next(1, SizeY - 1);
                    try
                    {
                        if (world[2, CoinX, CoinY] == 0)
                        {
                            await Task.Delay(100);
                            conn.Send(worldkey, 0, CoinX, CoinY, 100);
                            await Task.Delay(2000);
                            conn.Send(worldkey, 0, CoinX, CoinY, 0);
                        }
                    }
                    catch (IndexOutOfRangeException err)
                    {
                        MessageBox.Show(err.ToString(), "Error");
                    }
                }
            }
        }

Well if this ain't working blame yourself. This try was what i did to my bot and it's working 100% fine.


http://i.imgur.com/bjvgH5L.png?1

Offline

#32 2015-03-27 14:41:29

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [Tool] The (best) World Deserializer!

DarkDragon4900 wrote:
912468 wrote:

Do you mean this:

while (conn.Connected)

Mhmm.
Apologies, fixed.

[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks //forums.everybodyedits.com/img/smilies/tongue

Your changes don't change anything actually...


http://i.imgur.com/bjvgH5L.png?1

Offline

#33 2015-03-27 14:42:15

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [Tool] The (best) World Deserializer!

DarkDragon4900 wrote:
while (conn.Connected == true)

You can just use

while (conn.Connected)

-

if (world[2, CoinX, CoinY] == 0)

You're supposed to replace "2" with the layer; in this case, "0".

2 is decorative layer. He is doing it right.


http://i.imgur.com/bjvgH5L.png?1

Offline

#34 2015-03-27 20:05:00

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

Re: [Tool] The (best) World Deserializer!

marcoantonimsantos wrote:
DarkDragon4900 wrote:
while (conn.Connected == true)

You can just use

while (conn.Connected)

-

if (world[2, CoinX, CoinY] == 0)

You're supposed to replace "2" with the layer; in this case, "0".

2 is decorative layer. He is doing it right.

Since when does decorations have their own layer?

Offline

#35 2015-03-28 11:13:40

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: [Tool] The (best) World Deserializer!

marcoantonimsantos wrote:
DarkDragon4900 wrote:
912468 wrote:

Do you mean this:

while (conn.Connected)

Mhmm.
Apologies, fixed.

[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks //forums.everybodyedits.com/img/smilies/tongue

Your changes don't change anything actually...

Yes, they do, they save him a few lines of coding in total.
Well, tidying your code up and making it neater does change it though.
You don't wanna be looking at a bunch of mess.

--

marcoantonimsantos wrote:

2 is decorative layer. He is doing it right.

There is no such thing as a decorative layer.
Decorative blocks are placed on layer 0.
Using layer 2 is what's causing the IndexOutOfRange exception since he defined it to "2" ([2, wWidth, ..]) which makes the only possible layers be 0 & 1.
Besides, coins belong to the action blocks category.

--

marcoantonimsantos wrote:

Well if this ain't working blame yourself. This try was what i did to my bot and it's working 100% fine.

You didn't really change anything tbh.
He already had a

var roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];

Offline

#36 2015-03-28 12:41:12

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [Tool] The (best) World Deserializer!

DarkDragon4900 wrote:
marcoantonimsantos wrote:
DarkDragon4900 wrote:
912468 wrote:

Do you mean this:

while (conn.Connected)

Mhmm.
Apologies, fixed.

[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks //forums.everybodyedits.com/img/smilies/tongue

Your changes don't change anything actually...

Yes, they do, they save him a few lines of coding in total.
Well, tidying your code up and making it neater does change it though.
You don't wanna be looking at a bunch of mess.

--

marcoantonimsantos wrote:

2 is decorative layer. He is doing it right.

There is no such thing as a decorative layer.
Decorative blocks are placed on layer 0.
Using layer 2 is what's causing the IndexOutOfRange exception since he defined it to "2" ([2, wWidth, ..]) which makes the only possible layers be 0 & 1.
Besides, coins belong to the action blocks category.

--

marcoantonimsantos wrote:

Well if this ain't working blame yourself. This try was what i did to my bot and it's working 100% fine.

You didn't really change anything tbh.
He already had a

var roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];

He did, but it's a var inside init, so it would be private and only work for init, wich is causing his problems.


http://i.imgur.com/bjvgH5L.png?1

Offline

#37 2015-03-28 19:05:48

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: [Tool] The (best) World Deserializer!

I'm still having the issue. Your arguing hasn't helped anything.

2, or 0? Nothing. Still the same bug.


shh i have returned

Offline

#38 2015-03-30 11:40:13

Processor
Member
Joined: 2015-02-15
Posts: 2,246

Re: [Tool] The (best) World Deserializer!

Please keep this on-topic. The code being discussed is not the example code, and if you are having issues with your code please create new topics. Kthxbai


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

#39 2015-03-30 16:41:11, last edited by Tomahawk (2015-03-30 16:44:36)

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

Re: [Tool] The (best) World Deserializer!

There seems to be a lot of hassle with using the 'best' deserialiser in EE. You'd think after having created CupCake and BotBits, this would be perfect.

Oh, wait... //forums.everybodyedits.com/img/smilies/tongue

And having all extra block parameters in an object array is about as useful as downloading RAM. Ever heard of structs?

I'm tempted to write a public deserialiser myself, just to end this monopoly of unhelpful libraries.


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

Offline

#40 2015-03-31 11:28:24

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: [Tool] The (best) World Deserializer!

Yes, please.

Offline

#41 2015-04-03 07:53:39, last edited by Processor (2015-04-03 07:54:02)

Processor
Member
Joined: 2015-02-15
Posts: 2,246

Re: [Tool] The (best) World Deserializer!

Tomahawk wrote:

And having all extra block parameters in an object array is about as useful as downloading RAM. Ever heard of structs?

Structs have specific lengths, you can't have something as flexible as this put into a struct. This has a clear purpose: to be a serializer that never breaks. The "best" part in the title is kinda a silly name (hence why I put it in parentheses), there will probably not be a perfect serializer because every serializer has its own pros and cons. You shouldn't take that name too seriously //forums.everybodyedits.com/img/smilies/tongue
If you want to have your blocks saved in structs, you could use BotBits (I don't know any other public framework that uses structs, feel free to show me another one that uses structs)

There are more bot makers creating bots using other frameworks than BotBits/CupCake. What monopoly are you talking about? lol


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

#42 2015-04-03 14:36:43

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: [Tool] The (best) World Deserializer!

Does this tool have the functionality to read whats on the sign? Or do you have to re-place all signs?


shh i have returned

Offline

#43 2015-04-03 19:05:20

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [Tool] The (best) World Deserializer!

madiik wrote:

Does this tool have the functionality to read whats on the sign? Or do you have to re-place all signs?

blockargs[1]
To be able to read blockargs, read part 3 of this guide:
http://forums.everybodyedits.com/viewtopic.php?id=27068


http://i.imgur.com/bjvgH5L.png?1

Offline

#44 2015-04-11 11:09:46

Processor
Member
Joined: 2015-02-15
Posts: 2,246

Re: [Tool] The (best) World Deserializer!

Update:

- A bug regarding "reset" messages has been fixed.


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

Wooted by:

#45 2015-04-19 07:08:59

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: [Tool] The (best) World Deserializer!

ayy processor
realize that your updates have broken your own world deserializer

not best
bad
;(


shh i have returned

Offline

#46 2015-04-19 09:55:48

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [Tool] The (best) World Deserializer!

madiik wrote:

ayy processor
realize that your updates have broken your own world deserializer

not best
bad
;(

no, the newest update broke it.
Here's a tip: replace 12 and 13 with 15 and 16. All old values have now 3 ids more.

Yeah, they added description and some other values.


http://i.imgur.com/bjvgH5L.png?1

Offline

#47 2015-04-19 10:02:36

Psychocrysma
Member
Joined: 2015-02-26
Posts: 46

Re: [Tool] The (best) World Deserializer!

marcoantonimsantos wrote:
madiik wrote:

ayy processor
realize that your updates have broken your own world deserializer

not best
bad
;(

no, the newest update broke it.
Here's a tip: replace 12 and 13 with 15 and 16. All old values have now 3 ids more.

Yeah, they added description and some other values.

Oi, thanks!

Offline

Wooted by:

#48 2015-05-20 00:28:37

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [Tool] The (best) World Deserializer!

Can this be used for parsing world data from the BigDB object (i.e not the init data but the "minimap" data?)

Offline

#49 2015-05-20 14:49:11

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: [Tool] The (best) World Deserializer!

there's no minimap

only init message

init message create minimap

k?


shh i have returned

Offline

#50 2015-05-20 15:23:56, last edited by Hexagon (2015-05-20 15:28:51)

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [Tool] The (best) World Deserializer!

madiik wrote:

init message create minimap

I do not want to join the world in order to create a minimap; I'd like to query the Worlds table in the BigDB database to get the last-saved world data. Using this program, or something else that Processor has made, is this possible?

Offline

SirJosh39171458770132590512

Board footer

Powered by FluxBB

[ Started around 1732553447.4558 - Generated in 0.097 seconds, 14 queries executed - Memory usage: 1.78 MiB (Peak: 2.06 MiB) ]