Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Where do I find the default server settings for block direction control and such?

I did find this in module scripts
Code:
      (assign, "$g_multiplayer_selected_map", multiplayer_scenes_begin),
      (assign, "$g_multiplayer_respawn_period", 9),
      (assign, "$g_multiplayer_round_max_seconds", 300),
      (assign, "$g_multiplayer_game_max_minutes", 30),
      (assign, "$g_multiplayer_game_max_points", 300),

      (server_get_renaming_server_allowed, "$g_multiplayer_renaming_server_allowed"),
      (server_get_changing_game_type_allowed, "$g_multiplayer_changing_game_type_allowed"),
      (assign, "$g_multiplayer_point_gained_from_flags", 100),
      (assign, "$g_multiplayer_point_gained_from_capturing_flag", 5),
      (assign, "$g_multiplayer_game_type", 0),
      (assign, "$g_multiplayer_team_1_faction", "fac_kingdom_8"),
      (assign, "$g_multiplayer_team_2_faction", "fac_kingdom_7"),
      (assign, "$g_multiplayer_next_team_1_faction", "$g_multiplayer_team_1_faction"),
      (assign, "$g_multiplayer_next_team_2_faction", "$g_multiplayer_team_2_faction"),
      (assign, "$g_multiplayer_num_bots_team_1", 0),
      (assign, "$g_multiplayer_num_bots_team_2", 0),
      (assign, "$g_multiplayer_number_of_respawn_count", 0),
      (assign, "$g_multiplayer_num_bots_voteable", 50),
      (assign, "$g_multiplayer_max_num_bots", 101),
      (assign, "$g_multiplayer_factions_voteable", 1),
      (assign, "$g_multiplayer_maps_voteable", 1),
      (assign, "$g_multiplayer_kick_voteable", 1),
      (assign, "$g_multiplayer_ban_voteable", 0),
      (assign, "$g_multiplayer_valid_vote_ratio", 51), #more than 50 percent
      (assign, "$g_multiplayer_auto_team_balance_limit", 3), #auto balance when difference is more than 2
      (assign, "$g_multiplayer_player_respawn_as_bot", 1),
      (assign, "$g_multiplayer_stats_chart_opened_manually", 0),
      (assign, "$g_multiplayer_mission_end_screen", 0),
      (assign, "$g_multiplayer_ready_for_spawning_agent", 1),
      (assign, "$g_multiplayer_welcome_message_shown", 0),
      (assign, "$g_multiplayer_allow_player_banners", 1),
      (assign, "$g_multiplayer_force_default_armor", 1),
      (assign, "$g_multiplayer_disallow_ranged_weapons", 0),
	  
      
      (assign, "$g_multiplayer_initial_gold_multiplier", 86),
      (assign, "$g_multiplayer_battle_earnings_multiplier", 0),
      (assign, "$g_multiplayer_round_earnings_multiplier", 85),
but those are not all the options :neutral:
 
Barabas said:
Where do I find the default server settings for block direction control and such?

