Because the old szenes are already incompatible with OC i think should think about changes in the defcore file.
And the ID of Objects often cause al lot of trouble if you use more than one pack in one szene.
( I remeber an Clonk that shoots atombombs because of an conflict )
To complete it there should be an Version number and an array with identifiers that get overwritten.
So If there are two objects with the same identifier from different Packs there is no conflict.
And if there are two objects with different versions its easy to decide witch one is the current.
It might be possible to make the ClonkScript realy object oriented.
>To complete it there should be an Version number and an array with identifiers that get overwritten.
CreateObject("MetallAndMagic.c4d-TwoHandedSword-Version2.32ALPHA")?
MONS = Monster
EFLN = Tera-Flint
CreateObject("Monster")
Also I think we don't need to have the version / pack information there.
MONS would be MONSTR
EFLN would be TRFLNT
CLNK would be CLONK_
FLNT would be FLINT_
etc.
ExternalPacks could use a prefix then:
SBASSA - Assasin from ShadowBlood.c4d
CLONK = "monster";
CreateObject(CLONK);
CreateObject("monster"); //Same as the previous line
CreateObject(getobj("monster")); => CreateObject(MONS);
There doesn't have to be ID that it gets. It could just get the object (no matter how the real object is named). Also the getobj could be inside the CreateObject, so you could just use the line I showed previously.
function CreateObject(object, other, parametres, here, please){
realobject = getobj(object);
}
Message("I'm gonna create a %s!", foobar);
SetName(foobar, GetCursor());
CreateObject(GetObject(GetName(GetCursor()))); and stuff..
as CreateObject("clonk")
or var clonk = "clonk"
CreateObject(clonk)
For example:
var id = <Monster>; // other ideas: :Monster , {Monster} , 'Monster'
CreateObject(id);
Log("Just created a %s.", id) // With automatic cast?
> There could be a function that gets the object that corresponds the string.
That function will probably be GlobalN().
CreateObject(org.openclonk.clonk, 100, 100);
?
> ExternalPacks could use a prefix then:
Nobody uses the guidelines for IDs with four-character IDs, why would you think they'd care when they've two characters more available?
>This looks awful.[...]Also I think we don't need to have the version / pack information there.
That was my point. But without that it would not help in any way to have informations about the package or the version in the ID
> CreateObject("MetallAndMagic.c4d-TwoHandedSword-Version2.32ALPHA")
because it is obvisious that you want the latest version.
And i think there is no Problem to say exactly from wich pack you want the object.
It might be possible to keep out the pack definition if the object is in the same pack as the object that executes the script
>because it is obvisious that you want the latest version.
Not really.
>Not really.
If not, what do you want then? Its not like the previous option would still be loaded. Only all you CreateObject-Calls would become invalid when I change the arrow damage from 3 to 4 and therefore increase the version number - yay
>It would be useful if newer versions didn't overwrite the older ones.
So every object package should be delivered with each and every object in each and every version it has ever been?
> Hm. Polygonal objects are not that large, right? (I know, it's crazy.)
they are not that much smaler because a small bitmap uses very few data too (bmp 20 * 20 = 1,22 kB)
even if you implement the polygonal objects in a very effective way i will consume much more Space
And btw, you should reply to every post separately.
> You forgot, that we will perhaps have bone animations...
thats brave i wounder who is going to implement that. i do not think it is easy to do.
> It would be useful if newer versions didn't overwrite the older ones.
That is not very useful becaus you can anticipate that the later version is the better one.
to have the information of the version would just help the engine to decide (if there are more than one with the same identifier) wich one is the current.
It might give the possibilitie to patch Packs witchout updating the hole pack.
So for example you can put all objects that should get patched in a pack that uses the same namespace as the pack that should be patched. in the patched objects you increase the version number and easily just the current objects get loaded.
Now those identifiers get quite long, and we might want to choose not to solve the problem of two people creating identically named Megaflints after all. But with a little syntactic sugar, like "using namespace org.openclonk" to bring all core objects into the local namespace, and perhaps automatically doing this with the object's own namespace, it could be managable.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill