Preditor Scripting 101 - Part 3 of 3

JediFreemanJediFreeman Posts: 617 admin
edited November 2009 in Announcements
This is a place to discuss the topic Preditor Scripting 101 - Part 3 of 3
Runic Games Webmaster
Forum Rules | Support Forums | E-mail Support
«1

Comments

  • thank you thank you

    been looking forward to this for a month :)
  • Very nice. Thanks for putting together these tutorials, guys. I'll be looking forward to a potential series 2.
    The Basement My random mini-dungeon mod
    Here comes Leviathan! Starch 2 mod
  • Is it possible to make it so the chest has loot, but only drops it once all the monsters (from all spawns) are dead?
  • Karmond wrote:
    Is it possible to make it so the chest has loot, but only drops it once all the monsters (from all spawns) are dead?
    I can't edit my post. :(

    Might be better/possible to do the above with a player box trigger which spawns the monsters and then killing them all 'enables' the chest?

    Only reason I brought it up would be to stop a player from opening the chest, grabbing everything and then using a TP to get out of there, thus escaping the cool trap you made with all the loot. :)
  • Well, in the first tutorial video, we saw that monster spawners could have an output trigger that fires after all the monsters they spawned are killed. So I'm guessing that yes, you can spawn the monsters when the player enters the area, then allow the chest to be opened only after the monsters have been defeated.
    The Basement My random mini-dungeon mod
    Here comes Leviathan! Starch 2 mod
  • BissrokBissrok Posts: 654
    Would probably make more sense to have the chest locked, the trap springs when the player gets near, and then, after they're defeated, the chest unlocks.
  • NeedlehawkNeedlehawk Posts: 914
    This is very, very cool. I've never modded, but after playing the game for awhile, I'm really interested in trying my had at this!
  • Karmond wrote:
    Is it possible to make it so the chest has loot, but only drops it once all the monsters (from all spawns) are dead?

    Yes.
  • Thanks for the feedback. I had fun making these.
  • Mmm, delicious. I can't wait to dive into the editor!
    ~Benjamin Tomfoolery
    Website|Steam|XBL|PSN
    Truth, Justice, Freedom, Reasonably Priced Love, and a Hard Boiled Egg
  • OmnifasOmnifas Posts: 3,442 ✭✭✭
    Thanks for making these tutorials, a great introduction to the editor, hope to see more.

    PS
    Nice new UI design as well.
  • HazeHaze Posts: 353
    Thank you very much for these tutorials Patrick, I hope the second serie isn't to far away. ^^
    Can't wait to try out the preditor myself.
    Loading signature ...
  • BissrokBissrok Posts: 654
    I really liked that Scripting series. I hope they do something with dungeon building, quest creation, or modifying mob/loot stats next.
  • Ah, was looking forward to this one! Love your videos, everything is so well presented. Many thanks for your time! Can't wait to buy the game.
  • One thing I haven't really understood is these "no spawn regions" that you use in all 3 tutorials. Spawning is obviously tied to triggers here, so for there to be a need for this NoSpawn region the spawning points must normally activate automatically once you get close enough, right?
  • BissrokBissrok Posts: 654
    Mreaper wrote:
    One thing I haven't really understood is these "no spawn regions" that you use in all 3 tutorials. Spawning is obviously tied to triggers here, so for there to be a need for this NoSpawn region the spawning points must normally activate automatically once you get close enough, right?

    I don't think so, since those spawns were directly tied to opening the chest. I'm not sure what exactly it would be used for, though. Maybe there's a setting that randomly deposits monsters around the level? That doesn't really sound right, either.
  • Mreaper wrote:
    One thing I haven't really understood is these "no spawn regions" that you use in all 3 tutorials. Spawning is obviously tied to triggers here, so for there to be a need for this NoSpawn region the spawning points must normally activate automatically once you get close enough, right?

    Monsters automatically spawn in the levels. So if I hadn't used one, the area would of been filled with monsters. The only time we script them to spawn is for these types of special events. As a rule we always use a NoSpawnRegion in the area where the player first spawns in so they are not immediately overwhelmed before they can grasp their bearings. I used a NoSpawnRegion in this lasts video because I wanted the player to walk into the area and just see the chest, and nothing else. Plus sometimes it lets the player know something is about to happen, and that can be fun anticipation.
  • interessting and usefull tutorial ! :)

    maybe that the funktions allow to create custom crafting system. for example : a chest have a OnClose script and check own inlet. if player put special recipe gems in the chest, then create the chest a new items for the player :)
  • NeedlehawkNeedlehawk Posts: 914
    cacysunlee, that sounds like a very interesting idea! Hope you try it out in a mod.
  • PatrickB wrote:
    Mreaper wrote:
    One thing I haven't really understood is these "no spawn regions" that you use in all 3 tutorials. Spawning is obviously tied to triggers here, so for there to be a need for this NoSpawn region the spawning points must normally activate automatically once you get close enough, right?

    Monsters automatically spawn in the levels. So if I hadn't used one, the area would of been filled with monsters. The only time we script them to spawn is for these types of special events. As a rule we always use a NoSpawnRegion in the area where the player first spawns in so they are not immediately overwhelmed before they can grasp their bearings. I used a NoSpawnRegion in this lasts video because I wanted the player to walk into the area and just see the chest, and nothing else. Plus sometimes it lets the player know something is about to happen, and that can be fun anticipation.


    Let's see if I got this right: so when you start a level, all monster spawn points immediately spawn their monsters?
    Does that mean that the NoSpawn area refers to an area where the spawn points are inactive and have to be triggered?
    I really want a perfect grasp on this since I intend to start modding after my first playthrough :D
  • WebbstreWebbstre Posts: 7,231 ✭✭✭
    Mreaper wrote:
    Let's see if I got this right: so when you start a level, all monster spawn points immediately spawn their monsters?
    Does that mean that the NoSpawn area refers to an area where the spawn points are inactive and have to be triggered?
    I really want a perfect grasp on this since I intend to start modding after my first playthrough :D

    Judging from the very first tutorial, I would say that sounds right.

    P.S. Quotes really need to be turned on in this forum :P
    Administrator/Former Owner of Runic Games Fansite. Be sure to visit RGF for all your Torchlight series needs![/color] Don't forget to check out ModDrop as a one stop solution for installing and sharing mods easily!
  • @Mreaper

    No, that isn't what he is saying. If you have played diablo style games there are generally no "spawn" points, except for special scripeted events. It is all part of the random idea, monsters will spawn randomly in a given level... but they don't have "spawn" points. THey just spawn in the playable area. So in order to create a safe area, or an area that is special for a scripted event you will need to tell the game "don't spawn anything in this area". So when the game loads, the level chuncks are randomized, and the monsters are randomly spawned in the level, it won't spawn anything in the "no spawn zones".

    SO you have two different "spawns" happening. There are spawns which the level designer can place by hand as we have seen in the first and third tutorials. Then there are the random spawns that the engine creates at load time. Basically if you didn't want to have any scripted event you could just throw down some tiles to create a room and run it... I'm sure there are some options in the editor to set what kinds of monsters and what level and such will randomly spawn, but that hasn't be shown in the vids.
    Thanks!
  • GbrownGbrown Posts: 423 ✭✭✭✭
    @Mreaper

    No, that isn't what he is saying. If you have played diablo style games there are generally no "spawn" points, except for special scripeted events. It is all part of the random idea, monsters will spawn randomly in a given level... but they don't have "spawn" points. THey just spawn in the playable area. So in order to create a safe area, or an area that is special for a scripted event you will need to tell the game "don't spawn anything in this area". So when the game loads, the level chuncks are randomized, and the monsters are randomly spawned in the level, it won't spawn anything in the "no spawn zones".

    SO you have two different "spawns" happening. There are spawns which the level designer can place by hand as we have seen in the first and third tutorials. Then there are the random spawns that the engine creates at load time. Basically if you didn't want to have any scripted event you could just throw down some tiles to create a room and run it... I'm sure there are some options in the editor to set what kinds of monsters and what level and such will randomly spawn, but that hasn't be shown in the vids.

    Yeap, this is pretty much exactly right.
  • Good stuff! Thanks Patrick!
  • Great, then I know how it works.
  • Wow, looks very cool! Thanks for making these videos.
    I've played lots of games with level editors but I usually found they had no tutorials, and although I can usually pick things up easily, they were still too confusing to jump jump into. But this editor looks very intuitive. Just from watching these videos I feel like I could jump in and start creating some dungeons and traps. I can't wait to see it for myself when it's released, and I can't wait to play the game as well!
  • I've been modding for years for the Hive ( Warcraft 3 ) and even did some coding in Ogre3D, XNA and Blitz3D, but I will defenely try this for sure !!!

    Keep up the good work !!

    T.
    9757-albums2216-picture19549.png
    9757-albums2216-picture19984.png
  • aholmanaholman Posts: 311
    Im just excited and can't wait for the Editor:)
    So I already have an idea but also some questions to what you can do with the editor.
    Can you somehow trigger monsters to have changed abilities or stats?
    Those monster spawns, is it possible to just have monsters keep spawning from one spawn point until for example a trigger causes them to stop:)?
  • aholman wrote:
    Im just excited and can't wait for the Editor:)
    So I already have an idea but also some questions to what you can do with the editor.
    Can you somehow trigger monsters to have changed abilities or stats?
    Those monster spawns, is it possible to just have monsters keep spawning from one spawn point until for example a trigger causes them to stop:)?

    Yes they can change abilities and stats, we have a boss that changes up his abilities during the fight 3-4 different times. You will know when you see him. ;)
    Yes you can have monsters constantly spawn until you tell them not to.
  • aholmanaholman Posts: 311
    Great, Im looking forward to the editor. And yes I met that guy, I just wasn't sure that it was possible with the editor:) Thanks for the answer!
«1
This discussion has been closed.