• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Ilex Forest

Status
Not open for further replies.

JojoP

Pokémon Ranger
I made this map of Ilex Forest with the map editor, however it's not really finished yet. NPCs don't have their scripts, the water texture is standard (like ocean water) and the celebi shrine is missing.

Here's the link for the map.

Since I don't know how to script the events I don't think I can really finish this map. For me it is done as far as I could get it done.
 

DracoHouston

Kolben Developer
Contributor
what exactly are your problems with scripting? ask me anything, i just did a gym up

also i've been very interested in this map because if we have ilex forest then we're 1 step closer to goldenrod city, which i have a half made gym map for.

its a lovely map btw
 

JojoP

Pokémon Ranger
It's not really that it is impossible for me to script that, I am just far too lazy to complete it ^^
I am working on Farfetch'd and the first encounter is working, but when it moved away and I talk to it again the game crashes.
Code:
:if:position(Player,21,0,14)
:then
@Text:It's the missing~POKéMON!*FARFETCH'D: Kwaa!
@Turn:100,1
@Move:100,1
@Turn:100,2
@Move:100,6
:end
 
:if:position(Player,20,0,22)
:then
@Text:FARFETCH'D: Kwaa!
@Turn:100,2
@Move:100,4
:end
 
:if:position(Player,20,0,18)
:then
@Text:FARFETCH'D: Kwaa!
@Turn:100,2
@Move:100,1
@Turn:100,1
@Move:100,1
@Turn:100,2
@Move:100,5
@Turn:100,1
@Move:100,4
:end
 
:if:position(Player,24,0,11)
:then
@Text:FARFETCH'D: Kwaa!
@Turn:100,1
@Move:100,2
@Turn:100,4
@Move:100,6
@Turn:100,1
@Move:100,2
@Turn:100,4
@Move:100,1
@Register:oldguide
@NPC:remove(100)
@NPC:register(Ilex.dat|100|remove|1)
@NPC:register(Ilex.dat|100|position|29,0,18)
:end
 
:if:position(Player,29,0,17)
:then
@Text:FARFETCH'D: Kwaa!
:end
 
---
 
:if:position(Player,20,0,20)
:then
@Text:FARFETCH'D: Kwaa!
@Turn:100,2
@Move:100,2
@Turn:100,1
@Move:100,5
@Turn:100,4
@Move:100,1
:end

This is just the way back if you complete the mission without fooling around.
I also tried using
Code:
:if:not
:then
:if:position(Player ...)
:then
...
but that didn't work either. Is there an easier way than registering after every move ?
 

DracoHouston

Kolben Developer
Contributor
when i tried to make a really long options sequence in the pc script it messed up too. im not sure why it doesnt take it but you could try several npcs.

make the farfetch'd run off then remove itself, and move the next one into position (you'd have them outside the map waiting). the next one wouold have a different script that moves that one away and removes it and moves the next one into position.

not ideal but it may work

a command for turning the collision and visibility of an entity on and off would be great then you could have them waiting in the right spot but invisible and show them when its their turn
 

JojoP

Pokémon Ranger
So farfetch'd (an old man because I have no texture yet - just in case I mix that up while writing) has his first script where you can only talk to it from one position... it runs off, gets warped away (in case I need it again, farfetch'd tends to use the same spots when walking in a circle) and the next farfetch'd NPC gets warped to the position.
This farfetch'd doesn't work, neither with only one possible action nor with the two it's supposed to have.
I made 5 NPCs, all stored in (2,0,2) because that's in the middle of the forest. They have different IDs and matching scripts. The ID in the respective script is right.
Code in Ilex.dat (the map file)
Code:
{"NPC"{NPC[{"Position"{sngArr[21,0,15]}}{"TextureID"{str[5]}}{"ID"{int[100]}}{"Name"{str[farfetch'd]}}{"Action"{int[1]}}{"AdditionalValue"{str[farfetch'd]}}{"Rotation"{int[2]}}{"Movement"{str[Looking]}}{"MoveRectangles"{recArr[]}}]}}
 
{"NPC"{NPC[{"Position"{sngArr[2,0,2]}}{"TextureID"{str[5]}}{"ID"{int[102]}}{"Name"{str[farfetch'd2]}}{"Action"{int[1]}}{"AdditionalValue"{str[farfetch'd2]}}{"Rotation"{int[2]}}{"Movement"{str[Looking]}}{"MoveRectangles"{recArr[]}}]}}
 
{"NPC"{NPC[{"Position"{sngArr[2,0,2]}}{"TextureID"{str[5]}}{"ID"{int[103]}}{"Name"{str[farfetch'd3]}}{"Action"{int[1]}}{"AdditionalValue"{str[farfetch'd3]}}{"Rotation"{int[2]}}{"Movement"{str[Looking]}}{"MoveRectangles"{recArr[]}}]}}
 
{"NPC"{NPC[{"Position"{sngArr[2,0,2]}}{"TextureID"{str[5]}}{"ID"{int[104]}}{"Name"{str[farfetch'd4]}}{"Action"{int[1]}}{"AdditionalValue"{str[farfetch'd4]}}{"Rotation"{int[2]}}{"Movement"{str[Looking]}}{"MoveRectangles"{recArr[]}}]}}
 
