EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
989 stars 185 forks source link

CommandTeleport (10810) - Allow com.string as map filename #3208

Open jetrotal opened 5 months ago

jetrotal commented 5 months ago

image

You can teleport to a custom-named map, by filling com.string:

@raw 10810, "./Map/test", 0,0,0,3

It Even considers custom folder structure.

It still lacks some changes to support:

I have to learn how to implement those.

Ghabry commented 5 months ago

This is a bit more complex than just this command:

They must be all updated to support this (+ save data).

Look for ReserveTeleport to find invocations:

https://github.com/search?q=repo%3AEasyRPG%2FPlayer%20ReserveTeleport&type=code


Carbonara: Using 0 here would make sense since the data cannot properly be stored as a value, what would be needed here is a "store map ID in a string variable" command

Ghabry: And there is also an event to relocate vehicles which takes a map_id >.> btw Events also have a map ID but I cannot remember what the purpose of this was.

jetrotal commented 5 months ago

This is a bit more complex than just this command:

I put the filename logic inside of ConstructMapName, since multiple functions related to teleport went through it... That was what made the command work 🤔

jetrotal commented 5 months ago

ok, about stringVars: It's good to support it for feature completion. I guess none of the teleport commands uses com.string. So, just filling this argument may be enough.

Converting ID entries to 0 if com.string exists seems fair too.