Is there any way to create a list of features in a feature?

Tue 3. Jun 2014, 04:12

For example, I have entities defined for equipment. Each piece of equipment needs a list of stat modifications on it. Each stat modification is made up of two values, a drop-down list to specify the stat it affects, and a number specifying how much the stat is modified. If I use a strip for this, then I have to define entities for every combination of stat/value that I may want to include on an equipment entity so that I can reference them from the strip. This is obviously the wrong way to go as I will end up with thousands of possible stat/value combinations.

So, if I could define a feature for the stat/value combination, and then have something like a strip on the equipment which can hold multiple copies of that feature, then I could just add a copy for each stat modification. Essentially creating a list of arbitrary objects that each contain multiple values. As far as I can tell this isn't currently possible because each feature can only be added to a template once, and features can't be added to features.

The only workaround I can think of to get some type of list is to use a text field with the stat/value pairs listed in it and parse that list to get the actual values later, but this is far from ideal as the values will be difficult to work with, and the stat names would have to be typed in directly each time instead of having a nice drop-down list to show what stats are available so there's a high chance we will get parsing errors. Or, I have to give up on the idea of having a list entirely and simply add a bunch of properties to the equipment feature to specify a value for each stat, but then when working with these I will have to deal with each value directly instead of being able to just enumerate a list.

Are there any other options to deal with this that I'm missing?
Kermitt
 
Posts: 14
Joined: Sun 2. Feb 2014, 06:09

Re: Is there any way to create a list of features in a featu

Wed 4. Jun 2014, 13:23

Hello Kermitt,

Thanks for your feedback. As you've pointed out, it is currently not possible to add features to features. We heard this request a few times recently, mostly in context with modeling an inventory where each item reference also needs a few attributes like amount, stacked, etc.! So it's on our roadmap with high priority.

As a workaround, if you can accept the constraint of having a fixed maximum of stat modifications, you could n pairs of:

Custom Dropdown 'Stats' Stat to be modified || Custom Number Value 'Stat Modifier' Amount

This indicates that it is possible to create a custom type of dropdown list (with all the stats as list entries) or number field (with min and max values). See image below for details:

Image
1) Use context menu to create a property type from a property in your feature
2) Just drag & drop a property onto this field to create a property type from it

This approach avoids the redundancies, but you still have the disadvantage of a fixed amount of "rows", so to speak.


Hope this helps!
-Kai
Kai Rosenkranz
CEO | Nevigo | LinkedIn | Facebook | Xing | Google+ | MobyGames
User avatar
Kai Rosenkranz
Articy Staff
Articy Staff
 
Posts: 58
Joined: Fri 18. Nov 2011, 15:18

Re: Is there any way to create a list of features in a featu

Thu 5. Jun 2014, 04:56

Well I've used drop-down lists and custom types before so no problem there. I do prefer your idea of storing a list of stat/value pairs instead of just creating one integer field for each stat. At least that makes it a little more flexible and a slightly closer representation of a list. Having a fixed number of rows doesn't bother me too much.

So here's what I've done...
  • Create a custom type for the stats (3 currently) and another for the modifier value
  • Create a feature to just hold the set of stat/value pairs. I figure I'll allow a few extras in here to simplify adding new stats later, so currently I have 5. Each field is numbered e.g. StatType0, StatModifier0, StatType1, StatModifier1 etc.
  • That feature is then added to my equipment template.

One of my biggest concerns around this has been whether I will be able to iterate through the items easily. This is because at some point I export a managed copy of the equipment object to xml and use xsl to parse it and generate html(ish) tooltips, and I wasn't sure if I could successfully iterate a bunch of individual properties that each differ only by the number on the end. Well it turns out it was possible to do that with recursive templates and some clever auto generation of the xsl paths, so I'm happy with this option for now. Later I expect I'm going to want to iterate these properties in .NET code also, but I already know how to solve that with some reflection to get the property values and then I can convert them to a generic dictionary or something.

Thanks for your input on this. You gave me just the little nudge I needed to make it a workable solution.
Kermitt
 
Posts: 14
Joined: Sun 2. Feb 2014, 06:09

Re: Is there any way to create a list of features in a featu

Fri 13. Jun 2014, 21:33

Hi there.

Glad you managed to make this workaround work! Thanks for sharing your experience and feedback.

We're aiming for a more flexible solution that also plays nice with iterating in .NET code, but we'll need a bit more time for that.

All the best,
-Kai
Kai Rosenkranz
CEO | Nevigo | LinkedIn | Facebook | Xing | Google+ | MobyGames
User avatar
Kai Rosenkranz
Articy Staff
Articy Staff
 
Posts: 58
Joined: Fri 18. Nov 2011, 15:18

Re: Is there any way to create a list of features in a featu

Wed 20. May 2015, 18:25

[Nevigo] Kai Rosenkranz wrote:Hi there.

Glad you managed to make this workaround work! Thanks for sharing your experience and feedback.

We're aiming for a more flexible solution that also plays nice with iterating in .NET code, but we'll need a bit more time for that.

All the best,
-Kai


I'm looking at a similar issue to this one for my RPG. Actually, the issues appears in quite a few places e.g. the weapons have 0..n firing mode blocks, 0..n types of ammo, 0..n zoom modes, etc. Inside each of those are blocks of "features" as well.

It would vastly help my design if I am able to place 0..n instances of a feature into a template. Currently I have to make (n) copies of a feature for every aspect that needs multiple instances of that feature

e.g. a mission reward might possibly hand out faction / tokens as part of the reward. I currently have features that contain 6 copies of the faction and the amount of XP to award to that faction. I'm doing the same for items, and non-gold currencies. It would make a lot more sense to simply prototype each of those as a single feature and allow templates to contain 0..n of those features (in a sub block), with ability to limit min and max on that sub-block. Users could just click a +/- button to add more, remove ones.

XML is hierarchial in nature. It's a shame to not be able to fully exploit this in a natural manner.
ivanhawkes
 
Posts: 6
Joined: Mon 18. May 2015, 22:13

Re: Is there any way to create a list of features in a featu

Wed 27. May 2015, 17:41

I think of it in terms of effects. A spell, scroll, potion, or magic item carries a number of different effects, each of which are applied to the owner when it is carried, or to the target when it is used on it. Some effects never run out and some have a charge, which decreases with each use. Hopefully something like this will be added when they get to the inventory. :)
Ariegos
 
Posts: 5
Joined: Fri 16. Jan 2015, 22:14

Re: Is there any way to create a list of features in a featu

Wed 27. May 2015, 22:50

I'm looking at a way around it currently, where I define the complex nested structure as a prototype in a Flow, then make a reference to that Flow from the item. It doesn't leave me any particularly neat ways to define each item's (weapons, etc) individual values though, since they too would need to be hierachial or I need to flatten out any overideable structures.

I'm hoping that they make it possible to define items using the "prototype" design pattern - where one is designed only by how it differs with a template item e.g.

Sword
Sword + 1 (sword with +1 modifier)
Sword + 2 (sword with +2 modifier)

Orc
Elite Orc
Boss Orc
ivanhawkes
 
Posts: 6
Joined: Mon 18. May 2015, 22:13

Re: Is there any way to create a list of features in a featu

Thu 28. May 2015, 05:47

I'm thinking of the component pattern, because when you cast spells or use an item on an entity, the effects are injected into it. The result of an effect can be immediate, last a certain amount of time, or last forever, so each entity you target would also need its own updating list of effects. With that you can handle all sorts of things like diseases, curses, crippling injuries and effects from multiple spells active at the same time. You can also have an effect that dispels other effects, by removing them from a target entity's list. Anyhow I am sure Nevigo have their own ideas for this.
Ariegos
 
Posts: 5
Joined: Fri 16. Jan 2015, 22:14

Re: Is there any way to create a list of features in a featu

Fri 8. Feb 2019, 18:36

Bump.
Any update about placing 0..n instances of a feature into a template ?
Like in a spell system, if I have 200 different instances of a spell (it's the same spell but doing different damages), is there a way to avoid creating the 200 instances of that spell with only damage value changing ?
I would like to set this spell damage value directly on an player entity having that spell for instance.
Is this possible ?

Thanks.
LeLag
 
Posts: 2
Joined: Thu 7. Feb 2019, 17:49

Re: Is there any way to create a list of features in a featu

Wed 22. May 2019, 09:03

I do lean toward your concept of putting away a rundown of detail/esteem combines rather than simply making one whole number field for each detail. In any event that makes it somewhat more adaptable and a marginally closer portrayal of a rundown.
JONAH
 
Posts: 1
Joined: Sat 11. May 2019, 09:17

Next

Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

Who We Are
Contact Us
Social Links