Adding Crafting Scripts problem
#1
Posté 01 décembre 2010 - 08:10
Since i only want to add and modify blueprints i figured this would not be hard. I followed the tuts instructions putting the approriate files in my campaign folder. I opened my campaign version of the x2_mod_def_act.nss and x2_mod_def_aqu.nss.
It says to remove the trade system to replace:
#include "kinc_trade_crafting"
with
#include "kinc_crafting"
Instead of #include "kinc_trade_crafting" there is only a #include "kinc_trade" along with 2 others. So i replaced this one on both and tried to compile and this is what i got: kinc_crafting.nss(101): error: varible defined without type.
I have the .2da files i need the scripts i need and the recipe blueprints in my campaign folder. I closed out the toolset and reopened to make sure it registered the scripts being in the campaign folder.
I have two questions:
1) What am i doing wrong/forgetting?I followed the tutorial.
2) Can i use the above scripts without changing them and still not use the trade system? or will this cause problems? In other words is it even necessary to change the scripts if i am not using the trade system?
#2
Posté 02 décembre 2010 - 05:15
Regards
#3
Posté 03 décembre 2010 - 07:36
I use the OC Makeover as well ( for the OC). I am glad someone( you) came up with it. It makes the OC and first xpack more interesting.
My next problem that is related to this is I have tested in games several times and i cannot get any objects to drop crafting material. I know these specific objects drop crafting material and what they drop because i looked it up in the .2da file.
I am wondering if their is script i need to add to the placeables to tell them to drop their crafting materials upon destruction?
Modifié par Anotherone773, 03 décembre 2010 - 07:37 .
#4
Posté 06 décembre 2010 - 07:18
Anotherone773 wrote...
My next problem that is related to this is I have tested in games several times and i cannot get any objects to drop crafting material. I know these specific objects drop crafting material and what they drop because i looked it up in the .2da file.
I am wondering if their is script i need to add to the placeables to tell them to drop their crafting materials upon destruction?
Look at this thread. Should help you figure it out. Also make sure that variable X2_L_NOTREASURE is not set on the module. This will prevent creatures from dropping anything. See this thread.
Regards
Modifié par Kaldor Silverwand, 06 décembre 2010 - 07:20 .
#5
Posté 06 décembre 2010 - 07:12
#6
Posté 07 décembre 2010 - 05:45
It uses the des_crft_drop.2DA, with the index being the appearance type, and columns Placeable_Drop, Placeable_Num, Creature_Drop, Creature_Num, Door_Drop, and Door_Num. If a placeable has inventory then the craft item is placed in the inventory, otherwise it is dropped in the location.
I don't see in the des_crft_drop.2DA file any appearance types for non-creatures though. So it looks to me like placeables aren't going to drop anything unless you add the lines to the 2DA.
Regards
Modifié par Kaldor Silverwand, 07 décembre 2010 - 05:45 .
#7
Posté 07 décembre 2010 - 08:40
The creatures( outside the OC ) are not dropping anything as well.
This is the default door death script:
//::///////////////////////////////////////////////
//:: x2_door_death
//:: Copyright © 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
On death of a door it spawns in an appropriate
item component.
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: August 2003
//:://////////////////////////////////////////////
// MDiekmann 5/21/07 - Modified so door explosion effect plays
#include "x2_inc_compon"
void main()
{
craft_drop_placeable();
effect eDoorExplode = EffectNWN2SpecialEffectFile( "fx_wooden_explosion_big");
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDoorExplode, OBJECT_SELF);
}
However it is not dropping what the 2da says it should be dropping. That is why i am wondering if i need to add a script somewhere to enable placeables to drop crafting items.
#8
Posté 07 décembre 2010 - 06:35
#9
Posté 07 décembre 2010 - 07:48
I am not for sure how they have it setup to call the appropriate line out of the 2da. I would set mine up according to the crafting item the door dropped. "1" would be nothing, "2" would be wooden plank, "3" iron ingot, etc. Then each door would have a number assigned to it . A door assigned "3" would drop iron ingot. A script would check the door num value and drop the placeable that cordinates with that number.
The way they have it set up doesnt make a lot of sense to me though. This might be a 2da leftover from NWN and they modded it. And it may be NWN i was thinking of. But that doesnt seem right to me. NWN had a rather pathetic and almost useless crafting system.
For placeables they have no number reference. I wonder if the OC uses a different 2da than what is normally available for modding? Crafting , at least SoZ style, is something you have to actively add to your mods/campaigns. Perhaps this 2da is meant for modders so they dont have to mess with removing crafting and its items from their mods.
But your right this 2da doesnt look like it is setup to call from as far as what to drop.
#10
Posté 08 décembre 2010 - 06:23
Making it work properly with placeables would really require either completely altering the 2da (might be safe, but I don't know what other scripts use it) or adding columns to other 2das like placeables.2da or creating a new 2da. Each of these options would require some significant time and it doesn't seem like a really wise thing to spend time on since NWN2 modules should not have a large number of bashable placeables anyway. Why not? Here is why not:
- a large number of placeables prevents baking from working properly. This is why they are normally set to environmental, but environmental placeables cannot be destroyed.
- allowing placeables to be destroyed means special code to also destroy placeables stacked on the bashed placeable or avoiding stacking placeables which makes for a less attractive display.
- if a placeable is bashed then you should be able to walk through the space. But that would mean the placeable must be dynamic and in the walkmesh. Placeables in the walkmesh tend to interfere with pathing because of their edges which is why normally you surround placeables with a smooth walkmesh cutter. If a non-environmental placeable is in the walkmesh cutter and you bash it then you will still not be able to walk through the space because of the walkmesh cutter.
So it really makes more sense that few placeables in a module will be bashable. And for those that are a custom death script would be an easy way to drop something.
Doors make more sense, but since most doors are wood and most doors in the OC are not actually usable, again it makes more sense to just use a custom death script that drops a plank of wood than to go to an extensive length to define specialized drops for every type of door.
Nonetheless, I'll post what I have in a day or so. Need to do a little more testing with it. There is a fix I think should be made in x2_door_death anyway to properly handle locked transition doors.
Regards
Modifié par Kaldor Silverwand, 08 décembre 2010 - 06:28 .
#11
Posté 09 décembre 2010 - 12:57
I noticed the problem with placeables. in a large storage room in a cave i made. The placeables had a much larger area of effect for walking than the placeable took up. These were all set to static. So i had to ditch a few. I removed some and set some as walkable. The walkable ones are mainly usable chest and such. While you actually walk through them because they are so low to the floor you could actually step over them. I rarely end up walking through them but it kept my walk paths open and still gave the effect of a full storage room, though not as full as i originally had it.
I have not had problems elsewhere with it, but i am only picky on certain aspects of the game( like it annoys me that you can be in a dark cave with no light and still see everything. I would rather have indoors heavily light dependent and you can get by without any lights though it does look drab.





Retour en haut






