• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Fukubus · 4 days ago · rpgmodding

Moddable features from a single file (like characters or attacks)


I'm currently making an RPG in Unity and I want to have all attacks (and characters) in files next to the .exe in a Assets (or Mods) folder.


I want the file format to be like *.atk or *.chr and inside the file you set parameters like the attack name or the attack type.


I also wanted to add hardcoded functions that you call inside the mod file like DoDamage() or createSprite() which basically lets the modder tell the game what the attack does.


I'm fairly new to Unity so does anyone know how I can incorporate this?


Comment
andrew-lukasik

People who like this

1 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by MUG806 · 3 days ago

Unity is pretty bad for this kind of thing and doesn't have very good modding support out of the box. Depending on the type of data you want to load, as some things can be loaded at runtime reasonably easily. For example if you want to load text and number data or simple images there are ways of doing it. It becomes much more complicated if you want to load meshes/animations/prefabs etc.

Comment

People who like this

0 Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image andrew-lukasik · 3 days ago 0
Share


Unity is pretty bad for this kind of thing and doesn't have very good modding support out of the box.

Please let me disagree with you here. It's not that this or that engine lacks something (all engines can read text and bin files) - it something very different - modding support requires specific game architecture which surprises developers who are new to this and think about this as some kind of feature to add after the project is completed (multiplayer support being similar case).

If you think ahead and design your game to read text files, then modding is rather simple - you just read different text file instead...


avatar image MUG806 andrew-lukasik · 3 days ago 1
Share

Allow me to disagree further. Yes of course, modding basically always just comes down to loading in data at runtime, and does require that you have a specific plan for this which you are going to have to implement yourself in a lot of cases. However in some engines you are given tools that make loading in assets at runtime much easier. Unity has no such thing, so you are having to create a custom solution for it. Unity is also very inconsistent with the kinds of data that can easily be imported at runtime (eg it has solutions that allow the loading of texture data dynamically, but not for other various data types that can be imported via it's editor. Yes of course you can do it yourself if you put the work in, but that would be true if you were using no engine at all, and the whole idea of a game engine is to have prebuilt solutions to common things game devs need, and this is one place where unity doesn't help you very much.

avatar image andrew-lukasik MUG806 · 2 days ago 0
Share

That is true. No built-in utility to read/write gameObject at runtime as yaml/etc is disappointing. There are some pieces of that in Dots (ability to write/read World as binary file) which is a step in good direction but even that is incomplete and doesn't work out of the box (which is slightly infuriating I admit).

Show more comments
avatar image AnOrdinarySandwich · 2 days ago 0
Share

@MUG806 @andrew-lukasik Hey guys, I'm curious if you think LUA could be used to implement this kind of thing? I've played around with it in minecraft modding so I know with the right API its pretty robust, but I don't know enough in regards to its capabilities within unity.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

159 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to hack and mod my game? 2 Answers

Activate objects/crafting in a game. 1 Answer

Leveling up in RPG 1 Answer

Entering and Exiting Vehicals 2 Answers

Melee combat error 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges