Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Discuss FF Combo Scripting Ideas HERE

53 replies · 9,634 views · Started 14 August 2006

I'm pretty much clueless about these things, but would it be possible to create puzzles similar to the ones in the Oracle Games where you have to walk over a set of tiles in a paticular patten to light them all up in one line?

Geez Jman, you enjoy doing threads like that, dont you. First the revolution, now this...
I dont know to much, but it seems entierly plausable to create puzzles where blocks have to be pushed into a certain order. (Also oracles games)
And I know with this, moving platforms could be done. The only problem is making the pit around them(See my suggestion in the Beta Suggestions forum. It would actully be easy to medium difficult to implement)

I agree with the above, but how about an option to change the scripting language?
I pretty much only know C++, so it could help.

Uh... port this baby to C/C++ syntax or something and I might have a clue how I could use it. :blah:

Your test script really didn't give me any ideas other than the fact that it could be flexible. I just have no clue how flexible it is regarding everything that can be done. But then again... that's because I'm not that great with ASM and there is only one example of the possibilities in front of me (though I thought of someone making a game of pong, for some reason).

It's exciting to see some sort of scripting floating around now, even though I won't be able to use it unless I either learn ASM or wait for a different language.

Master_of_Power wrote:It doesn't detect Link yet

Um, the lx and ly arguments ad Link's X and Y positions. So yeah, in theory something constantly rotating Link would work.

How about
[FONT="Fixedsys"]VOIDPOS[/FONT] and then you could add 1 or 0 (or [FONT="Fixedsys"]true[/FONT]/[FONT="Fixedsys"]false[/FONT])
This would void the use of hitboxes behind/in front of the FFC. (maybe by 8x8 tile)
In other words, it would not be solid or a pit there.

Yes, I've whipped out Ye Olde Flex&Bison and so the next beta will hopefully let you specify scripts in C-like syntax (with high level features like loops, function calls, etc.) Thus if you have any suggestions for what should go in the high-level language, please let me know.

Anyone come up with the idea to have a pool of some general scripts that people can grab and use?

Perhaps an automatic scripter that analyzes what you're typing, and provides the proper input based on what you've typed. For example: (And pretend the ____ is four spaces.)

[font=courier]

____SETV d0,100 <-- Correct Sets variable d to 100
____SETV dx,1 <-- Unknown
____SETV yd,1 <-- Correct Sets vertical speed to 1 - down
____WATFRAME <-- Unknown
____SUBV d0,1 <-- Correct Subtracts 1 from variable 0
____COMPAREV d0,0 <-- Correct Compares variable 0 to 0
____GOTOTRUE 9 <-- Correct Goes to line 9 in the script
____GOTO4 <-- Syntax Error
____SETV d,100 <-- Missing Variable
____SETV xd-1 <-- Missing Component
____SETV yd,-1 <-- Correct Sets vertical speed to -1 - up
____WAITFRAME <-- Correct Waits (Or whatever this does...)
____SUBV d0,1 <-- Correct Subtracts 1 from variable 0
____COMPARE d0,0 <-- Missing Component
____GOTOTRUE 1 <-- Correct Goes to line 1 in the script if the above value is true
____GOTO 12 <-- Correct Goes to line 12 in the script
____QUIT <-- Correct Quits the script

[/font]
By "Automatic," I mean it'll mark up each line as you make it to make sure you're not making any errors as you type, and would also provide a description of what you're doing in layman's terms.

Freedom wrote:Anyone come up with the idea to have a pool of some general scripts that people can grab and use?
I, for one, would relish such a thing. I'll be thinking about this quite a bit over the coming weeks in my spare time. A few brave souls can indeed make a world of difference in making FF Scripting easier for everyone. Thankfully, comments are indeed allowed in FF Scripting. It's just a matter of seeing how it all works, as well as why.

Okay, so I fired up beta 12c and attempted to make a simple homing trap. W00t. 😛


