ID:134199
 
I have a question, its a bit hard to get what I mean across but hey i'l try.

Is it (or will it be) possible to make your game capable of compiling itself on laoding and load any external files within its rsc directory. Maybe an example would explain it better.
Say you have a sci fi game and you want to add planets to it but not go through the whole code, could you make the game check its folder for say 'NewPlanets.dm' and compile what is in it ingame, the idea would enable a server hosting without the source and just the host files to be able to add planets via the DM file or whatever file. So if the game was fully made and needed no updates except planets, the sever would simply add to the file.

I'm sure you could do a work around using save files but thats not what I mean.
Any ideas? (Sorry if I sound incoherent)

Anyway thanx in advance (Thats an intentional typo)
This is actually one of the oldest BYOND features that was requested on the BYOND forums.

See here for the relevant discussion:

[link]
In response to Jtgibson (#1)
Thanks, I never knew this, much appreciated!
In response to Lyndonarmitage1 (#2)
All very intresting although i didnt know what they were talking about for half of the time, so basically all i need is a decent save system an ingame programming langauge or proc with many variables >.< or can i transfer info like this from say a "compiler" sever to my main one using export and input.
I think I will just make a few procs for now...
In response to Lyndonarmitage1 (#3)
Bear in mind that almost all of the stuff they mentioned there was completely theoretical and none of it has been implemented. Plus, now that Dan is busy being a family man and all, it's not too likely that such a major "hardcode" feature will ever be implemented, at least not until BYOND's new programmer Lummox feels courageous enough to delve into the deepest, most complex code.

Creating an in-game scripting language is the only way that exists at present to do dynamic code in BYOND. That's not for the faint at heart; I've been around for seven and a half years (going on eight) under various keys, and I still don't feel like I would be comfortable making a scripting language...
In response to Jtgibson (#4)
aye aye, I was thinking about this hmmm... bascially the only thing that can be done is make an obj that has a var that denotes what verb or proc is run and when, if you get my drift.
Typically it's best to do whatever you can with external files rather than hardcoding content into your projects. It doesn't sound off the bat like you need any ability to actually add procs, so much as just add new content. This is quite easy to do.

If on the other hand you need dynamic code, then you'd certainly have to develop your own in-game scripting language to do it. There are, however, expression parsers that may be able to do part of that job for you, like SET.

Lummox JR
In response to Lyndonarmitage1 (#5)
The best way to do this would be a datum which holds all the procedures you need, and a list of the variables along with whatever else you need. I'm in the process of making a scripting language, and this is currently what I'm doing. I've been working since December on it, and it's still nowhere near completion, though. Don't expect to finish it quickly if you're making a complex language.