More questions about ObjectType [MOSS]

To not drill the other thread more :wink:, I am asking the rest of my questions about ObjectType in this thread.

If you have 100 types of swords that all have the same actions but their description, name, model info, damage, and attack radius are different. I am curious how you will handle that in ObjectType. Would you create 100 different object types in the objects script? or you are going to have just one object type “Sword” and read the configuration from somewhere else like a JSON file?

There would be one sword ObjectType and then the rest will be properties of the entity… since any of that can change at runtime.

In Mythruna, all objects will eventually be in-game created and so their properties are derived from the objects themselves and become part of the entity. Those values may also change over time for a variety of reasons.

Edit: moreover, I’m not even sure that a sword will be any different from a mace or a club or a battleaxe in the end… from an ObjectType perspective. The actions and manipulation will be what controls object types. (ie: does the player interact with it a different way or will it have different actions specific to its weapon type.)

Edit 2: and from that, you can start to see that ObjectType.typeVars might get little to no use in the final version of the game… since even the handle position (mostly what I’m using it for now) will be part of the object and not the type.

1 Like

Can you elaborate on this with an example, please? So a player would be able to create a sword from blocks and set those properties (name, damage,…) in the game and save it in a blueprint file and then create an entity later using that blueprint?

Note: all further text in this comment is speculation on planned features that have not been implemented yet and may be impossible. This does not denote promises or contracts for real features… please don’t send death threats to the developer if this turns out not to make it into the game.

The plan is for users to be able to create a blueprint, load it into an object work bench, and in there define the position of the handle, which action set should be used, etc… Or potentially even combine multiple blueprints together. How they craft the physical object is TBD… and I may abandon all of that in favor of real forging mini-games and so on.

But once there is an object, it will be analyzed for weight, material, etc. and that will determine how it behaves, durability, damage, and so on. For various sliding definitions of “analyzed”, “determines”, and “behaves”… depending on how far I get.

So if you get hit with something heavy and sharp, you will get cut a lot.

2 Likes

That is really cool :slightly_smiling_face:

What about villager NPCs, would you create them and their properties and relationship procedurally at runtime as well or you would load them from a configuration file?

General NPCs will be created randomly. Maybe with some exceptions.

But at that point, I don’t see any difference between a configuration file and a script… and I already have scripting support.

In Mythruna would it be possible to equip multiple objects? Let’s say a sword in the right hand, a projectile weapon (e.g. a shuriken) in the left hand, and a spell in the belt.

If so, how the player will select which item to use? Will there probably be an Action Bar that displays actions on the screen for the player to select?

Also, how you are going to let players choose how to use an item? For example, let’s say an equipped sword can be used to do a melee attack in multiple different ways, how can the player select which attack style to proceed with that sword? Will it be selected by a key binding on the keyboard or via an action bar style interface?

Yes. In many senses of the word “equip”. For example, right now the backpack is “equipped” even though the player currently has no control over that.

The planned control scheme is that whatever action you can do with your main hand can be done with your off hand by holding the control key. This may even allow for two handed attacks for nimble players.

It’s not clear if there will be conventional attack spells or not yet. Since most magic is planned to be slotted, most of it will be passive… which could be used for attacking if on a weapon, for example.

I do have a plan for “equipped containers” like belt pouches and things that could hold activatable items like potions, explosives, whatever… assigned to hot keys. I haven’t decided exactly how that will work… sometimes things are clearer when the other parts are mostly there.

Note: all further text in this comment is speculation on planned features that have not been implemented yet and may be impossible. This does not denote promises or contracts for real features… please don’t send death threats to the developer if this turns out not to make it into the game.

The current plan is to use a click+drag mechanic. In the most advanced case, dragging the mouse will control the tip of your sword and so you directly control where it slashes. There are numerous problems with this approach, not the least of which is that swords will probably swipe right through objects instead of always colliding with the things they hit (yay, computer physics). But this approach is very appealing for a lot of reasons… not the least of which is that it sets me up for VR controls someday. (In this approach, click+drag moves the item, simple-click does a default swing.)

I have a long list of mitigation strategies and fallback positions for most of the predicated issues which is why this feature is no longer holding up development. There is already a plan for selectable starting stances to better position for a particular type of swipe… in the most conventional fallback position, I’d use that to select attacks instead (or the stance would indicate the attack which has some interesting defense implications).

Selecting these will depend on what’s least awkward when everything else is working. Could be mouse wheel with two keys as an alternate. Or could be hotkey quick slots where you have some way of earning more slots.

Step 1 will be to see if I can get the procedural animation working and figure out how that feels and the other implications. Tweak from there.

1 Like

That is pretty intersting and prety advanced :slightly_smiling_face:

It is always interesting to know how folks think differently. In my case (considering that I am also going to support touch screen environment for mobile) I selected to follow the common action bar style interface for controlling actions. So in the sword attack example up on equiping the sword, for each attack style there will be an action added to the action bar. Or an other interesting idea would be to make it skill/power based. So for example when doing a melee attack action, it will check the player melee skills and other environment factors like the enemy type,… and automatically (+ some essence of randomness) pick the right attack style to proceed with.

re: your game… On a touch screen, it would also be really tempting to use gestures for different attack types.

1 Like

By the way, the above is what this video from 2020 was about:

Edit: I mean, it may not be 100% obvious what’s happening unless you follow the mouse cursor.

2 Likes