Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
So... by that logic , it should work If I use my own game to host , and my brother joins? I will test that today  :grin:
 
Einar23 said:
So... by that logic , it should work If I use my own game to host , and my brother joins? I will test that today  :grin:

just copy and paste this code and it will work in both cases :grin:

Code:
(1, 0, 0, [(multiplayer_is_server),], [   
       (get_max_players, ":max_players"),
        (try_for_range,":cur_player", 0, ":max_players"),
        (player_is_active,":cur_player"),
	(player_get_agent_id, ":cur_agent", ":cur_player"),
        (agent_is_active, ":cur_agent"),
        (agent_is_alive, ":cur_agent"),
	(store_agent_hit_points, ":health", ":cur_agent", 1),
	(val_add, ":health", 45), 
	(agent_set_hit_points,":cur_agent", ":health", 1),
     (try_end),
  ]),
 
Code:
(get_max_players, ":max_players"),
(try_for_range,":cur_player", 0, ":max_players")
instead of
Code:
(try_for_range,":cur_player",0,get_max_players)
Yours will work as well, but it will unnecessarily loop over 400 (because that's the value of the opcode get_max_players) players (when the actual maximum is 250).
 
cmpxchg8b said:
Code:
(get_max_players, ":max_players"),
(try_for_range,":cur_player", 0, ":max_players")
instead of
Code:
(try_for_range,":cur_player",0,get_max_players)
Yours will work as well, but it will unnecessarily loop over 400 (because that's the value of the opcode get_max_players) players (when the actual maximum is 250).

so what does the get_max_players return?it will return 250 every time or it will return the highest player id on the server or what?
 
I have searched in the module system using the find in files and looking around some of the files but just can't seem to find where to change this text here. You are not carrying any bolts, I want to change it to "you have run out of ammo". Could you guys help me out here as I want to change it.

 
The_dragon said:
Einar23 said:
So... by that logic , it should work If I use my own game to host , and my brother joins? I will test that today  :grin:

just copy and paste this code and it will work in both cases :grin:

Code:
(1, 0, 0, [(multiplayer_is_server),], [   
       (get_max_players, ":max_players"),
        (try_for_range,":cur_player", 0, ":max_players"),
        (player_is_active,":cur_player"),
	(player_get_agent_id, ":cur_agent", ":cur_player"),
        (agent_is_active, ":cur_agent"),
        (agent_is_alive, ":cur_agent"),
	(store_agent_hit_points, ":health", ":cur_agent", 1),
	(val_add, ":health", 45), 
	(agent_set_hit_points,":cur_agent", ":health", 1),
     (try_end),
  ]),
Thanks Dragon , it is already working  :smile: Now I will make medieval tournament!!!
 
xPearse said:
I have searched in the module system using the find in files and looking around some of the files but just can't seem to find where to change this text here. You are not carrying any bolts, I want to change it to "you have run out of ammo". Could you guys help me out here as I want to change it.
Language files, ui.csv
search for bolt and you should find:
ui_no_more_bolts|No more bolts...
ui_you_are_not_carrying_any_bolts|You are not carrying any bolts.
edit second text only.

Also, one question:
Me and animation flags don't get along very well, I have a moving animation fired by a toogle upon button hit with a mission template but I only managed to make it static else it doesn't fire at all:
Code:
 ["cover_shield", acf_enforce_lowerbody, amf_priority_kick|amf_client_prediction|amf_keep,
   [3.0, "rg_tseudo_33frame_walk", 0, 33,  arf_use_walk_progress|arf_cyclic],  
],
Code:
(0, 0, 2, [(key_clicked, key_c)],
  [(get_player_agent_no, ":player_agent"),
   (agent_is_active, ":player_agent"),		  
   (agent_is_alive, ":player_agent"),	
   (agent_get_horse, ":horse", ":player_agent"),
   (le, ":horse", 0),
   (agent_get_slot, ":cover", ":player_agent", slot_agent_cover),
   (try_begin),
     (eq, ":cover", 0),
     (display_message,"@testudo on."),
     (assign, ":cover", 1),     
     (multiplayer_send_int_to_server,multiplayer_event_animation_at_player, "anim_cover_shield"),                
   (else_try),
     (ge, ":cover", 1),
     (display_message,"@testudo off."),
     (assign, ":cover", 0),
	 (multiplayer_send_int_to_server,multiplayer_event_animation_at_player, "anim_cover_shield_end"),  
   (try_end),
   (agent_set_slot, ":player_agent", slot_agent_cover, ":cover"), ])
 
Seek n Destroy said:
xPearse said:
I have searched in the module system using the find in files and looking around some of the files but just can't seem to find where to change this text here. You are not carrying any bolts, I want to change it to "you have run out of ammo". Could you guys help me out here as I want to change it.
Language files, ui.csv
search for bolt and you should find:
ui_no_more_bolts|No more bolts...
ui_you_are_not_carrying_any_bolts|You are not carrying any bolts.
edit second text only.

Really great thank you, I never even considered it would be there.
 
Quick question, I have a bayonet fixing script, but some of my mounted units have attachable carbines.

Long story short, if they attach the bayonet, the animation plays inside the horse, and the bayoneted carbine is sheathed because it can't be used on horseback.

Errors. So many errors.

Is there a script that can be run in the module_scripts file to check if the person is mounted?
 
Quick question: has anyone run into any problems with using massive (talking about 300 metres across) scene props that use several pieces? it seems to be working fine, but I thought I'd see if anyone has had problems before I put it in cement.
 
I want to add an item that when its in your inventory it allows you to change your race at CAMP by adding a game menu. and your character size will change and items will be added to your inventory...

and when changed another menu will replace that menu that allows you to change back and removes these items and adds that original item back to your inventory...

id like a script or trigger to check for the item and check for when its not there so it wont show both menus at once.

kind of like closed feedback loop jah?

any suggestions? the idea is it changes your race/skeleton size.


after this im going to make it so when you are this special race most of your game menus for city entering are disabled.... any ideas??
 
Hi,

I'm wondering what the faction messengers / deserters are for (the Swadian_Deserter and Swadian_Messenger troops for example). Are they used in some quest?
 
I added some undead to my game and now every time I encounter them the game crashes.

Here's the dialog code:
Code:
  [anyone,"start", [(eq,"$talk_context", tc_party_encounter),(store_encountered_party, reg(5)),(party_get_template_id,reg(7),reg(5)),(eq,reg(7),"pt_dead_men")],
  "GRAAH!", "battle_reason_stated",[]],

The party spawns fine, so I'm not posting that code.

The module builds fine, its just in-game that it crashes whenever I encounter them.
 
Rather than having a trigger that fires after a certain number of days, is it possible to have one that fires once the player gets near a certain town/castle?

Code:
(2,0,ti_once,[],[
     (set_spawn_radius, 4),
           (spawn_around_party, "p_town_8", "pt_moon_brothers"),
  ]),
 
Cozur said:
Rather than having a trigger that fires after a certain number of days, is it possible to have one that fires once the player gets near a certain town/castle?
It needs a distance check regardless, unless you spawn the party from within the town menu when the player encounters it. If you really NEED it to fire immediately when the player approaches the party (and not just when a trigger checks for it), slap it on game_event_detect_party, but this will incur a small performance penalty on the world map since this script fires every time any party comes within range of the player's party.

cwr said:
I added some undead to my game and now every time I encounter them the game crashes.
The undead race and facecodes won't work out of the box in Warband - look at some other mods that implement tf_undead

Deathwhisper said:
Hi,

I'm wondering what the faction messengers / deserters are for (the Swadian_Deserter and Swadian_Messenger troops for example). Are they used in some quest?
They used to be for quests, but you can remove them safely as Native doesn't make use of those troops now (instead regular faction troops spawn in deserter parties).

windowscience said:
I want to add an item that when its in your inventory it allows you to change your race at CAMP by adding a game menu. and your character size will change and items will be added to your inventory...
There is no character size, only race scale. Make use of the troop_get/set_type operations and player_has_item in your menus. As an example code, here's a menu option to toggle the player character's gender
Code:
("change",[(ge, "$cheat_mode", 1),(assign, reg11, "$character_gender"),],"{!}Cheat: i wanna be the {reg11?guy:little girl}.",
       [ (store_sub, "$character_gender", 1, "$character_gender"),
         (troop_set_type, "trp_player", "$character_gender"),
         (change_screen_return),
        ]
       ),
 
Docm30 said:
Quick question: has anyone run into any problems with using massive (talking about 300 metres across) scene props that use several pieces? it seems to be working fine, but I thought I'd see if anyone has had problems before I put it in cement.

Work fine for me and I haven't run into any problems, this scene prop has 65 different parts to it. You can just see how big my scene is here, wouldn't know how much meters along this would be.
 
Status
Not open for further replies.
Back
Top Bottom