TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 13 of 13

Thread: Replace object class using DML ?

  1. #1
    Member
    Registered: Oct 2004
    Location: Ireland/Poland

    Replace object class using DML ?

    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?

  2. #2
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    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.

  3. #3
    Member
    Registered: Oct 2004
    Location: Ireland/Poland
    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.

  4. #4
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    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).
    Last edited by R Soul; 13th May 2018 at 12:11.

  5. #5
    Member
    Registered: Oct 2004
    Location: Ireland/Poland
    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.

    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...

  6. #6
    Zombified
    Registered: Sep 2004
    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 nospiders uni, a worm is spawned from all spiders upon BeginScript).

  7. #7
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    Quote Originally Posted by PinkDot View Post
    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.

  8. #8
    Member
    Registered: Oct 2004
    Location: Ireland/Poland
    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.

  9. #9
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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.

  10. #10
    Member
    Registered: Oct 2004
    Location: Ireland/Poland
    OK, I'll try with "PinkDot" then and see if that works...

  11. #11
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    btw, SymName is a hidden feature (Object System-->SymName). It's only available as developer function (DevMode). Many properties (scroll down) are hidden.

    See lg.ini for more details and how to enable devmode.

  12. #12
    Member
    Registered: Oct 2004
    Location: Ireland/Poland
    Quote Originally Posted by Unna Oertdottir View Post
    btw, SymName is a hidden feature (Object System-->SymName). It's only available as developer function (DevMode). Many properties (scroll down) are hidden.

    See lg.ini for more details and how to enable devmode.
    Not sure if I understand. Is SymName the same as object's name? Or is this a different thing?
    Anyway, I tried different names, also the GameName property, but nothing gets recognized.

    In my DML I'm referring to a name given in Dromed - you set the name in DML itself. Maybe that's why it's working for you?
    Still, it would be good to give a name in Dromed and refer to it in DML.

    How do you enable DevMode, btw.?

  13. #13
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    There's a config file "lg.ini". It's in the root folder. Open it and enable
    ;DevMode=1
    (remove ";" and save; there's also instructions, read it)
    It's also in the NewDark zip.

    SymName is the "real" object name. DromEd can handle it like a object ID.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •