PDA

View Full Version : Zim.qst



Zim
06-21-2013, 03:34 PM
http://sdrv.ms/1aArCRG

This quest file has the scrolling for sideview and overhead done pretty much perfectly.

The rest of what it's going to be able to do is up to you anyway if you are going to make a quest file with it.
If you know scripting you'll know what I mean when you follow the function's layout.. It's all pretty self explanatory. A simple copy/paste of the code with a definition of what combo property shows up where will get you what you need.

I'm going to be taking a prolonged hiatus from actually doing the coding myself, and the description in the script file isn't done very well, so I'll still answer questions if there are any here and on PureZC every now and then if and when they arise.

A few notes on how it's written for the scrolling though:

In the combo set, there's some *INCOMPLETE* combo spots where I started to combo out the items graphics and the enemies combos. When those combos are placed on the map that has the scrolling on layer 0, they appear on the game. There's a method I wrote that says the enemies only start moving when the sword hits them, or is a certain distance from them: That's optional. You could just as easily put it back the way it was originally so that the enemies spawn immediately upon Link (or whatever your character is) coming into proximity of the combo, like the items are set up for. Just duplicate what the item's thing looks like if you're having trouble doing that and it's what you want.


Also, I don't remember, and I can't access the file right now because I don't have ZC anymore, and I'm not going to download it on this computer I'm on atm, but I think the isSolidScreen() function is outdated..
I was redoing the code so that it could do an isSolidScrolling(x,y) function that didn't require a current screen or DMAP input that would calculate the current screens drawn on the actual screen (by current screens I mean as they are drawn in ZQ, by actual screens I mean what is drawn in ZC while playing the game.) and it could do an isSolid() function based on the actual (x,y) as the screens are drawn.

I'm sure that if you are smart enough to figure out how all that stuff really mathematically works out, you're probably smart enough to write it up yourself though. It was basically calculated by the overall X,Y of Link's postion on the ENTIRE DMap, the numbers Z[0] and Z[1] are/were the X, Y.
S==Screen. x==current X as drawn in ZC. y==current Y as drawn in ZC. (if you look at the script, these digits are actually b and a, respectively, and calculated by a similar function to this, but backwards:)
int a=Z[0]-Z[5]; if(a<0)a=0;
ScreenX=Floor((a+x)/256);
int b=Z[1]-Z[7]; if(b<0)b=0;
ScreenY=Floor((b+y)/176);
So given that Screen X is the distance by this calculation in Screens from the leftmost side, i.g. Screen 0 would make Screen X=0, screen 17 would make screen X=1, etc...
and that Screen Y does the same thing, for the Y axis from the top down...
From that we can calculate from Z[0] and Z[1] that
S=ScreenX + ScreenY*16.

After that I had plugged that in and modified the isSolidScreen to not need input args for the current DMap or screen by using Game->GetCurDMap()+1, plus1 because Link is always on the "subfloor" for scrolling, you could see why if you read how it works.., as the arg for Game->GetComboSolid(GetCurDMap()+1,S,x,y).
The x and y are already precalculated for you. It's all already precalculated for you... in fact you don't even really need to know this unless you are going to do what I was planning on and modify Ghost.z to work with scrolling....
Replace the isSolid with isSolidScrolling and the rest of the things with Game->GetComboType, GetComboFlag, etc.. and use the b and a integers as they are calculated instead of only what it looks like in ZQ and presto, ghost.z for scrolling.

Any questions about this feel free to write me on this thread, PM , or ask someone else who knows what they're doing.

Have a nice day!

Zim
04-26-2014, 03:07 AM
Does anyone have this file? Someone ERASED my life. Hehehehe! Anyway, I'd appreciate it if you could repost it for me if you do.

(Bump)

Zim
05-16-2014, 03:49 AM
Still looking to get this file back. A fresh build of ZC with the knowlege in my brain would produce a better than before scrolling platformer but I would really like to have this file back.

CJC
05-17-2014, 11:29 PM
I checked my records and I don't seem to have a copy. Sorry.

SUCCESSOR
05-18-2014, 05:53 AM
Does anyone have this file? Someone ERASED my life. Hehehehe! Anyway, I'd appreciate it if you could repost it for me if you do.

(Bump)

Here is what I have:

https://dl.dropboxusercontent.com/u/94061979/AGN/zim.qst
https://dl.dropboxusercontent.com/u/94061979/AGN/Zimbug.qst

Not sure if either are what you are looking for.

Zim
05-19-2014, 05:15 PM
I found a DoM.qst file that has is for sure the most recent file with the "debugger" scripts in it, because I know for sure I saved them both on 6/4 of last year, the menu with the mouse that can be used to warp link to specific maps, X Y, etc., spawn items, adjust other variables of the user's choosing without having to go back into ZQ and do it from there...
The Zim.qst file that is the lowercase file and the one I have are outdated though, so if anyone has the one that was made and posted on 6/4 I could totally use it, although I did find another one that is slightly more recent than zim.qst: it has the Mirror of the Moon item on it, that scans the current DMAP and locates items, bombable walls, etc., and points an arrow to their locations.

ZeldaPlayer
08-24-2014, 09:40 PM
How did you manage to make put scrolling into your quest? I tried looking to see, but nothing.

Zim
08-25-2014, 12:52 AM
Math, lots and lots of math.
The files are here in this thread somewhere.. Check the dropbox links to get them.
The post right above yours actually. It was a group effort. Once the Game->GetComboAt(Dmap,Screen,x,y) and the Game->SetComboAt(SAMETHING) functions were available I wrote a fake collision function that acts just like the normal collision, tricked the graphics by displaying the layers around the current layer so the character isn't actually on the layer(s) with the graphics, and wrote another function that moves the layers together graphically. From there I wrote a function that makes the interaction with the combotypes happen by association with a coordinate based function that cross-references the player's location with the actual dmap/screen grid by making a mathmatical formula for automatic equivalent graphing of the x,y coordinates of the entire map.
The sideview is very similar except for that the standing on the platforms required the original collision instead of my pseudo collision, and because the combos don't move on the Y plane in less increments than 16 pixels (although on the X axis they can), I just did the same thing as overhead exceot for moving the screen in a player is fixed in the center of screen fashion whenever his or her coordinate is above a certain point on the map so they always land on the platforms correctly, and the x axis is done by the psuedo collision. In sideview the player can even wall-kick and grab the walls.
The code could easily be modified to the effect that the player could only grab the wall on a ledge though.

I just checked the dropbox links and the files are still there.
They are slightly outdated compared to some of the progress I have made since, but they would be a great start for an aspiring coder.

I would strip the thing down to only the functions that are used for scrolling and start from there to use it as a template quest, and get rid of the clock and exp. points stuff. The battle points system and levelling up were perfected but in that file they are buggy, although it is only like one line is a booboo or an arrangement issue. I had it working though so it is easily fixable again, I just haven't had a decent system since.

So to use this in a game of your own, I would recommend exporting the script from the qst file, then going through the functions and deleting all the functions that aren't to do with the scrolling and interacting with combos while scrolling.

Some time in the near future I will strip it down to that and put it in a LoZ 1 file for a template for everyone who needs it.

With those new diaganal 8-ways from CJC I could whip up a LoZ meets Mother in a few days. That sounds sweet.
:) It would look like it anyways with the diagonal movement and scrolling.

Zim
08-29-2014, 04:13 PM
Here I make for you a quest template and explanatory comments in the scripting page.

https://onedrive.live.com/embed?cid=A73C3BB416DD9365&resid=A73C3BB416DD9365%21108&authkey=ACIdLRBFrft1vJg

If y'all butter up the devs real good they might make you a build that the DMAP grid size could be edited using ZQuest, and the functions I wrote could be integrated to do the rest for you.
You'd only need to draw maps to make a scrolling quest.

ZeldaPlayer
08-31-2014, 02:15 PM
So the flags won't trigger tiles? You can walk through walls, I know you worked really hard with math. There were just a few bugs.

Zim
09-01-2014, 02:57 PM
Tiles don't get triggered, combos do. No walk through walls. You didn't actually use the file, did you?

8-Dir Scrolling Zelda: http://youtu.be/HIEUQjiSGAo

There's a video of the most recent update since I started over.

Zim
09-18-2014, 04:26 PM
http://1drv.ms/1swHcn5

I haven't done anything with this for a few weeks but this version is slightly better than the last one.

It uses CJC's 8-Dir Link Tiles, and has bombable bush (The one right next to Link at the start) and all the other bushes burn, for example reasons of how it can use normal combo usages.

There is no more graphical glitchyness, and the scrolling is very smooth, all the way to the edges of the screen.
The only slight bug (and by bug I mean unintentional side-effect) with it is that when Link goes up against a solid combo in any given direction, then stops pressing towards the wall, then presses the direction towards the wall again, he gets wedged into the wall and can't move in the perpendicular directions while that happens.
However, he doesn't get stuck permanently, and that's actually not a game-breaking glitch at all and actually could be used in some way as an aspect of the game engine rather than a bug.

CJC
09-18-2014, 09:35 PM
This is looking more and more fantastic the more you do.

I've grabbed a copy of the quest in its current state and I'll be taking a peek inside (if it's unpassworded, anyway), but you're really doing a fantastic job overcoming the screen restrictions of the game.

Zim
09-21-2014, 02:53 PM
This is looking more and more fantastic the more you do.

I've grabbed a copy of the quest in its current state and I'll be taking a peek inside (if it's unpassworded, anyway), but you're really doing a fantastic job overcoming the screen restrictions of the game.

Thanks dude. These posted demos will always be unpassworded as the point is to share the code.
I would've submitted to script database but I'm still debating to myself if I should integrate all combo types and flags or not, because that is a bunch of code...
Then again it wouldn't be longer than ghost.z.. so I guess it wouldn't hurt.

Zim
09-22-2014, 08:27 PM
Today I integrated the items and NPC spawning into the new template.
Just click the combo with the desired item or npc and place it on the screen and it will show up in game as the actual item or npc with scrolling. Also started on PitWarp function and it works, perfectly actually, with warp return points and everything. The return warp bugged though so more to do on it tomorrow.
There were only two maps to test the warps with scrolling with, and map 0 to 10 did fine, 10 to 0 is set up the exact same and uses the same code but didn't work right.

Probably an easy fix.