OSP Code Combat Deployable Pavise Shield (Multiplayer 6/6/2010)

Dawiduh

Squire
WB
Best answers
0
I ad to change the deploy key from g to k just to be sure to avoid the dropping weapon issue. The thing is it simply doesn't work no matter the key. Otherwise the shield is, ok, usable, wearable, etc. It just doesn't deploy. Any changes to the code we must do in order to work with newer versions of the module system?
 
Best answers
0
Hi guys. I'm trying to implement the collapsible version into native (then into 1257) but I can't get the mission_temp code to work. I keep getting this error...
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
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)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
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)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
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)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
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)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
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)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Exporting quest data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_mission_tmps.py", line 5, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\process_operations.py", line 21, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Steam\SteamApps\common\MountBlade Warband\Modules
\mb_warband_module_system_1105\module_mission_templates.py", line 39
    (0, 0, 0,
    ^
IndentationError: unexpected indent

______________________________

Script processing has ended.
Press any key to exit. . .

The code is inserted under this line, like so.
pilgrim_disguise = [itm_pilgrim_hood,itm_pilgrim_disguise,itm_practice_staff, itm_throwing_daggers]
af_castle_lord = af_override_horse | af_override_weapons| af_require_civilian

#pavise
      (0, 0, 0,
        [],
        [

            (get_player_agent_no, ":player_agent"),
            (agent_get_position, pos2, ":player_agent"),
            #==click g && has pavise
            (try_begin),
                #(agent_has_item_equipped, ":player_agent", "itm_pavise"),
                (agent_get_wielded_item, ":shield_item", ":player_agent", 1),
                (eq, ":shield_item", "itm_pavise"),
                (key_clicked, key_g),
                (clear_omitted_keys),
           
                (scene_prop_get_num_instances, ":num_props", "spr_pavise"),
                (position_move_y, pos2, 50),
                (set_spawn_position, pos2),

                (assign, ":pav_found", 0),#pf
                #FOR # props if prop at LATENT spot
                (try_for_range, ":prop_no", 0, ":num_props"),
                    (eq, ":pav_found", 0),#pf
                    (scene_prop_get_instance, ":scene_prop_id", "spr_pavise", ":prop_no"),
                    (prop_instance_get_position, pos3, ":scene_prop_id"), #pos3 holds position of current prop
                    (position_get_z, ":z_coor", pos3),
                    (eq, ":z_coor", -100*100),#-100 LATENT spot

                    (prop_instance_set_position, ":scene_prop_id", pos2),#pavise move
                    (get_player_agent_no, ":player_agent"),
                    (agent_unequip_item, ":player_agent", "itm_pavise"),
                    (assign, ":pav_found", 1),#pf
                (try_end),

                (try_begin),
                    (lt, ":pav_found", 1),#pf

                    (spawn_scene_prop, "spr_pavise"),#pavise spawn
                    (get_player_agent_no, ":player_agent"),
                    (agent_unequip_item, ":player_agent", "itm_pavise"),
                (try_end),
            (try_end),

            (scene_prop_get_num_instances, ":num_props", "spr_pavise"),
            #==click h && near proped pavise
            (try_begin),
                (key_clicked, key_h),
                (clear_omitted_keys),
                #FOR # props if prop close to player
                (try_for_range, ":prop_no", 0, ":num_props"),
                    (scene_prop_get_instance, ":scene_prop_id", "spr_pavise", ":prop_no"),
                    (prop_instance_get_position, pos3, ":scene_prop_id"), #pos3 holds position of current prop
                    (get_distance_between_positions, ":player_distance", pos2, pos3),
                    (le, ":player_distance", 100),

                    (position_set_z, pos3, -100*100),#-100 LATENT spot
                    (prop_instance_set_position, ":scene_prop_id", pos3),#pavise move

                    (set_spawn_position, pos2),
                    (position_move_y, pos2, 50),
                    (spawn_item, "itm_pavise"),#pavise spawn
                (try_end),
                #(scene_prop_set_visibility, ":scene_prop_id", 0),
                #(init_position, pos1),
            (try_end),

        ]),#0,0,0 pavise
I've managed to get the item to appear in shops and work as a shield, just not transition into a scene prop. I also can't find it in the editor, although I had no issues when compiling the code in the scene_prop file. Anyone else had this problem/ know how to fix it?
 

dunde

Count
WB
Best answers
0
#pavise
      (0, 0, 0,
No space nor tabs before (0,0,0, please, and assign it to a variable :

deploy_pavise = (0,0,0,

        ]),#0,0,0 pavise -> remove the comma


Then, insert the :

deploy_pavise,

at any mission template you want to anable the trigger.
 

Wu-long

Sergeant Knight at Arms
WBWF&SNW
Best answers
0
Hmm, going to try to work on this see if I can get the NPC's to deploy them too with me xD Think of a Rhoduck Shield wall of Pavise shields...they would actually become a death mongering field army if we could do that. DEATH TO THE HORSEMEN!
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
HammYtheMagnificent said:
was this ever edited/remade for the AI?
You'll find a reworked implementation of this, with added single player AI decision-making, in my PBOD source code kit (and as an included feature in the most current released version of PBOD 0.96, so you should find it in completed mods that incorporate it like Silverstag, as well as in the standalone PBOD).
 

builder of the gods

Sergeant at Arms
Best answers
0
i have got a problem
(agent_force_rethink, ":cur_agent"),
        (try_end),
        ]),
      ],
  ),
  common_shield_bash = (0,0,0,[
(key_clicked, key_left_control),
(neg|main_hero_fallen),
],
[
(call_script, "script_shield_bash"),
])
 
