Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
1. Don't use the smooth function too often. It can end up making reverse polygons or putting vertices underground, which has caused crashes for me too. Try manually fixing the problem areas, if you can find them.

2. Make a faction, exclude them from script_initialise_aristocracy, and make sure they don't defect due to landlessness (exclude from defection script). You might also need to give them a weekly injection of cash so that they don't run out of money half way through the game. Oh, and there's a script in game_start which assigns villages to castles. You should exclude the knighthood's castle.
 
Hello friends, I have another question.

I borrowed a code of recruitment and use it successfully in a npc.

But I wonder if there is another way to adapt to npc but considering culture.

I mean that as the culture of the player can recruit one or another troop. 

My English is very bad. I don't know if you understand me.

if you are a faction recruits a type of troop and if you are from another other.

As modified this code for use with the king's counselor.

Thank you


module_dialogs
Code:
[trp_ramun_the_slave_trader|plyr,"ramun_talk", [          (eq, "$reclutar_cantabros", 0),
], "¿Y los esclavos de las galeras estan en venta?",
"pj_talk71",[]],
  

  [trp_ramun_the_slave_trader, "pj_talk71", [],
   "Son Hombres endurecidos por una vida de exclavitu como nadie mas a conocido. y es que muy pocos sobreviven a eso... dales una espada y calrradia tembalara a tus pies.\Puedo darte Algunos Esclavos de las galeras por  100 denares cada uno.\
 ¿Estas interesado?","ramun_oferta", []],
[trp_ramun_the_slave_trader|plyr,"ramun_oferta", [], "Lo siento pero solo pregunte por curiosidad adiós.",
"close_window",[]],
[trp_ramun_the_slave_trader|plyr,"ramun_oferta", [], "¿Desde luego que estoy interesado. estoy ansioso por poder verlos en combate.", "ramun_oferta2",[]],

[trp_ramun_the_slave_trader,"ramun_oferta2", [], "Cada hombre de las galeras cuesta 100 denares y puedo venderte un maximo de 15 cada 72 horas recibo mas ¿cuantos quieres?", "ramun_oferta3",[]],

[trp_ramun_the_slave_trader|plyr,"ramun_oferta3", [], "Quiero 15  (coste: 1500 denares). ",
"pj_dilema2",[
    (store_troop_gold,":money","trp_player"),
      (try_begin),
        (gt,":money",2000),
       (troop_remove_gold, "trp_player", 1500),
	   (store_random_in_range, ":warriors",15),
	   (party_add_members,"p_main_party","trp_imperial_elite_2b", ":warriors"),
	   (call_script, "script_change_player_party_morale", 1),
		  (assign, "$reclutar_cantabros", 1),
	  (else_try),
        (display_message,"str_trp_ramun_the_slave_trader"),
      (try_end),
]],  

[trp_ramun_the_slave_trader|plyr,"ramun_oferta3", [], "Quiero 10  (coste: 1000 denares). ",
"pj_dilema2",[
    (store_troop_gold,":money","trp_player"),
      (try_begin),
        (gt,":money",2000),
       (troop_remove_gold, "trp_player", 1000),
	   (store_random_in_range, ":warriors",10),
	   (party_add_members,"p_main_party","trp_imperial_elite_2b", ":warriors"),
	   (call_script, "script_change_player_party_morale", 1),
		  (assign, "$reclutar_cantabros", 1),
	  (else_try),
        (display_message,"str_trp_ramun_the_slave_trader"),
      (try_end),
]],  
  
 [trp_ramun_the_slave_trader|plyr,"ramun_oferta3", [], "Quiero 5  (coste: 500 denares). ",
"pj_dilema2",[
    (store_troop_gold,":money","trp_player"),
      (try_begin),
        (gt,":money",2000),
       (troop_remove_gold, "trp_player", 500),
	   (store_random_in_range, ":warriors", 5),
	   (party_add_members,"p_main_party","trp_imperial_elite_2b", ":warriors"),
	   (call_script, "script_change_player_party_morale", 1),
		  (assign, "$reclutar_cantabros", 1),
	  (else_try),
        (display_message,"str_trp_ramun_the_slave_trader"),
      (try_end),
]],   


