Nick:  
Pass:     
Help Register


Post Reply 
Modding Item modding discussion
Author Message
Rasmus Offline
Main developer of Dwelvers
Dwelvers Developers

Posts: 3.619
Joined: Sep 2013
Reputation: 502
Post: #1
Item modding discussion
A lot of moding going on now Tongue

Well, as I was working on getting the creatures modable I encountered a little brainteaser. That is the equipment some of the creatures have, the knight has his hammer, the orcs their shields, swords and axes.

We have been discussion having the possibility to equip creatures, this means that we would have a couple of swords in different levels, and shields armours and so on. But this doesn't mean that every creature should have individual armours and weapons, the orc for example should be able to pick up the knights hammer and do some damage with it.

So the way to solve this is that I will not have any item modelled as a package with the creature. The hammer itself will be regarded as an item that the knight can drop and replace with another weapon if he wants to.

This is easier said than done, because every creature has its own skeleton and holds the items in a certain way, which means that for every new introduced item into the game all the creatures will need to have some information on how to hold it and in most cases have their own model of the item to fit them.

Weapons, Shields and Resources
First of, items and weapons that are held in the hand is the easiest, this is because there is only the hand bone that is controlling the weapon. But it could still be a little bit annoying that I would have position every item in the game in the hands of the creatures as it is now. Therefore I have come up with this solution.

[Image: HandleItem.png]

As seen here we have a bucket of water, but we also have a little arrow stuck to it. This is a handle arrow (as I call it Tongue) that is positioned in the handle of the water bucket. The next step is this:

[Image: RogueItem.png]

As you can see the the rouge also has an arrow in his hand that marks out his hand-handle, and as we already know how the water bucket should be located in relations to the arrow it will position itself there automatically.

So what does this mean; It means that all that is needed to be done is giving all the creatures this handle arrow and all the items this handle arrow and from there all creatures will be able to carry all items without any extra work from me or the one that wants to mod the game. Simple as pie Tongue

Item moding

So back to the headline Smile
I have reorganized the items folder a little, now it looks like this:

[Image: FolderItems.png]

The game will automatically load in all xml files in this folder into the game. So if I were to make a new file named "Sword.xml" with some info to it we will have a sword item in the game. So let me show of what the water.xml file contains:

Code:
(item)
  (name)Water(/name)
  (path)water//(/path)
  (model)water.3ds(/model)
  (texturecolor)color.png(/texturecolor)
  (texturespec)spec.png(/texturespec)
  (texturenormal)normal.png(/texturenormal)
  (icon)icon.png(/icon)
  (handle)handle.hdl(/handle)
  (language)language(/language)
  (unlimitedresource)1(/unlimitedresource)
  (dropable)1(/dropable)
  (foodvalue)0(/foodvalue)
  (drinkvalue)0(/drinkvalue)
  (equipmenttype)resource(/equipmenttype)
(/item)
  • name - The ID of this items, when other objects in the game is calling this item they will call its name, in this case "Water"
  • path - The path to the item folder where its textures, icons, models resides.
  • model - The filename of the model.
  • texturecolor - Model color/diffuse texture.
  • texturespec - Model specular texture.
  • texturenormal - Model normal texture.
  • icon - Item icon image.
  • handle - Filename of the handle data I showed in the images above.
  • language - Filename of the language file (will go into this soon).
  • unlimitedresource - This is for resource management purposes, water is a unlimited resources and should only be pumped out of the well when it is needed.
  • dropable - Some creatures will have some standard items on them as a default from start, like a wig (the impanzee hair for example) or jewellery. When moding the creatures the moder have the option to set default items/equipment on the creatures to create variation, but that don't mean that all these items should be dropped and pickupable by other creatures.
  • foodvalue - This is what categorize the item as food and that it should be delivered to the bar room.
  • drinkvalue - This is what categorize the item as drinkable and that it should be delivered to the bar room.
  • equipmenttype - In this case it is just a resource like rock, fish and wheat. But if it were a helmet for example we need to make sure so that the creature don't equip two helmets.

So here we have the content of the water folder:

[Image: FolderWater.png]

Projectiles
As the particle and projectile effects now is a part of the item moding I wanted to expand this topic a little. All items can now call on the particle effects by adding this code into the item xml file:

Code:
(projectilemodel)cannonballprojectile.3ds(/projectilemodel)
  (projectiledamage)75(/projectiledamage)
  (projectilerotationX)250(/projectilerotationX)
  (projectiledamageradius)100(/projectiledamageradius)
  (projectilefiresound)CannonFire(/projectilefiresound)
  (projectilehitsound)CannonBallExplosion(/projectilehitsound)
  (projectileparticles)CannonBallProjectile(/projectileparticles)
  (projectilelight)255,196,64,128,1500(/projectilelight) (!--r,g,b,shine (0-255), radius / 1000--)
  (projectilehitparticles)CannonBallExplosion(/projectilehitparticles)
  (projectilehitlight)255,196,64,128,5000(/projectilehitlight) (!--r,g,b,shine (0-255), radius / 1000--)
  (projectilefireparticles)CannonBallFire(/projectilefireparticles)
  (projectilefirelight)255,196,64,128,2500(/projectilefirelight) (!--r,g,b,shine (0-255), radius / 1000--)
  (projectilespeed)3000(/projectilespeed)
  (lifetime)10000(/lifetime)
  • (projectilemodel) - What model the item will use when it behaves as a particle, if no model is named here it will use the standard item model.
  • (projectiledamage) - How much damage the projectile does in % of the creature melee damage, or of the damage the projectile gets at initialization. To clarify, when the cannon shoots it may input the damage 20 to the projectile and when the projectile hits its target it will do 75% damage of 20 = 15 damage to the target. If a creature throws a item it will maybe input 40 as damage to the projectile as it is its core melee damage and the when the projectile hits is will only do 30 damage.
  • (projectilerotationX) - X spin of the projectile.
  • (projectilerotationY) - Y spin of the projectile.
  • (projectilerotationZ) - Z spin of the projectile.
  • (projectiledamageradius) - If the projectile hits/explodes it will damage all creatures within this radius.
  • (projectilefiresound) - The wav sound the projectile will do when it is getting fired.
  • (projectilehitsound) - The wav sound the projectile will do when it hits the target.
  • (projectilefireparticles) - The particle package the projectile will use when getting fired.
  • (projectilefirelight) - The light the projectile emits when getting fired.
  • (projectileparticles) - The particle package the projectile will use during its flight.
  • (projectilelight) - The light the projectile emits during its flight.
  • (projectilehitparticles) - The particle package the projectile will use on hit.
  • (projectilehitlight) - The light the projectile emits on hit.
  • (projectilespeed) - The speed of the projectile.
  • (lifetime) - The lifetime of the projectile.

The item moding has actually expanded a lot as it can be used for more than just being an item. For example, I do have a "UnBakedBread.xml" file available as well, this item is only used to display unbaked bread on the baking table.

The user could also create an item named fireball and adding fireball particles to it and giving it fire damage and explosion and everything and have the creatures throw this item.

Another fun idea is to set the projectile speed to 0 and just let it live out its lifetime, if an enemy walks into the projectile while it is standing still it will hit him, and in this way work as a trap.

This will of course need to be expanded a lot more for more advanced spells, but I think it is a good start Smile

Language

All files here are rather self explanatory except the language.xml file. As noticed above in the item moding I wrote the filename for the language like this (language)language(/language) and not like this (language)language.xml(/language). The reason for this is that "language.xml" is the default language (in this case english), but everytime a new language is introduced to the game (lets say Swedish) the game will look for a language file named "languageSE.xml".

So at some point in the future I will have a language folder where people can just tell the game through other xml files that another language is introduced to the game and that it have the ending "SE", which means that for every language file in the game it will always check and see if there is one with SE in the end available.

