Aller au contenu

Photo

Exporting custom weapons from Blender


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

#1
Rekov

Rekov
  • Members
  • 75 messages

I have been attempting to export a weapon that I made from Blender, and I wanted to check with ya'll to make sure I'm doing this correctly. The example I have has two additional objects, hp_0 and hp_1 that I assume are important.

 

b60MUst.png

 

I don't seem to be able to export equivalent objects with my own model though. They aren't there when I reimport it to test. I'm probably just screwing up something basic. Any ideas?

 

QTkl76W.png

(This work in progress does not reflect the final quality of the product, bla bla bla.)

 



#2
rjshae

rjshae
  • Members
  • 4 491 messages

I didn't test the Blender import/export scripts with weapons. It's possible they don't work and need some modification. I'll take a look.



#3
Rekov

Rekov
  • Members
  • 75 messages

I think it's more likely that I'm a clueless idiot, but I appreciate you looking into it. :D

 

EDIT: So the guy I made this for says that it works for him in the toolset both as a stand alone item and equipped on NPCs,  but doesn't show up in game. Some of it is definitely working, at least.



#4
rjshae

rjshae
  • Members
  • 4 491 messages

I think it's more likely that I'm a clueless idiot, but I appreciate you looking into it. :D

 

No, not at all. It's just a minor code issue. Line 254 of NWN2Exporter.py needs to change from this:

                elif obj.name[0:3]=="HP_":  # it's a hook point

to this:

                elif obj.name[0:3]=="HP_" or obj.name[0:3]=="hp_":  # it's a hook point

After I made the change I was able to export and re-import a test dagger.

 

 

More elegant version:

                elif obj.name[0:3].upper()=="HP_":  # it's a hook point

  • GCoyote aime ceci

#5
Rekov

Rekov
  • Members
  • 75 messages

Cool, thanks! I imagine those hook points are important. Hopefully they're what's preventing it from showing up in game as well.



#6
rjshae

rjshae
  • Members
  • 4 491 messages

Cool, thanks! I imagine those hook points are important. Hopefully they're what's preventing it from showing up in game as well.

 

The HOOK parts appear to be used to connect two different models together. I'm not sure why it needs two; maybe for scaling purposes?



#7
Rekov

Rekov
  • Members
  • 75 messages

Well I imagine they could be used with some types of weapons, like swords, where it's three different pieces that can each be individually selected in the toolset. With ranged weapons that isn't the case, so who knows. It's still showing up in the toolset and not in game, but that might well be something on our end. It's fairly weird to me in any case.

 

That new line of code definitely works though, so thanks!