Aller au contenu

Photo

Creating new craftable items


  • Veuillez vous connecter pour répondre
81 réponses à ce sujet

#51
CPK87

CPK87
  • Members
  • 73 messages
Huh, it worked this time for some reason. I swear, last night I restarted the editor, restarted the game, pretty much did the exact same thing I did just now, but it didn't work. Oh well, I'll take it, lol.

#52
kevL

kevL
  • Members
  • 4 052 messages
welcome to NwN2

computers generally.. sometimes i wonder if electrons do a bit too much quantum LSD.

#53
CPK87

CPK87
  • Members
  • 73 messages
Heh, yeah... it's doing it again, and now I can't get it to work at all no matter how many times I restart it. So confused - is there a naming convention it has to follow, such as all caps or something?

#54
Dann-J

Dann-J
  • Members
  • 3 161 messages

CPK87 wrote...

Resurrecting this thread for a moment. It seems creating new distillable monster parts doesn't quite work the same way that creating new molds does. Simply changing the tag name of an existing distillable part to something else in Crafting.2DA and then creating your own blueprint doesn't make the item distillable. Anyone have experience with this?


If you're distilling them to essences, then all you need to do is change the icon, name, description, and ResRef values for an existing distillable item, and leave the old tag intact. The downside is that you won't be able to distinguish between the new item and the old one via GC_ conversation scripts that only check tags. You can write your own GC_ script that checks the ResRef value though.

I've got all sorts of distillable items in the module I'm working on that use that method. None of them are quest-related though, so tags aren't an issue.

#55
CPK87

CPK87
  • Members
  • 73 messages
Well, the thing is that it randomly happened to work last night. I'm wondering if it's an issue with directory mode or something.. it's just not working now. I'm at a loss, but i'll try changing the tags back to the original names and see what happens.

#56
CPK87

CPK87
  • Members
  • 73 messages
Still didn't work, even with setting the tags back to what they were. I have no clue what the issue is.

#57
kevL

kevL
  • Members
  • 4 052 messages
i didn't see any tag convention, and it worked for me with a random "kg_test_residue" tag (in the same Crafting row REAGENTS as the original residue was). I did change the resref of the .Uti to match the new tag but that shouldn't be it..

check folders for duplicate files....

#58
CPK87

CPK87
  • Members
  • 73 messages
No duplicates, and I just put them into a chest in the mod so they're not outdated versions of the items or anything. I just can't imagine why it happened to work this morning, then as soon as I moved the exact same tags to a different line in the same DIS category, it broke again. It recognizes that the 2da has been changed because the older versions no longer work, but the new ones don't work either. It makes no sense, lol.

Modifié par CPK87, 13 février 2014 - 11:41 .


#59
kevL

kevL
  • Members
  • 4 052 messages
did the row#s in Crafting go wonky when you made the row changes?

#60
CPK87

CPK87
  • Members
  • 73 messages

kevL wrote...

did the row#s in Crafting go wonky when you made the row changes?


Nope, they appear to be in order.

#61
kevL

kevL
  • Members
  • 4 052 messages
Can you revert things back to where the standard distillable items are successful?

#62
CPK87

CPK87
  • Members
  • 73 messages
Tried reverting them, and the only one that works is the shadow reaver bones, but it doesn't yield the right output. It gives a glowing earth essence and then a random glowing/radiant essence, rather than a weak air essence like I have it set to do. It must be looking at the wrong place, but my other crafting changes I made to the molds are still working just fine within the same 2DA file.

Edit:  Just tried distilling some of the existing items that I hadn't even modified in the 2DA or the editor, and they aren't distilling properly either.  So something is wrong with how it's reading that section of the 2DA.

Modifié par CPK87, 14 février 2014 - 01:53 .


#63
kevL

kevL
  • Members
  • 4 052 messages
some ideas:

Have you understood how the _index relates to Crafting.2da? i'd look there. ( although yeilding the wrong output for a tagged input is still suspect: incorrect output wouldn't be related to a mismatched _index; if the _index is mismatched the recipe simply won't work, although parts of the "DIS" CATEGORY might ) blah blah. Check the _index for mismatched CATEGORY & Start_Row


wait a sec. the toolset tells me that the tag for Distillable shadow reaver bones is "N2_CRFT_DIST028" but this reagent is not in Crafting.2da ..... the rows jump from "N2_CRFT_DIST027" to "N2_CRFT_DIST029" and a search of Crafting says nada - what's up with that i wonder,

#64
kevL

kevL
  • Members
  • 4 052 messages
ok, Fairy Dust and Shadow Reaver Bones are special cases, that get handled by the mortar's onActivated script.

Fairy Dust, tag "NW_IT_MSMLMISC19", and Shadow Reaver Bones, tag "N2_CRFT_DIST028", output random essences. So those two particular tags won't work as reagents in Crafting under category "DIS".

Modifié par kevL, 14 février 2014 - 02:22 .


#65
CPK87

CPK87
  • Members
  • 73 messages
Alright, I finally got it working. I noticed that N2_CRFT_DIST028 was missing from the original file as well, so I went back to my modified file and set everything back as it was with the right names, including skipping from 27 to 29. Then I just named all my new items with the same tags and it worked. Last time I hadn't skipped 28, so that might've been part of the problem (although it still doesn't explain why it didn't work when I gave them my own names). Hopefully this continues to work and doesn't break again.

#66
kevL

kevL
  • Members
  • 4 052 messages
k. Secure everything with a back up, then try changing a tag again ...


:wizard:

#67
CPK87

CPK87
  • Members
  • 73 messages
Nope, that broke it. Looks like I have to use the naming convention that they used.

#68
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi CPK87,

