Search results for query: *

  1. Custom button var number for multiplayer server

    Please use the code environment for your script snippets.
    how do I do that
  2. Custom button var number for multiplayer server

    I've spent quite a long time trying to figure out how to get this working for my multiplayer NW server. Basically, I want the var2 number for the "custom_button_instant" to determine the item the player receives when they use the button. It works perfectly in single player mode with this script...
  3. Any coding genius know how to attach artillery to the moving ships in NW?

    Seems almost impossible, but if any of you could figure out a working script to put cannons on the ships so that they can be fired and operated while the boat is moving, I would be willing to pay something for it. Would take me about a year to figure that one out so I figure it would be worth...
  4. Adding custom animation keys

    @free_pc_virus_removal Yeah, you could have used 19 :smile:
    Lol cause there was already a 19 all the way to like 200 something and didnt know if there could be two 19's. And I like the number 8 so I figured it would grant good luck kek.

    I found every instance of action_b and v in both mission templates and scripts and transposed their format for h and it still says it is undefined. Is there another folder I should be searching in?
  5. Adding custom animation keys

    Two locations I assumed were relevant in scripts:

    Code:
    (else_try),
                (eq, ":mod_variable_type", mod_variable_enable_custom_action_h),
                (assign, "$g_enable_action_h", ":value", 1),
                (multiplayer_send_2_int_to_server,multiplayer_event_send_player_action,player_action_key_h),
              (else_try),
                (eq, ":mod_variable_type", mod_variable_enable_custom_action_v),
                (assign, "$g_enable_action_v", ":value", 1),
                (multiplayer_send_2_int_to_server,multiplayer_event_send_player_action,player_action_key_v),
              (else_try),
                (eq, ":mod_variable_type", mod_variable_enable_custom_action_b),
                (assign, "$g_enable_action_b", ":value", 1),
                (multiplayer_send_2_int_to_server,multiplayer_event_send_player_action,player_action_key_b),

    added a new line for h copying the others


    Code:
      (eq, ":action_type", player_action_key_v),
      (store_script_param, ":action", 4),
      (agent_get_animation,":cur_anim",":player_agent",1),
      (try_begin),
          (eq,":cur_anim","anim_sitting"),
          (agent_set_animation,":player_agent","anim_freeze_player",1),
      (else_try),
          (agent_set_animation,":player_agent","anim_freeze_player",1),
      (try_end),
    
    (else_try),
      #action on H## key
      (eq, ":action_type", player_action_key_h),
      (store_script_param, ":action", 4),
      (agent_get_animation,":cur_anim",":player_agent",1),
      (try_begin),
          (eq,":cur_anim","anim_sitting"),
          (agent_set_animation,":player_agent","anim_drum",1),
      (else_try),
          (agent_set_animation,":player_agent","anim_drum",1),
      (try_end),

    (same deal here) ^

    In mission templates:
    Code:
    multiplayer_client_custom_action_b = (
    0, 0, 1.0, [   
      (neg|multiplayer_is_dedicated_server),
      (eq, "$g_enable_action_b", 1),
      (neg|is_presentation_active, "prsnt_multiplayer_admin_chat"),
      (neg|is_presentation_active, "prsnt_multiplayer_custom_chat"),
      (key_clicked,key_b),
    ],
    [
      (multiplayer_get_my_player, ":player_id"),
      (player_is_active, ":player_id"),
      (multiplayer_send_string_to_player, ":player_id", multiplayer_event_return_admin_chat, "[USER=318733]@Praise[/USER] Aut."),
      (call_script, "script_show_multiplayer_message", multiplayer_message_type_admin, 0),
    
      (try_begin),
          (call_script,"script_client_get_my_agent"),
          (assign,":agent_id",reg0),
          (agent_is_active,":agent_id"),
          (agent_is_alive,":agent_id"),
          (agent_set_animation,":agent_id","anim_fall_chest_front",1),
          # (multiplayer_send_2_int_to_server, multiplayer_event_send_player_action, player_action_surrender,music_type_start),
      (try_end),
      (multiplayer_send_2_int_to_server,multiplayer_event_send_player_action,player_action_key_b),
    ])
    multiplayer_client_custom_action_h = (
    0, 0, 1.0, [    
      (neg|multiplayer_is_dedicated_server),
      (eq, "$g_enable_action_h", 1),
      (neg|is_presentation_active, "prsnt_multiplayer_admin_chat"),
      (neg|is_presentation_active, "prsnt_multiplayer_custom_chat"),
      (key_clicked,key_h),
    ],
    [
      (multiplayer_get_my_player, ":player_id"),
      (player_is_active, ":player_id"),
      (multiplayer_send_string_to_player, ":player_id", multiplayer_event_return_admin_chat, "@Autistic Seat"),
      (call_script, "script_show_multiplayer_message", multiplayer_message_type_admin, 0),
    
      (try_begin),
          (call_script,"script_client_get_my_agent"),
          (assign,":agent_id",reg0),
          (agent_is_active,":agent_id"),
          (agent_is_alive,":agent_id"),
          (agent_set_animation,":agent_id","anim_drum",1),
          # (multiplayer_send_2_int_to_server, multiplayer_event_send_player_action, player_action_surrender,music_type_start),
      (try_end),
      (multiplayer_send_2_int_to_server,multiplayer_event_send_player_action,player_action_key_h  ),
    ])
    (copied format for b key but with different animation ofc)

    Also added a constant for h key in the module_constants. No idea if that is relevant just trying things.

    Code:
    player_action_key_v = 17
    player_action_key_b = 18
    player_action_key_h = 888

    I am new to scripting still so bare with me. But both v and b key animations work. I still get the error " NameError: name 'mod_variable_enable_custom_action_h' is not defined"

    Forgive me if I overlooked something that was already the answer. It is quite late here haha
    Thanks for the help
  6. Adding custom animation keys

    How would I go about adding more custom animations, like the cheer animation, or whatever for my multiplayer server. I successfully added animations for the b key and v key (those already have some sort of template), but when I attempted to add one for 'h' copying the same format I got an error...
  7. How to add a zoom key for my multiplayer server?

    Thought it would be cool to add a key to enable players to zoom while aiming in Napoleonic Wars. I looked around for places to edit the existing zoom features such as the Numpad + key and Numpad - or the spyglass script but I couldn't find where the zoom function was stored in either of these...
  8. New to modding, trying to change names of bots in Napoleonic Wars Multiplayer. Possible?

    Thanks for the concise explanation John. And okay thank you that explains a lot Earendil. It is not a big element for my server so I will just accept the default names. My other current mission is to attach a sit down button (like the toilet button) to a carriage that I added to the back of the artillery horse so that people can sit down while they ride it. I was able to add the button to make the character sit, but they simply stay in place while the carriage moves away from them. Is it possible to have the player move with the carriage in the sitting position? Thanks
  9. New to modding, trying to change names of bots in Napoleonic Wars Multiplayer. Possible?

    Thank you, Namakan and Earendil. Yes that is correct I only see certain changes when I edit things in MS and upload the files to the server. It was the same for changing strings- Welcome message and map names were changed in multiplayer but nothing else had an effect there. So you're saying that for certain changes I need to create an entirely new mod for others to see it, and simply making changes in the ways I changed other things like weapon damage, player equipment etc. wont be enough for it to get uploaded to the server? Thanks
  10. New to modding, trying to change names of bots in Napoleonic Wars Multiplayer. Possible?

    I made these changes in the mm-dev-MS folder. The confusing thing to me is that I changed the clothing of the troops in the same folder that I attempted to change their troop names (module_troops). Only the clothing changes are able to be seen when uploaded to multiplayer server but the troop names are default there. Should I have used txt files? Thanks you
  11. New to modding, trying to change names of bots in Napoleonic Wars Multiplayer. Possible?

    I changed the names of all of the troops in the module_troops folder, for instance: ["british_highlander_ai","ClassySportyGothicEmoLadyBoy","Highland Infantry",tf_guarantee_all,0,0,fac_britain, [itm_british_brown_bess,itm_bullets], In the private host I am able to see this in the kill feed...
Back
Top Bottom