Recent content by Pitch

  1. Pitch

    WB Coding Slots between client/server

    You have to use loop.
  2. Pitch

    WB Coding Slots between client/server

    Thanks--I see there's some kind of system in place w/ 'events' in script_game_receive_network_message, is this used for both server and client updates?
    yes.

    multiplayer_send_message_to_server, multiplayer_send_int_to_server, multiplayer_send_message_to_player etc are all handled inside script_game_receive_network_message.
  3. Pitch

    WB Coding Slots between client/server

    Slots are just variables but better, they are not synced by engine.
    Particle systems are synced by default afaik, check particle_system_burst and particle_system_burst_no_sync
    You can make agents play animations directly from server but from my experience its often laggy and desync occurs. Not sure if it depends on any particular animations.
  4. Pitch

    WFaS 2D Art WSE WFaS Build Shader Problems

    Is that a setting in module_config_template.ini?
    No, I mean video settings in game which WSE has implemented.
    Do you use custom shaders?
  5. Pitch

    WFaS 2D Art WSE WFaS Build Shader Problems

    Play with your texture settings (and generally with Video settings, check results with diffrent settings) . I believe there is 1 particular option implemented by WSE2 that doesn't work properly in WFaS. (blured screen)
  6. Pitch

    OSP Code QoL Day and Night Cycle

    Creative way of implementing skyboxes.
    Didn't know you can treat skyboxes as just prop instances.
    Thank you for sharing.
  7. Pitch

    PYTHON SCRIPT/SCHEME EXCHANGE

    Multiplayer, Server-Side Oddity.

    I found out that you can use bug in native prsnt_multiplayer_message_1 and
    multiplayer_message_type_defenders_saved_n_targets event in order to display string at the center of the player screen.
    This is most likely not reliable way to do that, however I don't know of existence of any other way to achieve it without client side mods.


    Why its working?


    Python:
    ### prsnt_multiplayer_message_1
    (else_try),
            (eq, "$g_multiplayer_message_type", multiplayer_message_type_defenders_saved_n_targets),
    
            (try_begin), #for spectators initializing, we assume spectators are fan of team0 so coloring is applied as they are at team0.
              (eq, "$g_defender_team", 0),
              (assign, ":text_font_color", 0xFF33DD11),
            (else_try),
              (assign, ":text_font_color", 0xFFFF4422),
            (try_end), #initializing ends
            (multiplayer_get_my_player, ":my_player_no"),
            (try_begin),
              (ge, ":my_player_no", 0),
              (player_get_agent_id, ":my_player_agent", ":my_player_no"),
              (try_begin),
                (ge, ":my_player_agent", 0),
                (agent_get_team, ":my_player_team", ":my_player_agent"),
                (try_begin),
                  (eq, ":my_player_team", "$g_defender_team"),
                  (assign, ":text_font_color", 0xFF33DD11),
                (else_try),
                  (assign, ":text_font_color", 0xFFFF4422),
                (try_end),
              (try_end),
            (try_end),
    
            (assign, ":num_targets_saved", "$g_multiplayer_message_value_1"),
    
            (team_get_faction, ":faction_of_winner_team", "$g_defender_team"),
            (str_store_faction_name, s1, ":faction_of_winner_team"),
    
            (try_begin),
              (eq, ":num_targets_saved", 1),
              (str_store_string, s0, "str_s1_saved_1_target"),
            (else_try),
              (eq, ":num_targets_saved", 2),
              (str_store_string, s0, "str_s1_saved_2_targets"),
            (try_end),
    
            (create_text_overlay, "$g_multiplayer_message_1", s0, tf_center_justify|tf_with_outline),
            (overlay_set_color, "$g_multiplayer_message_1", ":text_font_color"),
            (position_set_x, pos1, 350),
            (position_set_x, pos1, 500), #new
            (position_set_y, pos1, 400),
            (overlay_set_position, "$g_multiplayer_message_1", pos1),
            (position_set_x, pos1, 2000),
            (position_set_y, pos1, 2000),
            (overlay_set_size, "$g_multiplayer_message_1", pos1),
            (presentation_set_duration, 400),
          (else_try),

    Mostly this part:

    Code:
            (try_begin),
    
              (eq, ":num_targets_saved", 1),
    
              (str_store_string, s0, "str_s1_saved_1_target"),
    
            (else_try),
    
              (eq, ":num_targets_saved", 2),
    
              (str_store_string, s0, "str_s1_saved_2_targets"),
    
            (try_end),


    Here game expects from us to provide variable num_targets_saved ($g_multiplayer_message_value_1) equal to 1 or 2.
    If we don't do that, s0 will be unassigned and for some reason ( i don't know details of game engine), last chat message(?) will be used as s0.

    We can then make something like this:

    Code:
      (multiplayer_send_string_to_player,":player_no",multiplayer_event_show_server_message, "@display my string at the center of the screen"),
      (multiplayer_send_2_int_to_player, ":player_no", multiplayer_event_show_multiplayer_message, multiplayer_message_type_defenders_saved_n_targets, 20),

    It should display text at the center of the ":player_no" screen.
    Be aware, this is potentially very unreliable way to do that.
    I share this more like oddity than a something useful to use. :grin:

    If anybody has more informations on this topic, I would love to see it :grin:

    xwXZq9S.jpg
  8. Pitch

    B Musket Era [WFaS] Taiping Heavenly Kingdom

    We don't have chance to see WFaS too often. Good Luck!
  9. Pitch

    [Tutorial] Monitor for any changes in your code and automatically compile module system.

    Monitor for any changes in your code and automatically compile module system with nodemon. Perfect for development Nodemon is a development dependency that monitors for any changes in your project and automatically re-compiles your code, saving time and tedious work. Nodemon does not require...
  10. Pitch

    Unresolved Performance issues with Mount & Blade: Warband on a new laptop.

    Please show us rgl_log.txt from main Warband directory.
  11. Pitch

    Warband Script Enhancer 2 (v1.0.5.6)

    Fixed reloading bug - only one projectile was loaded, regardless of weapons max ammo.
    Thank you for quick update.






    @K700
    WFaS WSE2
    I noticed some inconsistency in store_agent_hit_points native operation.

    Python:
    (store_agent_hit_points, reg10, ":agent_id"),

    In this situation, I expect reg10 to return 100 on brand new agents.
    This works correctly in Native M&B, however with WFaS WSE2, it behaves a bit strange, not horribly incorrect - but still strange.

    Client side
    Tested on both, native server and server with WSE.

    i0ciGcY.jpeg
    .


    EDITED


    It's something oddly specific and honestly can't figure what it is.
    I think you can safely ignore it.

    Python:
          (ti_on_agent_spawn, 0, 0, [],
           [
             (store_trigger_param_1, ":agent_no"),
             (call_script, "script_multiplayer_server_on_agent_spawn_common", ":agent_no"),
    
            (try_begin),
             (agent_is_human, ":agent_no"),
             (store_agent_hit_points, reg50, ":agent_no", 0),
             (assign, reg51, ":agent_no"),
             (display_message, "@Agent ID: {reg51 }HP: {reg50}", green),
             (try_end),

    ^ Here it returns always correct values.
    Maybe it's mistake on my side and I am just blind.
  12. Pitch

    Warband Script Enhancer 2 (v1.0.5.6)

    @K700
    WFAS WSE2

    There is currently bug in WFaS WSE which causes Double-barreled pistols and muskets not work properly.
    On first use, they work correctly (they shot twice) but after reloading - they take 1 bullet and shot only once.

    Tested on dedicated server and on "host game". Same effect.
  13. Pitch

    WB Coding Need help with compiling error

    When I'm compiling my mod, I get this error. I'm not really sure how I broke it because I haven't done anything with triggers at this point. Any insight would be greatly appreciated!



    I found this thread which looks similar, but I'm not sure where to look for a syntax error: https://forums.taleworlds.com/index.php?threads/compiling-error.439781/
    You got Unexpected token somewhere in your module_items.py
  14. Pitch

    Warband Script Enhancer 2 (v1.0.5.6)

    1.0.5.2
    -Added WFaS build.
    -Added bMoreProficiencyEffectForMovingSpeedWhileReloading config option.
    -Added sf_use_next_for_far sound flag.
    -Fixed sf_always_send_via_network sound flag.
    -Fixed sound bugs.
    -Fixed backpedal speed.


    Note for WFaS
    Since the WFaS does not have necessary network events, for compatibility following Warband features works only when bBreakWarbandCompatibility=true:

    -Separate audio channel for agent_play_sound and agent_stop_sound operations.
    -Network sync for agent_set_accuracy_modifier, agent_set_speed_modifier, agent_set_reload_speed_modifier, agent_set_use_speed_modifier operations.

    Thanks to DoDoCat for sponsoring development.

    Thank you.
  15. Pitch

    WB Coding Assistance With Player Faction Troops

    Hello.
    You have to use official module system in order to modify update_volunteer_troops_in_village script.
Top Bottom