Code:
server_get_renaming_server_allowed   = 475 # (server_get_renaming_server_allowed, <destination>), #0-1
server_get_changing_game_type_allowed= 476 # (server_get_changing_game_type_allowed, <destination>), #0-1
##477 used for: server_set_anti_cheat                = 477 # (server_set_anti_cheat, <value>), #0 = off, 1 = on
server_get_combat_speed              = 478 # (server_get_combat_speed, <destination>), #0-2
server_set_combat_speed              = 479 # (server_set_combat_speed, <value>), #0-2
server_get_friendly_fire             = 480 # (server_get_friendly_fire, <destination>),
server_set_friendly_fire             = 481 # (server_set_friendly_fire, <value>), #0 = off, 1 = on
server_get_control_block_dir         = 482 # (server_get_control_block_dir, <destination>),
server_set_control_block_dir         = 483 # (server_set_control_block_dir, <value>), #0 = automatic, 1 = by mouse movement
server_set_password                  = 484 # (server_set_password, <string_id>),
server_get_add_to_game_servers_list  = 485 # (server_get_add_to_game_servers_list, <destination>),
server_set_add_to_game_servers_list  = 486 # (server_set_add_to_game_servers_list, <value>),
server_get_ghost_mode                = 487 # (server_get_ghost_mode, <destination>),
server_set_ghost_mode                = 488 # (server_set_ghost_mode, <value>),
server_set_name                      = 489 # (server_set_name, <string_id>),
server_get_max_num_players           = 490 # (server_get_max_num_players, <destination>),
server_set_max_num_players           = 491 # (server_set_max_num_players, <value>),
server_set_welcome_message           = 492 # (server_set_welcome_message, <string_id>),
server_get_melee_friendly_fire       = 493 # (server_get_melee_friendly_fire, <destination>),
server_set_melee_friendly_fire       = 494 # (server_set_melee_friendly_fire, <value>), #0 = off, 1 = on
server_get_friendly_fire_damage_self_ratio   = 495 # (server_get_friendly_fire_damage_self_ratio, <destination>),
server_set_friendly_fire_damage_self_ratio   = 496 # (server_set_friendly_fire_damage_self_ratio, <value>), #0-100
server_get_friendly_fire_damage_friend_ratio = 497 # (server_get_friendly_fire_damage_friend_ratio, <destination>),
server_set_friendly_fire_damage_friend_ratio = 498 # (server_set_friendly_fire_damage_friend_ratio, <value>), #0-100
server_get_anti_cheat                = 499 # (server_get_anti_cheat, <destination>),
server_set_anti_cheat                = 477 # (server_set_anti_cheat, <value>), #0 = off, 1 = on

 
Caba`drin said:
N0body said:
Thanks, didn't think about the positioning of the code, and since I put the change screen last, most of it is working, apart from the clearing of the party and the inventory.

How exactly would I go around to doing the loop to remove all of the player's inventory slots? The troop_clear_inventory,"trp_player" command doesn't seem to be working.
I don't know why (party_clear, "p_main_party"), would not be working. It is used in Diplomacy without a problem. They even need(?) a second line to remove the player
Code:
    (party_clear, "p_main_party"),
    (party_remove_members, "p_main_party", "trp_player", 1),
and then they add the player back later...

So far as an alternative to troop_clear_inventory
Code:
(troop_get_inventory_capacity, ":capacity", "trp_player"),
(try_for_range, ":i", 0, ":capacity"),
    (troop_set_inventory_slot, "trp_player", ":i", -1),
(try_end),

That worked! Thanks!  :smile: The player is now almost completely reset.
All I need to do now is work out how to reset the skills.

I've been using this in it (Below) - it's doesn't seem to be working right.

Is there an easier way or decreasing or reseting (which is actually what I want) the players' stats?

Code:
		 #Skills down
		 (troop_add_proficiency_points, "trp_player", -20),
		 #(troop_raise_attribute, "trp_player",<attribute_id>,<value>),
		 (troop_raise_attribute, "trp_player",ca_intelligence,-5),
         (troop_raise_attribute, "trp_player",ca_charisma,-5),
		 (troop_raise_attribute, "trp_player",ca_strength,-5),
		 (troop_raise_attribute, "trp_player",ca_agility,-5),
		 
		 #(store_skill_level, ":trade", "skl_trade", "trp_player"),
		 
		 # (troop_raise_skill, "trp_player","skl_trade",-2),
         # (troop_raise_skill, "trp_player","skl_leadership",-2),
         # (troop_raise_skill, "trp_player","skl_prisoner_management",-2),
         # (troop_raise_skill, "trp_player","skl_persuasion",-2),
		 # (troop_raise_skill, "trp_player","skl_engineer",-2),
         # (troop_raise_skill, "trp_player","skl_first_aid",-2),
         # (troop_raise_skill, "trp_player","skl_surgery",-2),
         # (troop_raise_skill, "trp_player","skl_wound_treatment",-2),
		 # (troop_raise_skill, "trp_player","skl_inventory_management",-2),
		 # (troop_raise_skill, "trp_player","skl_spotting",-2),
		 # (troop_raise_skill, "trp_player","skl_pathfinding",-2),
		 # (troop_raise_skill, "trp_player","skl_tactics",-2),
		 # (troop_raise_skill, "trp_player","skl_tracking",-2),
		 # (troop_raise_skill, "trp_player","skl_trainer",-2),
		 # (troop_raise_skill, "trp_player","skl_looting",-2),
		 # (troop_raise_skill, "trp_player","skl_horse_archery",-2),
		 # (troop_raise_skill, "trp_player","skl_riding",-2),
		 # (troop_raise_skill, "trp_player","skl_athletics",-2),
		 # (troop_raise_skill, "trp_player","skl_shield",-2),
		 # (troop_raise_skill, "trp_player","skl_weapon_master",-2),
		 # (troop_raise_skill, "trp_player","skl_power_draw",-2),
		 # (troop_raise_skill, "trp_player","skl_power_throw",-2),
		 # (troop_raise_skill, "trp_player","skl_power_strike",-2),
		 # (troop_raise_skill, "trp_player","skl_ironflesh",-2),
		 
		 (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,-50),
		 (troop_raise_proficiency, "trp_player",wpt_two_handed_weapon,-50),
		 (troop_raise_proficiency, "trp_player",wpt_polearm,-50),
		 (troop_raise_proficiency, "trp_player",wpt_archery,-50),
		 (troop_raise_proficiency, "trp_player",wpt_crossbow,-50),
		 (troop_raise_proficiency, "trp_player",wpt_throwing,-50),

dunde said:
Caba`drin said:
N0body said:
Thanks, didn't think about the positioning of the code, and since I put the change screen last, most of it is working, apart from the clearing of the party and the inventory.

How exactly would I go around to doing the loop to remove all of the player's inventory slots? The troop_clear_inventory,"trp_player" command doesn't seem to be working.
I don't know why (party_clear, "p_main_party"), would not be working. It is used in Diplomacy without a problem. They even need(?) a second line to remove the player
Code:
    (party_clear, "p_main_party"),
    (party_remove_members, "p_main_party", "trp_player", 1),
and then they add the player back later...

I think it's easier to remove all main party members except the player, and spawn them as new firendly party (if it's visualy needed on world map), then moving them back to the main party later.

Sounds like an idea - how would I go around creating a new party and transferring all the troops into it - no need for the part to rejoin the player, just that there is a wanderering, leaderless army in which the player left.
 
N0body said:
Is there an easier way or decreasing or reseting (which is actually what I want) the players' stats?
...
Sounds like an idea - how would I go around creating a new party and transferring all the troops into it - no need for the part to rejoin the player, just that there is a wanderering, leaderless army in which the player left.
Use a try_for_range loop and iterate over all the skills/proficiencies and attributes and use a large negative number - it should be reset to 0. You can't screw around with the player's level though - adding negative xp won't send it back to 0. Instead, you can try playing with set_player_troop, but that has its own set of problems. For your second question, iterate over the party and use party_add/remove_members after using spawn_party for your new army. Don't forget about the prisoners too.
 
Heh, as Somebody said, but I was for some reason in the mood to write silly loops...so more info
N0body said:
Is there an easier way or decreasing or reseting (which is actually what I want) the players' stats?
You're using the only operation as there's no way to set a specific level straight out. But again, a loop would simplify things

Code:
(try_for_range, ":skill", "skl_trade", "skl_reserved_18"), #the final skill won't get reset, but this shouldn't matter as it is 'reserved' and unused
    (store_skill_level, ":level", ":skill", "trp_player"),
    (val_mul, ":level", -1),
    (troop_raise_skill, "trp_player", ":skill", ":level"),
(try_end),
That will set all skills to 0. Follow a similar form for attributes and proficiencies.