{"NPC"{NPC[{"Position"{sngArr[2,0,2]}}{"TextureID"{str[5]}}{"ID"{int[105]}}{"Name"{str[farfetch'd5]}}{"Action"{int[1]}}{"AdditionalValue"{str[farfetch'd5]}}{"Rotation"{int[2]}}{"Movement"{str[Looking]}}{"MoveRectangles"{recArr[]}}]}}
Code for the NPCs
Code:
:if:position(Player,21,0,14)
:then
@Text:It's the missing~POKéMON!*FARFETCH'D: Kwaa!
@Turn:100,1
@Move:100,1
@Turn:100,2
@Move:100,6
@Warp:100,2,0,2
@Warp:102,20,0,21
:end
Code:
:if:position(Player,20,0,22)
:then
@Text:FARFETCH'D: Kwaa!
@Turn:102,2
@Move:102,4
@Warp:102,2,0,2
@Warp:103,20,0,18
:end
 
:if:not
:then
@Text:FARFETCH'D: Kwaa!
@Turn:102,2
@Move:102,2
@Turn:102,1
@Move:102,5
@Turn:102,4
@Move:102,1
@Warp:102,2,0,2
@Warp:106,20,0,18
:end
 

BakaOnibi

Trainer
Donator
This should fix it
Code:
:if:position(Player,20,0,22)
:then
@Text:FARFETCH'D: Kwaa!
@Turn:102,2
@Move:102,4
@Warp:102,2,0,2
@Warp:103,20,0,18
:else
@Text:FARFETCH'D: Kwaa!
@Turn:102,2
@Move:102,2
@Turn:102,1
@Move:102,5
@Turn:102,4
@Move:102,1
@Warp:102,2,0,2
@Warp:106,20,0,18
:endif
:end
I believe the problem was the :if:not which could have been an :else or needed the position(,,,) as well

So farfetch'd (an old man because I have no texture yet
Here's a farfetch'd texture if you want one.
Farfetchd.png



Download XNB here
 

DracoHouston

Kolben Developer
Contributor
im looking at the GBC rom of gold version's scripts for this and it needs the ability to make something visible or not visible, then you'd have script blocks set up around the front of each place the far fetch'd stands. these scripts would unregister its entry (like ilex_farfetchquest_0,ilex_farfetchquest_1 etc), register the next entry in the chain, move the npc off and hide it, teleport it back where it was while invisible (this is also not a feature yet >.<).

dont try and do it with 1 script
 

JojoP

Pokémon Ranger
This should fix it
Code:
:if:position(Player,20,0,22)
:then
@Text:FARFETCH'D: Kwaa!
@Turn:102,2
@Move:102,4
@Warp:102,2,0,2
@Warp:103,20,0,18
:else
@Text:FARFETCH'D: Kwaa!
@Turn:102,2
@Move:102,2
@Turn:102,1
@Move:102,5
@Turn:102,4
@Move:102,1
@Warp:102,2,0,2
@Warp:106,20,0,18
:endif
:end
I believe the problem was the :if:not which could have been an :else or needed the position(,,,) as well

So farfetch'd (an old man because I have no texture yet
Here's a farfetch'd texture if you want one.
View attachment 270


Download XNB here
And what do I do if there are more options ? There are a few places where you can talk to it from 4 spots :/
Edit2: Doesn't work ... stupid scripting lol
 

BakaOnibi

Trainer
Donator
Depends what you mean by more options.
If you want them completely separate then you want another :if after the :endif
Code:
:if
:then
:else
:endif
 
:if
If you want another option as part of the condition, you can put the :if inside of the other :if, or inside the :else
Code:
:if
:then
  :if
  :then
  :endif
:else
  :if
  :then
  :endif
:endif
Although it is probably better as DracoHouston said, not to try to do it all in one script.
 

JojoP

Pokémon Ranger
I just replaced my old script with yours, but it doesn't work. I'll see if I can do this with register and such...
 

BakaOnibi

Trainer
Donator
Try copy and pasting the code again, I edited the code shortly after I posted it, only to clean it up a little, both versions should work. You may have the old one, not realising I edited it, and possibly I made a small mistake in it. Otherwise it's strange why it doesn't work for you but does for me.
 

JojoP

Pokémon Ranger
I tried several things and the second NPC is a problem. Not even a simple unconditioned talking script works... it always crashes.
 

BakaOnibi

Trainer
Donator
I really don't know what to say, everything I say seems to crash it, you could zipping what you have and letting me have a look at it, though I'm not sure if I will be able to get it to work.

Also, I've found that in the code that I gave you earlier, for some reason if you activate the second option, as soon as you turn the screen so that the new farfetch'd is in view, the game crashes. Nothing to do with activating the next script, just when you see the NPC.
 

JojoP

Pokémon Ranger
I updated the link in the first post, the folder in the zip contains the scripts, put the folder itself in /Pokemon/Scripts
 
Status
Not open for further replies.
Top