Tenderfoot Thahd Raistlin Posted January 18, 2010 Share Posted January 18, 2010 i understand how to right script, but not sure on how to apply them. do you simply put them in the scenario folder or what? Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Duck in a Top Hat Posted January 18, 2010 Share Posted January 18, 2010 You should start by putting the script in the scenario's folder, yes. Then, depending on if it's a Town script or and Outdoor script you'll want to go into the town/outdoor details menu and enter the script's name (without the .txt) into the right text field. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Ephesos Posted January 18, 2010 Share Posted January 18, 2010 Yes, that's a good question. What kind of script is it? Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Raistlin Posted January 18, 2010 Author Share Posted January 18, 2010 dialogue script, and custom character script. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Enraged Slith Posted January 18, 2010 Share Posted January 18, 2010 All scripts need to be included in the scenario folder. Applying them is a different matter. For dialogue scripts, you need to name them the same as the town script they apply to, while adding a "dlg" at the end. For instance, for a town with the script "t0fort", the dialogue script for that town should be called "t0fortdlg". To get characters to speak, you need to enter the creature menu and change the value of Cell 3 to whatever dialogue node you want them to start at. For creature scripts, all you need to do is set to set the default script in the creature menu to whatever you named your script. You can also change the default script of a creature through the scenario data file. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Raistlin Posted January 18, 2010 Author Share Posted January 18, 2010 so you put all the dialogues for a town as one file, and to assign characters the dialogues you just have to put the correct node numbers in the memory cell 3? Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Ephesos Posted January 18, 2010 Share Posted January 18, 2010 Correct. There can only be one node number in that memory cell, though. And the dialogue file's name needs to be the same as the town's file name, just with "dlg" at the end of the file name. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Raistlin Posted January 18, 2010 Author Share Posted January 18, 2010 thank you very much. on another note, is there any way to change an NPC's name without creating a custom character? such as making a dervish named Bob using the dialogue script, or would i have to make a custom character named Bob with the dervish graphic? Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted January 18, 2010 Share Posted January 18, 2010 In your town script use the set name call, here is an excerpt from t0Fort Talrus.txt from Valley of the Dying Things: beginstate INIT_STATE; // This state called whenever this town is entered. //Names set_name(13,"Commander Terrance"); set_char_dialogue_pic(13,1907,0); set_name(14,"Maria"); set_name(15,"Penelope"); set_name(16,"Avizo"); break; Edit: this means that you can rename characters without creating custom character types. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Raistlin Posted January 18, 2010 Author Share Posted January 18, 2010 amazing! thanks so much for the help Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted January 18, 2010 Share Posted January 18, 2010 Originally Posted By: Ishad Nha Edit: this means that you can rename characters without creating custom character types. You can even alter their statistics. For example, you could create a captain who knows a handful of spells without creating a custom creature type. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Raistlin Posted January 18, 2010 Author Share Posted January 18, 2010 that would be set_mage_spells(character number, spell level) right? Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Raistlin Posted January 18, 2010 Author Share Posted January 18, 2010 (character number, mage spells skill level)* Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted January 18, 2010 Share Posted January 18, 2010 Not quite, the call you want is Code: void alter_stat(short which_char_or_group,short which_stat,short how_much) with the character number for which_char_or_group, 11 (which corresponds to Mage Spells skill) for which_stat, and the amount of skill to give for how_much. Then, you would want to use Code: void change_spell_level(short which_char,short mage_or_priest,short which_spell,short amt_to_change) to teach the creature actual spells, now that it has some Mage skill; the arguments would be the character number for which_char, 0 (for mage spells) for mage_or_priest, and then spell numbers chosen from the Mage Spells table in the documentation appendices for which_spell along with the spell level you want to confer for amt_to_change. Assuming that we wanted creature 6 to be able to cast Bolt of Fire and Lightning Spray, the code would go like this: Code: //give creature 6 8 units of Mage Spells skillalter_stat(6,11,8);//teach it Bolt of Fire level 2change_spell_level(6,0,0,2);//teach it Lightning Spray level 1change_spell_level(6,0,10,1); Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Raistlin Posted January 18, 2010 Author Share Posted January 18, 2010 cool thank you. as far as adding floors for a dungeon, i know the call and that you have to make another town for it, but how do i connect them without the outdoor entrance? i know the call, but how do i apply it to a specific location such as a staircase? Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted January 18, 2010 Share Posted January 18, 2010 You have to make a special rectangle that calls the script state with move_to_new_town() in it. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted January 18, 2010 Share Posted January 18, 2010 In order to place an entrance from the outdoors into a town, use the 'Create Town Entrance' tool while editing the relevant outdoor section. It's icon looks like a pair of arrows pointing to the right to a crenelated wall. Follow the instructions given by the tool, and designate a rectangular area which functions as the town entrance. When the party walks into that rectangle, they will be put inside the town. In order to let the party move between towns, put the call to move_to_new_town() in a state in the town's script. Then, in the editor, use the 'Create Special Encounter' tool (whose Icon is a heavy, black dot) to define a rectangle. When prompted, enter the number of the state that you wrote in your script. Now, when the party steps into the blue (in the editor, invisible in-game) special encounter rectangle, the game will execute the script state and move the party to the other town. You can put such encounter rectangles anywhere you want, as appropriate for your scenario. Common cases are on staircases, on ladders or trapdoors, or around portals. Obviously in many cases you'll want to script two such encounters, one in each town, so that the party will be able to travel back down the flight of stairs they just came up, and so on. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted January 19, 2010 Share Posted January 19, 2010 Originally Posted By: Niemand Assuming that we wanted creature 6 to be able to cast Bolt of Fire and Lightning Spray, the code would go like this: Code: //give creature 6 8 units of Mage Spells skillalter_stat(6,11,8);//teach it Bolt of Fire level 2change_spell_level(6,0,0,2);//teach it Lightning Spray level 1change_spell_level(6,0,10,1); I thought creatures automatically knew all spells at level 2? Originally Posted By: Niemand In order to place an entrance from the outdoors into a town, use the 'Create Town Entrance' tool while editing the relevant outdoor section. It's icon looks like a pair of arrows pointing to the right to a crenelated wall. Follow the instructions given by the tool, and designate a rectangular area which functions as the town entrance. Make sure the rectangle is at least 3 spaces wide and 3 spaces high if you want the player to be able to enter from any direction. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted January 19, 2010 Share Posted January 19, 2010 Originally Posted By: Celtic Minstrel I thought creatures automatically knew all spells at level 2? Not quite: they know all spells up to their creature type's default spell skill at level 2. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.