Replies: 1 comment
-
|
Splitting protosets into multiple files would help in this regard, but it's not yet implemented (#227). E.g. this protoset: {
"glock": {
"ammo_type": "bullet",
"weapon_type": "ranged",
"fire_mode": "semi_auto",
"one_handed": true,
"damage": 10,
"mag_size": 20
},
"revolver": {
"ammo_type": "bullet",
"weapon_type": "ranged",
"fire_mode": "semi_auto",
"one_handed": true,
"damage": 10,
"mag_size": 6
},
"desert_eagle": {
"ammo_type": "bullet",
"weapon_type": "ranged",
"fire_mode": "semi_auto",
"one_handed": true,
"damage": 9001,
"mag_size": 7
}
}becomes: {
"handgun": {
"ammo_type": "bullet",
"weapon_type": "ranged",
"fire_mode": "semi_auto",
"one_handed": true,
"damage": 10,
},
"glock": {
"inherits": "handgun",
"mag_size": 20
},
"revolver": {
"inherits": "handgun",
"mag_size": 6
},
"desert_eagle": {
"inherits": "handgun",
"damage": 9001,
"mag_size": 7
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thank you for this amazing addon.
However, I'm a little confused about Prototree creation. I've heard that manually doing same things in programming is a bad habit, and it made me wonder - is writing each item down manually in the JSON is the most optimal way to work with it? The thing is that I plan my game to have dozens of various items, but the idea of putting each item manually gives me shivers. I was thinking of making a tool that generates a Prototree based on my game's hierarchy, but before I get started I'd love to ask if there's any better solution rather than declaring each item manually? Or maybe there's a way to breakdown the tree in a few separate files, kinda like "prototree_weapons", "prototree_food" and so on.
Beta Was this translation helpful? Give feedback.
All reactions