Modding questions

Hey there. I am currently working on a chi system similar in vein to the mana system and i was wondering if it was possible to somehow get rid od the two item wear limit.

I have a ki barrier item that provides protection and i want the player to be able to strengthen said barrier to better protect themselves by putting more ki into it.

Right now i have it that it summons a weightless semitangible armor item that provides protection and the strengthening aspect is just summoning more of said item.

However you can only wear two at once so i was wondering if there was a way to bypass that limit so the barriers can be stacked continuously the more ki is used.

I think the limit of items that the character can wear is given and can’t be changed from JSON.

However, you probably can bypass it in different ways.
One thing that comes to my mind would be to create multiple item defintions of the same type (copy-from) with different ids. That way you can wear up to two of each seperate id.

Depending on the way you want to implement it (as in; if you want to just summon one item id and not randomly for example), you could make it that [a]ctivating the items “transmutates” it into one of the other ids, and activating that item will transmutate it further and so on.

Maybe look into aura spells? They give different protection/stats based on casting level, and I doubt there are 20 versions of each aura in the files. No time to check now so can be wrong, though.

From what i understand aura spells tend to summon an item that is semitangible that you wear and provides the effecta.

I suppose i could make it an effect instead of a item. I would just need to remember how to simply give armor to the full body as say a mutation would.

Hmm…how would i go about doing multiple ids? Its not as clean as i was hoping to make the abillity but it may be what i have to do for its intended effect.

Like say i want it to just summon a random version of a specefied set of ids. How would i go about it?

Based on your first post I think it’s save to assume you already have a definition for your base barrier item.

Let’s say that barrier item looks like this:

"id": "barrier_armor",
"type": "ARMOR",
"name": { "str": "barrier shield" }

…and whatever else is part of the item definition.
You can then add another item definition:

"id": "barrier_armor2",
"type": "ARMOR",
"name": { "str": "barrier shield" },
"copy-from": "barrier_armor"

…and then barrier_armor3, and so on.

To each item definition, starting with barrier_armor, you then add an use_action:

"use_action": {
    "type": "transform",
    "msg": "You shift the frequency of the barrier.",
    "target": "barrier_armor2",
    "menu_text": "Change barrier frequency"
}

barrier_armor2 then gets an use_action that targets barrier_armor3, and, if you want to, you can wrap around in the end, so that barrier_armorX’s target is barrier_armor again.

Thats pretty smart! Thank you very much ill give that a shot. Ive got a bunch of other ki abillities working auch as beams blasts, powering up, making afterimages.

This was the only one i was having some issue with. I sure hope this works!

1 Like

You’re welcome, always glad I can help and good luck!

I just saw your edit.
It highly depends on how you spawn them in. You might be able to pass an item group and let it pick one randomly from the list in that item group.

Also, I’m not sure what you exactly mean by “strengthening aspect is just summoning more of said item” in your first post.
Do they use up a predefined value of ki and spawn one item at a time or do you spawn multiple of them based on ki available (like some bionics empty your power completely on use but provide a longer or stronger effect)?

If it’s the latter, it might be possible to spawn in an item group of the "subtype": "collection" and provide a max of two of each different id directly, scaled on the ki available (although you’d probably would have to add a collection for every range, like: 100 ki = 1 barrier_armor, 200 ki = 2 barrier_armor, 300 = 2 barrier_armor + 1 barrier_armor2 etc)…

I would like to confirm that the shifting frequencies idea worked, so when activated you can now shift the ki barriers frequency up one level (Currently capping at 5) Allowing someone to potentially have up to 12 ki barriers at once (Not that anyone would have the ki to do that but its there.) I would like to thank you very much for your help Valase.

1 Like

Where if anywhere, would i find that in the game files?

Zhilkin linked a source file of the game (written in c++). You will find this file in the source code of the game, in the src folder.
You could change that variable to whatever value you desire and then recompile the game to be able to wear more than the 2 of one item.

If you want to write (and distribute) a mod, however, that uses the built in mod loader system… then this isn’t really helpful in any way I’d know of…
Maybe s-/he can explain it better how this would be helpful?