Where is the sword in the Adventure Mod tutorial?

PhoenixF2B

New member
I am watching the full youtube tutorial on the adventure module, and at 1:10:00 he is making the NPC give us a sword along with the text box. He makes the comment that "We already have the sword" and he puts in "@" as the value and his game shows the sword graphic. When did he make this and how do you set it as a sword graphic? He doesn't cover that at all in the first hour of the tutorial up to that point and he didn't make any game objects for a sword. How do we make the sword asset and what does "@" mean to associate to it?
 

TurtleRescueNES

Active member
This got me too. The sword is no longer a game object. He draws the sword sprite that is sitting in a specific location in your game objects bitmap file.
 

PhoenixF2B

New member
Oh, well that explains that. But he still has it in the tutorial for 4.1 adventure mod he released today. How can we make a sword object and customize that then? Does it have to be in that spot? The beta assets that came with mine doesn't even HAVE that graphic that I can find (it only came with the game objects for the platform mod.

How can we set up the graphic for the Melee weapon and the Projectile?
 

dale_coop

Moderator
Staff member
Which version of NESMaker? Are you using the beta?

In the 4.xx and bêtas versions the weapon and projectile are game objects.

In the 4.1, used sprites (pre)drawn next to the Player... (see the tutorial GameObject tileset)
And the User Constants to set with sprite to use.

(Here’s the section for the old 3.xx versions)
 

PhoenixF2B

New member
I'm currently using 4.0.11. I did just download the 4.1 version but I wanted to finish the tutorials first. Should I start the tutorial over using 4.1? It's the 3.5 hour adventure mod tut.
 

dale_coop

Moderator
Staff member
The 4.1 is so different than the previous...
You have to watch it in order to use it, set things correctly for your projects in order to work correctly.
I would recommend all the get started videos (it’s not long), and a lot of things you will already know in the basics... and then just the 20min for te type of game you want to make.
 

dale_coop

Moderator
Staff member
The sword is a tile in the GameObject tileset BMP.
And in the “Project settings > User constants”, there is an element that indicate which tile used (from the tileset) to use.
(Sorry can’t be more specific, I am not in front of my pc)
 

PhoenixF2B

New member
He just posted a bunch of new "getting started" tutorials for 4.1, so I will take your advice and start with those. Thank you for your help, I appreciate it!
 

Artix

New member
Greetings friends!

Figured this out. Ran into this confusion too... because in the previous version the weapon was set up as a separate object under your list of Game Objects. I looked everywhere for it. It really threw me off that it did not exist anywhere O_O. So I started poking around the code which resulted in me learning some basic assembly. Here is what is going on...

ANSWER
In this example module, without doing any coding, your weapon must be a 8x8 pixel sprite on the first row.

By default, the vertical sword is tile 8 and the horizontal is tile 9.

You can go to Project Settings and then User Constants to change this-- but it only allows you to change the horizontal row. Look for these two....
SPR_WEAPON_V (which is the X value of where your horizontal weapon art is located.)
SPR_WEAPON_H (which is the X value of where your horizontal weapon art is located.)

DEEPER ANSWER AND CODE STUFFS
The script you add to your project to make your character attack when you press B on your controller is "b_create_melee.asm". But I was surprised that the code to show your weapon when you attack is not in the b_create_melee script at all.

To see the code that makes your weapon display, go to Scripts > Defined Scripts > Handle Sprite Pre-Draw ... this is where it looks at which direction you are facing and then draws the weapon on top of your character with the "DrawSprite Width, height, X, Y, Offset" function.

Also, you will want to look in Scripts > Defined Scripts > Handle Sprite Weapon ... this is where it does the collision detection. The width of your weapon is hard coded at 8 pixels in there.

Editing this to work like the old version, which allowed you to have a game object which could be animated and all the other fun features is currently beyond my skill level. I literally learned how to read the assembly code tonight to understand. It is possible that I am mistaken and it is still possible to build a custom melee weapon into the first slot like in the previous Adventure Module. If so, please let me know.

For the game I am making, my hero wields a 16x16 battle axe with a motion trail. So I was trying to figure out how to get it to display and animate properly when he attacks and do the proper hit box. The 8 sprites per row limit on the NES has been killing me X_X. If anyone has a sprite drawer example, or large size weapon script-- I would be very grateful for any help you can give.

Battle on!
Artix
 

dale_coop

Moderator
Staff member
Yep, you right, exactly how it's work in this version.
(...as it is been explained, in the tutorial videos, in the forum... ;))
There also already some topics about how to make the melee object instead of the sprite based sword, how to add projectiles objects, ... use the search function or browse the "Script" and "Community Tutorials" categories ;)


(sorry can't search and copy/paste link with my iPhone... it's a pain in the a***************)
 
Top Bottom