You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.
I think I understand
I was thinking that a simpler Call GotoMap ( {Map:package/area/map:entry} ) would be fine
oh wait
I see where you're going with this
without some kind of exit/entry manifest maps defined in dependencies don't know how to connect to yours
that's.... a difficult problem
we could solve it your way, or we could make a more generic configuration system for dependencies e.g.
name = "M"version = "1.0.0"
[dependencies.A]
version = "1"config = { east_exit: "B/awesome_area/b:Entry0" }
[dependencies.B]
version = "1"config = { west_exit: "A/cool_area/4:Entry2" }
packages can define what config they take via:
name = "A"version = "1.0.0"
[config]
east_exit = "map_entry"
% A/src/area/cool_area/4/4.mscr
#new:Script $Script_Exit_East
Call GotoMap ( {Config:east_exit} ) # expands into {Map:B/awesome_area/b:Entry0}
Return
End
or we could just do simple string replacements like GotoMap ( {Map:{Config:east_exit}} ) and not bother with types - this should be fine right?
might be worth making the config system more nuanced in the future which brings into question the {Config:x} syntax, e.g. if I want conditional compilation
Star Rod uses {...} already for its expressions, too; could move away from that?
Add @x syntax, which expands to config values defined by dependent packages in their starpkg.toml. These would expand before reference expressions to allow for Call GotoMap {Map:@east_exit} and the like.
Example starpkg.toml:
name = "foo"version = "1.0.0"
[dependencies]
bar = { version = "1", config = { east_exit = "foo/cool_map" } }
Usecases:
configurable enemy health, damage, etc
joining maps from different packages together
more
Out-of-scope for this issue is C-style conditional compilation (#if etc), but it should definitely be added in the future.
The text was updated successfully, but these errors were encountered:
We also need to consider the myriad of TOML files within the src directory, like src/actor/<name>/<name>.toml or those proposed for battle/area exports - how would config values work for these, if at all?
I'm currently thinking that in places where IDs are accepted (e.g. actor.toml files take text IDs), we also support @foo syntax.
Since config values just provide basic string replacement like in C, it's also worth considering contexts where @x needs to be delimited somehow, e.g. @xfoo - this is ambiguous, did the user mean @xfoo or @x + "foo"? Therefore we should also support a @{x} syntax which allows juxaposition in this manner.
Alternatively, we place the delimiter at the end as in x!, i.e.
#new:Script $Script_Exit_East
Call GotoMap ( east_exit! 0 )
Return
End
name = "enemy_name!"tattle = "enemy_tattle!"
Bang-syntax makes things like x!foo described above possible.
Continuing discussion from #5...
Add
@x
syntax, which expands to config values defined by dependent packages in theirstarpkg.toml
. These would expand before reference expressions to allow forCall GotoMap {Map:@east_exit}
and the like.Example
starpkg.toml
:Usecases:
Out-of-scope for this issue is C-style conditional compilation (
#if
etc), but it should definitely be added in the future.The text was updated successfully, but these errors were encountered: