OSP Code Combat [WB, SP] Order: Volley Fire!

Fredwin

Recruit
Best answers
0
I don´t know whats my problem, but i can´t get this to work, maybe i just don´t get the exact position for the lines...
Could you just upload the modified .py files or the .txt files? Would be awesome for untalented modders like me!  :mrgreen:
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
Vympel said:
If only i can put this in my mod without using python.... Awsome code.
Fredwin said:
I don´t know whats my problem, but i can´t get this to work, maybe i just don´t get the exact position for the lines...
Could you just upload the modified .py files or the .txt files? Would be awesome for untalented modders like me!  :mrgreen:
If you want this in a near-Native implementation, then I'd suggest simply getting my Pre-Battle Orders & Deployment mod. This is included there with a number of other new orders, graphically incorporated into the F-key order menu, as well as completely optional battle AI changes and additional features (all include on/off toggles in a camp menu mod options or can simply not be chosen from the pre-battle menu). PBOD is also packaged with Diplomacy or Diplo and Custom Commander in Bismark's Native Mod Compilation, or in the Floris Expanded Mod Pack.

If you aren't looking for a Native implementation, then providing the compiled files wouldn't be particularly helpful.

joseph590 said:
question were does the incluse mission template go?
As per the OP, drop the trigger declarations (everything in the mission template triggers spoiler) somewhere near the top of the file, say just under the pilgrim outfit definition, and then add them to the end of the various mission templates you want them used in. Lead charge, for instance. Find the end of the template for lead charge (find lead charge, then scroll all the way down until you come to the next template start "village_something something", then scroll back up to find the closing bracket and parentheses for lead charge and add the trigger as directed in the OP).
 

DOMA_

Knight
Best answers
0
Is this compatible with 'Multiplayer'..?

And do you hav any cool ideas that 'AI tactics'  can be used on 'Multiplayer..'?
 

Crossbow Joe