#-## Outposts begin
  (
    "fort_visit",0,-1,
    "Fort visit",




## part of my code
## but then i get a syntax error with the problem to the = (i have this always only in mision templates) how do i fix this?






This is my batch:
Traceback (most recent call last):
  File "process_init.py", line 2, in ?
    from process_operations import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\process_operations.py", line 21, in ?
    from module_mission_templates import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\module_mission_templates.py", line 14703
    common_shield_bash = (0,0,0,[
                      ^
SyntaxError: invalid syntax
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 ?
    from process_operations import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\process_operations.py", line 21, in ?
    from module_mission_templates import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\module_mission_templates.py", line 14703
    common_shield_bash = (0,0,0,[
                      ^
SyntaxError: invalid syntax
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in ?
    from process_operations import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\process_operations.py", line 21, in ?
    from module_mission_templates import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\module_mission_templates.py", line 14703
    common_shield_bash = (0,0,0,[
                      ^
SyntaxError: invalid syntax
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in ?
    from process_operations import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\process_operations.py", line 21, in ?
    from module_mission_templates import *
  File "C:\Users\joostgrunwald\Desktop\dit\Module_system 1.165 1 - kopie - kopie
\module_mission_templates.py", line 14703
    common_shield_bash = (0,0,0,[
                      ^
SyntaxError: invalid syntax
Exporting troops data
Exporting particle data...
 

Caba`drin

Count
M&BWBWF&SNWVC
Best answers
0
Builder, I've seen you posting in a large number of OSP code kits with very similar and extremely basic mistakes. Since the errors you are experiencing are not problems with the code packs you are posting in, but in how you have tried to copy them in, please create a "mega thread" in The Forge for your coding questions when you run into trouble and you can add to that single thread when you want to ask more questions. It is not appropriate to post basic "how do I mod"-type questions in every code kit you might want to use.

Now, with my moderator/administrator hat off, looking at your errors, you are not copying the code to the correct places. I'd suggest you spend more time with the module system, particularly mission templates as that seems to be where you are spending most of your efforts here, before trying to throw every cool looking OSP you come across in at once. Implement even one of these packs to Native successfully and you'll learn a lot and not have to ask the same question across a myriad of threads. See the syntax tutorial in my signature, for instance, and look at the general tutorial for mission templates.

There are multiple portions of the mission templates file. The top has common definitions of triggers, where you define a trigger to use later (like shield bash) in individual templates (like "lead_charge" for field battles). This is one of those common trigger definitions:
Code:
common_shield_bash = (0,0,0,[
 (key_clicked, key_left_control),
 (neg|main_hero_fallen),
 ],
 [
 (call_script, "script_shield_bash"),
 ])
This is the start of a mission template that should go later in the file:
Code:
  (
    "fort_visit",0,-1,
    "Fort visit",
...
and this looks like the end of another template:
Code:
(agent_force_rethink, ":cur_agent"),
         (try_end),
         ]),
      ],
  ),
The fact that common_shield_bash is wedged in between there is causing errors, as it should be up by the other common trigger definitions, not mixed in with the templates. (You've made this same mistake in other threads). Look at the structure of the module_mission_templates file, refer to tutorials and try to understand what you're working with. Copy-pasta will not work without some basic level of coding understanding so you can put things in the right place and be reasonably sure they will work.
 

builder of the gods

Sergeant at Arms
Best answers
0
sorry it is just i can't seem to find it in module_mission_templates
adding skills and lumos his outpost worked well and thanks for your help (i am learning but 14 and not really good at english so sorry for that)
Again thanks a lot Caba'drin
EDIT (didn't want to doublepost again)
with your tips Caba'drin and a little bit changing the code it actually works now :grin: !
 

Deathstruck92

Veteran
WBNWVCM&BWF&S
Best answers
0
I apologize for ressurrecting this old topic but... has the newest Warband update somehow broken the deployable Pavise functionality(or the script) in general?

I've tried like 2 mods that include the Pavise function (which I assume came from this, since it's OSP) but neither of them work anymore. Not even after remapping the key to another.  :sad:
 

Corbul

Sergeant at Arms
WBWF&SVC
Best answers
1
Sorry to necro, but how do I install this? I tried copying the code for "singleplayer, destroyable" as instructed, downloaded the .brf and .dss files, but when I try compiling, I get this:
*** Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.) version 1.0.0 ***
Please report errors, problems and suggestions at http://lav.lomskih.net/wreck/

Loading module... DONE.
Loading plugins... DONE.
Checking module syntax... FAILED.
MODULE `mission_templates` ERROR:
failed to parse element #50
  0 is not a legal identifier at position #0 in (0, 0, 0, 'list[len=0]', 'list[l
en=11]')


COMPILATION FAILED.