NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post Reply
User avatar
dale_coop
Posts: 5365
Joined: Fri Feb 16, 2018 7:05 am
Location: France

NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by dale_coop » Sat Jun 13, 2020 8:24 am

PART 6

Joe Granato:
Alright, campers - tutorial 6 in the Adventure game set is up. It gets complicated for those still not comfortable with code, so I will be curious to know who follows the logic ok and who still troubles. Again, the goal with THIS tutorial set is to help you guys learn how the tool works, not just show you where to point and what to click. I hope it's helping!

We will be making some patches to the tool over the weekend based on bugs found, and will likely have an update for Monday, when we start moving in a new direction...maybe from left to right... 😉

Anyhow - I know this only has a few adventure game mechanics, but play with it...see what you can make with it, give it a good stress test and see where it breaks!
Have a good weekend everyone!
Here's the new tutorial and instructions (with the link the "Support Files" zip):
https://www.thenew8bitheroes.com/post/adventure-game-basics-part-6-monster-health

The video:

https://vimeo.com/428649307/9e5969e399



PART 7 (small fix)

Joe Granato:
Here is a patch file that will fix the Lock Block script so that all the tiles go away. It was a small change in how this is handled that I forgot to include in the patched files! Thanks for helping me remember to share it with you guys.
Here's the new tutorial and instructions (with the link the "Support Files" zip):
https://www.thenew8bitheroes.com/post/adventure-game-basics-part7-small-patch
-----
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)
My son's game: KUBO 3
User avatar
TolerantX
Posts: 57
Joined: Fri Jan 18, 2019 7:58 am

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by TolerantX » Mon Jun 15, 2020 10:41 am

Thank you for sharing these Dale!
User avatar
Rob Burrito
Posts: 123
Joined: Mon Apr 23, 2018 4:31 pm

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by Rob Burrito » Wed Jun 24, 2020 4:35 am

finally back!
-going through these and noticed Joe had a "Common" folder in the MOD_adventure script folder already in the video. wasn't a common folder there for me going through the tutorial yet. the /BASE_4_5/Game/CommonScripts had a bunch of similar ones, was wondering where they should be stored at first, or if it even matters, or if i missed something. i just copied the whole common folder from the patch into the MOD_adventure folder. that worked as it should have appeared later in the video in case anyone else come across that and is confused.
*also later on the hit point test, NPC cavemen are replaced with crabs already in the video. easy enough just remember to change your overworld/screen info/tileset/mosnter groups and palettes back to crabs for testing. but really you should know that by now haha
User avatar
Rob Burrito
Posts: 123
Joined: Mon Apr 23, 2018 4:31 pm

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by Rob Burrito » Wed Jun 24, 2020 6:15 am

after 7's patches, i can't seem to get the autotext tile to trigger. in the text edit screen, when the text is set to: End of text action/NPC is trigger, -after displaying the correct message it loads the first message registered (in this case from the first tutorial NPC text), and even when day triggered text groups are updated too. anyone else run into this? guessing it's not triggering the screen state as intended and also something is telling it to display text #$00 at the end of text action state.
*also if the first entry of text is set to NPC is trigger, the text box will loop indefinitely. so all it's triggering is to display the first line of text again.
User avatar
dale_coop
Posts: 5365
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by dale_coop » Wed Jun 24, 2020 7:27 am

I'd suggest to watch all the tutorial videos... if you try something that is NOT shown in the current video and have an issue... it could be a bug or this issue may have been patched in the next tutorial. Make sure to have followed all the tutorial parts.
-----
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)
My son's game: KUBO 3
User avatar
Rob Burrito
Posts: 123
Joined: Mon Apr 23, 2018 4:31 pm

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by Rob Burrito » Wed Jun 24, 2020 2:50 pm

after 7 Joe mentions to play around. the tile is working as expected until i go off and start playing around haha. need it to trigger the screen to the triggered state after the text box closes. i'll finish up 8 & 9 to see if it's covered, just seemed like the end of the adventure module camp and still missing functionality within the tool for covered items (auto text tiles/screen triggers) looked to see if i could find it myself, but haven't found a solution in the places i've looked yet...
User avatar
Rob Burrito
Posts: 123
Joined: Mon Apr 23, 2018 4:31 pm

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by Rob Burrito » Wed Jun 24, 2020 9:43 pm

To update, i have worked through tutorial 10 and it's still an issue. believe it's a bug. shouldn't be too hard to catch!

also after the future patches up to 10 if you go to re-open your adventure project it will have an error. when you add the Object_vulnerability into the mix, to get your adventure game to work again for testing you need to add that object into the project settings/object variables or i guess comment it out in the script to not change the old version.
User avatar
jataka5000
Posts: 15
Joined: Thu Jun 11, 2020 1:18 am

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by jataka5000 » Tue Jun 30, 2020 7:35 pm

Enjoying these tutorials!
I followed everything so far through tutorial 7 (version 4.5.2). Learning assembly and how it interfaces with our NESmaker gui is challenging but I'm starting to get it.

I'd like to understand better how to access the monster health value for each monster. For example, suppose I wanted to display the monster health for one or more monsters on the HUD. I tried to add as an element "3:Number" and called the Element Var as "Object_health". This led to just showing 0 on the screen the entire time though. I guess there is an ambiguity here because each instance of monster on the screen has its own Object_health... I'd like to know how to access these numbers and display them on the HUD, for starters. This would be useful also for troubleshooting. Any hints in this regard are appreciated!
User avatar
dale_coop
Posts: 5365
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by dale_coop » Wed Jul 01, 2020 7:19 am

You can't directly use that variable in the HUD variables... because "Object_health" is not a user variable, it's an object variable (an array of values).
It means that you can get the Object_health of each objects that is created/loaded on screen...
to access to the health value of an object, first you need to get that object loaded in x register
than you can load that value:

Code: Select all

LDA Object_health,x
The player is the main (and persistent) object, this object is loaded first so it's always the 0th of the array:

Code: Select all

LDX player1_object
LDA Object_health,x
(to get the player health)

For monsters, it's complicated, because we have to way to access directly to a monster
So you would have to loop on all the objects currently on screen, check if that object is a monster type and if it is, then you can read its health.

If you want just doing experimentations...
you could create a new user variable, for example "myMonsterHealth", that you could display on your HUD (element).
And try to manipulate that variable, when a monster is hurt (the handle monster hurt script).
-----
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)
My son's game: KUBO 3
User avatar
jataka5000
Posts: 15
Joined: Thu Jun 11, 2020 1:18 am

Re: NESmaker 4.5 - Adventure Game Basics - Part 6 & Part 7

Post by jataka5000 » Wed Jul 01, 2020 2:13 pm

That makes sense, I’ll give it a try. Thanks!
Post Reply