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

Thread: Noob with NVLinkBuilder script, making TurnOn create a DetailAttachment [solved]

  1. #1
    Member
    Registered: Sep 1999
    Location: Portland, OR

    Noob with NVLinkBuilder script, making TurnOn create a DetailAttachment [solved]

    NVLinkBuilder (NVTrap)Upon receiving TurnOn, this script creates a link with the flavour specified by NVLinkBuilderLinkType between the objects specified by NVLinkBuilderLinkSource and NVLinkBuilderLinkDest.
    A TurnOff message will remove the link.

    You can specify data for the link by using NVLinkBuilderLinkData#Field and NVLinkBuilderLinkData#Value (where # is a number between 1 and 10, maximum). To specify booleans, use 1 for True and 0 for False; to specify vectors use the format: "0.00, 0.00, 0.00".
    If the link you want to create has no fields (such as ScriptParams links), then you must omit NVLinkBuilderLinkData#Field.

    To find out the name of the field, create the appropriate flavour of link in DromEd and hit Edit Data. The field name is exactly the same as the label next to each box, including spaces and other special characters. If there are no labels in the Link Data window, then that link flavour has no fields (and you need to omit NVLinkBuilderLinkData#Field).
    For example, valid fields on a Flinderize link are: "Count", "Impulse", "Scatter?", and "Offset".
    If you specify an invalid link flavour or an invalid field name, DromEd will throw up an error message and possibly crash when this script is triggered. You have been warned.

    As of v1.2.4, you can use NVLinkBuilderModifyExistingLink=1 to modify the data of existing link (if it exists), instead of creating a new one. The first matching link is used. Note that modifying the data (instead of removing and adding a new link) allows you to avoid behaviour such as attached objects automatically being deleted when the attachment link is removed.
    Multiple copies: This script has multiple copies, allowing you to apply it multiple times with different parameters to the same object. Add a number after the script name to use another instance of the script, and adjust the name of the script used in the script's parameters accordingly.

    Example: you can use the following scripts: NVLinkBuilder, NVLinkBuilder2, NVLinkBuilder3, ... up to NVLinkBuilder4. In each case, replace the NVLinkBuilder in the name of each parameter with the name and number of the script you are using. e.g. NVLinkBuilder2On will specify the message to trigger NVLinkBuilder2.
    ^^^ Above for quick reminder in case you haven't seen it in a while.

    I'm trying to have a door with a new [DetailAttachment] link (attaching to vhot 1) once another object, in this case, the glass window of the door, is destroyed.

    Scripting is still new to me and I'm just starting to understand, but can't wrap my head around how to use this NVScript.

    So.. I know I can send a TurnOn to this script (NVLinkBuilder), by using TrigSlain on the object acting as the [ControlDevice]. Cool. This means I can slay the window with this TrigSlain script, with a [ControlDevice] linked to an object to send the TurnOn. But what do I actually link to? I mean I know I have to link it to whatever object is going to have the Design Note populated with NVLinkBuilder's specifications... but it seems made to link to a third party object because I see you can specify the NVLinkBuilderLinkSource and NVLinkBuilderLinkDest. Perhaps on a marker? I wouldn't think it was the very door I was planning to create the [DetailAttachment], because a TurnOn will also open the door, which I don't want.

    Then, once I do know what object is to get the TurnOn I'm not sure how the Design Note is supposed to look. I will try and make it up now below, but I wish there was examples. Perhaps there is but my searching sucks. Let me try:

    Code:
    NVLinkBuilderOn; NVLinkBuilderLinkType="DetailAttachment"; NVLinkBuilderLinkSource=105; NVLinkBuilderLinkDest=95; NVLinkBuilderLinkData1vhot/sub #=1
    PS: Sorry if I'm exhausting this community with my stupid window stuff, but I'm learning things that will apply to much more than the window, so I don't post too much more on later issues. I'm basically crashing head on into this window to learn early. Pun intended. Thanks for all the help.
    Last edited by gamophyte; 2nd Apr 2019 at 20:18.

  2. #2
    Member
    Registered: May 2002
    Location: Texas
    Its been a while since I used NVLinkBuilder but IIRC I added the script and design note to a marker and cd linked whatever sends the TurnOn to the marker.

  3. #3
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    The learning curve for NVScript is like a house of cards. Steep, but if you make a hole in it, the whole thing collapses.

    The parameters need attention.
    Code:
    NVLinkBuilderOn;
    is not needed. That's not a valid parameter. It should always be ParamName="value" (or value without quotes if specifying a number). This param is only needed if you want to change the activation message from TurnOn (the default) to something else.

    Code:
    NVLinkBuilderLinkType="DetailAttachement";
    Note the changed spelling of the link type. It should be spelt wrong, presumably to match the wrong spelling in ParticleAttachement.

    Your source and dest params are using concrete object IDs, which is never a good idea (just like with convs), so you should use object names instead. The script can operate on a third party, but if you leave out either the source or dest param, that will use a default value of the object itself.

    For setting the link data values, it has to be like this:
    Code:
    NVLinkBuilderLinkData1Field = "vhot/sub #"; NVLinkBuilderLinkData1Value = 1
    i.e. the name of the field and its value are set via two parameters.


    Are you sure a concrete ID for the attached object is correct? If it's slain, is the slay result set to 'no effect' so the object still exists?
    Last edited by R Soul; 31st Mar 2019 at 08:32.

  4. #4
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Amazing R Soul, this orientates my brain to what it meant by NVLinkBuilderLinkData1Field, and it makes sense, why would there be a call for each link type, that would be crazy. So yeah I see you just do them seperate too, hence doing it up to 10 times, but theses are for set 1 etc.

    Now, your example has spaces before and after the = symbol, is that allowed? Shouldn't it be?
    Code:
    NVLinkBuilderLinkData1Field="vhot/sub #"; NVLinkBuilderLinkData1Value=1
    Note the changed spelling of the link type. It should be spelt wrong, presumably to match the wrong spelling in ParticleAttachement.
    HA! That's funny I didn't even notice! Attach-chea-ment haha.

    Your source and dest params are using concrete object IDs, which is never a good idea (just like with convs)
    Well I don't then know to make it understand it's that specific door? I mean I guess that doesn't matter, this door is unique, so I suppose it should be placed with this on it. So does this mean I need to do the hierarchy number with the negative in front?

    The script can operate on a third party, but if you leave out either the source or dest param, that will use a default value of the object itself.
    This is a problem I still don't understand, if a third party.. don't I have to make a marker in the concrete world? If so, it feels odd to have it ref non-concrete numbers (-6850 eg.).
    It would be easier to do it in the door's props to not have to have source included, but how do I prevent the incoming TurnOn from opening the door via StdDoor?

    Are you sure a concrete ID for the attached object is correct? If it's slain, is the slay result set to 'no effect' so the object still exists?
    I'm not sure what you're asking here. The object being slain has links in it's class, to flinder as it leaves the world. I first tested the TrigSlain sending TurnOn with a crate and it worked. Breaking the crate opened a door, so I think I'm safe.

    Adjusted code:
    Code:
    NVLinkBuilderLinkType="DetailAttachement"; NVLinkBuilderLinkSource=-6852; NVLinkBuilderLinkDest=-6808; NVLinkBuilderLinkData1Field="vhot/sub #"; NVLinkBuilderLinkData1Value=1

  5. #5
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    Well I don't then know to make it understand it's that specific door? I mean I guess that doesn't matter, this door is unique, so I suppose it should be placed with this on it. So does this mean I need to do the hierarchy number with the negative in front?
    Set the object names of the objects involved and use them instead of their IDs, just like with convs.

    but how do I prevent the incoming TurnOn from opening the door via StdDoor?
    I'd forgotten about TurnOn opening the door, so yes, a marker is needed.

    I'm not sure what you're asking here. The object being slain has links in it's class, to flinder as it leaves the world. I first tested the TrigSlain sending TurnOn with a crate and it worked. Breaking the crate opened a door, so I think I'm safe.
    Yes, TrigSlain works fine for that, but bear in mind that I don't know exactly what you're trying to do (e.g. why some slain object triggers this other object attachment, but I can just assume the 'detail' object is a concrete object.

    edit:
    Two possible ways to avoid having to use a maker:
    1:
    Put the NVLinkBuilder script (and design note) on the glass object. Add another parameter:
    Code:
    NVLinkBuilderOn="Slain"
    No need for any CD links. However, the engine might delete the object before the script to has enough time to make the link.

    2:
    Put the NVRelayTrap script on the glass object. Parameters:
    Code:
    NVRelayTrapOn="Slain"; NVRelayTrapTOn="Giraffe"
    CD link from the glass to the door (or instead, another parameter NVRelayTrapTDest="door object name")

    When the glass is slain, it'll send a 'Giraffe' message to the door.
    Put NVLinkBuilder on the door, along with the design note (link dest param not needed) with the following addition:
    Code:
    NVLinkBuilderOn="Giraffe"
    When the glass is slain, it sends a 'Giraffe' message to the door, which responds by adding the DA link. You can use whatever message you want. The point of using 'Giraffe' in the example is to make it clear that you can use any name you want.
    Last edited by R Soul; 31st Mar 2019 at 18:42.

  6. #6
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Quote Originally Posted by R Soul View Post
    Set the object names of the objects involved and use them instead of their IDs, just like with convs.
    I've never done convs yet. But so then the object was called "BD_FrontTowerWindowLongParticleHack" I'd literally use that then?

    Yes, TrigSlain works fine for that, but bear in mind that I don't know exactly what you're trying to do
    Oh sorry I thought I explained. So I have a door window perfectly where it needs to be via door vhot. It's physical and slayable because it's parent is the wood barrier (but now with met glass that breaks into flinders and produces a corpse of pieces of glass still stuck in the door. I'll call it CPSSD). To get it it to swing with door, you have to use particleattachment and cheat by adding non working particle group to the object. Work great.

    But, if it produces the CPSSD, it floats in the air where it was made. So you close the door and it's just there floating there. This script stuff came in as a way to reattach the CPSSD, so that it swings with the door. The original glass object was attached via refs to concrete, though it didn't matter.

    Two possible ways to avoid having to use a maker...
    WOW COOL! I do get it. So long as the message is received. I'm so glad I started learning this stuff. It's way less intimidating now. I will try it out in a little while.

  7. #7
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Dang it's not working. Can you see what I'm doing wrong?

    In the glass:


    The door:
    Last edited by gamophyte; 31st Mar 2019 at 23:11.

  8. #8
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    You're using the archetype name, not the object name. Setting the name is exactly the same procedure as when you make a starting point (double click "A ... (##)" to set the name).
    I don't know if there's a character limit, but start with something short.

  9. #9
    Member
    Registered: Sep 1999
    Location: Portland, OR
    oh wow, I vaguely remember doing that so long ago, and since there's not been a need for it since, I totally forgot you can do this. Sorry about that. Will give it a go tonight. Thanks so much!

  10. #10
    Member
    Registered: Sep 1999
    Location: Portland, OR
    uhg, I'm burnt out trying to get this to work. I can't get this to work tonight.

    I've named my concrete window "BrokeHack", tried it in blue room and right in the same room.

    I've tried deleting quotes, adding quotes in the design notes, trying different combos. Using source, using dest instead.
    Tried deleting the longer "LinkBuilder" names in design note (for v1.2.6), the version I have, for the old names in, example "NVLinkType" vs "NVLinkBuilderLinkType". Nothing.


    Now I have it super simple, to avoid all the extra commands I've dropped back away from the relaytrap, and now using a button to avoid slaying to fast issue. I can hit the button and it doesn't need to relay.


    Next step is to do another link type, before I head to bed. Don't know what else to do.

  11. #11
    Member
    Registered: Sep 1999
    Location: Portland, OR
    I think I'm working this out. So it looks like you cannot leave it up to inherit the DEST, so putting the DEST in made it work, now just trying to figure out why it's not using my vhot 1.

    Also it's only working with button, but that could go back to needing the relay.

    Code:
    NVLinkBuilderLinkType="DetailAttachement"; NVLinkBuilderLinkSource="BrokeHack"; NVLinkBuilderLinkDest="FTBrokeHackDoor"; NVLinkBuilderLinkData1Field="vhot/sub #"; NVLinkBuilderLinkData1Value=1
    Edit: my Comcast went down so on tapitalk. Giving up for now. I thought i found the issue, that detailattachement defaults to sub object, so I made NVLinkBuilderLinkData1Field the type, so I can say vhot, then NVLinkBuilderLinkData2Field is the vhot number. Still not working.

    Edit2: I will post verbatim what I have tonight. My only other thought is that it wants me to do every field even though they're not needed, and assumed if omitted they should be default.
    Last edited by gamophyte; 2nd Apr 2019 at 11:48.
    - The Gamophyte
    "They settled into the depths of Cesseld, only the symbols remind us they still exist"

  12. #12
    Member
    Registered: Sep 1999
    Location: Portland, OR
    And boom goes the dynamite. Done and it works well. THANK YOU R SOUL!

    So I was putting in words for a drop down selection data value. Drops downs are numbered instead, 0 for the first item 1 for second and so on. So Vhot was second down so I put 1. Final comment for others following to do this as well:

    Code:
    NVLinkBuilderOn="BreakingNews"; NVLinkBuilderLinkType="DetailAttachement"; NVLinkBuilderLinkSource="BrokeHack"; NVLinkBuilderLinkDest="FTBrokeHackDoor"; NVLinkBuilderLinkData1Field="Type"; NVLinkBuilderLinkData1Value=1; NVLinkBuilderLinkData2Field="vhot/sub #"; NVLinkBuilderLinkData2Value=1

  13. #13
    Member
    Registered: May 2002
    Location: Texas

  14. #14
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Quote Originally Posted by john9818a View Post
    Everything ok?

  15. #15
    Member
    Registered: May 2002
    Location: Texas
    Yes everything's fine. I was just surprised by the four posts in a row.

  16. #16
    Member
    Registered: Sep 1999
    Location: Portland, OR
    Quote Originally Posted by john9818a View Post
    Yes everything's fine. I was just surprised by the four posts in a row.
    I was hack and slashing trying to figure out what I was doing wrong, and so would report back if I got close but had to stop. Then a new idea would pop up to try, since it was radio silence.

  17. #17
    Member
    Registered: May 2002
    Location: Texas
    I guess with the long posts its not much of a big deal but admins here don't like successive posts from the same poster. One idea is to edit your post with new info.

  18. #18
    Member
    Registered: Sep 1999
    Location: Portland, OR
    I wanted to send out subscription notifications to R Soul, for when I was stumped. I didn't realize I would get it so quick, and wanted to send another notify in case the radio silence I was getting was him or her testing it. Also there is only two posts that were made close to each-other. There are the ones that are 10 hours or so apart, and the other a day. I will be careful though.

Posting Permissions

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