Magic or AOE

正在查看此主题的用户

cakuyan

Recruit
Hi folks, is there any mod that enables me to deal AOE damage with i.e. a longsword? or magic that deals AOE damage like in phantasy calradia?
I'm playing the floris mod and would like to be the only one that can use magic / AOE damage, for the purpose of fast killing my enemies.
Would also appreciate any link to the relevant tutorials

Thanks in advance.
 
There are mods that implement magic, but figuring out how they do it may not be worth the effort if you only need a quick fix. Giving some weapons (say, 2H) AoE damage when wielded by the player is probably the easiest way to do it.
Some quotes from Lav's header files to point you in the right direction:

header_triggers.py
插入代码块:
ti_on_weapon_attack           = -51.0 # Agent has performed an attack with this item. Does not fire on client side in multiplayer missions.
    # trigger param #1 = attacking agent_id
    # pos1             = weapon item position
插入代码块:
ti_on_agent_hit               = -28.0 # Agent has been damaged with a weapon attack. Does not fire on client side in multiplayer missions.
    # trigger param 1 = damage inflicted agent_id
    # trigger param 2 = attacker agent_id
    # trigger param 3 = inflicted damage
    # trigger param 4 = hit bone
    # trigger param 5 = item_id of missile used to attack (if attack was with a ranged weapon)
    # reg0            = weapon item_id
    # pos0            = position of the hit area, rotation fields contain the direction of the blow
    # If (set_trigger_result) is used in the code with operation parameter equal or greater than zero, it will override the inflicted damage.

header_operations.py
插入代码块:
agent_deliver_damage_to_agent            = 1722  # (agent_deliver_damage_to_agent, <agent_id_deliverer>, <agent_id>, [damage_amount], [weapon_item_id]),
                                                 # Makes one agent deal damage to another. Parameter damage_amount is optional, if it is skipped or <= 0, then damage will be calculated using attacker's weapon item and stats (like a normal weapon attack). Optional parameter weapon_item_id was added in 1.153 and will force the game the calculate the damage using this weapon.

What you would have to do is add a trigger to either the items you want to use it with, or the mission templates you want to have it in, and then use agent_deliver_damage_to_agent to hit everyone around the player if the right conditions are met (it was in fact the player agent who attacked, the target is closer to the player than weapon range, and the item is one of those that do AoE damage).
Beware, though: The secondary attacks might call the trigger again, getting you into a cycle that could cause infinite damage and/or crash the game. You might have to set some global variable that prevents calling the trigger when dealing secondary damage, or otherwise make sure that each agent only gets one hit.
 
后退
顶部 底部