Author Topic: Spear Bracing Kit (Updated)  (Read 20129 times)

0 Members and 1 Guest are viewing this topic.

FrisianDude

  • Coitus non Awesome
  • Grandmaster Knight
  • *
  • ... and let's keep this as civil as possible
    • View Profile
  • Faction: Neutral
  • MP nick: OLL_SirAndelot/Warden Leo
  • M&BWB
Re: Spear Bracing Kit
« Reply #15 on: April 10, 2009, 03:19:20 AM »
Now it might be that it's because it's 4:17 in the morning, but I can't think of where to put all this script. Ofcourse, if it's obvious I'll be angry at myself when I wake up, but I honestly can't think of it now.  :?
Nords ruled by King Ragnar, Khergits ruled by Sanjar Khan, Rhodoks ruled by King Graveth, Swadians ruled by King Harlaus, Vaegirs ruled by King Yaroglek. All those peoples live, fight, and die in the continent of Calradia. The Nords and Rhodoks field solely infantry and archers, the Swadians and Vaegirs have infantry, archers and cavalry and the Khergit field almost exclusively cavalry. No such things as "infarty" or "calvary" exist. A nice link to my mod ;)

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #16 on: April 10, 2009, 03:40:30 AM »
There are pieces missing (like slot definitions).  Wait a bit, I think TheMercenary will be fixing it up soon.

FrisianDude

  • Coitus non Awesome
  • Grandmaster Knight
  • *
  • ... and let's keep this as civil as possible
    • View Profile
  • Faction: Neutral
  • MP nick: OLL_SirAndelot/Warden Leo
  • M&BWB
Re: Spear Bracing Kit
« Reply #17 on: April 10, 2009, 11:26:12 AM »
Oh, right. See, that's what I meant whith my previous post, same things has been asked before.
Nords ruled by King Ragnar, Khergits ruled by Sanjar Khan, Rhodoks ruled by King Graveth, Swadians ruled by King Harlaus, Vaegirs ruled by King Yaroglek. All those peoples live, fight, and die in the continent of Calradia. The Nords and Rhodoks field solely infantry and archers, the Swadians and Vaegirs have infantry, archers and cavalry and the Khergit field almost exclusively cavalry. No such things as "infarty" or "calvary" exist. A nice link to my mod ;)

Merlkir

  • Grandmaster Knight
  • *
  • Obnoxious *******.
    • View Profile
    • My blog about swords and stuff.
  • Faction: Neutral
  • M&BWB
Re: Spear Bracing Kit
« Reply #18 on: April 10, 2009, 11:45:01 AM »
O_o this is pretty awesome.
Don't make me get all Merlkir on your ass.
When I was 12yo I killed a doberman leaping at me with a roundhouse kick.

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #19 on: April 10, 2009, 12:07:58 PM »
There are pieces missing (like slot definitions).  Wait a bit, I think TheMercenary will be fixing it up soon.

It wouldn't be hard to add the agent slots yourself.  All the code goes near the top of the mission_templates.py file (where the other pre-defined triggers are), then you use the one line calls in your mission_templates tuples.


Berserker Pride

  • Grandmaster Knight
  • *
  • Fearless Scripter of the Berserk Mod
    • View Profile
  • Faction: Vaegir
  • MP nick: CoR_Berserker
  • WB
Re: Spear Bracing Kit
« Reply #20 on: April 10, 2009, 05:44:31 PM »
hey jik,

when you say the predefined triggers do you mean the pilgrim_disguise trigger and the af_castle_lord trigger so the code goes right below those two?
I'm not a very experienced coder what are the agent_slots slot definitions and where would they go? I understand what you are saying about only needing to list the nine triggers in the separte mt battle tuples though.

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #21 on: April 10, 2009, 09:05:42 PM »
hey jik,

when you say the predefined triggers do you mean the pilgrim_disguise trigger and the af_castle_lord trigger so the code goes right below those two?
I'm not a very experienced coder what are the agent_slots slot definitions and where would they go? I understand what you are saying about only needing to list the nine triggers in the separte mt battle tuples though.

Yup, right there would work.  Anywhere between there and above:

mission_templates = [

then in the templates you want to be able to use it (such as with the charge mission_template) you need to add the constant names with the other triggers.

The agent slots go in the module_constants.py.  Search for agents, the area is clearly marked.

MISHO

  • Knight at Arms
  • *
  • Permanently Banned
  • Im the one whos gonna beat your ass, hows it goin?
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #22 on: April 11, 2009, 11:58:30 AM »
is there any way to know how to put it to a specific unit (or item and then assign the item to that unit? and make it unique?)

Lord Leoric of Wercheg

  • Grandmaster Knight
  • *
  • Self-interest above all else
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #23 on: April 11, 2009, 12:10:28 PM »
You can assign which weapons could brace, it clearly says so in Merc's first post. You could make, the item(s) unique but my question is why?
You willingly live in Japan, your opinion is invaid.

You can't spell, your opinion also is invalid.
Don't like it? Suck my dick. Like it? Suck my dick. So-so? Harder!

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #24 on: April 11, 2009, 02:50:45 PM »
You could make the item unique to a specific troop which would mean that only a specific troop can use the option...

If you look at the code, they check for the weapon(s) allowed to be used.  Adjust that to only be the weapon(s) you want to use the spear brace, such as pikes.

Leopardo

  • Sergeant Knight
  • *
  • AwOOOOUUUUuuuuu AwOOOOuuuuuuuu
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #25 on: April 11, 2009, 03:12:16 PM »
Ummm define brace please?
I don't see what bracing a weapon would look like (and its utility) :roll:

sorry, sometimes i just don't understand...

kt0

  • Knight
  • *
    • View Profile
  • Faction: Swadian
Re: Spear Bracing Kit
« Reply #26 on: April 11, 2009, 04:02:42 PM »
Ummm define brace please?
I don't see what bracing a weapon would look like (and its utility) :roll:

sorry, sometimes i just don't understand...
Bracing a polearm is an infantry tactic to prevent cavalry from crashing into their lines.  You basically take a reasonably long weapon, stick it in the ground and raise it at an angle toward the charging horsies.  If braced well, the horse and often rider will impale themselves on the weapons and have a generally bad day. 

Leopardo

  • Sergeant Knight
  • *
  • AwOOOOUUUUuuuuu AwOOOOuuuuuuuu
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #27 on: April 11, 2009, 05:12:57 PM »
oh ok, i understand now :)
thanks!

The Mercenary

  • Grandmaster Knight
  • *
  • Rest in peace, Cymro. We'll all miss you.
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #28 on: April 13, 2009, 09:30:32 PM »
Code: [Select]
get_player_agent_no                    = 1700 # (get_player_agent_no,<destination>),
get_player_agent_kill_count            = 1701 # (get_player_agent_kill_count,<destination>,[get_wounded]), #Set second value to non-zero to get wounded count. returns lifetime kill counts
agent_is_alive                         = 1702 # (agent_is_alive,<agent_id>),
agent_is_wounded                       = 1703 # (agent_is_wounded,<agent_id>),
agent_is_human                         = 1704 # (agent_is_human,<agent_id>),
get_player_agent_own_troop_kill_count  = 1705   # (get_player_agent_own_troop_kill_count,<destination>,[get_wounded]), #Set second value to non-zero to get wounded count
agent_is_ally                          = 1706 # (agent_is_ally,<agent_id>),
agent_is_defender                      = 1708 # (agent_is_defender,<agent_id>),
agent_get_look_position                = 1709   # (agent_get_look_position, <position_no>, <agent_id>),
agent_get_position                     = 1710 # (agent_get_position,<position_no>,<agent_id>),
agent_set_position                     = 1711 # (agent_set_position,<agent_id>,<position_no>),
agent_get_horse                        = 1714 # (agent_get_horse,<destination>,<agent_id>),
agent_get_rider                        = 1715 # (agent_get_rider,<destination>,<agent_id>),
agent_get_party_id                     = 1716 # (agent_get_party_id,<destination>,<agent_id>),
agent_get_entry_no                     = 1717 # (agent_get_entry_no,<destination>,<agent_id>),
agent_get_troop_id                     = 1718 # (agent_get_troop_id,<destination>, <agent_id>),
agent_get_item_id                      = 1719 # (agent_get_item_id,<destination>, <agent_id>), (works only for horses, returns -1 otherwise)

store_agent_hit_points                 = 1720 # set absolute to 1 to retrieve actual hps, otherwise will return relative hp in range [0..100]
# (store_agent_hit_points,<destination>,<agent_id>,[absolute]),
agent_set_hit_points                   = 1721 # set absolute to 1 if value is absolute, otherwise value will be treated as relative number in range [0..100]
# (agent_set_hit_points,<agent_id>,<value>,[absolute]),
agent_deliver_damage_to_agent          = 1722 # (agent_deliver_damage_to_agent,<agent_id_deliverer>,<agent_id>),
agent_get_kill_count                   = 1723   # (agent_get_kill_count,<destination>,<agent_id>,[get_wounded]), #Set second value to non-zero to get wounded count
agent_get_wielded_item                 = 1726 # (agent_get_wielded_item,<destination>,<agent_id>,<hand_no>),
agent_get_ammo                         = 1727 # (agent_get_ammo,<destination>,<agent_id>),
agent_refill_ammo                      = 1728 # (agent_refill_ammo,<agent_id>),
agent_has_item_equipped                = 1729 # (agent_has_item_equipped,<agent_id>,<item_id>),


Basically the agents. You need the deliver damage to agent, get wielded item, has item equipped...umm, just stick them all in. Override the agents with it.

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #29 on: April 14, 2009, 12:04:24 AM »
(click to show/hide)
Basically the agents. You need the deliver damage to agent, get wielded item, has item equipped...umm, just stick them all in. Override the agents with it.

I think you miss understood my initial request.  You must have defined some new slots, because you call a few that don't exist in native.  Those who try to add this with out basic knowledge of slots will never get it to work...