PinkDot on 13/5/2018 at 15:12
Is it possible to change the class of an object using DMLs?
Let's say I have a mission with a swordguard2 (-6047) but I want to replace him in a DML with a HugeSpider (-2997). Basically I want to be able to replace it with ANY creature I specify in DML.
Any links or properties assigned to the concrete object should ideally stay (although could be recreated in DML, if needed). (I'm thinking of a conversation actor link etc..)
I know that I could just change the Model Shape, but that would work only to a certain extent, as the creature type would have to be the same.
Any ideas if this could be done?
LarryG on 13/5/2018 at 15:27
Stick all the relevant properties into two metaprops, one for creature type A and one for creature type B. Create a new creature type without all the important stuff, and then create a concrete of it with one of the metaprops added to it. Use dml to add and remove metaprops.
That's just a guess.
PinkDot on 13/5/2018 at 15:43
Hmm... for two or few creatures, that could possibly work. But I'd like to be able to replace an AI with any arbitrary one available in the archetype. I'd have to replicate a big chunk of the archetype in the DML's metaproperties to do that...
Another possibility would be to just create a new AI object from scratch. Can we do that in Dromed? Or any kind of "spawning" effect is just a teleporting from a blue room really?
If the latter is a case, one solution that comes to my mind is to have 1 instance of each creature type in a blue room, and using the DML I would only change which one I teleport to the visible part of the mission. Then I could switch the Shape Model additionally...
This is for some motion testing, btw. - not for a real playable mission.
R Soul on 13/5/2018 at 16:02
It might be easier to write a squirrel script*. There are in-built functions for creating new objects, and copying properties/links etc from one to another, and of course, deleting objects. If you want to allow AIConversationActor links to be copied, remember that the AI needs the correct Speech > Voice property to say any lines (so we can hear a spider complaining about having to break in his new boots).
I'm curious: what's the purpose of this? Are you working on a tool for editors to make mass updates, or is it for players who want to see what a mission would be like with different AI?
*DMLs can load script modules (see Thief2\doc\dbmod-sample.dml, line 118).
PinkDot on 13/5/2018 at 16:30
Squirrel script - that sounds interesting. I never touched it yet (just skimmed through documentation), but that might be a way to go, if setting up all those teleports becomes too cumbersome.
Quote:
I'm curious: what's the purpose of this?
This is basically for a motion testing for my animation tools for 3ds max. The idea is to let you see how your motion looks like in-game, while being still in 3ds max, with so called 'one click'. So if you work on an animation for a burrick or a tree-beast, it would open up the scene and load burrick or tree-beast respectively and playback the motion.
This also means that I don't care too much about voices - that's just to see if everything exports correctly etc...
voodoo47 on 14/5/2018 at 08:22
it's easy to write a dml that would spawn creature B from all concretes of creature A upon level start, but this will kill all extra props and links (see (
https://www.systemshock.org/index.php?topic=134.0) nospiders uni, a worm is spawned from all spiders upon BeginScript).
Unna Oertdottir on 14/5/2018 at 10:30
Quote Posted by PinkDot
Is it possible to change the class of an object using DMLs?
Let's say I have a mission with a
swordguard2 (-6047) but I want to replace him in a DML with a
HugeSpider (-2997). Basically I want to be able to replace it with ANY creature I specify in DML.
Any links or properties assigned to the concrete object should ideally stay (although could be recreated in DML, if needed). (I'm thinking of a conversation actor link etc..)
It's possible to swap properties via dml, Just replace the numbers in a dml. But its too much work, since you need to add the properties needed manually, they won't be saved in an exported dml. The archetype looks too different, anyway.
For example,
swordguard2 (-6047) is also Grunts<--Swordman<--Human. You can't swap everything.
HugeSpider (-2997) is also Spider, Sewerspider is also in Spider. Can't swap this without trouble.
PinkDot on 14/5/2018 at 12:19
Thanks for all the info - I get a better understanding of the DML possibilities now. It's a pretty powerful feature even if not all kind of modifications are possible.
Just while we're on this - the documentation says that starting from version v1.22 one can refer to objects by name, rather than just id number, but this does not seem to work. I get a message in the monolog that it couldn't find an object called 'Actor', while clearly this is how I named my AI.
Has anyone tried using names rather than numbers? I'm afraid that numbers may change, as I might re-do the setup.
Unna Oertdottir on 14/5/2018 at 12:51
This will work with object names
Code:
+ObjProp xxx "GameName"
{
"" PinkDot
}
+ObjProp xxx "SymName"
{
"" PinkDot
}
+ObjProp "PinkDot" "DiffScript"
{
"quest var values" 1,2
}
I can see that diffscript was added. Don't know about "Actor". Might be a common name in the proplist.
PinkDot on 14/5/2018 at 16:41
OK, I'll try with "PinkDot" then and see if that works... ;)