TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 2 of 5 FirstFirst 12345 LastLast
Results 26 to 50 of 113

Thread: KDScript 0.7.0 (2013-09-01): new script module, now with tutorials

  1. #26
    Member
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    Imagine a sudden downpour and lots of AI deciding to find shelter till it passes. A thief might just have a chance to get through a guarded door.

  2. #27
    Member
    Registered: Aug 2012
    Location: Seattle
    Hello all. Based on my research into the R6025 crash ("Effects" switch), I think it's a NewDark bug specific to Windows XP. A few people have reported it with other recent FMs, but it was less consistent than here. I'm going to PM each of you getting crashes with some follow-up questions, to keep from overloading this thread. This was wrong; see below.

    Meanwhile I've been working on a new version that adds or fixes some minor features and progresses toward T1/TG compatibility. For those of you who have been able to run the entire demo and/or look at the documentation, is there anything about the scripts so far that you would like to see changed? Inconvenient usage, missing options, limitations, etc.?
    Last edited by kdau; 10th Jul 2013 at 17:01. Reason: bug fixed

  3. #28
    Member
    Registered: Aug 2012
    Location: Seattle
    Well, I somehow managed to reproduce the bug myself on Win7, so I've been able to fix it I'm making progress on fixing it. Version 0.3.0, including that fix and various small new features, should be ready later today (GMT-7). soon. (I'd gotten it to work, but now it's crashing again. Further investigation tomorrow.)

    fibanocci, your R6025 crash was for a related but different reason. I'll PM you details.
    Last edited by kdau; 11th Jul 2013 at 06:26. Reason: ugh, still crashing

  4. #29
    Member
    Registered: Jun 2009
    Location: The Spiraling Sea
    Thank you kindly, kdau...I love the possibilities...

  5. #30
    Member
    Registered: May 2002
    Location: Toronto
    Question about KDToolSight

    I'm using a default tool sight on the CustomHUD object. I decided to change the tool sight for one of my projectiles, however the projectile has other projectiles that inherit from it. I notice they don't inherit the tool sight image from the parent, but rather from the CustomHUD. Would it be possible to change that? It's a really minor (and easily circumventable) thing but it felt kind of "off" from the way most things inherit in Dromed.

    Do you think it would be possible in the future to offset the tool sight graphic?

  6. #31
    Member
    Registered: Aug 2012
    Location: Seattle
    Quote Originally Posted by Sliptip View Post
    Question about KDToolSight

    I'm using a default tool sight on the CustomHUD object. I decided to change the tool sight for one of my projectiles, however the projectile has other projectiles that inherit from it. I notice they don't inherit the tool sight image from the parent, but rather from the CustomHUD. Would it be possible to change that? It's a really minor (and easily circumventable) thing but it felt kind of "off" from the way most things inherit in Dromed.
    Ah yes, Design Note parameters are an inheritance nightmare. I really wish we had a better system. The CustomHUD object is only consulted if a parameter is missing from the Design Note inherited by an object. However, Design Note inheritance is all or nothing. If an archetype or concrete object has any Design Note at all, it won't inherit any Design Note parameters from its parent archetype(s). The only solution is to copy the ancestors' parameters onto the descendants. For example, you might have a tree like this:

    Code:
    MyGenericType (-6003)             Design Note: foo=2
    |- MyIntermediateType (-6011)     Design Note: foo=2; bar=-7              ("inherit" MyGenericType's foo parameter and add bar)
    |  |- MySpecificType (-6027)      Design Note: foo=4; bar=-7; baz=6.5     (override foo, add baz, but "inherit" bar)
    |  \- MyConcreteObject (322)                                              (no Design Note; inherited from MyIntermediateType)
    \- MyOtherType (-6015)                                                    (no Design Note; inherited from MyGenericType)
       \- MyOtherConcrete (485)       Design Note: foo=2; baz=11.0            (if any parameters need to be set on a concrete object, still have to include all ancestors' parameters)
    OTOH, if you don't have any Design Note on the child archetype and the parent archetype's parameters are being ignored anyway, that would be a bug.

    Quote Originally Posted by Sliptip View Post
    Do you think it would be possible in the future to offset the tool sight graphic?
    I knew I was forgetting something in the positioning code! Parameters tool_sight_offset_x and tool_sight_offset_y will be added in the next version (along with equivalents for KDStatMeter).

  7. #32
    Member
    Registered: May 2002
    Location: Toronto
    Oh my mistake then!

    My child objects all have their own design notes. That would explain why they weren't inheriting.

    EDIT: I just noticed that the tool sight disappears when I pick up more of the same projectile. I've got a container that when frobbed gives the player the item specified by the contains link. I'll do some testing with this when I get home from work tonight to give you more specifi info!

    EDIT 2: More specifically, if I pick up more projectiles the tool sight does not appear. If I'm using one of the pre-made tool sights, I can switch to another inventory item, then switch back and it will appear. If I'm using a .png file of my own design, I am unable to get it back.
    Last edited by Sliptip; 11th Jul 2013 at 08:32.

  8. #33
    Member
    Registered: Aug 2012
    Location: Seattle
    Quote Originally Posted by Sliptip View Post
    EDIT: I just noticed that the tool sight disappears when I pick up more of the same projectile. I've got a container that when frobbed gives the player the item specified by the contains link. I'll do some testing with this when I get home from work tonight to give you more specifi info!

    EDIT 2: More specifically, if I pick up more projectiles the tool sight does not appear. If I'm using one of the pre-made tool sights, I can switch to another inventory item, then switch back and it will appear. If I'm using a .png file of my own design, I am unable to get it back.
    Well, that's interesting. It turns out that, when an object is cloned (such as when a stackable is combined or pulled off the stack), the scripts on it aren't always started afresh or sent the usual messages. The engine may just copy the scripts' data wholesalecreate new instances by surpise. (It's not a NewDark thing; the HUD feature is just revealing a design flaw in the original Dark code.)

    Edit: technical clarification for posterity: Sometimes the engine does properly start new script instances; other times it doesn't bother. In either case, the HUD bitmap system reuses handles for requests for the same path, so a garbage collection wrapper is needed to avoid early freeing.

    In this case, both copies of the projectile then hold a pointer to the same loaded copy of the image. When one of them is destroyed, it deletes the image copy, so then the other one can't use it.

    This won't be fixed in 0.3.0 (coming momentarily), but for 0.5.0 I'll write a managed pointer that keeps the images alive.
    Last edited by kdau; 14th Jul 2013 at 19:59. Reason: more clarifications

  9. #34
    Member
    Registered: May 2002
    Location: Toronto
    Ok good I'm glad you know what it's doing

    I was trying to compile more useful data to report, but the more I thought I had it figured out, the more I wrong I was. . .

  10. #35
    Member
    Registered: Aug 2012
    Location: Seattle
    Announcing version 0.3.0, now with 99% fewer crashes (hopefully)! See the first post for details.

    Quote Originally Posted by Sliptip View Post
    Ok good I'm glad you know what it's doing

    I was trying to compile more useful data to report, but the more I thought I had it figured out, the more I wrong I was. . .
    Yeah, without seeing the data on the scripts themselves, something like this looks nonsensical. Don't worry, you're not in Neverland quite yet.

  11. #36
    Member
    Registered: May 2002
    Location: Toronto
    Everything seems to be working now - thanks for the update!

  12. #37
    Member
    Registered: Dec 2002
    Yes. it's working very well

  13. #38
    Member
    Registered: Oct 2003
    Location: Nampa, Idaho
    Isn't it amazing that a game approaching its 15th birthday is still going strong? And much of it is due to folks like Le Corbeau, kdau, Telliamed, Nameless Voice, and other math pukes who keep coming up with tools and improvements to Garrett's world.

    I've been doinking around with level design and mods since Boulderdash put out its editor. DooM, Quake, etc...the mod communities within those games all had a few folks who could crank out tools to make the process easier. I've known a few who were hired by the same companies who made the games. I feel fortunate to have these guys in our midst, keeping Thief alive.

  14. #39
    Member
    Registered: Jan 2008
    Location: Sweden
    Wow, this is great news. I've been playing around with the scripts and havn't found any problems so far.

    On a lighter note, now we finally have an intuitive way to indicate how many whole deer legs Garrett manages to stuff himself with.
    Chewing is overrated.


  15. #40
    Member
    Registered: Aug 2012
    Location: Seattle
    Update on the disappearing bitmap issue: it has indeed been fixed for version 0.5.0. As part of that fix, the KDCustomHUD script will no longer be needed (or exist). (It will still be possible to set parameter defaults on an object named CustomHUD, but no extra script will be involved.)

    Quote Originally Posted by Ricebug View Post
    Isn't it amazing that a game approaching its 15th birthday is still going strong? And much of it is due to folks like Le Corbeau, kdau, Telliamed, Nameless Voice, and other math pukes who keep coming up with tools and improvements to Garrett's world.

    I've been doinking around with level design and mods since Boulderdash put out its editor. DooM, Quake, etc...the mod communities within those games all had a few folks who could crank out tools to make the process easier. I've known a few who were hired by the same companies who made the games. I feel fortunate to have these guys in our midst, keeping Thief alive.
    Aww, thanks for the kind words. I'm not sure I really belong on that list, but I'm glad to do what I can.

    Quote Originally Posted by seventyfour View Post
    Wow, this is great news. I've been playing around with the scripts and havn't found any problems so far.

    On a lighter note, now we finally have an intuitive way to indicate how many whole deer legs Garrett manages to stuff himself with.
    Chewing is overrated.
    This is the best use of KDStatMeter that one could possibly conceive of. Would you mind if I linked to that video in future versions of the documentation?

  16. #41
    Member
    Registered: Jan 2008
    Location: Sweden
    Quote Originally Posted by kdau View Post
    This is the best use of KDStatMeter that one could possibly conceive of. Would you mind if I linked to that video in future versions of the documentation?
    I don't mind, go ahead. I'd like to see the day when FMs start implementing this as a fundamental gameplay feature.

  17. #42
    Member
    Registered: Nov 2003
    Location: Thief fan since ca. 1999
    seventyfour:

  18. #43
    L'architecte de Rocksbourg
    Registered: Nov 2005
    Location: Narbonne, France
    Quote Originally Posted by seventyfour View Post
    On a lighter note, now we finally have an intuitive way to indicate how many whole deer legs Garrett manages to stuff himself with.
    Chewing is overrated.
    Fantastic

  19. #44
    Member
    Registered: May 2002
    Location: Toronto
    KDQuestArrow Question

    I added KDQuestArrow to the "Physical" archetype just for kicks. Now everything has a quest arrow except anything created with the RenewableResource script (from miss16.osm).
    Is that possible to fix? Mind you, I'm probably the only one that'd ever be important for.

    Do you think it'd ever be possible to have it show the distance to the target?

  20. #45
    Member
    Registered: Aug 2012
    Location: Seattle
    Quote Originally Posted by Sliptip View Post
    I added KDQuestArrow to the "Physical" archetype just for kicks. Now everything has a quest arrow except anything created with the RenewableResource script (from miss16.osm).
    Is that possible to fix? Mind you, I'm probably the only one that'd ever be important for.
    Hmm. That actually reveals another facet of the engine's weird script-instance-replacing behavior. I've hacked at it more, and I think I've fixed 99% 90%* of the disappearing HUD element problems now. Memo to future game developers: If you replace one instance of a class with another for no apparent reason, it would be polite to at least notify them.

    * It still happens when a HUD element script is placed directly on an AI object and that AI is killed or knocked out.

    By the way, the RenewableResource script does unspeakable things to the Scripts property, often leading to doubling of object behaviors (e.g. rope and vine arrows created with the script deploy two ropes or two vines when they impact, making it impossible to jump off without removing them). Do you use it a lot? I could easily create a replacement version that isn't so ill-behaved.

    Do you think it'd ever be possible to have it show the distance to the target?
    My original spec had distance indicated by the opacity of the arrow, but the subsystem that does opacity and scaling turns out to have issues. Would you want to show distance as part of the label (e.g. "Hidden Treasure (23 ft)"), by gradation of the label/symbol color, by choosing a different image frame (like with KDStatMeter), by scaling a symbol (but not text or bitmap image), or by some mixture of these?
    Last edited by kdau; 14th Jul 2013 at 20:19. Reason: well, almost

  21. #46
    Member
    Registered: May 2002
    Location: Toronto
    I do use the RenewableResource script a lot actually. If it's not too much trouble to make a better one I'd certainly use it instead. Would I be able to simply swap it for the RenewableResource script or do you think further set-up would be necessary?

    I feel guilty asking this . . . but in the spirit of improving some of the old scripts: Have you ever taken a look at the miss16 LoudSpeakerRelay script? That one is really useful but devastatingly buggy. It's the script that broadcasts Karras's speech. It seems to stop working at random. I suspect its when you're out of range of a speaker when it plays a schema or when too many sounds play at once and overide the currently playing schema. Either way, I'd really like to use that script in multiple missions - but in every case it'll break the mission if it fails to play

    Please don't feel obliged to look into that script unless your feeling really charitable! You're already working wonders as it is!


    As for the Quest arrow range display, I didn't really have a specific application in mind, but I was thinking of the range being displayed in numbers (eg. HiddenTreasure (23ft)). I think that'd be pretty cool - though I am working primarily on a sci-fi campaign and am not sure how useful it would be for most taffers.

  22. #47
    Member
    Registered: Aug 2012
    Location: Seattle
    Quote Originally Posted by Sliptip View Post
    I do use the RenewableResource script a lot actually. If it's not too much trouble to make a better one I'd certainly use it instead. Would I be able to simply swap it for the RenewableResource script or do you think further set-up would be necessary?
    It should be directly swappable. The only issue would be if you rely on getting a TurnOn message back to the managing object after the created object is picked up. That's the part that creates all the Scripts property trouble, and I'll have to either leave it out (preferred) or replace it with a less crazy method.

    I feel guilty asking this . . . but in the spirit of improving some of the old scripts: Have you ever taken a look at the miss16 LoudSpeakerRelay script? That one is really useful but devastatingly buggy. It's the script that broadcasts Karras's speech. It seems to stop working at random. I suspect its when you're out of range of a speaker when it plays a schema or when too many sounds play at once and overide the currently playing schema. Either way, I'd really like to use that script in multiple missions - but in every case it'll break the mission if it fails to play

    Please don't feel obliged to look into that script unless your feeling really charitable! You're already working wonders as it is!
    Funny you should ask. My abandoned first mission had a sci-fi element, and I happen to already have a spec written for a proper loudspeaker script. I'll put it on the list for the version after next.

    As for the Quest arrow range display, I didn't really have a specific application in mind, but I was thinking of the range being displayed in numbers (eg. HiddenTreasure (23ft)). I think that'd be pretty cool - though I am working primarily on a sci-fi campaign and am not sure how useful it would be for most taffers.
    Ah good, "in the label" is the easiest option. Can do.

  23. #48
    Member
    Registered: May 2002
    Location: Toronto
    Fantastic! Very good news indeed

  24. #49
    Member
    Registered: Aug 2012
    Location: Seattle
    Presenting version 0.5.0: halfway (theoretically) to a final release!

    For anyone using HUD elements: most of the disappearing issues have been fixed. In the course of that, the KDCustomHUD script is no longer needed and has been removed. It is still possible to place parameter defaults on an object named CustomHUD, but ScriptParams links with the data CustomHUD are no longer consulted.

    Sliptip, please note the new KDRenewable script. In addition to fixing the bugs with RenewableResource, this script understands Transmute links in addition to the standard crystal types. It should work as a drop-in replacement.

    Also new are the KDOptionalReverse script, text labels for KDStatMeter, support for TG/T1, improved documentation, and various minor fixes. More to come...

  25. #50
    Member
    Registered: May 2002
    Location: Toronto
    Awesome - thanks kdau!

    I will test these out tonight. One question though - what's the transmute link for?

Page 2 of 5 FirstFirst 12345 LastLast

Posting Permissions

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