Here is the language.xml file:
Code:
(language)
  (title)Water Bucket(/title)
  (info)
    (p)
      For some reason water is the easiest resource to get in the dungeon, but that is lucky for you because the production chain would fail without it! Just build yourself a well and let your imps fetch water from it.
    (/p)
  (/info)
(/language)

Armour and accessories

Here is the tricky part. All the models have a different sizes and different skeleton. This means that one torso armour that fits on one creature will probably not fit on another. The easiest armour to create would be the helmet, but even that needs to be a little modified for each creature. I say this to let you know that this is something that will come in second. But I have some tricks up my sleeves to make this simple for both me and for anyone that would like to introduce new armours Smile
(This post was last modified: 20-04-2014 10:00 AM by Sebt.)
28-02-2014 10:00 PM
Find all posts by this user Quote this message in a reply
Sebt Offline
The Evil Admin
Evil Admins

Posts: 1.567
Joined: Aug 2013
Reputation: 98
Post: #2
RE: Item moding
Yey modding is getting real now! Smile
I support The Venus Project & Resource-Based Economy - The feasible plan to get rid of scarcity, poverty, and other incoming global issues.
28-02-2014 10:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Mello Tonin Offline
Guru O' Mello

Posts: 2.216
Joined: Aug 2013
Reputation: 176
Post: #3
RE: Item moding
This is FANtastic!!! I love how you solved the problem of different creature types picking up the same item and positioning it properly. BRILLIANT!!!
28-02-2014 11:11 PM
Find all posts by this user Quote this message in a reply
Seriously Unserious Offline
The Ninja Dinosaur

Posts: 1.607
Joined: Jun 2013
Reputation: 69
Post: #4
RE: Item moding
Awesome! More modding capabilities. I'd say it's about time for me to re-post that idea I had on item development and progression. Oh, yeah, and before I forget, Rasmus, you get yet another +1.
[Image: 11619898803_7d3a89e6bd_n.jpg]
The Golden One!
01-03-2014 02:45 AM
Find all posts by this user Quote this message in a reply
TacticBlack Offline
Tactical Dungeoneer
Dwelvers Voice Actors

Posts: 108
Joined: Feb 2014
Reputation: 25
Post: #5
RE: Item moding
My only worry is the generation of this differentiation. Will the movement of the creature still flow naturally with the object or will the physics seem off? If so, then there are algorithms that may be able to help that I am sure you are aware of or at least heard of called Procedural Content Generation (PCD) algorithms. Through a generative systems approach you can come up with the most logical, and accurate way that each creature would use each item and have it give you the numbers you need. A link to a more recent article related to this topic can be found here.

I know you already use a portion of this in the design of the dungeon from a 32 bit number. If this could be applied pre-production to object usage and associated motion, that may give a very realistic feel and look without having to do an assload of coding to make it look right, just some simple physics emulation. Idk if it is feasible but the creature creation system from games like Spore used PCG in game and found they were very useful for user customization.

If you want something that sets Dwelvers apart from almost all other RTS games and certainly all games in this theme, the idea for user created, nearly fully customizable units, from the length of their arms to what they wear may be the way to go while solving the issue of time spend coding using an equally adjustable and malleable algorithm set. Perhaps this is how creature combos could come about! You get bits and pieces from all the pieces you've thrown into the DM and can use them to allow the user to create a new creature from it.

Thoughts?
[Image: i563hs.png]
No Money, No Poverty, No Crime, No Politicians, No Corruption, No Social Stratification, Strength Based Education, Global Democracy, and True Equality.
A New Social Paradigm: Only Impossible Because of Your Attitude; Only Possible with Your Aspiration Towards a Better World.
You can't spell Humanity without Unity.

01-03-2014 05:06 AM
Find all posts by this user Quote this message in a reply
Seriously Unserious Offline
The Ninja Dinosaur

