Basic help.

NOTE: I HATE A LOT OF YOUR ZZT GAMES, SO WATCH OUT!

Moderators: Commodore, Zenith Nadir

User avatar
clecky
Founder of Scientology
Posts: 18
Joined: Sun Mar 16, 2003 12:59 am
Location: ns, canada
Contact:

Post by clecky »

#change empty solid
"Reefer makes darkies think they're as good as white men." Harry J. Anslinger, 1929
Ryan Ferneau
LOOK OUT FER BAAAD BOB
Posts: 116
Joined: Fri Mar 28, 2003 12:51 am

Post by Ryan Ferneau »

Yeah, but that makes it so the player can't pause or save on pain of TRAPPED IN TIME FOREVER.

On the other hand,

#change empty

is a pretty demented way to get the player onto an adjacent board fast.
53
What can be said now?
Posts: 0
Joined: Tue Mar 11, 2003 6:14 pm

Post by 53 »

Is there anyway for a object to tell what color fake it's on, so that when the fake color changes, it can change its code to very with it

for example, you have an object that walks n on light red/heavy black floor, when it hits heavy red fake/light black fake (such as blood) it moves faster.
User avatar
Zenith Nadir
this is my hammer
Posts: 2767
Joined: Wed Mar 12, 2003 11:40 am
Location: between the black and white spiders

Post by Zenith Nadir »

I don't think so unless you only have like one of that colour fake on a board, but you can have an object detect the colour of a fake adjacent to it.
he looked upon the world and saw it was still depraved :fvkk:

Overall: Rotton egg for breakfast
53
What can be said now?
Posts: 0
Joined: Tue Mar 11, 2003 6:14 pm

Post by 53 »

I know myliverhurtz had Z*Bert do something like that, it would change the color of the tile you walked on... I'll have to look at the code for it.
User avatar
Homz
Ordinery
Posts: 49
Joined: Sat Oct 25, 2003 9:40 pm
Location: Ontario, Canada
Contact:

Post by Homz »

I think the way this is done is to have the correct color fake placed behind the object in the direction opposite his move.
518
What can be said now?
Posts: 0
Joined: Tue Dec 09, 2003 2:04 am

Post by 518 »

Zephyr wrote:In WiL's realm in Deathgate, he made an object that took away all function of the keyboard. Does anyone know the code for that object?
I don't know about an object, but mrs clause's playerless board has a similar effect.

Oh, and a tip: To make a place where you truly cannot enter without getting the correct key, replace the doors in the game with keys, and the keys with doors, like in Lee K's testing. Then, to make an antizap, have objects that constantly place the keys below them, and then place solids around themselves, giving a double anti-zap feature.

And if you want a complicated engine that you want NO ONE to know the programming for, put it in the menu bar. The problem is that an object has to signal it for it to work.

To put something (ie an object) in the menubar:

1. have an empty space be filled with as many objects as the board will allow.

2. take two out.

3. put a player (F1-Z) at the very edge of the board.

4. Type in the cheat code to use ?zap. For my version, it's ?+debug and ?zap, but I think its different for other people. no matter. do it.

5. An empty space will appear on the menubar. Take the player away to some other place.

6. make sure the object you want to place in the menubar is in the last pattern selector (ie you press enter and it goes there).

7. press x right beside the empty space.

8. Delete the rest of the empty objects and all instances of your object that you can find.

9. One will be left in the menubar.

10. When an object signals it, ie #send objectname:action or #objectname:action, it will happen, although you cannot sense a single object of that type.
536
What can be said now?
Posts: 0
Joined: Wed Dec 24, 2003 6:30 pm

Post by 536 »

OMG Nanobot's back! :O

Guy: I haven't tried it yet, but it doesn't seem like that would work. Where would the object be saved when you save the world? It seems like it _might_ work if you just quit out of the editor and play, but beyond that, the object should just be cut out of the board when it's saved.

An object can detect what color fake it's on by first stepping away, then changing, for example, all red fakes to solids, and checking if it is now blocked in the opposite direction it just stepped. This doesn't always work, however, since you might not know if it can step off an any given direction, and it takes two cycles to check the fake status and return to its position.

