Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Hello Guys
I've got an another problem, to my mode.
So, I did want to modified my lords items. I'd put the game a lots of new stuff, and I want to gave them with troop editor. It looks like works, but in the game, they dont wear nothing, from my new items!!! The old items are work, but my new items not.
For example: I gave crown helmet, to King Harlus, but he doesnt wear neither in the castle, nor in the battle field, and I can't find out why?
Any idea?
 
hello

I would like to create special animations for objects in my mod.

The example of a cart with turning wheels is one of the ideas. For now it is rather distant thing to be done, as I would like to start with a bit more simple ones.

I know, some mods did that before ... like rideable chariots features.


My way of thinking, on how to manage the thing was about creating a skeleton of this object. Make the animation. Save it in already existing or in a new *.brf file. Start searching for the tutorials on how to implement this new object into the game.


So far, I have managed to look into skeletons.brf and animations hold brf files. There are some tutorials about using this files as a base for new animations. Yet, those describe only the ideas of making some new attack animations and the like.


So my question is, if any of CommonRes brf files is holding any other animations than those of humen and horses?
Or, if there is any tutorial on how to manage such a problem?
 
duck83 said:
The example of a cart with turning wheels is one of the ideas. For now it is rather distant thing to be done, as I would like to start with a bit more simple ones.
There is no point in making skeletal animations for solid objects. Just use vertex animation (like for e.g. bow models) or simply represent moving parts of an object through scene props movement (like belfry wheels)
 
Just have to ask it, as I want to be sure if those two methods you have mentioned, are useful for the idea I want to start working on.


The first step, as speaking in terms of having anything done in my project, is implementing the falling trees animations.

This is going to happen, as a result of taking a damage by a tree. Trunk gets cracked, it falls, and forms a sort of obstacle.

I know this is nooby question, but for which method tutorials should I start searching for in this case? Vertex animations or editing scene props?
 
duck83 said:
The first step, as speaking in terms of having anything done in my project, is implementing the falling trees animations.
This is going to happen, as a result of taking a damage by a tree. Trunk gets cracked, it falls, and forms a sort of obstacle.
That should be pretty easy with moving scene props. Search for "destructible scene props" on the forum. And look through destructible dummy code in module_scene_props.py in Native. It's pretty self-explanatory. I'm not sure that it will work with autogenerated trees, but you can definitely place destructible trees scene props in whatever scenes you need them by hand, using edit mode.
Ofc you would need a module system for it.
 
and again ...

I have another question, I was asking a bit earlier, about tho possibility of making destructible trees on the battle map.

Did made some progress with it. I can make every single tree I want a destructible one, giving to it some HPs.

I also looked to module_scene_props, and copied the training dummy code to use it as the one of my tree. After that, I have found some solutions on how to make these trees actualy make a fall.

Yet, I do would like to ask, if it is possible to create any kind of special collision mesh for the ground level of the area, so while setting max. angle for the tree to fall, it could stop after 'hiting the ground'?

For now, it is made this way, that when i set a high falling angle, the tree might get into the ground a bit too much.

What I wanted to achieve is a kind of group of trees, that can be demaged to that point, where they fall, and lay on the ground, being some sort of 'special' feature I'd like to have in my mod.

Other thing is, that in fact, I can set the turn angle to 180, after the tree gets destroyed, so if I was to make some sort of texture covering the bottom part of the tree's trunk, I might have quite simple effect of standing from the ground, lone, cracked in half tree trunk.

What is of concerning for me matter in here, is that I realy have no idea on how to create a trigger, working like after the tree is destroyed, another trunk is spawned, and that spawned one actualy falls, while the previous one turns 180 and starts to be as a damaged, lone standing, left, tree trunk.


Lastly, I would like to ask, for a link to a topic for setting dmg resistance for specified objects. This is as I would like to prevent situations where any of my trees might get destroyed because a typical attack hits it in any random way.
It is not a point of setting high HPs value for a tree here.
 
duck83 said:
Yet, I do would like to ask, if it is possible to create any kind of special collision mesh for the ground level of the area, so while setting max. angle for the tree to fall, it could stop after 'hiting the ground'?
It's doable. First, obtain the direction this tree falls, then create a double for tree initial position, rotate and move it towards the forementioned direction by the approximate length of the tree, using (position_set_z_to_ground_level) on the way. Compare resulting positions' Z coord with Z coord of initial tree position. This way you will obtain rougly earth profile in the direction of treefall. Calculate a needed angle of fall from that data and rotate the tree sceneprop there with animation

duck83 said:
What is of concerning for me matter in here, is that I realy have no idea on how to create a trigger, working like after the tree is destroyed, another trunk is spawned, and that spawned one actualy falls, while the previous one turns 180 and starts to be as a damaged, lone standing, left, tree trunk.
Turns 180? It's easier to move trunk scene prop from underground simultaneously with your tree falling. You can't spawn new scene props so you should store these trunks underground from the start.

duck83 said:
Lastly, I would like to ask, for a link to a topic for setting dmg resistance for specified objects. This is as I would like to prevent situations where any of my trees might get destroyed because a typical attack hits it in any random way.
It is not a point of setting high HPs value for a tree here.
AFAIR you can't control the damage sceneprops receive directly, but you can probably switch an indestructible copy of a tree prop with destructible one instantly with prop_instance_set_position, when you need it to become destructible. Store unneeded stuff underground.
 
So, how does one add an animation trigger?  So that when a key is pressed, it would enact this animation?

And in (0, 0, 0,[(key_clicked, key_<>), what would control be? 

ctrl?
 
COGlory said:
So, how does one add an animation trigger?  So that when a key is pressed, it would enact this animation?
And in (0, 0, 0,[(key_clicked, key_<>), what would control be? 
ctrl?
Look in header_triggers.py for all the available key codes.
I assume you know how to write basic triggers. Then put (agent_set_animation, ":agent id", "anim_whatever_animation") in consequences block of the key_clicked trigger, defining properly what particular agent you want to make perform before calling the anim
 
So far I have this:

crouching = (0, 0, 0,[(key_clicked, key_left_control),  ## show the string
            (agent_set_animation, ":agent", "anim_crouch"),
], [])

and it compiles correctly.  Now I must simply test it out.  :grin:
 
There's no reason why it wouldn't work. You'll need to make sure the animation flags on that animation are right though, to make sure the player can't move. Unless you wanna implement the moving crouch animation of course, but that might take a bit more code.
 
And more animations.  Of course it didn't work though.  I know I have to put it in the individual missions, but I don't know exactly what to put...

 
COGlory said:
So far I have this:
crouching = (0, 0, 0,[(key_clicked, key_left_control), (agent_set_animation, ":agent", "anim_crouch"),], [])
I do not see where you define ":agent" local var value, and do not know what agent relates to the 0 pointer value.
Add (get_player_agent_no,":agent"), before calling anim, and it will work as intended in all the cases
 
Hmm...I'll do that.  I'm new to this sort of thing, everything I've done before was just calling previously written things. 

Out of curiosity, do I have to call the trigger for each individual mission?  Such as lead_charge?
 
Status
Not open for further replies.
Back
Top Bottom