Posts: 1.607
Joined: Jun 2013
Reputation: 69
Post: #6
RE: Item moding
If that were to be the way Dwelvers went, I'd say a sort of "creature creater" type of tool, similar to what was used in Spore would be a good idea. Most modders are not 3d animators and creating new creatures from scratch would be way over the heads of most people, but a tool like this would allow even the most inept graphic artists to create creatures by using a pre-designed set of parts that we could colour, stretch, size, disassemble/reasimble and shape in different ways to create creatures from already designed parts. That need not stop skilled 3d artists and animators from adding new parts or fully self-made custom creatures, but would enable the non-3d artists to join the fun too.
[Image: 11619898803_7d3a89e6bd_n.jpg]
The Golden One!
01-03-2014 05:42 AM
Find all posts by this user Quote this message in a reply
Rasmus Offline
Main developer of Dwelvers
Dwelvers Developers

Posts: 3.619
Joined: Sep 2013
Reputation: 502
Post: #7
RE: Item moding
(28-02-2014 11:11 PM)Mello Tonin Wrote:  This is FANtastic!!! I love how you solved the problem of different creature types picking up the same item and positioning it properly. BRILLIANT!!!

Haha, thank you Big Grin It will be a lot more fun for me as well giving the creatures more job abilities as I now don't have to code and model every item a creature may or may not hold. Another really good thing here is that all the creatures will share the same model of the item, meaning that it will be a lot more easier to change their appearance.

(01-03-2014 02:45 AM)Seriously Unserious Wrote:  Awesome! More modding capabilities. I'd say it's about time for me to re-post that idea I had on item development and progression. Oh, yeah, and before I forget, Rasmus, you get yet another +1.

You are to kind Big Grin

(01-03-2014 05:06 AM)TacticBlack Wrote:  My only worry is the generation of this differentiation. Will the movement of the creature still flow naturally with the object or will the physics seem off? If so, then there are algorithms that may be able to help that I am sure you are aware of or at least heard of called Procedural Content Generation (PCD) algorithms. Through a generative systems approach you can come up with the most logical, and accurate way that each creature would use each item and have it give you the numbers you need. A link to a more recent article related to this topic can be found here.

I am not sure what you mean here. There is no generation involved with the creatures holding and equipping items, for a creature to hold an item in the hand all the info the game needs is the item location in the hand and the bone name of the hand and the game will take care of the rest. If you ask about the object movement still flowing naturally there will be no change in this.

(01-03-2014 05:42 AM)Seriously Unserious Wrote:  If that were to be the way Dwelvers went, I'd say a sort of "creature creater" type of tool, similar to what was used in Spore would be a good idea. Most modders are not 3d animators and creating new creatures from scratch would be way over the heads of most people, but a tool like this would allow even the most inept graphic artists to create creatures by using a pre-designed set of parts that we could colour, stretch, size, disassemble/reasimble and shape in different ways to create creatures from already designed parts. That need not stop skilled 3d artists and animators from adding new parts or fully self-made custom creatures, but would enable the non-3d artists to join the fun too.

What will be needed is 3dsmax, and some basic knowledge in 3d modelling. For exporting animations and bonestructures of the creatures I will include a max-script file that the user can use to export these information. For the items all that is needed is to be able to model the item, and then position the "handler" I mentioned above. The export for the handler is also scripted in max script so I will include that one as well.

For people wanting to use other 3D programs when modelling and animating this is definitely possible if someone would convert the max script files I include. It is like this:

A max script file is used for scripting in 3dsmax and being able to export data from the models to a file. Some files like 3ds and others may be missing some of the information that I need to include about the object in the game, therefore I had to make a custom exporter. These are not hard to use, it is just a tool that you select when exporting a model to get its data exported in the right way.

Here is an example of the HandleExporter max script file:
Code:
if (selection.count == 0) do
(
    messagebox "No objects selected." title: "Export failed"
)
if (selection.count > 0) do
(
    out_name = GetSaveFileName caption:"Save handle" types:"Handle (*.hdl)|*.hdl"
    if out_name != undefined do
    (
        axis = $.transform
        out_file = fopen out_name "wb"
        WriteFloat out_file axis.row4.x
        WriteFloat out_file axis.row4.y
        WriteFloat out_file axis.row4.z
        WriteFloat out_file axis.rotation.x
        WriteFloat out_file axis.rotation.y
        WriteFloat out_file axis.rotation.z
        WriteFloat out_file axis.rotation.w
        WriteFloat out_file axis.scale.x
        WriteFloat out_file axis.scale.y
        WriteFloat out_file axis.scale.z
        fclose out_file
    )
)

What it does is just exporting some values to the file that the user want to save. These are:
  • Location of the object (x, y, z) = 3 float values.
  • The rotation quad of the object (x, y, z, w) = 4 float values.
  • The scale of the object (x, y, z) = 3 float values.

If anyone wants to create an handle exporter in another 3D program and have some knowledge in how to create exporters I am sure that they can do it very easily Smile
01-03-2014 03:38 PM
Find all posts by this user Quote this message in a reply
TacticBlack Offline
Tactical Dungeoneer
Dwelvers Voice Actors

Posts: 108
Joined: Feb 2014
Reputation: 25
Post: #8
RE: Item moding
What do you think of a creature combiner like the one we discussed above Ras? One with different parts the user can place onto a customizable frame and customize further once on the frame Etc...
[Image: i563hs.png]
No Money, No Poverty, No Crime, No Politicians, No Corruption, No Social Stratification, Strength Based Education, Global Democracy, and True Equality.
A New Social Paradigm: Only Impossible Because of Your Attitude; Only Possible with Your Aspiration Towards a Better World.
You can't spell Humanity without Unity.

01-03-2014 10:27 PM
Find all posts by this user Quote this message in a reply
Rasmus Offline
Main developer of Dwelvers
Dwelvers Developers

Posts: 3.619
Joined: Sep 2013
Reputation: 502
Post: #9
RE: Item moding
It would be fun having a creature combiner, but making something like Spore creatures is unfortunately more than my knowledge of modelling have to offer and it would probably not look so good to be honest.
03-03-2014 05:21 PM
Find all posts by this user Quote this message in a reply
Seriously Unserious Offline
The Ninja Dinosaur

Posts: 1.607
Joined: Jun 2013
Reputation: 69
Post: #10
RE: Item moding
I guess that's something for a later project when you have the money to hire people to do that for you.
[Image: 11619898803_7d3a89e6bd_n.jpg]
The Golden One!
04-03-2014 03:39 AM
Find all posts by this user Quote this message in a reply
Xiemas Offline
Dark Side Member

Posts: 359
Joined: Dec 2013
Reputation: 13
Post: #11
RE: Item moding
This is not my part of dwelvers because I'mbad at this but I have noticed for like the orc can wield like solething big but if the rogue wields it because he has small leggs it maybe puts part of it in the ground.

But great Rasmus only not my section.
Pyramid of Live
[Image: kEbemdH.png]
04-03-2014 12:28 PM
Find all posts by this user Quote this message in a reply
Rikus Khan Offline
Antroot Farmer

Posts: 94
Joined: Dec 2013
Reputation: 13
Post: #12
RE: Item moding
Does this mean I can finally get someone to Pimp My Imp???
Code:
[insert witty text here]
05-03-2014 03:42 AM
Find all posts by this user Quote this message in a reply
Seriously Unserious Offline
The Ninja Dinosaur

Posts: 1.607
Joined: Jun 2013
Reputation: 69
Post: #13
RE: Item moding
(05-03-2014 03:42 AM)Rikus Khan Wrote:  Does this mean I can finally get someone to Pimp My Imp???

well, let us know what you want in the Imp Uniforms topic. Wink

There was also some discussions on pimping imps in this thread.
[Image: 11619898803_7d3a89e6bd_n.jpg]
The Golden One!
05-03-2014 08:25 AM
Find all posts by this user Quote this message in a reply
Rasmus Offline
Main developer of Dwelvers
Dwelvers Developers

Posts: 3.619
Joined: Sep 2013
Reputation: 502
Post: #14
RE: Item moding
(04-03-2014 12:28 PM)Xiemas Wrote:  This is not my part of dwelvers because I'mbad at this but I have noticed for like the orc can wield like solething big but if the rogue wields it because he has small leggs it maybe puts part of it in the ground.