SETV xd,0 ; clear x speed
SETV yd,0 ; clear y speed
COMPARER ly,y ; check if link is above/below trap
GOTOTRUE 9 ; if link y = trap y, skip <> checks because no up/down speeds need to be set
GOTOMORE 8 ; if link y > trap y, skip next 2 lines
SETV yd,-0.5 ; link y < trap y, so trap moves up
GOTO 9 ; skip next line
SETV yd,0.5 ; link y > trap y, so trap moves down
COMPARER lx,x ; check if link is to left/right of trap
GOTOTRUE 15 ; if link x = trap x, skip <> checks because no left/right speeds need to be set
GOTOMORE 14 ; if link x > trap x, skip next 2 lines
SETV xd,-0.5 ; link x < trap x, so trap moves left
GOTO 15 ; skip next line
SETV xd,0.5 ; link x > trap x, so trap moves right
WAITFRAME ; to give the trap time to move 😛
GOTO 1 ; reset the speeds to 0 and pick new direction
QUIT ; self-explanatory. 😊

I'm having two weird problems with this, though:

1.
Although I didn't seem to break the comment syntax (as specified in jman's post in the beta 12 thread), the script won't work in ZQuest unless I remove the comments...if I try to load it with the comments intact, ZQuest hangs. 😮dd:

2.
The trap works perfectly with a speed of 1...unfortunately, this makes it near-impossible to outrun (as in...you can outrun it, but literally won't have time to do anything else :sweat😊, and this is in a dungeon room with no solid blocks or anything (save for the walls themselves).
However, if I lower the speed to 0.5, it quits working correctly. 🙄
At that speed, it only goes down or right, or stands still if it's right on Link. Never moves up or left. 😮dd:
This has stumped me quite a bit, since I don't see any logic problems in the script. Although I wouldn't be surprised if I missed something completely obvious, considering the maze of GOTOs I had to use to do the "equal, greater than, or less than" checks...:laughing:

Here is a homing trap script, if you want one.


SETV d0,0.5
START WAITFRAME
COMPARER lx,x
GOTOMORE XMORE
SUBR x,d0
GOTO CHECKY
XMORE ADDR x,d0
GOTO CHECKY
CHECKY COMPARER ly,y
GOTOMORE YMORE
SUBR y,d0
GOTO START
YMORE ADDR y,d0
GOTO START
QUIT

It will follow Link around the screen at a speed of 0.5. If you want it at a different speed just change the value in the first line. This script really doesn't need to involve the speed registers. Just update the position of the trap every frame so that it is closer to Link.

Also it's much easier to use labels for GOTO statements than to keep track of line numbers.

I will be writing a FFScript tutorial very soon for those who don't really understand how to do it.

Enjoy.

That's quite good, but I feel that there should be GOTOTRUE checks as well so that it doesn't needlessly add and subtract 0.5 whenever Link happens to be on the same axis as it.

COMPARER lx,x
GOTOLESS 11; if lx < x, x -= 0.5
GOTOTRUE 5
ADDV x,0.5; if lx > x, x += 0.5
COMPARER ly,y
GOTOLESS 13; if ly < y, y -= 0.5
GOTOTRUE 9
ADDV y,0.5; if ly > y, y += 0.5
WAITFRAME
GOTO 1
SUBV x,0.5
GOTO 5
SUBV y,0.5
GOTO 9
QUIT

Praethus wrote:This script really doesn't need to involve the speed registers. Just update the position of the trap every frame so that it is closer to Link.

...

Excuse me while I go bang my head on a wall repeatedly for not thinking of this obvious course of action. :sweat:

Seriously though, yours and _L_'s are much better...I was pretty sure there was an easier way to begin with, but couldn't figure out what it was...😛

Could someone please help me understand JMans Moving platform script, like how I change speed or direction. I have almost no understanding of the scripting.

These are the new/planned additions to the script language command set:

EXP - Sets arg1 to arg1! (ie. 3!=3x2x1)
POWERR
POWERV - Sets arg1 to arg1 to the arg2 power (arg1^arg2)
IPOWERR
IPOWERV - Sets arg1 to arg1 to the 1 over arg2 power (arg1^(1/arg2))
NOT - Sets arg1 to the bitwise-not of arg1 (!arg1)
ANDR
ANDV - Sets arg1 to arg1 bitwise-and arg2 (arg1&arg2)
ORR
ORV - Sets arg1 to arg1 bitwise-or arg2 (arg1|arg2)
XORR
XORV - Sets arg1 to arg1 bitwise-exclusive-or arg2 ((arg1|arg2)&!(arg1&arg2))
NANDR
NANDV - Sets arg1 to arg1 bitwise-nand arg2 (!(arg1&arg2))
NORR
NORV - Sets arg1 to arg1 bitwise-nor arg2 (!(arg1|arg2))
XNORR
XNORV - Sets arg1 to arg1 bitwise-exclusive-or arg2 (!((arg1|arg2)&!(arg1&arg2)))
LSHIFTR
LSHIFTV - Bit-shifts arg1 left by arg2 positions (fills with zeroes) (arg1<<arg2)
RSHIFTR
RSHIFTV - Bit-shifts arg1 right by arg2 positions (fills with zeroes) (arg1>>arg2)
LROTR
LROTV - Bit-shifts arg1 left by arg2 positions (fills with shifted bits) (similar to arg1<<arg2)
RROTR
RROTV - Bit-shifts arg1 right by arg2 positions (fills with shifted bits) (similar to arg1>>arg2)
PUSHR
PUSHV - Pushes arg1 onto the internal stack (first in, last out)
POP - Pops the top value from the internal stack and places it in arg1
ENQUEUER
ENQUEUEV - Adds arg1 to the internal queue (first in, first out)
DEQUEUE - Removes the first value from the internal queue and places it in arg1

These are the new arguments available:
sd0-sd7 - Persistent screen data. These values hold their data assigned to them for the current screen, even after going to another screen and coming back.
gd0-gd255 - Persistent global data. These can be set or read anywhere. So, you could set a global variable in one room then do something in another room based on that value.

Thoughts?

Dark Nation wrote:
Thoughts?

I'm at a loss to think of what FFC implementation would require so many binary operations. (I privately suspect that half of the reason why we're getting so many of them is because they're easy for the developers to implement.)

Could we also have something that the non-computer scientists can understand? Like "SFX - commences playing one of the sounds in sfx.dat, with argument 1 being the ID of the sound, and argument 2 being the volume."

Wait, so which of the following are possible with FFC scripting, just to get an idea of what you can do:

-An object, such as a trap, that moves in a circle (without using billions of FF attribute change combos)?
-A character that follows Link (such as a fairy)?
-An object that continually circles Link?
-An object that randomly roams around the screen with no predetermined path?
-An object/character that moves opposite or away from Link?
-An object that warps around the screen, disappearing & reappearing at random locations?

idontknow wrote:Wait, so which of the following are possible with FFC scripting, just to get an idea of what you can do:

-An object, such as a trap, that moves in a circle (without using billions of FF attribute change combos)?
-A character that follows Link (such as a fairy)?
-An object that continually circles Link?
-An object that randomly roams around the screen with no predetermined path?
-An object/character that moves opposite or away from Link?
-An object that warps around the screen, disappearing & reappearing at random locations?

All of the above 😊

idontknow wrote:
-An object, such as a trap, that moves in a circle (without using billions of FF attribute change combos)?
-A character that follows Link (such as a fairy)?
-An object/character that moves opposite or away from Link?

I have created all three of these in the example dungeon I mentioned in another topic.
idontknow wrote:
-An object that continually circles Link?

It will become possible when the next beta introduces trigonometric functions.
idontknow wrote:
-An object that randomly roams around the screen with no predetermined path?
-An object that warps around the screen, disappearing & reappearing at random locations?
Not possible until the next beta introduces RNDV.

Hmm...could it be possible to have an entire dungeon where a friend follows you around, except for when you need him to stand on certain triggers? This could make for a fun, Winder Waker-esque type dungeon.

And L, in your example dungeon, you have an elevator at one point that Link can ride. However, you still need to press UP to use it. I'm wondering if its possible, or will be possible at any point, to have FFCs scripted to effect Link's movement. In other words, having moving platforms where once Link steps on them, he takes on the movement of whatever's in the script. So in your example, once he were to step on the elevator, he & the elevator would both rise automatically.

idontknow wrote:Hmm...could it be possible to have an entire dungeon where a friend follows you around, except for when you need him to stand on certain triggers? This could make for a fun, Winder Waker-esque type dungeon.

And L, in your example dungeon, you have an elevator at one point that Link can ride. However, you still need to press UP to use it. I'm wondering if its possible, or will be possible at any point, to have FFCs scripted to effect Link's movement. In other words, having moving platforms where once Link steps on them, he takes on the movement of whatever's in the script. So in your example, once he were to step on the elevator, he & the elevator would both rise automatically.

Once again, all of that is tecnically possible. What we DO need though is a way to tell which way Link is facing at any given moment if we want to do something.

How about a general bitmask of Link's various actions. For example, two bits for direction, 1 bit for whether he's swimming or not, 1 bit for whether e's attacking or not, etc.