Modding Creature modding
#1
So I will try to get better on talking about what it is I am doing to the game right now, so that your suggestions can have more direct impact on the current progress of the game.

Two days ago I started to add more creature to the game, but when I did I got a little bit mad on how I have designed it. Even if all the creatures each and one of them have their own class they properties are still hardcoded. And this will definitely be a issue when we get more and more creatures into the game as the code will grow in size until it starts to be unmanageable.

I have said before that I wanted to start with giving scripting availability to certain buildings in the dungeon, but as the buildings can be really hard to do as they have a lot of unique behaviours I decided to start with the creatures.

The goal is that the player will be able to actually add creatures to the game by adding xml files into a creatures folder. So with the next release the player will be able to see a imp.xml, orc.xml and so on. All of these files containing all the models and animations this creature have, and also what the creature can do, and what race he belongs to and so on. So nothing about the creatures will be hardcoded with other words.

I am about 30% finished with this, and I suspect that it will take a couple of days more to get it finished.

An example on how a rogue for example could be added would be something like this:

- Add rogue.xml to the creature folder.
Edit rogue.xml:

Code:
(Creature)
    (FilePath)creatures\rogue\(/FilePath)
    (LanguagePack)RogueLanguage.xml(/LanguagePack)
    (Model)rogue.skin(/Model)
    (TextureColor)RogueColor.png(/TextureColor)
    (TextureSpec)RogueColor.png(/TextureSpec)
    (TextureNormal)RogueColor.png(/TextureNormal)
    (AnimationStand)
        (File)standing.anim(/File)
    (/AnimationStand)
    (AnimationAttack)
        (File)attack.anim(/File)
        (Chance)75(/Chance)
        (Attack)
            (Frame)15(/Frame)
            (Power)20(/Power)
            (HitProb)12(/HitProb)
        (/Attack)
        (Sound)
            (File)swing.wav(/File)
            (Frame)5(/Frame)
        (/Sound)
    (/AnimationAttack)
    (AnimationAttack)
        (File)attack2.anim(/File)
        (Chance)25(/Chance)
        (Attack)
            (Frame)10(/Frame)
            (Power)40(/Power)
            (HitProb)8(/HitProb)
        (/Attack)
        (Sound)
            (File)swing2.wav(/File)
            (Frame)5(/Frame)
        (/Sound)
    (/AnimationAttack)
    (CanDig/)
    (CanEat/)
    (CanClaimPath/)
    (Health)20(/Health)
    (Strength)40(/Strength)
(/Creature)

This is just a very small example on what I had in mind and not all the of the animations and abilities are presented here. But I think it can give a idea on what it is I am trying to accomplish, and that is something that is easily read and modified.

You may have noticed that I used the variable (AnimationAttack) twice, this is so that the player can create some variations in the creature animations. And the probability for this animation to get selected depends on the (Chance) variable. So having several animation for one action will work with everything, not just attacking. All animations will also have sounds connected to their keyframes as seen in the example; When the attack animation reaches the frame 5 the swing.wav will get activated.

Some of you may think that this will limit the variations and uniqueness of the creatures. But I will make sure so that no behaviour and animation will get left behind when making this update.
Reply
#2
Hehe, this look like suggestion templates, but totally is about everything actually built a creature now in the game. }:])

That's good news especially for people who would like to see their ideas in game just by adding their to the game and then test if the idea is really good. Wink

Of course thanks to this we could work with community on which codes should built a creature, but I think as more features will be implemented as creature folders will be more and more expanded of code lines.
Spec: Win 10, ATI 7800 HD, res: 1280x1024x75. I support The Venus Project & Resource-Based Economy
Reply
#3
Very true, to be honest I haven't done that much scripting myself, so once I get the basics in there I could need all the help I can get.
One thing I really want to introduce is not only having something like "attack 50". But instead so that the player can script code on certain actions. Lets say that when attack1 is executed then it will follow a code that the player writes like this:

Code:
(Attack1)
    (Damage)50(/Damage)
    (If)
        (Level)>=5(/Level)
        (RandPercentage)50(/RandPercentage)
        (Then)
            (Poison)50(/Poison)
        (/Then)
    (/If)
(/Attack1)

Which means that the attack normaly does 50 damage, but if the creature has a level higher or equal to 5 then he have a 50% chance to poison the enemy as well.
Reply
#4
This is really cool. This will definitely increase the replay value of the game if we can add content of our own. If I'm understanding this right, you could feasibly create a completely different game with this piggy backing on the game engine you made. You could redesign the rooms and characters for whatever you wanted like a game based on a group of miners that dug too deep into the earth in a more modern setting and find themselves under attack from demons from the underworld for instance.
Reply
#5
Yeah, but it will probably have some limitations to begin with, many of the rooms are pretty complex in the code and it will take some time to make them script-able. The iron smelter is a good example for this as there are many stages that interacts with the workers as well. But I think moding the creatures is a good start to get it all going, once that works well I will move on to the buildings Smile

Even if it is possible to mod the creatures they will probably have some standard actions in there like walking, running, attack, getting hurt and more things like that. I will try not to make it to limited, but I have to start somewhere Smile
Reply
#6
This is an awesome addition. Modability is great. Smile +1 Ras.
[Image: 11619898803_7d3a89e6bd_n.jpg]
The Golden One!
Reply
#7
This is great news and an awesome update Rasmus!!
Code:
[insert witty text here]
Reply
#8
Wow, this is an awesome addition.

I love the way where you're going Rasmus! +1
Reply
#9
This is great! I love it!

Rasmus +1 Big Grin
Pyramid of Live
[Image: kEbemdH.png]
Reply
#10
This news is so good it's worth a 2nd +1, Ras

Hell, it even got Xiemas back to posting again, this place just hasn't been the same without regular posts from our dark side member. Smile
[Image: 11619898803_7d3a89e6bd_n.jpg]
The Golden One!
Reply
#11
You really want me back Wink you're posting everywhere about me. I get it,I get it Big Grin I don't know why I left, this is fun!

To make sebt happy I'll post something about this thread.

Are you going to make it for maps to? Or how do you save maps when someone edits it and saves it. Ok hmm maybe this is for another thread Smile
Pyramid of Live
[Image: kEbemdH.png]
Reply
#12
hmm, must be, yes, a level editing thread, sounds good to me. Smile
[Image: 11619898803_7d3a89e6bd_n.jpg]
The Golden One!
Reply
#13
Welcome back Xiemas Wink
Reply
#14
Oooh thnx Wink its fun here why did I left
Pyramid of Live
[Image: kEbemdH.png]
Reply
#15
well done, simple and concise but very appealing through customization. +1 for sure.
[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.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)