 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
binoal

Joined: 20 Jun 2009 Posts: 123 Location: My Own Little World
|
Posted: Wed Jul 29, 2009 1:17 pm Post subject: Zelda Style Items? |
|
|
I recently added a RPG with graphics from the NES game, Legend Of Zelda. I decided i wanted to make an actual zelda game using the graphics. Im trying to make the equipment you find useable outside of battle, Like dropping a bomb next to a rock, and the rock will dissapear, or firing your bow, and hitting a crystal that acts as a switch. I also wanted to start off a battle with the attack you hit an enemy with, making it advantagous (idk if i spelled that right haha) to hit with the item instead of just touching the enemy and starting the battle. I dont have the slightest idea on how to do this. Can anybody help? _________________ Resident Evil RPG Demo
http://www.castleparadox.com/gamelist-display.php?game=963
Legend Of Zelda: Reptilian Warlord Demo
http://www.castleparadox.com/gamelist-display.php?game=961 |
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Wed Jul 29, 2009 1:30 pm Post subject: |
|
|
Using the OHR, it is completely possible to reproduce every part of The Legend of Zelda on the NES. Not just some strange RPG/Zelda hybrid, though that might be fun.
I released a tech demo of a zelda style game that you might find useful.
It can be found here:
somekindaninja
It's script file is included and anyone and everyone is welcome to use it.
As far as specific scripts go, I'd be willing to code one or two of them, but the best, only real way you're going to be able to make this kind of game is if you study the language a bit and learn to code things for yourself.
You can find the whole list of commands, what they do, and how to use them, HERE:
Plotscripting Dictionary |
|
Back to top |
|
 |
binoal

