How to modify kick's effects?

Users who are viewing this thread

NordArcher

Sergeant at Arms
I want it to push the person farther, and eventually make them fall (as if charged by a horse). I also want to make it faster. How?
 
It'll be difficult. You could (I guess) mod the stun animation, giving it a longer stun time, or, if Warband allows, moving the agent? Or is it as in 1.011, where you must end teh animation on the exact same spot...?
 
No ****, Sinisterius. I just happen to suck at modding a module system with an incomplete documentation and functions that aren't even functions. For example this:
(faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive),
      (assign, "$g_player_luck", 200),
      (troop_set_slot, "trp_player", slot_troop_occupation, slto_kingdom_hero),
      (store_random_in_range, ":starting_training_ground", training_grounds_begin, training_grounds_end),
      (party_relocate_near_party, "p_main_party", ":starting_training_ground", 3),
      (str_store_troop_name, s5, "trp_player"),
      (party_set_name, "p_main_party", s5),
      (call_script, "script_update_party_creation_random_limits"),
      (assign, "$g_player_party_icon", -1),

No, i didn't remove what's before the (). And yes, those are instructions. Now tell me, what kind of ****ing instructions are these?
Let's have a look at some decent code.

printf("this is sparta\n no this is %s", input);

Here, in green you see the function you're calling. Then under () there's the variables you're sending it. As opposed to this ****ty module system that calls no function at all. In this case, there's a string ("this is sparta\n no this is %s") with a special character "%s" that indicates there's a string inside the string. "input" is the string that will appear instead of %s, and it's just the name of a char table (aka string).

This is some decent code, unlike that **** that the module system uses and that corresponds to nothing, and only serves one purpose: piss me off.

Yeah, i used the printf function but i could have used anything else, for example this imaginary function:

#include <somelibrary.h>

int crappyfunction (int numberone, int numbertwo);

int main(){
    scanf ("%d", numberone);
    scanf ("%d", numbertwo);
    printf ("Here's your multiple :D!!!!!!!!!!!! %d", crappyfunction(numerone, numbertwo))
}

int crappyfunction (int firstnumber, int secondnumber){
    return firstnumber*firstnumber;
}

This might do nothing usefull but at least it's understandable! Gah anyways i'm gonna do a ranting thread somewhere about this ****ty module system.




 
To be a bit more specific than the previous posters, the behavior of kick is hardcoded, but you could write a script that adds further functionality. The script would monitor for the kick button to be pushed and then do whatever you command the script to do (for instance, check for nearby enemy agents, if an enemy agent is within X meters and X degrees from the player's position then do something) BUT this would be in addition to the hardcoded script functionality; it would not supersede or change that behavior. So, if you scored a hit with your kick, the kick would hit AND your script would fire...though you could put in a check for if the enemy agent is 'in parried animation' or has recently been hit, I suppose. It would get decently complex. But the bottom line is you would not be modifying the behavior of kicking...just augmenting it.

EDIT after cross-post with NordArcher: Perhaps I shouldn't have bothered to reply in the first place...or to make this edit...but ranting quite so intensely simply because the module system programming language is not Python seems...odd...to say the least.

If you can understand Python, picking up the module system will be no problem. Study the code others have posted, look at header_operations and figure it out. Ask questions where you need to. You can call functions in the module system--they are called scripts and you do so using the (call_script, "script_script_name", argument1, argument2, argument3), operation. That script can then output whatever arguments you want it to output.

As for the snip of code you have posted, it is read as follows:
Line 1: Set the arrayed faction variable "faction state" for the player's faction to "Inactive"
Line 2: Set the global variable "player luck" to 200
Line 3: Set the arrayed troop variable "occupation" for the player to "kingdom hero"
Line 4: Use the random number generator to pick a random training ground
Line 5: Move the player's party to the training ground picked randomly above
Line 6: Record the player's name in string #5
Line 7: Retitle the player's party to "string #5's party"...or "Player Name's Party"
Line 8: Go to the script "update party creation random limits" and do whatever that script says to do
Line 9: Set the global variable "Player party icon" to -1

Now, I'm not saying that there aren't inherent limitations to the module system's code (the inability to create arrays and array variables cleanly and then iterate through them being the biggest pain for me)...but simply complaining that it is a different coding language than the one you readily understand doesn't get anyone anywhere.
 
Meh. I'm really confused at what you're ranting. M&B's scripting language is easy & straight-forward.
(val_add, ":variable_1", ":variable_2"), = int ValAdd( int variable_1, int variable_2) { return variable_1 + variable_2; }



The logic for a self-created kick.
1) Make a trigger.
2) Check for key press in conditions block. (Aka the if( <TheFollowingStuffIsTrue> ) { <run other code< } ).

Now you have two options. Make it the simple way or the hardy way.
3-simple) Loop through agents, get closest agent to kicker agent (using minimum distance, of course), if the distance is sufficient then set animation and position of kicked agent backwards.
3-hard) Use player/agent (if you're feelin' creative and want to optimize it, use scene props slots) slots to periodically modify the position of the kicked agent backwards (using triggers, again).

It is, really, very simple to do.
 
Back
Top Bottom