#[trp_ramun_the_slave_trader,"money", [], "¿Pero si no tienes ni 2000 denares? soy un hombre de negocios regresa cuando puedas pagar.",
#"Me_piro",[]],
#[trp_ramun_the_slave_trader|plyr,"Me_piro", [], "Mejor me voy,  adios.", "close_window",[]],

 [trp_ramun_the_slave_trader|plyr,"ramun_oferta3", [], "Pensandolo mejor no quiero comprar esclavos de las galeras.", "close_window",[]],
  
  [trp_ramun_the_slave_trader, "pj_dilema2", [],
   "Que te den gloria y a mi mas dinero cada vez que necesites mas. tardare 2 días en tener mas ","ramun_bye", []],	  

[trp_ramun_the_slave_trader|plyr,"ramun_bye", [], "Gracias Ramun volveré en otra ocasión adiós.",
"close_window",[]],
 
Code:
       (troop_remove_gold, "trp_player", 500),
	   (store_random_in_range, ":warriors", 5),
	   (party_add_members,"p_main_party","trp_imperial_elite_2b", ":warriors"),

this part of the code is quite strange, "store_random_in_range" needs two values after the variable is will be saved (i.e: 1, 6 to store a random number from 1 to 5) but what you'd need there is an "assign" operation.

also, to get a different troop depending on the faction, you could follow the example of the recruiting in villages:

