Dynamic Scripting

I’ve started a few threads about different parts of what I’m trying to do. But the actual goal is to dynamically script content (load it from a string pulled from the web) that can control specific behaviors of dynamically created content, Quests for example. If anyone has any ideas I’d love to hear them

You are mixing two fundamentally different things.
Do you want data driven behaviour or do you want runtime code compilation?

Quests and alike do not require any additional code, they just require that you wrote code to interpret the data. Especially quests are never “free and open”, they use the steps you allow them to do and what you allow them to do is what you wrote handing for in the interpretation / parsing code

I want to be able to have some level scripting that can more directly control the behavior in the quest. Data driven isnt enough, it can only support pre-programmed quest types. I want to be able to make a new quest type from an external script that is then downloaded to the client during play.

In other words, I want runtime code compilation that can include data connected to them on another external level, IE, Quest Types are the code, Quests themself are defined by a Quest Type (the code) and a set of variables that are assigned to them, these two things make up an actual instants of a quest.

I was just posting something concerning quests. I think the overall concept of what you are planning is not possible, however the core of what you are is totally possible. Creating a questing system that is flexible is actually easier then creating one that is not. You just have to know all of the things that you want to track, then give quests based on those things.

A flexible quest system is based in classes, not code. You can easily program a quest to force a monster to drop an item, or force something else to happen without actually creating the code to do it on the fly. I would think that way would seem more managable, but I doubt that it is.

http://forum.unity3d.com/threads/78017-Quest-problem.

Sadly the product that requires this questing system isnt a normal RPG style game, its actual an educational product that uses alot of the same design that traditional RPG games use. I need it to be as expandable as possible so I can have a level of abstraction away from the core code of the product but allow the other people that will be working on the product a level of flexibility over the quest system, including but not limited to, specialized GUIs, receive messages from the core system via callbacks interact with as well as create NPCs in the world.

Heh, you just described a questing system. Again, a flexible system would be much better than and open ended one. I would think the only advantage to open ended would be to let the users add quests to the core content. That is both a good and bad idea.

really the only thing I need to meet the goals I have is some kind of runtime code compilation. Which means It might result in me having to write a simple language to handle this, but I sure hope not.

A little google search reveals a possible answer for you… LUA. game script code that is very common in many games. (World of Warcraft for one)

http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/using-lua-with-c-r2275

It would be restricted to a client side file, but it looks promising

I was thinking lua might be an option, but the question is, can unity3d support it. or more importantly, can it run on iOS in the same way.

If you write a Lua interpreter, yes.

–Eric

If you have to integrate a script interpreter you can just make your and the designers life easier and not use scripting at all. Because you don’t get more from scripting as the script code can only execute what you implemented under the hood, you can not open up the low level access anyway and the “interaction creator” can not make use of most of the stuff anyway as he wants to create interaction and requirement → gain relationships so exposing only these things is meaningfull. You will be writing a scripting support for an engine in the engine in the engine kind off.

If you want to do something like Second Life on iOS, then you can drop the idea right away as apple will never approve it, just in case your “educational interest” goes this far and especially in the direction of user created content

Instead of scripting, I would use proper structured data like XML to represent the interaction trees or a truely relational database if you have strong cross relationships between “quest trees”, baked by a pretty complex state machine / rule based system.
Depending on if you want to support cross references, I would recommend to give Behave a look for example as BTs are very strong for such kind of things.

We are doing something that might be rather similar to what you do and use Behave, but ours isn’t targeted at iOS as mobile devices are away a magnitude to two in power for what we need.

Is Behave on the unity store, or could you link me to it directly?

Its in the unity asset store, yes, and additionally on the website of AngryAnt (his username here)

I think I get what you are saying Dreamora, its kinda like a kitsmid (spelling?) from udk3 that I could develop for quests. interesting idea.