Help Scripting Loot - Very Very n00b
#1
Posté 10 février 2012 - 02:03
I'm about as n00b as you get with scripting. I'm also terrible at it. I'm fooling around with the toolset, making a simple module to practice a bit. I want to make a chest that will provide the appropriate weapon(s) when opened based on the class who opens it, especially if they have a weapon focus.
This would be very similar to the chest you open in your room in the OC and the first chest you open in NWN OC as well. So for instance, if a melee class opens it (say a fighter,) it could have a longsword as default, and if the fighter has WF: warhammer, it has a warhammer instead.
Also, maybe a few potions in addition. Which script would I need for this, or do I have to write my own?
#2
Posté 10 février 2012 - 04:01
I have a modified version of that script in my Harvest of Chaos: King's Festival + Queen's Harvest campaign (link below) that adds equipment for the Favored Soul, Spirit Shaman, and Swashbuckler classes since those were left out of the original OC script.
Regards
#3
Posté 10 février 2012 - 06:14
If you are trying to understand the fundamentals of scripting may I recommend
Scripting For Noobs by Knightmare
NWN2Scripting.com by scriptwiz
Both of these can be accessed on the NWVault and NWN2Scripting.com is a website that I used to learn the basics of scripting.
#4
Posté 11 février 2012 - 06:26
Kaldor Silverwand wrote...
I never write my own script when there is one provided. Although sometimes I may enhance the one provided. In this case I've done both. After you turn off the Toolset autosave function you can then safely open any of the OC modules and look at their scripts and the campaign scripts. In this case the script you are looking for is called 11_p_chest_open.
I have a modified version of that script in my Harvest of Chaos: King's Festival + Queen's Harvest campaign (link below) that adds equipment for the Favored Soul, Spirit Shaman, and Swashbuckler classes since those were left out of the original OC script.
Regards
I'm assuming this is "On Open Script?" There's no 11_p_chest_open in the toolset at least under the default. When I type 11 I don't get this option. Is this a script I have to write myself?
#5
Posté 11 février 2012 - 06:28
#6
Posté 11 février 2012 - 06:09
gamer025 wrote...
I can't figure out how to turn off auto-save either
In the upper Left hand corner, go to View->options and then under the options menu you should be able to find it.
To find the script kaldor is talking about, go to File->open script and then type in the script name. That should find it for you.
One last bit of advice to save heartache. Save as a directory, not a file. When you save, go to File->Save Directory and use that to save. Directories are much more stable and will not corrupt as much as a file.
...and always back up your work. People have lost months of work because of toolset crashes.
Modifié par M. Rieder, 11 février 2012 - 06:09 .
#7
Posté 11 février 2012 - 07:31
gamer025 wrote...
Kaldor Silverwand wrote...
I never write my own script when there is one provided. Although sometimes I may enhance the one provided. In this case I've done both. After you turn off the Toolset autosave function you can then safely open any of the OC modules and look at their scripts and the campaign scripts. In this case the script you are looking for is called 11_p_chest_open.
I have a modified version of that script in my Harvest of Chaos: King's Festival + Queen's Harvest campaign (link below) that adds equipment for the Favored Soul, Spirit Shaman, and Swashbuckler classes since those were left out of the original OC script.
Regards
I'm assuming this is "On Open Script?" There's no 11_p_chest_open in the toolset at least under the default. When I type 11 I don't get this option. Is this a script I have to write myself?
This is not a golobal script, it is a module script When you open the toolset open the OC module "1100_West_Harbor", this will be in your install folder not the my document folder with all the user created modules.
Once you look at the script you can modify it like Kaldor suggests or use it as it is or use his modified version.
There are a number of things that could stand to be fixed and it sounds like Kaldor has done most if not all
-Include additional classes
-Give grey orcs favored great axe
-Weapon finese should give light weapon no long sword.
-It looks like it doesn't take into account small stature. Any character with a spell feat gets a quarter staff and fighters get a greatsword, both these weapons are two handed.
-This script or a similiar one could also check for weapon focus so if your a fighter who wants to use a warmace you won't be given a greatsword. I did this with a chest in Risen Hero, module Risen_Hero_Ch1_02, module script "wt_tomb_good_end".
#8
Posté 12 février 2012 - 10:51
If you start the game with a character below level 10 you get the chance to level up, then when you open a nearby chest you get weapon preferances based on weapon focus, weapon proficiency or race (rather than class).
#9
Posté 13 février 2012 - 10:25
#10
Posté 13 février 2012 - 07:54
#11
Posté 13 février 2012 - 10:46
ALSO: For some reason now, whenever I try to load a module using a pre-made character, the game crashes. I have no idea what's causing it and it's driving me nuts. Any ideas?
Modifié par gamer025, 13 février 2012 - 10:58 .
#12
Posté 14 février 2012 - 01:07
With regard to the crashing, have you baked the area?
#13
Posté 14 février 2012 - 02:51
Shaun the Crazy One wrote...
Regrettably there is no level up wizard in NWN2 toolset. The easiest way to level up creatures is to go under the basic tab, set the levels as you want them (for example you might what to add 2 levels of fighter class to a goblin to make him tougher, or just up his humanoid levels), select a starting package based on that class and press "Reset from Package". You'll have to go under the statistics tab to adjust Hit Points and abilities, and possibly change the items in their inventory in the inventory tab, but other than that your done. I suggest just browsing the property tabs to arranging skill points, feats, and spells (if applicable).
With regard to the crashing, have you baked the area?
Thanks I'll give it a try.
No I haven't baked the area. This occurs even when I try the default module "Uninvited_Guests." I haven't tried the campaign yet. I hope someone has an idea. If it helps, I'm running steam version of the game.
#14
Posté 14 février 2012 - 03:00
#15
Posté 14 février 2012 - 03:38
Shaughn78 wrote...
That pre-made character that is crashing the game, was it created in a module/campaign that had custom content in it? If there a classes/feats/abilities or whatever that don't exist in the default game the game can crash since it can't find that material.
This makes perfect sense. There are some in my list of PCs that were made online. The rest were made offline or are the defaults that come with the platinum edition. I don't even get to see the list. When I click "select character" the game crashes.





Retour en haut