Joined: 20 Jun 2009 Posts: 123 Location: My Own Little World
|
Posted: Wed Jul 29, 2009 3:39 pm Post subject: |
|
|
Wow, thanks! i havent downloaded the game yet, but i am as soon as i post this. I am trying to get better with plotscripting, but if i get stuck on any particular item, ill post that. Thanks!
EDIT: Ok. I downloaded it, and looked at the script. It might as well have been in japanese. I tried looking at it and looking at the commands in the plotscripting dictionary. Still confused. Im gonna try all night to figure this out! _________________ Resident Evil RPG Demo
http://www.castleparadox.com/gamelist-display.php?game=963
Legend Of Zelda: Reptilian Warlord Demo
http://www.castleparadox.com/gamelist-display.php?game=961 |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Wed Jul 29, 2009 4:33 pm Post subject: |
|
|
No offense, but it'll probably take longer than that. _________________
|
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Wed Jul 29, 2009 5:02 pm Post subject: |
|
|
Perhaps that script is a bit too tough for your first time.
Lets start off with a simpler script. like a script that would perform the bomb trick you wanted.
Begin all text based scripts with this:
Code: | include, plotscr.hsd
include, scancode.hsi |
We start with variable creation. ( this makes variables, which hold numbers, to be used at a later time )
Code: | global variable, begin
1, AB
2, CD
3, EF
4, GH
end
|
Then, the top declaration.
Code: | Plotscript, bomb, begin |
We check to see if the correct button is pressed next. We use the key is pressed command
( I use the "A" button here, 30 is the code for A.)
The IF statement should look something like this:
Code: | if ( Key is pressed(57) ) then ,begin |
We now move on to npc creation.
In this part we create a Bomb under the hero.
( I'm going to use npc's 5 6 and 7
5 will be the bomb, 6 will be the explosion, and 7 will be the false wall. These can be changed later by you. just replace all the 5,6,or7's with whatever npc number. These npcs will have to be edited by you in order to get the desired result)
So first, we want to find where the hero is.
The commands hero X (0), and hero y (0) tell us the location of the hero on the X/Y plane that we like to call the tilemap.
So using this we create an NPC at the exact same location using the create npc command
create npc command
Like so.
Code: | Create Npc (5,hero X (0),hero y (0)) |
( at this point you'll want to edit npc 5 to resemble a bomb, AND also to make it STEP ON activated. This will let the player walk on it, and more importantly, off of it.)
Now that we have the bomb placed, we'll want to make it wait before blowing up. So the
wait command comes into play. Like so.
Next we make the bomb explode. To do this we change the npc from 5 to 6.
( you'll want to make NPC 6 look like an explosion. )
We'll use the change NPC ID command in this part.
It'd look something like this.
Code: | change NPC ID (5,6) |
Now that we have the bomb exploding we want to check to see if it's placed correctly. If it is we'll be blasting open a passageway. So, first we need to know where the bomb is placed when it blows up. This might be different then the hero x, and hero y, before because the player may have moved, thus we will be using NPC X (6) and NPC y (6)
So now we check the surrounding areas for NPC 7 ( remeber this is the breakable wall ) with the NPC at spot command
The surrounding areas will be the locations
NPC X (6)+1, NPC y (6)
NPC X (6)--1, NPC y (6)
NPC X (6), NPC y (6)+1
NPC X (6), NPC y (6)--1
And IF npc 7 is there we will destroy it.
So first we store the NPC at each spot
(Remeber the global vairables? here's where you use them. )
(You store things into variables using the symbol := )
then we check if it's npc id is7, with the Get NPC ID command
if it is, we destroy it. Using the Destroy NPC command
Like this:
Code: | #store variables
AB:=NPC at spot (NPC X (6)+1, NPC y (6))
CD:=NPC at spot (NPC X (6)--1, NPC y (6))
EF:=NPC at spot (NPC X (6), NPC y (6)+1)
GH:=NPC at spot (NPC X (6), NPC y (6)--1)
#check and destroy
If ( get NPC ID (AB) == 7 ) then ( destroy npc (AB) )
If ( get NPC ID (CD) == 7 ) then ( destroy npc (CD) )
If ( get NPC ID (EF) == 7 ) then ( destroy npc (EF) )
If ( get NPC ID (GH) == 7 ) then ( destroy npc (GH) )
|
Then we destroy the explosion npc after waiting a few milliseconds and end the IF key is pressed statement plus the script
Code: |
wait (3)
destroy npc (6)
end ,end
|
Here's the how code again.
Code: |
include, plotscr.hsd
include, scancode.hsi
global variable, begin
1, AB
2, CD
3, EF
4, GH
end
Plotscript, bomb, begin
if ( Key is pressed(30) ) then ,begin
Create Npc (5,hero X (0),hero y (0))
Wait (30)
change NPC ID (5,6)
AB:=NPC at spot (NPC X (6)+1, NPC y (6))
CD:=NPC at spot (NPC X (6)--1, NPC y (6))
EF:=NPC at spot (NPC X (6), NPC y (6)+1)
GH:=NPC at spot (NPC X (6), NPC y (6)--1)
If ( get NPC ID (AB) == 7 ) then ( destroy npc (AB) )
If ( get NPC ID (CD) == 7 ) then ( destroy npc (CD) )
If ( get NPC ID (EF) == 7 ) then ( destroy npc (EF) )
If ( get NPC ID (GH) == 7 ) then ( destroy npc (GH) )
wait (3)
destroy npc (6)
end, end
|
Then you compile the script, import it, and attach it to the button press script activation built in to the OHR.
And that's all there is to it. I hope this helped. And I'd be happy to clearify on any and all problems you might have.
Last edited by Spoon Weaver on Wed Jul 29, 2009 8:23 pm; edited 4 times in total |
|
Back to top |
|
 |
FyreWulff Still Jaded

Joined: 02 Apr 2005 Posts: 406 Location: The Internet
|
Posted: Wed Jul 29, 2009 6:30 pm Post subject: |
|
|
Moogle1 wrote: | No offense, but it'll probably take longer than that. |
Dearest Moogle the First:
Please restart RPG-ACE
Kthnx,
Wolf In Flames |
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Wed Jul 29, 2009 8:22 pm Post subject: |
|
|
I cut my previous post short at first by mistake, plus there where a couple errors ( and may still be). If you didn't notice. Then never mind...
If there are any errors or you're having some other kind of problem. Please, let me know. |
|
Back to top |
|
 |
binoal

Joined: 20 Jun 2009 Posts: 123 Location: My Own Little World
|
Posted: Thu Jul 30, 2009 6:51 am Post subject: |
|
|
haha thanks! i kinda feel bad when people take the time to code stuff for other people, cause thats time they could be putting into their own games. lol but this script seems a lot simpler than the somekindaninja one. I could probably alter this one for the bow and hookshot and everything, by setting walk npc at 10 speed, and a few more changes. Thanks a whole crapload lol, this is going to be much easier! _________________ Resident Evil RPG Demo
http://www.castleparadox.com/gamelist-display.php?game=963
Legend Of Zelda: Reptilian Warlord Demo
http://www.castleparadox.com/gamelist-display.php?game=961 |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Thu Jul 30, 2009 8:58 am Post subject: |
|
|
FyreWulff wrote: | Dearest Moogle the First:
Please restart RPG-ACE
Kthnx,
Wolf In Flames |
No offense, but it'll probably take longer than that.
You've got me reminiscing, though. I liked that engine. Maybe someday. _________________
|
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Thu Jul 30, 2009 9:42 am Post subject: |
|
|
binoal wrote: | haha thanks! i kinda feel bad when people take the time to code stuff for other people, cause thats time they could be putting into their own games. lol but this script seems a lot simpler than the somekindaninja one. I could probably alter this one for the bow and hookshot and everything, by setting walk npc at 10 speed, and a few more changes. Thanks a whole crapload lol, this is going to be much easier! |
Don't feel bad, I can only work on one game for so long before mental fatigue sets in. That's why I normally have more then 1 entry in any given contest. Believe it or not, writing that script was kind of relaxing.
As far as a bow or hookshot go. You'll have to change more then just NPC speed. ( Though, you'll want to do that too. )
For the bow, you wouldn't really have to change too much. Basically, you'd want to set a direction for the created NPC equal to the direction of the hero. Then you'd want to make the arrow stop it is hits the wall by contently detecting it's direction. (This may require a loop, which would be a bit of a stretch as far as early scripting is concerned) Then you'd change the NPC location checking part to check for NPC's directly under the created npc. That would be about it. Perhaps you'd also want to change the destroy npc part to beginning a battle instead, as you discussed earlier.
The hookshot, would require the suspending of the player. ( in order to work like the one in the game ) Then you'd want to check tiles for walls as it moved away from the player. Each tile without a wall would get an NPC of a hook created in it. The NPC would then be changed into a chain as soon as the next hook was made. Creating the illusion of movement. ( None of the NPC's for this one would need to move )
Then, when the NPC checker reached a wall, another script would activate. This script would place the hero along the line just created while destroying the npc's as he passes. When the last npc is destroied the script is over and the hero has been pulled by the hook shot.
Of course, there might also have to be a branch for this script to deal with the hook shot hitting surfaces you don't want to be hookable, and if the hookshot hit a monster.
I wish you luck in figuring these scripts out. Feel free to ask me for help if needed. |
|
Back to top |
|
 |
binoal

Joined: 20 Jun 2009 Posts: 123 Location: My Own Little World
|
Posted: Thu Jul 30, 2009 9:56 am Post subject: |
|
|
so i actually understood that entire bomb script and what it did! And i was editing it a little bit, like changing the explosion npc 2 times for a better look, and i made the tag you get after finding the bombs required to be on. after doing that it worked. And then i tried making it also hurt you if you were next to it when it exploded. it keeps saying "If statement has 2 conditions. it should only have one. use and and or for complex conditions." I have no idea what it means, i only have one if in the part i added. heres the script:
Code: | Plotscript, bomb, begin
if (check tag (9))
Then (
if ( Key is pressed(48) ) then ,begin
Create Npc (5,hero X (0),hero y (0))
Wait (30)
change NPC ID (5,6)
Wait (5)
change NPC ID (6,7)
AB:=NPC at spot (NPC X (7)+1, NPC y (6))
CD:=NPC at spot (NPC X (7)--1, NPC y (6))
EF:=NPC at spot (NPC X (7), NPC y (6)+1)
GH:=NPC at spot (NPC X (7), NPC y (6)--1)
If ( get NPC ID (AB) == 0 ) then ( destroy npc (AB) )
If ( get NPC ID (CD) == 0 ) then ( destroy npc (CD) )
If ( get NPC ID (EF) == 0 ) then ( destroy npc (EF) )
If ( get NPC ID (GH) == 0 ) then ( destroy npc (GH) )
If ( hero x (hero:link) <= NPC X (7)+1, and, hero x (hero:link) >= (NPC X (7))-1), and
( hero y (hero:link) <= NPC Y (7)+1, and, hero Y (hero:link) >= (NPC Y (7))-1), then
(set hero stat (hero:link,stat:hearts,get hero stat (hero:link,stat:hearts,current stat)-1,current stat)
fade screen out (63,0,0)
fade screen in )
wait (3)
destroy npc (7) )
end, end |
lol thanks for all the help! _________________ Resident Evil RPG Demo
http://www.castleparadox.com/gamelist-display.php?game=963
Legend Of Zelda: Reptilian Warlord Demo
http://www.castleparadox.com/gamelist-display.php?game=961 |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Thu Jul 30, 2009 10:53 am Post subject: |
|
|
Here's your problem:
Code: | If ( hero x (hero:link) <= NPC X (7)+1, and, hero x (hero:link) >= (NPC X (7))-1), and
( hero y (hero:link) <= NPC Y (7)+1, and, hero Y (hero:link) >= (NPC Y (7))-1), then |
Let's look at that with different spacing.
Code: | If
(
hero x (hero:link) <= NPC X (7)+1
and
hero x (hero:link) >= (NPC X (7))-1
)
and
(
hero y (hero:link) <= NPC Y (7)+1
and
hero Y (hero:link) >= (NPC Y (7))-1
)
then |
There are two issues here: first, your parentheses. There need to be parentheses around the entire if block. In other words, you can do this:
if (something && something) then (something)
But you can't do this:
if (something) && (something) then (something)
The second problem is your use of minus signs. The minus operator is --, not -. So instead of saying x := y - 1, you should say x := y -- 1. _________________
|
|
Back to top |
|
 |
binoal

Joined: 20 Jun 2009 Posts: 123 Location: My Own Little World
|
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Thu Jul 30, 2009 8:55 pm Post subject: |
|
|
Neat, I do love being in the credits of stuff.
As a side note, you might also want to include a Play sound command in order to make the bomb more impressive. Simply import an explosion .wav file. ( many of which can be found in the import folder thats included with the engine ) Then put in the command:
Code: | Play sound ( 0,false,false) |
Place it right below ( or above ) the change npc command in the script, for what I assume would be the desired effect.
good luck with your game.
Remember, feel free to ask if you get stuck on anything. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri Jul 31, 2009 1:42 am Post subject: |
|
|
Moogle1 wrote: | FyreWulff wrote: | Dearest Moogle the First:
Please restart RPG-ACE
Kthnx,
Wolf In Flames |
No offense, but it'll probably take longer than that.
You've got me reminiscing, though. I liked that engine. Maybe someday. |
Never give up! _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|