I want to spawn item in front of my current client camera position, even if there's no agent around.
With agents it works completely fine, I know that. But I want to make it for camera, not for agents.
Hello!
I want to respawn some item on the server, 5 meters in front of my current camera position on client.
I have problem with putting this spawn point in front.
Client side code:
This code don't work as it should - there is a problem with +5 meters, it always spawn item +5 meters in same direction, no matter how camera is rotated. So I guess i'm doing something wrong here.
When I read some agent position on server and move Y position only, it works perfectly fine, and spawns item always in front of that agent, no matter where agent looks. But how to make same effect with camera rotation from client ?
I want to add click sound to image_button_overlay, not only on left mouse button (which works by default), but with right and middle mouse button too.
Easy ? Well not quite.
I used (play_sound, "snd_click") code, when right or middle mouse is pressed. And right mouse click with that code is so quiet, I barely hear it. Same time, exactly same code in middle mouse section is a bit louder, but still very quiet.
I tried to add options to this code, something like: (play_sound, "snd_click", sf_2d|sf_vol_15), but it has no effect at all at sound volume.
And when I raise volume in sound file (obviously I do this for all clicks then), all clicks are much louder, but still right mouse is more quiet than middle mouse. I just can't understand why this happens and how to fix this. Why same code has different volume in right and middle click section, and why sound options seems to be ignored ? Am I doing something wrong here ?
Code:
(try_begin),
(eq, ":mouse_state", 1),
(play_sound, "snd_click", sf_2d|sf_vol_15), # <- very quiet, hard to hear it at all, I need to raise volume of my speakers
(else_try),
(eq, ":mouse_state", 2),
(play_sound, "snd_click", sf_2d|sf_vol_15), # <- louder than above, I can hear it without raising volume of my speakers, but it's still quiet
(try_end),
EDIT: I added 2 more sounds to module sound file - right_click and middle_click and set their volume inside this file (right click to 10, middle to 7). It's not the solution i hoped for, but it's better than nothing. It works fine this way. If you know better solution for this (without adding duplicated sounds with various volumes), please write it here.
Ok it works with Warband. Is there any way to activate this in WFAS as well ? In CAMP -> CHEAT MENU I only see "Increase player renown" in WFAS, nothing more
Hello!
Is there some application to easly preview all items in game ?
I mean, there is eg. Morghs M&B Warband Tool or ItemEditor, but they just shows stats of items - it's pure text, you don't really see how this item looks like.
Is there application (or way) to quickly preview items ?
Is this possible to check ID of player you are currently following in multiplayer ?
As a spectator (or dead), you can follow some player (Following 'NICK'), and you see everything this person is doing - camera is sticked to this player.
I want to make some action on player i'm currently following. I need his player ID then. Is there any way to read it somehow ?
Guys, how can I check is agent a horse ?
I know there is agent_is_human operation, which I can negate, but this will work on every non-human agents.
I just want to do some action on horses only, neg|agent_is_human will work on every non human agent (horses, bots).
Thanks for tip Vornne. I'll try to get this working using mission timer - it's not bad idea, I just need to sum all missions timers to get actual time .
Is there any way to count the server up time ? I need to check how much time left since some player left the server.
Having server uptime counter I could just store time he left, and then after he join server once more again, sub current time and time stored.
In theory it would be just fine, but I have no idea is this possible to check server uptime. Didn't find anything suspicious in operations .
Is there any way to set admin rights from module code ?
I tried (player_set_is_admin, ":player_no", 1), but this seems not to work, or do something different.
In previous patch (1.142), archers had much worse accuracy and half the damage. It was fine imo then. Even if they needed a little buff, developers increased their accuracy to almost pinpoint and damage too (now with best bow and best arrows, they deliver similar values like musketeers with good musket).
Since 2 month people are begging for fix, but developers has different view about game balance than players. So for developers, archers are well balanced, swedish musketeers too and many similar stuff.
In my opinion patch 1.142 was MUCH better balanced, current patch unbalanced this game completely.
Is there any way to force troop type for players in multiplayer ?
So let's say player chosen Archer on his screen, as his troop type, but I want to change it on server to eg. Cavalry.
I want to make identical characters wars - I already forced equipment (every character respawn with exactly same equipment).
But when player will take some troop type, he will have different stats than another troop type (running speed, ironflesh, riding, wpf and so on).
I want this to be compatibile with native, so is there any way to server-side force troop type of player ? How modified duel servers are dealing with this problem ?
I tested this more and results are:
- when I shot from musket (no matter bought or command spawned one) and then spawn any metal item with spawn_item operation, it will change to blunt/wooden hit sound
- when I spawn musket, pick it up, but don't shot from it, next metal spawned items will be fine
- sometimes (very rarely) when I shot again from musket, throw it away and then spawn metal item, it will revert to cut/metal sound again
- when server is bugged (all spawned items have wooden sound) and I go to spectator, then chose nation/troop/equipment again and chose some metal item, it will be fine - only metal items spawned by spawn_item operation will be bugged (so it's spawn_item operation problem)
- when I change/reload the map, new spawned metal items won't be bugged until I shot from musket again (so something resets to default and all is fine after map change)
For me it looks like spawn_item bug in WFAS. Muskets can bug this operation somehow.
So, spawn_item operation changes spawned item hit sound to blunt/wooden, after shooting from musket. This is very strange thing.
Hello guys!
First problem already solved:
Second problem is, when I use spawn_item operation, sometimes those items have different hit-sound effects than original.
When I spawn some melee item after server starts, everything is fine, so for example:
Will spawn Good Saber and it's fine.
The...
The idea is briliant. But i'm not really sure how global variables works in this game.
If I change some global variable server sided, will it be loaded to client side after I join the server ?
Maybe server settings variables would do so, but then... where can I find the list of variables which are loaded from server to client ?
Module_variables file is empty in my module system. I see variables.txt file contains some names, but how to know which variables there are just for client side settings (maybe all are ?) and which are loaded from server ?
I guess it will be hard to find any unused variable which is send from server to client to keep them level - it would be just unwanted network traffic.
Well, I should've write this at start - i don't want to make whole mod. It's just a little modification of server based on native.
You can play with original files or changed ones. I don't want to force people to download whole mod (most people won't do that anyway).
It works fine, without any problems. Only annoying thing is, I see new item on every server, and that's what I want to avoid.
Hello guys!
I added new weapon to Multiplayer game, but I want it to be (client side) visible ONLY on my server.
Of course leaving it visible on other servers won't give me anything except confusion - it won't work there anyway.
So is there any way to do this ?
Something like:
(try_begin),
(eq, current_server_name, "my server"),
(item_set_slot, "itm_new_sword", slot_item_multiplayer_item_class, multi_item_class_type_sword),
(try_end),
I may be wrong as I never dealt with MP aspect of Warband modding, but I think it's better to have the same item settings for client and server. Instead of giving item different properties on server and client, find the code which displays the item to the player, and place your hack there.
The thing is, in MP to see/take new item you added, you need to add it to server AND to client. Client sided item list isn't generated, based on server settings. It's purely client side. So if you add new item only on server, it won't give you anything at all, because without client side modification you won't see this item.
To be able to use this item, I need to modify client side files as well as server side.
But when I modify client side files, I'll see this new item in every MP server. It won't work there (only client side modification), but i'll see it.
I want to avoid this somehow, by client side activating item only on some specific server.