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

dale_coop

Moderator
Staff member
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:
[media]https://vimeo.com/428649307/9e5969e399[/media]
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
 

Rob Burrito

New member
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
 

Rob Burrito

New member
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.
 

dale_coop

Moderator
Staff member
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.
 

Rob Burrito

New member
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...
 

Rob Burrito

New member
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...
 

Rob Burrito

New member
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.
 

jataka5000

New member
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!
 

dale_coop

Moderator
Staff member
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:
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:
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).
 
Top Bottom