But great Rasmus only not my section.

Yeah, I figure not everyone will find this directly useful, but I am sure that if people start to mod the game all people that could download the mods would have use for it Big Grin

(05-03-2014 03:42 AM)Rikus Khan Wrote:  Does this mean I can finally get someone to Pimp My Imp???

You sure can Big Grin
05-03-2014 09:38 AM
Find all posts by this user Quote this message in a reply
Rasmus Offline
Main developer of Dwelvers
Dwelvers Developers

Posts: 3.619
Joined: Sep 2013
Reputation: 502
Post: #15
RE: Item moding
As the particle and projectile effects now is a part of the item moding I wanted to expand this topic a little. All items can now call on the particle effects by adding this code into the item xml file:

Code:
(projectilemodel)cannonballprojectile.3ds(/projectilemodel)
  (projectiledamage)75(/projectiledamage)
  (projectilerotationX)250(/projectilerotationX)
  (projectiledamageradius)100(/projectiledamageradius)
  (projectilefiresound)CannonFire(/projectilefiresound)
  (projectilehitsound)CannonBallExplosion(/projectilehitsound)
  (projectileparticles)CannonBallProjectile(/projectileparticles)
  (projectilelight)255,196,64,128,1500(/projectilelight) (!--r,g,b,shine (0-255), radius / 1000--)
  (projectilehitparticles)CannonBallExplosion(/projectilehitparticles)
  (projectilehitlight)255,196,64,128,5000(/projectilehitlight) (!--r,g,b,shine (0-255), radius / 1000--)
  (projectilefireparticles)CannonBallFire(/projectilefireparticles)
  (projectilefirelight)255,196,64,128,2500(/projectilefirelight) (!--r,g,b,shine (0-255), radius / 1000--)
  (projectilespeed)3000(/projectilespeed)
  (lifetime)10000(/lifetime)
  • (projectilemodel) - What model the item will use when it behaves as a particle, if no model is named here it will use the standard item model.
  • (projectiledamage) - How much damage the projectile does in % of the creature melee damage, or of the damage the projectile gets at initialization. To clarify, when the cannon shoots it may input the damage 20 to the projectile and when the projectile hits its target it will do 75% damage of 20 = 15 damage to the target. If a creature throws a item it will maybe input 40 as damage to the projectile as it is its core melee damage and the when the projectile hits is will only do 30 damage.
  • (projectilerotationX) - X spin of the projectile.
  • (projectilerotationY) - Y spin of the projectile.
  • (projectilerotationZ) - Z spin of the projectile.
  • (projectiledamageradius) - If the projectile hits/explodes it will damage all creatures within this radius.
  • (projectilefiresound) - The wav sound the projectile will do when it is getting fired.
  • (projectilehitsound) - The wav sound the projectile will do when it hits the target.
  • (projectilefireparticles) - The particle package the projectile will use when getting fired.
  • (projectilefirelight) - The light the projectile emits when getting fired.
  • (projectileparticles) - The particle package the projectile will use during its flight.
  • (projectilelight) - The light the projectile emits during its flight.
  • (projectilehitparticles) - The particle package the projectile will use on hit.
  • (projectilehitlight) - The light the projectile emits on hit.
  • (projectilespeed) - The speed of the projectile.
  • (lifetime) - The lifetime of the projectile.

The item moding has actually expanded a lot as it can be used for more than just being an item. For example, I do have a "UnBakedBread.xml" file available as well, this item is only used to display unbaked bread on the baking table.

The user could also create an item named fireball and adding fireball particles to it and giving it fire damage and explosion and everything and have the creatures throw this item.

Another fun idea is to set the projectile speed to 0 and just let it live out its lifetime, if an enemy walks into the projectile while it is standing still it will hit him, and in this way work as a trap.

This will of course need to be expanded a lot more for more advanced spells, but I think it is a good start Smile
09-03-2014 12:59 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)


© 2013-2017 Dwelvers | Contact