I have done a ton of study/alteration to the crafting systems that come with NWN2 and have blogged about many of my findings. I don't know if it will help much, but here is a search from my blog for "crafting".

Some information may be useful ... or may not be. ;)

If you have any questions regarding what I have there, please ask and I will try to answer as best I can. (I have not read all the posts here, so don't know what you have or have not yet worked out.)

Cheers,
Lance.

Modifié par Lance Botelle, 15 février 2014 - 02:07 .


#69
CPK87

CPK87
  • Members
  • 73 messages
Very nice Lance, looks interesting. I don't have any issues with the crafting system currently, but I'm about to start making enchantments and I'll let you know if I have any issues.

#70
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

CPK87 wrote...

Very nice Lance, looks interesting. I don't have any issues with the crafting system currently, but I'm about to start making enchantments and I'll let you know if I have any issues.



No problem ... I will answer anything I can if you do ask. Note: If I am not around these boards (which can happen from time to time) and you need to contact me, send a PM or contact me via my blog ... link in sig. If you have not had a reply, it means I have not heard anything.

Cheers,
Lance.

#71
CPK87

CPK87
  • Members
  • 73 messages
Thanks, appreciate it.  

I am curious if there is a way to restrict an enchantment to a specific type of weapon, rather than just any weapon. For instance, if I create an enchantment that grants an item X number of spells per day, but I only want that enchantment to apply to quarterstaves so that a fighter can't run around casting high level spells with it (I would put a class restriction on the staves themselves). I know wands are capable of doing this, but they don't really fit in the mod I'm creating.

Modifié par CPK87, 17 février 2014 - 09:19 .


#72
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

CPK87 wrote...

Thanks, appreciate it.  

I am curious if there is a way to restrict an enchantment to a specific type of weapon, rather than just any weapon. For instance, if I create an enchantment that grants an item X number of spells per day, but I only want that enchantment to apply to quarterstaves so that a fighter can't run around casting high level spells with it (I would put a class restriction on the staves themselves). I know wands are capable of doing this, but they don't really fit in the mod I'm creating.


Hi CPK87,

The short answer is "yes", this can be done. However, it does require altering the crafting scripts (the "kinc_crafting" if I am recalling correctly ... no toolset open just at the moment.) You would need to add a "weapon" check at the point the enchantment was being used. There are a number of checks, but it is easy enough to add your own "functions" to check for specific cases based on certain enchantment requirements.

I changed this include file so much that I ended up renaming it and redirecting the functions to my own crafting include script (alb_crafting). But, it all depends on how much you want to rely on existing code (systems) or expand to fit your own ideals. If you are OK with scripting, I think there is a lot to be gained through altering to fit your own requirements.

Cheer, Lance.

#73
CPK87

CPK87
  • Members
  • 73 messages

Lance Botelle wrote...

CPK87 wrote...

Thanks, appreciate it.  

I am curious if there is a way to restrict an enchantment to a specific type of weapon, rather than just any weapon. For instance, if I create an enchantment that grants an item X number of spells per day, but I only want that enchantment to apply to quarterstaves so that a fighter can't run around casting high level spells with it (I would put a class restriction on the staves themselves). I know wands are capable of doing this, but they don't really fit in the mod I'm creating.


Hi CPK87,

The short answer is "yes", this can be done. However, it does require altering the crafting scripts (the "kinc_crafting" if I am recalling correctly ... no toolset open just at the moment.) You would need to add a "weapon" check at the point the enchantment was being used. There are a number of checks, but it is easy enough to add your own "functions" to check for specific cases based on certain enchantment requirements.

I changed this include file so much that I ended up renaming it and redirecting the functions to my own crafting include script (alb_crafting). But, it all depends on how much you want to rely on existing code (systems) or expand to fit your own ideals. If you are OK with scripting, I think there is a lot to be gained through altering to fit your own requirements.

Cheer, Lance.



Awesome - I'm not a seasoned scripter by any means, but I think I understand it well enough to modify existing scripts.  I'll take a look at it and let you know if I run into any issues.  Thanks man.

Edit:  Also, correct me if I'm wrong, but the way that the system currently does it is that it uses the "TAGS" column in Crafting.2da to specify what type of item the enchantment can be applied to.  So if there is a "1" in the cell under that column, it can only be applied to weapons, while a "2" will restrict it to armor only.  Do you know which 2da file these tags are being referenced, and what script is defining them?  I'll check "kinc_crafting" to see if it's being done there.

Modifié par CPK87, 17 février 2014 - 10:43 .


#74
kevL

kevL
  • Members
  • 4 052 messages
ginc_crafting is the core #include

see esp. DoMagicCrafting() for enchantments.


At a glance, which isn't saying much when dealing with OC-crafting, it sorta looks like iRecipeMatch might be the row# in Crafting.2da -- which if so might then be referenced against a separate call to Baseitems.2da


... further browsing says that chances for no-extra-scripting are fair. Try "B50" in the TAGS column. "50" is the baseitem type of a quarterstaff

#75
CPK87

CPK87
  • Members
  • 73 messages

kevL wrote...

ginc_crafting is the core #include

see esp. DoMagicCrafting() for enchantments.


At a glance, which isn't saying much when dealing with OC-crafting, it sorta looks like iRecipeMatch might be the row# in Crafting.2da -- which if so might then be referenced against a separate call to Baseitems.2da


... further browsing says that chances for no-extra-scripting are fair. Try "B50" in the TAGS column. "50" is the baseitem type of a quarterstaff


Yep, that worked!  I was wondering about those B# entries, and I was looking at the baseitem 2da, lol... not sure how I didn't put those things together.  Thanks for calling that out, that's exactly what I needed.