Jump to content

[1.8] [SOLVED] Additional Data from JSONs?


Sgmjscorp

Recommended Posts

Basically it's going to be a model JSON file for an item, but I want to add in additional data like offsets applied to the modular item it will be a part of.

My current system stores this offset separately but I'd like to make it so users can make a JSON and have the internal system update from the file rather than hard-coding everything.  This would also allow people to make additional models without needing to make a new mod and still be compatible with the current design.

Link to comment
Share on other sites

Why don't you create your own .JSON file reader - search for the file the user creates with the model information, parse it to whatever you need, then apply to the item model. Really, I don't see why you would do this with this .JSON system, pretty flexible with rotations / translations / scale.

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Link to comment
Share on other sites

Why don't you create your own .JSON file reader - search for the file the user creates with the model information, parse it to whatever you need, then apply to the item model. Really, I don't see why you would do this with this .JSON system, pretty flexible with rotations / translations / scale.

Because translations and rotations won't persist with my current item.  Individually it would but the design I worked on is a compilation of multiple item models, unless ISmartItemModel has some rotation voodoo I haven't found.

As for a JSON file reader, I feel like an idiot now.  Thank you!  (Will update with results.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.