Grandmaster Knight
M&BWB
Best answers
0
Sorry to post so late, but I know I have done something horridly wrong and I am not sure what it is
Here is what happens when I compile
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting troops data
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 5, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_mission_templates.py", line 2536
    order_volley_triggers = [
                          ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
Any ideas?
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
DOMA_ said:
Is this compatible with 'Multiplayer'..?

And do you hav any cool ideas that 'AI tactics'  can be used on 'Multiplayer..'?
Since it uses team_slots to track things, it could be made compatible with multiplayer. The tricky part that would need to be changed would be getting the order given to the correct team. I've not done any MP coding, but it should definitely be possible.

oliver255 said:
Does this work for original?
No, this script uses Warband-introduced operations (it will work for WFaS, however).

Crossbow Joe said:
Sorry to post so late, but I know I have done something horridly wrong and I am not sure what it is
Here is what happens when I compile
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting troops data
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 5, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_mission_templates.py", line 2536
    order_volley_triggers = [
                          ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\New Elgante\New Elgan
te Source Code\module_scripts.py", line 48203, in <module>
    (agent_get_item_slot, ":item", ":agent", ":i_slot"),
NameError: name 'agent_get_item_slot' is not defined
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
Any ideas?
The only reasons I can think of for agent_get_item_slot not being defined is if you are using Warband pre-1.134 (or somehow your header_operations is messed up).
 

Lynch

Regular
Best answers
0
Any easy way to change time between volleys?
Between crossbow volleys, to be precised, for I´ve managed to implement it in WFaS, but some of my musketeers fire without wait the less skilled (they fire once every five seconds, thats correct, but some of them take more than five seconds to reload).

Awesome script, by the way :grin:. It makes gunpowder war much more spectacular, thank you very much! :smile:
 

Somebody

Code Pope
Baron
WBWF&S
Best answers
1
Code:
            (try_begin),
                (eq, ":volley_wpn_type", itp_type_bow),
                (assign, ":delay", 3),
            (else_try),
                (eq, ":volley_wpn_type", itp_type_crossbow),
                (assign, ":delay", 5),
            (try_end),
 

Crossbow Joe

Grandmaster Knight
M&BWB
Best answers
0
Caba`drin said:
The only reasons I can think of for agent_get_item_slot not being defined is if you are using Warband pre-1.134 (or somehow your header_operations is messed up).
I'm afraid its the former, when I started my mod it was on 1.132 and since then it has been tweaked slightly to accommodate 1.143. I was aware that 1.134 added new scripting abilities, but not being much of a scripter myself I didn't think that it would be worth the time upgrading. Presumably it is no easy task and this is probably not the thread for it. But how can I make my code compatible with these new scripts?
If its too hard then don't worry, I can live without it
 

Lynch

Regular
Best answers
0
Somebody said:
Code:
            (try_begin),
                (eq, ":volley_wpn_type", itp_type_bow),
                (assign, ":delay", 3),
            (else_try),
                (eq, ":volley_wpn_type", itp_type_crossbow),
                (assign, ":delay", 5),
            (try_end),
Great, thanks! :smile:

Haha, a bit ashamed it was under my nose and I didnt see it... Dont blame me, it was like 5AM when I asked it XD
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
Crossbow Joe said:
Caba`drin said:
The only reasons I can think of for agent_get_item_slot not being defined is if you are using Warband pre-1.134 (or somehow your header_operations is messed up).
I'm afraid its the former, when I started my mod it was on 1.132 and since then it has been tweaked slightly to accommodate 1.143. I was aware that 1.134 added new scripting abilities, but not being much of a scripter myself I didn't think that it would be worth the time upgrading. Presumably it is no easy task and this is probably not the thread for it. But how can I make my code compatible with these new scripts?
If its too hard then don't worry, I can live without it
Are you running 1.134+ Warband?
If so, then just use the header_operations.py file from the version of Warband you are running and it will be compatible. If not, then you'll need to loop through the equipment and find the appropriate items in a bit more complicated way--which we can talk about if necessary.
 

Crossbow Joe

Grandmaster Knight
M&BWB
Best answers
0
Caba`drin said:
Are you running 1.134+ Warband?
If so, then just use the header_operations.py file from the version of Warband you are running and it will be compatible. If not, then you'll need to loop through the equipment and find the appropriate items in a bit more complicated way--which we can talk about if necessary.
Okay I did that, thanks for telling me how to upgrade the source code.
But now I can't seem to add it the same way I did before. I have forgotten what I did. I have read through the instructions several times but can't seem to work out what I am supposed to do for Mission Templates, and I keep getting errors because I am doing it wrong.
I am guessing I am not supposed to actually add
"+ order_volley_triggers," to the mission template?
Basically I have done this:
I added the large block of code in between multiplayer and common, that does not seem to error.
It is this that does and looking at it I can tell that it is completely wrong, but I have no idea what I am supposed to add here :???:
Code:
 (
    "lead_charge",mtf_battle_mode,charge,
     bla bla bla..............

      common_battle_order_panel,
      common_battle_order_panel_tick,

    ], + order_volley_triggers,
  ),
The other way I did it was actually adding in that slab of code there, but it has a problem with the equals sign.
I'm hopeless at this, could you tell me how I can add it?
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
@Crossbow

The only problem with what you posted is the comma after the bracket and before the +

It should read:

Code:
    ] + order_volley_triggers,
  ),
Then, just be sure your order_volley_triggers = [ ] is up with the other common trigger declarations.
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
King85 said:
is there any way to change which keys are associated with the order(s)?
In the version of the code that is in the OP, change the section in the spoiler marked module_constants to point to a different key.
 

King85

Squire
WB
Best answers
0
Caba`drin said:
King85 said:
is there any way to change which keys are associated with the order(s)?
In the version of the code that is in the OP, change the section in the spoiler marked module_constants to point to a different key.
is there any way to do it without python? just to give you an understanding of my situation, im playing the 1776 mod and it has volley fire incorporated into it but when i try to use the order through the function keys, it doesn't work. so i'm basically trying to change the orders from being used by the function keys to some other key on my keyboard.