And you'd use a loop to remove all the troops from the player party
Code:
(party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
(try_for_range, ":stack", 1, ":num_stacks"), #0 is the player, so don't start with 0
   (party_stack_get_troop_id, ":troop", "p_main_party", ":stack"),
   (party_stack_get_size, ":size", "p_main_party", ":stack"),
   (party_remove_members, "p_main_party", ":troop", ":size"),
(try_end),
(party_get_num_prisoner_stacks, ":num_stacks", "p_main_party"),
(try_for_range, ":stack", 0, ":num_stacks"), 
   (party_prisoner_stack_get_troop_id, ":troop", "p_main_party", ":stack"),
   (party_prisoner_stack_get_size, ":size", "p_main_party", ":stack"),
   (party_remove_prisoners, "p_main_party", ":troop", ":size"),
(try_end),

N0body said:
Sounds like an idea - how would I go around creating a new party and transferring all the troops into it - no need for the part to rejoin the player, just that there is a wanderering, leaderless army in which the player left.

Something like
Code:
(set_spawn_radius, 0),
(spawn_around_party, "p_main_party", "pt_none"),
(assign, ":new_party", reg0),
(call_script, "script_party_copy", ":new_party", "p_main_party"),
(party_remove_members, ":new_party", "trp_player", 1),
Though unless you set a number of other things for the new party--its AI behavior, etc--it will just sit there. The game won't know what to do with it.
 
Hi,

I came here because it has been said that were the right place for answers...
I'd like to know what I have to do for faction lords use units I've just created (maybe I do have nothing to do...). I understand I have to check Party Templates but I can't see what I have to do. Existing parties like reinforcement do not list all faction unit.
Is theresomeone to explain me how party templates work ?

Thanks in advance for the answers.

 
  • Ulec said:
    [*] I need to know whether it is possible to enlarge an existing map or not. Or whether it is possible to create a map larger than the current standards. (Over the maximum widths allowed in the scene creator in edit mode. I tried messing with the hex string there and got a huger map, yet still the same parts available for use whereas it just extended the area between the actual scene and the outer terrain, making no difference as you cannot use that area for anything)
    I'm not 100% sure about enlarging existing scenes: I've done exactly once (without issue), but others have brought up issues when trying to do so. As for making a bigger map (or smaller too), you're on the right track. Once you change the size of the map by tinkering with the hex values, make sure your min position and max position in the actual scene entry are appropriate.

    [*] A custom in-game inventory menu which connects to the database that was mentioned in the first component of this list, with more slots and whatnot. (Basically the same issue here with the mission_templates one as I believe that's how you also create new menus and their interfaces in-game. Please correct me if I'm wrong)
Presentations: take a look at some of the simpler ones first, as the native inventory ones are extremely convoluted.

 
pino69 said:
I came here because it has been said that were the right place for answers...
I'd like to know what I have to do for faction lords use units I've just created (maybe I do have nothing to do...). I understand I have to check Party Templates but I can't see what I have to do. Existing parties like reinforcement do not list all faction unit.
Is theresomeone to explain me how party templates work ?
Party templates list the types of troops that are given to parties of that template.
The various kingdom reinforcement templates get used to reinforce lords' parties and towns and what not.

The template itself has a list of troops that get, used as well as a numeric range; a random number of troops, picked from within the range for the given troop type, get added any time the template is used, so pick a reasonable range for the troop type you are editing.

You don't see all the types of troops a faction has because the lords' parties will gain experience and then upgrade to those troop types. You'll note there are reinforcement templates with many lower-level troops, and then some with fewer high level troops. Keep the balance, unless you want to totally change the balance of forces you face on the map.
 
In theory, it's just adding the mission template at the end and adjusting the count number at the beginning, but nothing is ever as simple in theory. (Likewise, you'd need to change the numbers referencing that mission_template in every file that has it).
 
Caba`drin said:
N0body said:
Sounds like an idea - how would I go around creating a new party and transferring all the troops into it - no need for the part to rejoin the player, just that there is a wanderering, leaderless army in which the player left.

Something like
Code:
(set_spawn_radius, 0),
(spawn_around_party, "p_main_party", "pt_none"),
(assign, ":new_party", reg0),
(call_script, "script_party_copy", ":new_party", "p_main_party"),
(party_remove_members, ":new_party", "trp_player", 1),
Though unless you set a number of other things for the new party--its AI behavior, etc--it will just sit there. The game won't know what to do with it.
may be if we use manhunter party templates (clearing it's member on spawning first and renaming it), we can make them do bandit hunting. More, if the main party moral is low hen character left them, we can use deserter party template instead.
 
so when I put this rigged model into BRF, and press (Animation: Anim_horse) i get this
32049564.jpg
 
Federick421 said:
Caba`drin said:
Federick421 said:
there is any troop editors that visually show the troops models and the items they will be using. I think it would be really handy in chosing what equipment any soldier would be using
No, there are not.

well someone should make one
Actually, there is an ingame troop viewer you can use. Check edit mode, start a game, and go to the character screen - there are new arrow buttons there that let you view all the troops.
 
sorry guys i have another problem -.-

The uniforms aren't appearing, my troops are completely invisible, apart from their heads, hands, and feet.

Can someone give me a link to someone who has had this problem and fixed it, or can someone help me??

Thanks :smile:
 
Status
Not open for further replies.
Back
Top Bottom