Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2019-06-21 10:11:10

n.tsakalov
Member
Registered: 2019-06-21
Post 1/11

Adding new text on new NPCs - newbie here

I have successfully added a new npc on the Route1 in pokered.gbc .
What I want to do is to add some text, when I interact with them.

I have written the text in the

pokered\scripts\Route1.asm

Route1Text4:
TX_FAR _Route1Text4
db "@"



pokered\text\maps\Route1.asm

_Route1Text4::
text "This is a test"
line "Let' hope it"
cont "will work!"
done

and I (think) assigned the text to the new  npc:

object SPRITE_BUG_CATCHER, 4, 12, STAY, LEFT, 4 ;


When I go to Cygwin terminal to assembly the rom,
I get the following message:

~/pokered
$ make

rgbasm -D _RED -h -o main_red.o main.asm
rgbasm -D _RED -h -o text_red.o text.asm
warning: text.asm(381):
    Empty entry in list of 8-bit elements (treated as 0).
ERROR: text.asm(381):
    syntax error
error: Assembly aborted in pass 1 (1 errors)!
make: *** [Makefile:58: text_red.o] Error 1


To be frank, I don't know what I do. I am not a programmer and all I want is to mess around with the Gen 1 and have some fun.
All I want  is to add some new npcs and text to them while I am interacting with them.

Please, don't mock me. Instead if you know how to do it, just tell me. And I will do my best to follow the instructions.

Nicholas.

edit: I just realised that I should have posted that on the questions section.

Last edited by n.tsakalov (2019-06-21 10:53:34)

Offline

#2 2019-06-21 12:40:07

Mateo
Member
Registered: 2009-11-25
Post 3,610/3,631

Re: Adding new text on new NPCs - newbie here

If I'm reading it correctly, (and cross-referencing the line number with vanilla pokered since I have almost nothing to go on from your post) the compiler is complaining about text.asm and not any of the files you edited, and the line number matches up with a line in one of the Gym Statue texts for some reason. Are you sure you have the right version of RGBDS? Also, what have you been using to edit the .asm files? I ask because the last time I checked, windows notepad will cause issues because it messes up the line endings. But other text editors that are designed with code in mind (such as Notepad++, which is free) work fine.


I am no longer active on this forum. I only pop in from time to time.

Offline

#3 2019-06-21 13:06:56

n.tsakalov
Member
Registered: 2019-06-21
Post 2/11

Re: Adding new text on new NPCs - newbie here

Dear Mateo,
I really appreciate your answer. You are right. I looked into it and I realised my mistake:
While I was trying to add custom text to custom npc, I had already changed a line in the text.asm and I had mistyped a command as I was adding trainers in the Gym Statues...
When I corrected the typo in the text.asm, I tried again to assemble the pokered. And the new npc had the text I wanted it to have!

I am using Notepad++, as you suggested.

I really really thank you for your time to answer.

I would like though to ask one more question my dear friend.
I have successfully managed to make an npc have its own dialogue.
Lets say I want to make a new npc, in Viridian Forest to give me a Pokéball.
What files and what should I type, in order to make it give me an item?

Please if you know, it would be really helpful mate.
Thank you in advance!

Offline

#4 2019-06-21 13:24:16

Mateo
Member
Registered: 2009-11-25
Post 3,611/3,631

Re: Adding new text on new NPCs - newbie here

That depends. Do you want it to be an item ball that you pick up, or an NPC like the one on Route 1 that gives you a Potion?


I am no longer active on this forum. I only pop in from time to time.

Offline

#5 2019-06-21 13:30:57

n.tsakalov
Member
Registered: 2019-06-21
Post 3/11

Re: Adding new text on new NPCs - newbie here

I did not think of the first option now that you mention it my friend.
If it is not much trouble, could you guide me with both options,
therefore to have a guy giving me a potion and to pick up an item?

Plus if it is an item that I should pick up, how do I make it invisible?

I would be really grateful my friend. I really appreciate your time to reply.

Offline

#6 2019-06-21 16:03:36

Mateo
Member
Registered: 2009-11-25
Post 3,612/3,631

Re: Adding new text on new NPCs - newbie here

I'll try to type out an example for both later tonight. I'm still at work so it would be annoying to try to do on mobile, especially looking up the specific files to point you to. Both are pretty simple but they do involve edits to a few files.


I am no longer active on this forum. I only pop in from time to time.

Offline

#7 2019-06-21 16:26:28

n.tsakalov
Member
Registered: 2019-06-21
Post 4/11

Re: Adding new text on new NPCs - newbie here

That sounds great. Your help is much appreciated.

I generally work with examples. Up to now, I have been adding things, just copying and pasting to other locations. And it has been working fine up to now. The only problem I have encountered yet is the following:

Just for experimentation's shake I added a Moltres encounter in Pallet town. While the encounter works fine  (I interact with the object, triggers the Cry and the Battle), the Sprite, even if I chose "SPRITE_BIRD",

object SPRITE_BIRD, 4, 8, WALK, 0, 8, MOLTRES, 50 ; LegendaryPKMN

in the map it shows a SEEL sprite. (When I added this object in Route1, instead of BIRD, it showed the LYING_OLD_MAN and when I interacted with it it showed the GAMBLER sprite). Plus every time I battled it or caught it, the PKMN did not disappear. I tried to make it "missable" but I think I messed everything up.

I searched the forum for answers about these, and I saw that other people as well had the same issues: Here for example that you already answered but it seems very advanced for my understanding

But I do not want to exploit your kindness by asking more.
For me it will be more than enough to guide me through what I have already asked you for, whenever you have the time of course. It already makes me feel better and less desperate knowing from you that both are pretty simple.

Thank you in advance, I will be waiting for your precious help.

Offline

#8 2019-06-22 03:38:01

Mateo
Member
Registered: 2009-11-25
Post 3,613/3,631

Re: Adding new text on new NPCs - newbie here

Hey, I ended up not having a chance to do much online after work today. But basically, to make it an NPC who gifts you the item, you can look at the NPC on Route 1 who gives you the Potion. You'll just need to make sure you add an event constant for your new NPC to use. You can find the list in constants/event_constants.asm. Unless I'm mistaken, the generic ones (the ones named things like EVENT_0C1 instead of EVENT_GOT_BICYCLE for example) are free to use, if you want to rename one to something meaningful such as EVENT_GOT_WHATEVER_FROM_THAT_GUY or whatever you want.

Itemballs are a little bit trickier, since hide/show data is a bit finicky. I'll try to explain that tomorrow.


I am no longer active on this forum. I only pop in from time to time.

Offline

#9 2019-06-22 05:25:58

n.tsakalov
Member
Registered: 2019-06-21
Post 5/11

Re: Adding new text on new NPCs - newbie here

First of all, thank you for your time.

Now I will try to make a new event give me something the way you suggested.
I think I am on a good way, thanks to your valuable help.

Whenever you have the time, just explain to me about the Itemballs etc, and I will fully follow
your helpful instructions.

If I may my friend, once I figure out all this event Itemballs and hide/show data, I would like to
ask a couple more questions to which I think I cannot find an answer that can make me
understand completely what I should do.

Have a good day,
I will be checking later as well for your answer.



Edit: Flash question, in the events what are these .asm_lcadd and .asm_lcada ? It seems everytime I try to change them, it messes up the game.

Last edited by n.tsakalov (2019-06-22 11:42:06)

Offline

Board footer

Powered by FluxBB