Code:
	  # Cultures:
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_1_troop, "trp_swadian_recruit"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_2_troop, "trp_swadian_militia"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop, "trp_swadian_footman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_4_troop, "trp_swadian_infantry"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop, "trp_swadian_knight"),

      (faction_set_slot, "fac_culture_2", slot_faction_tier_1_troop, "trp_vaegir_recruit"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_2_troop, "trp_vaegir_footman"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_3_troop, "trp_vaegir_veteran"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_4_troop, "trp_vaegir_infantry"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_5_troop, "trp_vaegir_knight"),

      (faction_set_slot, "fac_culture_3", slot_faction_tier_1_troop, "trp_khergit_tribesman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_2_troop, "trp_khergit_skirmisher"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_3_troop, "trp_khergit_horseman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_4_troop, "trp_khergit_horse_archer"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"),

      (faction_set_slot, "fac_culture_4", slot_faction_tier_1_troop, "trp_nord_recruit"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_2_troop, "trp_nord_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_3_troop, "trp_nord_trained_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_4_troop, "trp_nord_warrior"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_5_troop, "trp_nord_veteran"),

      (faction_set_slot, "fac_culture_5", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),

      (faction_set_slot, "fac_culture_6", slot_faction_tier_1_troop, "trp_sarranid_recruit"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_2_troop, "trp_sarranid_footman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_3_troop, "trp_sarranid_archer"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_4_troop, "trp_sarranid_horseman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_5_troop, "trp_sarranid_mamluke"),

so you could set a new slot "slot_faction_slave_troop" and assign it somewhere at "script_game_start" then use:
Code:
(try_begin),
(is_between, "current_player_faction*", "fac_kingdom_1", "fac_kingdoms_end"),
(faction_get_slot, ":troop", "current_player_faction*", slot_faction_slave_troop),
(else_try),
(assign,":troop","trp_slave"),
(try_end),
(party_add_members,"p_main_party",":troop", 5),
and change "current_player_faction*" for sth else as I don't have the modSystem open right now
 
Hi my question is reasonably simple. How much can be affected by server side scripts. For instance if I was creating a script for use on a NW server would it be able to change the values of Module_Troops or Module_Items or anything similar? Thanks to whoever replies.
 
Fraser said:
Hi my question is reasonably simple. How much can be affected by server side scripts. For instance if I was creating a script for use on a NW server would it be able to change the values of Module_Troops or Module_Items or anything similar? Thanks to whoever replies.

yes you can edit module troops and items as much as you like as long as you don't remove/add new items/troops however, players will only see the changes if they download your "mod", also, you need to change the items in module_scripts if you want players to be able to select new items
 
I was more meaning how far can I go with scripts on a sever without people having to download my mod and instead just connect to the server.
 
Ikaguia said:
Code:
       (troop_remove_gold, "trp_player", 500),
	   (store_random_in_range, ":warriors", 5),
	   (party_add_members,"p_main_party","trp_imperial_elite_2b", ":warriors"),

this part of the code is quite strange, "store_random_in_range" needs two values after the variable is will be saved (i.e: 1, 6 to store a random number from 1 to 5) but what you'd need there is an "assign" operation.

also, to get a different troop depending on the faction, you could follow the example of the recruiting in villages:

Code:
	  # Cultures:
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_1_troop, "trp_swadian_recruit"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_2_troop, "trp_swadian_militia"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop, "trp_swadian_footman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_4_troop, "trp_swadian_infantry"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop, "trp_swadian_knight"),

      (faction_set_slot, "fac_culture_2", slot_faction_tier_1_troop, "trp_vaegir_recruit"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_2_troop, "trp_vaegir_footman"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_3_troop, "trp_vaegir_veteran"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_4_troop, "trp_vaegir_infantry"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_5_troop, "trp_vaegir_knight"),

      (faction_set_slot, "fac_culture_3", slot_faction_tier_1_troop, "trp_khergit_tribesman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_2_troop, "trp_khergit_skirmisher"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_3_troop, "trp_khergit_horseman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_4_troop, "trp_khergit_horse_archer"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"),

      (faction_set_slot, "fac_culture_4", slot_faction_tier_1_troop, "trp_nord_recruit"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_2_troop, "trp_nord_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_3_troop, "trp_nord_trained_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_4_troop, "trp_nord_warrior"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_5_troop, "trp_nord_veteran"),

      (faction_set_slot, "fac_culture_5", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),

      (faction_set_slot, "fac_culture_6", slot_faction_tier_1_troop, "trp_sarranid_recruit"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_2_troop, "trp_sarranid_footman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_3_troop, "trp_sarranid_archer"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_4_troop, "trp_sarranid_horseman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_5_troop, "trp_sarranid_mamluke"),

so you could set a new slot "slot_faction_slave_troop" and assign it somewhere at "script_game_start" then use:
Code:
(try_begin),
(is_between, "current_player_faction*", "fac_kingdom_1", "fac_kingdoms_end"),
(faction_get_slot, ":troop", "current_player_faction*", slot_faction_slave_troop),
(else_try),
(assign,":troop","trp_slave"),
(try_end),
(party_add_members,"p_main_party",":troop", 5),
and change "current_player_faction*" for sth else as I don't have the modSystem open right now

Thank you very much for the reply ^^
 
So I'm trying to add towns to an existing faction but the starting quest is all messed up. Wrong scene, wrong troop for the merchant, and the merchant not giving the starting quest.
Here's all the code I've added. Is there something else I need to add, but haven't?
module_parties
Code:
	Line 106:   ("town_26", "Rothenbach", 	icon_town|pf_town, no_menu, pt_none, fac_neutral, 0, ai_bhvr_hold, 0, (-28,-20), [], 260.0),
module_troops
Code:
	Line 1015: ["town_26_seneschal", "{!}Town 26 Seneschal", "{!}Town 14 Seneschal", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[ itm_blue_gambeson,      itm_blue_hose],     def_attrib|level(2),wp(20),knows_common, 0x000000000004728b01c293c694944b05],
	Line 1093: ["town_26_arena_master","Tournament Master","{!}Tournament Master",tf_hero|tf_randomize_face, scn_town_26_arena|entry(52),reserved,  fac_commoners,[itm_padded_leather,    itm_hide_boots],    def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2],
	Line 1093: ["town_26_arena_master","Tournament Master","{!}Tournament Master",tf_hero|tf_randomize_face, scn_town_26_arena|entry(52),reserved,  fac_commoners,[itm_padded_leather,    itm_hide_boots],    def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2],
	Line 1143: ["town_26_armorer","Armorer", "{!}Armorer",  tf_hero|tf_randomize_face|tf_female|tf_is_merchant, 0, 0, fac_commoners,[itm_sarranid_common_dress,         itm_sarranid_head_cloth       ],def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2],
	Line 1173: ["town_26_weaponsmith","Weaponsmith","{!}Weaponsmith",tf_hero|tf_randomize_face|          tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic,     itm_sarranid_boots_a],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2],
	Line 1202: ["town_26_tavernkeeper","Tavern_Keeper","{!}Tavern_Keeper",tf_hero|tf_randomize_face,           scn_town_26_tavern|entry(9),0,  fac_commoners,[itm_sarranid_cloth_robe_b,               itm_sarranid_boots_a],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2],
	Line 1202: ["town_26_tavernkeeper","Tavern_Keeper","{!}Tavern_Keeper",tf_hero|tf_randomize_face,           scn_town_26_tavern|entry(9),0,  fac_commoners,[itm_sarranid_cloth_robe_b,               itm_sarranid_boots_a],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2],
	Line 1231: ["town_26_merchant","Merchant","{!}Merchant",          tf_hero|tf_randomize_face|tf_is_merchant, scn_town_26_store|entry(9),0, fac_commoners,    [itm_leather_apron, itm_leather_boots                   ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2],
	Line 1231: ["town_26_merchant","Merchant","{!}Merchant",          tf_hero|tf_randomize_face|tf_is_merchant, scn_town_26_store|entry(9),0, fac_commoners,    [itm_leather_apron, itm_leather_boots                   ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2],
	Line 1262: ["town_26_horse_merchant","Horse Merchant","{!}Town 18 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant|tf_female,  0, 0, fac_commoners,[itm_sarranid_common_dress_b,       itm_blue_hose,      itm_sarranid_felt_head_cloth_b],     def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2],
	Line 1291: ["town_26_mayor", "Guild_Master", "{!}Guild_Master", tf_hero|tf_randomize_face, 0,reserved,  fac_neutral,[ itm_sarranid_cloth_robe,      itm_sarranid_boots_a],     def_attrib|level(2),wp(20),knows_common,  man_face_middle_1, mercenary_face_2],
	Line 1439: ["town_26_master_craftsman", "{!}Town 26 Seneschal", "{!}Town 14 Seneschal", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[ itm_sarranid_cloth_robe_b,      itm_blue_hose],     def_attrib|level(2),wp(20),knows_common, 0x00000000200c658a5723b1a3148dc455000000000015ab920000000000000000],
module_scenes
Code:
("town_26_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300491830004a529000036230000312a00003653",
("town_26_castle",sf_indoors, "interior_castle_z", "bo_interior_castle_z", (-100,-100),(100,100),-100,"0",
["exit"],["town_26_seneschal"]),	
("town_26_tavern",sf_indoors, "interior_tavern_g", "bo_interior_tavern_g", (-100,-100),(100,100),-100,"0",
("town_26_store",sf_indoors, "interior_town_house_j", "bo_interior_town_house_j", (-100,-100),(100,100),-100,"0",
("town_26_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c",
("town_26_prison",sf_indoors,"interior_prison_e", "bo_interior_prison_e", (-100,-100),(100,100),-100,"0",
("town_26_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300015e300063d8800002757000055df00001b08",
("town_26_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932",
module_scripts
Code:
	Line 528: 	  (call_script, "script_give_center_to_faction_aux", "p_town_26", "fac_kingdom_7"),
	Line 618:       (call_script, "script_give_center_to_lord", "p_town_26", "trp_knight_7_1", 0),
	Line 5902: 	 (call_script, "script_set_trade_route_between_centers", "p_town_26", "p_town_2"), #Maastricht - Tihr     
	Line 5903:      (call_script, "script_set_trade_route_between_centers", "p_town_26", "p_town_4"), #Maastricht - Suno
	Line 5904:      (call_script, "script_set_trade_route_between_centers", "p_town_26", "p_town_12"), #Maastricht - Wercheg        
	Line 5905:      (call_script, "script_set_trade_route_between_centers", "p_town_26", "p_town_6"), #Maastricht- Praven     
	Line 5906:      (call_script, "script_set_trade_route_between_centers", "p_town_26", "p_town_15"), #Maastricht - Yalen     
	Line 5907:      (call_script, "script_set_trade_route_between_centers", "p_town_26", "p_town_16"), #Maastricht - Dhirim
	Line 6497:       (party_set_slot,"p_town_26", slot_town_arena_melee_1_num_teams,   2),
	Line 6498:       (party_set_slot,"p_town_26", slot_town_arena_melee_1_team_size,   8),
	Line 6499:       (party_set_slot,"p_town_26", slot_town_arena_melee_2_num_teams,   2),
	Line 6500:       (party_set_slot,"p_town_26", slot_town_arena_melee_2_team_size,   8),
	Line 6501:       (party_set_slot,"p_town_26", slot_town_arena_melee_3_num_teams,   2),
	Line 6502:       (party_set_slot,"p_town_26", slot_town_arena_melee_3_team_size,   8),
	Line 6519: 	  (party_set_slot, "p_town_26", slot_center_smithies, 20),       #Maastricht
	Line 6520:       (party_set_slot, "p_town_26", slot_center_wine_presses, 5),    #Maastricht
	Line 6521:       (party_set_slot, "p_town_26", slot_center_olive_presses, 5),    #Maastricht
	Line 6522:       (party_set_slot, "p_town_26", slot_center_fishing_fleet, 25),    #Maastricht
	Line 6939: 			(party_slot_eq, ":village_no", slot_village_market_town, "p_town_26"), #Maastricht
module_triggers
Code:
	Line 191:     (store_add, ":p_town_26_plus_one", "p_town_26", 1),
	Line 191:     (store_add, ":p_town_26_plus_one", "p_town_26", 1),
	Line 192:     (store_random_in_range, ":selected_town", "p_town_1", ":p_town_26_plus_one"),
 
jacobhinds said:
Is it possible to get vertex colours into openbrf from an external editor?
You can import from the .ply format, at least; it's what I have used in the past. But at least when importing to / exporting from Blender, the vertices are not kept attached and the orientation and scale is different (cancels out if imported back); so I normally use the .obj format for editing the mesh and UV mapping, then export to .ply only to tweak vertex colors, reimport into a differently named mesh in OpenBrf, then use "Copy" "Paste vert colors" onto the .obj imported version, to keep the correct mesh.
 
Fraser said:
I was more meaning how far can I go with scripts on a sever without people having to download my mod and instead just connect to the server.

Here are some limitations:
- items:
  - you can add new items, BUT you can only use them as storage memory (using their slots). Trying to use then (equip, spawn) will NOT work in clients (they will not see the item or their client will just pop errors and crash)
  - you can't edit the texture/mesh of an item (because it is related to visual, the server does not control visual things in clients (each client loads the texture of anything from the game/mod folder and not by transmitting/downloading them over internet))
  - you can't change the item type (one handed, two handed, etc)
  - you can change the rest of an item's properties/flag with a few exceptions like item size (which is client side)
  - some flags/properties combinations can result in crashes

-troops:
  - same as items, you can add new troops BUT only for using them as storage
  - you CAN'T edit the face code (it will be no different in clients)
  - you can change stats like agility, skills
  - you can change the inventory

-scripts:
  - you can add/remove as many scripts as you like
  - you can change already existing scripts

-mission templates:
  - you can add/remove as many triggers as you like
  - i don't have any idea about mission templates flags/entry points

-presentations:
  - it doesn't matter what you do to them, it will not affect the clients

There are many more things to say, but I couldn't found proper context for them.

Conclusion: you can do whatever you like in your server as far as you don't want visual things changed or you don't want to use stuffs that needs to be manually synced (like play sound at position).
 
So, do I make these changes on server? Or, writing on top of any Native module in my PC then putting it on FTP server will work?
 
The_dragon said:
Fraser said:
I was more meaning how far can I go with scripts on a sever without people having to download my mod and instead just connect to the server.

Here are some limitations:
- items:
  - you can add new items, BUT you can only use them as storage memory (using their slots). Trying to use then (equip, spawn) will NOT work in clients (they will not see the item or their client will just pop errors and crash)
  - you can't edit the texture/mesh of an item (because it is related to visual, the server does not control visual things in clients (each client loads the texture of anything from the game/mod folder and not by transmitting/downloading them over internet))
  - you can't change the item type (one handed, two handed, etc)
  - you can change the rest of an item's properties/flag with a few exceptions like item size (which is client side)
  - some flags/properties combinations can result in crashes

-troops:
  - same as items, you can add new troops BUT only for using them as storage
  - you CAN'T edit the face code (it will be no different in clients)
  - you can change stats like agility, skills
  - you can change the inventory

-scripts:
  - you can add/remove as many scripts as you like
  - you can change already existing scripts

-mission templates:
  - you can add/remove as many triggers as you like
  - i don't have any idea about mission templates flags/entry points

-presentations:
  - it doesn't matter what you do to them, it will not affect the clients

There are many more things to say, but I couldn't found proper context for them.

Conclusion: you can do whatever you like in your server as far as you don't want visual things changed or you don't want to use stuffs that needs to be manually synced (like play sound at position).

Thanks for the reply. My plan is to change the number of cartridges players spawn with on NW. From the information you provided I assume this is possible, Thank you :grin:
 
That was an exception (forgot to mention it, didn't came into my mind).
The client will load it's max ammo from items txt file and the client does some ammo checks each time you want to shoot. For ex, if originally the max ammo was 5, and you put 10 in server, the client will still shoot only up to 5, because it's ammo is not updated from server each time he shoots (after 5 shots, the client will think he has 0 ammo, resulting in it not sending that he wanna shoot to server (because ammo > 0 check fails (from the game engine))). At least that is resulting from some of my tests.

You can however decrease the max ammo number, but if serverside, the player has 0 ammo, and he wanna shoot, client side will result in 'ready and hold' animation to play even after the mouse button is released (by right clicking or doing anything else it will come back to it's normal animation).
 
Hello everyone.

I have problems with the coordinates.  As you know my English is not good.

I will try to explain well. The question is:

Is there a way to know the coordinates of the player so they can be then used in the Module_system?.

Thank you all
 
Neodrako said:
Hello everyone.

I have problems with the coordinates.  As you know my English is not good.

I will try to explain well. The question is:

Is there a way to know the coordinates of the player so they can be then used in the Module_system?.

Thank you all
Global map or on the scene?

On the global map, it's:
Code:
(set_fixed_point_multiplier, <precision>),
(party_get_position, pos1, "p_main_party"),
(position_get_x, reg1, pos1),
(position_get_y, reg2, pos1),
(display_message, "@Player is at ({reg1}, {reg2})"),
On the scene, it's:
Code:
(set_fixed_point_multiplier, <precision>),
(get_player_agent_no, ":agent_id"),
(try_begin),
  (agent_is_active, ":agent_id"),
  (agent_get_position, pos1, ":agent_id"),
  (position_get_x, reg1, pos1),
  (position_get_y, reg2, pos1),
  (position_get_z, reg3, pos1),
  (display_message, "@Player is at ({reg1}, {reg2}, {reg3})"),
(else_try),
  (display_message, "@No player agent found!"),
(try_end),
Use whatever value you want as <precision> - popular values are 100 and 1000. If you use 1, then you're using the base distance units. On the scene it's meters, on the global map it's the distance that a party with speed of 1.0 traverses in 1 second.
 
MaHuD said:
To who are you replying Blender?
Usually I would say the person above you, but since he was talking to someone else I am not sure. :razz:

:razz:

I kind of misused grammar. I was also curious for the answer of that question.
 
Thank you

In the global map
Do you have to be somewhere special?

O replace something that already exists?

thank you very much
 
Status
Not open for further replies.
Back
Top Bottom