Where is the sword in the Adventure Mod tutorial?

PhoenixF2B
Posts: 26
Joined: Sun Dec 30, 2018 5:38 am

Where is the sword in the Adventure Mod tutorial?

Post by PhoenixF2B » Sun Jan 06, 2019 3:21 am

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?
User avatar
jsherman
Posts: 296
Joined: Sun Apr 22, 2018 11:25 am
Location: Cleveland OH

Re: Where is the sword in the Adventure Mod tutorial?

Post by jsherman » Sun Jan 06, 2019 3:55 am

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.
"Turtle Rescue" updates can be found here: viewtopic.php?f=13&t=112
For more in-depth updates, please follow GossipTurtle on Twitter! https://twitter.com/TurtleRescueNES
PhoenixF2B
Posts: 26
Joined: Sun Dec 30, 2018 5:38 am

Re: Where is the sword in the Adventure Mod tutorial?

Post by PhoenixF2B » Sun Jan 06, 2019 4:10 am

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?
User avatar
dale_coop
Posts: 3562
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Where is the sword in the Adventure Mod tutorial?

Post by dale_coop » Sun Jan 06, 2019 10:06 am

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)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
PhoenixF2B
Posts: 26
Joined: Sun Dec 30, 2018 5:38 am

Re: Where is the sword in the Adventure Mod tutorial?

Post by PhoenixF2B » Mon Jan 07, 2019 3:29 am

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.
User avatar
dale_coop
Posts: 3562
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Where is the sword in the Adventure Mod tutorial?

Post by dale_coop » Mon Jan 07, 2019 7:28 am

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.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
Blacksheep32
Posts: 16
Joined: Mon Aug 27, 2018 1:05 am

Re: Where is the sword in the Adventure Mod tutorial?

Post by Blacksheep32 » Fri Jan 11, 2019 12:27 am

I understand how he did but cannot seem to find the actual values, any chance for a screenshot?
User avatar
dale_coop
Posts: 3562
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Where is the sword in the Adventure Mod tutorial?

Post by dale_coop » Fri Jan 11, 2019 12:37 am

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)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
PhoenixF2B
Posts: 26
Joined: Sun Dec 30, 2018 5:38 am

Re: Where is the sword in the Adventure Mod tutorial?

Post by PhoenixF2B » Fri Jan 11, 2019 4:51 am

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!
User avatar
Artix
Posts: 15
Joined: Wed Nov 21, 2018 3:41 am
Location: Tampa, Floridas
Contact:

Re: Where is the sword in the Adventure Mod tutorial?

Post by Artix » Thu Feb 21, 2019 5:27 am

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
Post Reply