A similar idea to that is what I used in Box Climber and has probably been used several other places as well: To test if a particular element (for example, ammo) is blocking the object in a given direction, you can first check if it is in fact blocked there, then change all ammo to fake (make sure it's a color that won't already exist on the board), test to see if it is still blocked (if it isn't, then that shows that it is blocked by ammo), and then change the fake back. This can be done within a single cycle with nothing more than a quick flicker.

In case you didn't get what zzo38 was saying a while back, I'll explain it further...

Here is the ZZT file format. If you notice, the gems counter is stored just before the key counters (BK, GK, etc.) When the player grabs a key, its color number (blue=1, green=2, etc.) is increased by 7 to get the byte that should be increased by 1. A key counter with a value of 1 means that it's set, and a value of 0 means it isn't. The number for black is 0, which means that the 7th byte will be set to 1. Because Tim Sweeney didn't expect the black key to be used, so he didn't reserve a space for it. Instead, the byte that the black key refers to is part of the gems counter: its second byte. The first byte of a counter is the 0-255 value, and the second byte is multiplied by 256, so 1=256, 2=512, and so on. So, when the second byte is set to 1, the gems counter increases by 256. When you touch a black door, the "key" counter is set to 0, so you lose 256 gems.
518
What can be said now?
Posts: 0
Joined: Tue Dec 09, 2003 2:04 am

Post by 518 »

Nanobot wrote:OMG Nanobot's back! :O

Guy: I haven't tried it yet, but it doesn't seem like that would work. Where would the object be saved when you save the world? It seems like it _might_ work if you just quit out of the editor and play, but beyond that, the object should just be cut out of the board when it's saved.
Yeah, welcome back nanobot.

For some reason, the game save includes the region to the east of the end of the board. The region most likely includes edgeboards so that the player stepping into one of them will go to the next board, giving the illusion of going east from board to board while keeping the screen the same.

The game also stores all debug and cheat functions. You can even pre-program flags if you're too lazy to make an object to store the flags. And in this way, there's no possible way to zap the object holding the flag, because it's set into the game's memory instead.

Anyway, if you zap the edge of a board, I assume that the boardedge dies like an ordinary boardedge would. Then, you can explore the menuscreen. There are blocks and fatal exception errors when, for instance, you try to "get" the player's health symbol.

When you zap while in the editor, the zapped space does not show up because you're looking at the editor screen which is directly on top of the zzt inventory. If it wasn't, it would probably be possible to edit the inventory.

You can similarily fill it with objects because the objects will go through a line of empties no matter where they are. I haven't tried it with fakes, but I assume the menubar is set as not blocked, not as a particular empty or fake.

When you save, it records the object as well. So if you go back in there and feel around, the object will still be there.

They do not make their own stimuli, but respond to another's stimuli.
536
What can be said now?
Posts: 0
Joined: Wed Dec 24, 2003 6:30 pm

Post by 536 »

Unfortunately, for almost a week I'm on a computer that I cannot put ZZT on, so I can't test what you are saying. But I am very familiar with the ZZT file format and there just isn't any place in it to store the object element. Its stats probably remain, but the element they would correspond to is a board edge. Let me explain further...

Around the visible portion of the board is a layer of board edges. Whenever you enter a new board (or generally, whenever a board is loaded), that board edge layer is redrawn. The board edges are NOT stored in the ZZT game file, but rather are automatically drawn in by the ZZT program. The size of the board stored in a ZZT file is a fixed size: 60x25. There is nothing you can do to make this larger. Because of this, there simply cannot be an element stored beyond the basic 60x25 portion of the board.

When you put the object into the menu (in the board edge layer) in the editor, it actually puts the object there in memory. The board edges are actually there in memory as well, as if the board was larger than 60x25. However, when you save the game, it only takes the 60x25 portion and puts that into the game file. Thus, the object element is lost.

However, the stat information (including OOP code) isn't stored in the same way. The object's stats are probably saved, referring to X=61 and Y=whatever. So you could say that the object in part is saved. But the way ZZT uses stat information depends on the element at those coordinates. Since the object is replaced with a board edge, it is as if you are simply giving a board edge stats.

Now I just thought of something that might prove your claim true, and it's something that I don't believe I've actually tried. Using something like KevEdit, try taking just any element like a solid or board edge and give it OOP code with a name and labels. See if you can have an object send to that label. If the non-object actually executes OOP code, we have an interesting new development.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

Good to hear from you Nanobot!

Now I've got a question! (It begins again! >:) )

It's something I just recently discovered and so far I can only get it to occur on one game, that Sdarknes one that just got uploaded. If you enter something into the cheat dialogue box, no matter if it's a valid command or not, a number is displayed over it after you press enter. "m209147"
*POW* *CLANK* *PING*
536
What can be said now?
Posts: 0
Joined: Wed Dec 24, 2003 6:30 pm

Post by 536 »

Well, an obvious possibility is that the "debug" flag is somehow set. The flag is probably either set in your game by an object or is set into your game, which could have happened if you used the +debug cheat while in the editor and saved.

As soon as you enter a cheat, the area around the cheap box is refeshed and the debug code is shown because the flag is set.

To fix this, you can either change the name of the flag from debug to something else if it is used by objects, or use an external editor to remove the debug flag from the "global settings".
User avatar
Dr. Dos
OH YES! USE VINE WHIP! <3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

I'm not reading these posts because they're too long. Hello Nano.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
518
What can be said now?
Posts: 0
Joined: Tue Dec 09, 2003 2:04 am

Post by 518 »

Commodore wrote:Good to hear from you Nanobot!

Now I've got a question! (It begins again! >:) )

It's something I just recently discovered and so far I can only get it to occur on one game, that Sdarknes one that just got uploaded. If you enter something into the cheat dialogue box, no matter if it's a valid command or not, a number is displayed over it after you press enter. "m209147"
i MADE that game. Somewhat odd, perhaps I was fiddling around with something when that happened. To be honest, it was over 2 years ago and I just dont remember.

Nanobot: The object responding was actually not my idea, but from someone else's game. Somehow, they got theirs to work. I once had one working too, but I don't remember how.

Oh, and try saving while in the box. All the zaps will be undone, and the player will still be in there.
518
What can be said now?
Posts: 0
Joined: Tue Dec 09, 2003 2:04 am

Post by 518 »

Okay, I can answer your question now. I set the debug flag while editing that game. Not sure why, probably just beta testing the game and tired of always putting in ?+debug to cheat around it, so I pre-programmed it in.

No big mystery. Only that m-number doesn't appear in version 2.0 so I didn't notice it.
Post Reply