Weapon customisation script?

I found a basic system for armour customisation that serves my needs, but I also wish players on my PW to be able to customise their weapons. Is there a seperate system for weapons customisation available?

I think CCOHEE has it, but it would be a trouble to extricate from that. I was surprised to not (easily) find something specific to this available, but maybe my search-fu is weak.

Well, there is [PGP](https://Pretty Good Character Creator / Customizer (PGC3) powered by IGIPE), which comes with a rather complex general customizer for items and an appearance modifier for visible armor parts and weapons. Imo, the best on the market, but never upgraded for the EE (Afaik).

Then there is Omega forge.

And last but not least: my own general item customizer, which comes with “The Rogues of Quinn (Part 4 and 5)”.

Yeah I’m kind of looking for something basic I can expand myself. I am working on my own customisation system (which I wanty to program my own restrictions and etc into), so I’d rather a starting point than something that has everything and also the kitchen sink. I also found some stuff by genisys but it’s in a google drive link and its one big collection of a bunch of stuff to wade through.

I absolutely will not claim this will answer your problem, but I built an nui-based appearance customizer for character appearances, armor/clothing appearances, and item/weapon appearances. The code is not pretty, but the functions that do this are all in there … somewhere … if you want to check it out. I think those functions are near line 1000-ish. If you find any of it useful, steal what you want (good luck!). If you have any questions, feel free to contact me here or on discord.

https://github.com/tinygiant98/nui/blob/legacy/formfiles/appearance_editor/nuif_appedit.nss

Ooh, shiny! I will definitely take a look!

Do you mind a screenshot or two of how it should look? The last NUI thing I tried to kludge in here didn’t come out quite right and having reference was helpful in figuring out what weird.

Definitely not shiny. Old and tarnished. And abandoned. This form was built under my older nui wrapper system, so I don’t even know if I can recreate it. But I did find some old screenshots from ye old development days a couple years ago. The data page allowed you to fill all the databases with all available model data, including from haks (green square means data is present). The selector let you pick any game object, including objects in inventory or lying on the ground, to modify. I meant to update this to the new nui wrapper system, just never got around to it. And CCOHEE might have better implementation, but I haven’t looked deeply into that yet.

The form had several “pages”. Here’s the weapons modification page. Unfortunately, this one was from earlier in development, so it doesn’t show the available models/colors.

Here’s one with some of the data, just ignore the weapon image… The green triangles/circles with the number indicate the shape and model number for each part of the item/weapon.

This was the “main” page, or character appearance modification page.

Here’s the armor page. The little blue dots denote per-part coloring (clicking them removes the per-part coloring).

Cool! That’s a lot more than I would have been able to manage myself, so I appreciate sharing!

Don’t know how useful the form is anymore, but feel free to rip out whatever code might help, if any.

Silly me. I thought you were looking for script systems to enable making weapons with unique properties like -

Forge of Wonders
Omega Forge v2.3
The Primordial Forge of Gauntlgrym (NWN EE)

or maybe even -

Guile’s Workshop OE (Offline Edition) EE

TR

1 Like

Adding item properties is coming but right now I was looking for a basic weapon customizations script. I intended to use it in two places: allowing a smith (player crafter) to set the appearance of crafter weapons, and allowing the player to change the appearance of “generic” storebought items. tinygiants script is brilliant, if I can get it to work, but if not I’ll take a look at those others!

I haven’t used that code in a couple of years. If you need help pulling it out in a functional way (to divorce it from the nui form), I can give it a shot if I know what you’re looking for. Once you do your review, let me know if you need any help.

I’ve got the code in and it compiles fine, I’ll let you know how the testing goes, since its getting to zzzz time now!

So its all in there and nothing crashes, but where I’m invoking the window from doesn’t work:

image

It might not be initializing something it needs? I did make sure the NUI_Initialize() thing was in the module load.

Take a look inside that database that was created in your /database folder → nui_form_data.sqlite3. Take a look at the nui_forms table and see if there’s any data in there. If not, maybe it didn’t find any forms to load? Confirm you have at least one nuif_xxxx.nss somewhere in your module resources?

Did you get a message somewhat like NUI_DefineFormsByFormfile ... in your server’s log? If so, it should be followed shortly thereafter by something like -- Setting NUI_CURRENT_FORMFILE (loop) ... showing the loaded formfiles.

Finally, if you look at your nui_i_const.nss file, what is the value of NUI_VERSION?

You’re working on the old version of this nui management system, so I might be a little slower finding right answers.

I think I have an idea what it is, the event for the selector is having a bit of a fit, so just adding the listener wasnt enough for integration here. Having a poke at it now.

So I’ve weeded out some other errors and problems but not got it showing the appearance form yet. My gut feeling is that I need to be doing something to load or initialize the form beyond just having the nui loader and handler working, but I don’t have intimate knowledge of the script to know what. Or otherwise something is not working but silently failing. I wouldn’t know quite where to look, to make sure that the database is populated. Any thoughts?

I can send you a minimal module late tonight or tomorrow. I’m in the road right now.

Sure, no rush! That would be very helpful.

Here’s a minimalist module. There’s really nothing in it except nui and its support files. Just enter with any character and type !appedit into the chat bar and the form should open up. It will have no model data loaded. You’ll have to open up the data loading form by clicking the Data button. If you load all the data, it will take a long time, but the game isn’t frozen. Also, this is the legacy version of the nui system and I haven’t looked at it in a while. If there are any issues, and there probably will be, let me know and I’ll look into it as I can.
nui.zip (78.4 KB)