Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
HyperCharge said:
did i understand wrong ? or its true ?

The Barrel script is,making windmills rotating ? like in bannerlord's 8th blg video ?

The barrel script is an interpreted language/scripting language, made over module system (pretty impressive but sadly it takes up lots of CPU). With it, you can make triggers and scripts that will execute and will be saved on individual scenes (without recompiling the module itself); so you can make some fancy stuffs for a scene, but for another scene it will do something different. You can add new scenes, then for each scene you write custom stuffs for the usable scene props.

In fewer words, it is a dynamic language (it loads and executes triggers at execution time, not at compile time; so you can load different scripts while you are playing, without closing the game and reopen it).

Your scripts are saved into the scene itself, as barrel scene props (each statement is saved as a barrel scene prop), with different values of x, y, scale x,y,z, variation ids giving different data for that specific statement (yes...many barrels). When the mission starts, barrel script init is called and what it does is it loops throu every barrel scene prop that is in the scene, then it gets the scale, the variation ids and other stuffs, and put them into a big array (that will be the storing memory).

So yes, you can make windmills rotating.
 
Dusk Voyager said:
Shcherbyna said:
Is there a way to choose different mount animations in scripts?
You could take your body/hand/head/foot/armor on and off very frequently to change the meshes using the new beta's cur_item_add_mesh, making it look like the agent is animating differently, but I'm not sure if it's feasible.

The_dragon said:
Shcherbyna said:
Is there a way to choose different mount animations in scripts?

You can make all your custom mount animation with a higher priority than the mount animation.
Then make a ti_on_agent_mount trigger; inside it calculate which mount animation to use, then do agent_set_animation and your custom calculated animation.

Thanks, i fully forget about priority.. is work. I was confused because the default jump animation easily overridden by the custom jump (shinobi) with the same priority .. But the custom mount animation needs a higher priority to override the default mount anim.
 
fladin said:
HyperCharge said:
did i understand wrong ? or its true ?

The Barrel script is,making windmills rotating ? like in bannerlord's 8th blg video ?

yes  :grin:
http://barrelscript.zendarhunters.tk/example_scripts.html

ah thats what i need!

Thank You!!

What is the "A moving ship which will automatically return" code in this link ? what it does ?

like klabautermann ? or mirathei's older code's another version ?(also,is it still working old ship codes of mirathei ? i wanna to improve :smile: )
 
can someone help me with this?

Code:
multiplayer_once_at_the_first_frame = (
  0, 0, ti_once, [], [
    (start_presentation, "prsnt_multiplayer_welcome_message"),
	##LWBR
	(try_begin),
		(neg|multiplayer_is_server),
		(multiplayer_send_2_int_to_server, multiplayer_event_lwbr_server, lwbr_server_return_mod_version, lwbr_mod_version),
		(eq, lwbr_debug_mode, 1),
		(assign, reg1, lwbr_mod_version),
		(display_message, "@DEBUG: Mod version is {reg1}"),
	(try_end),
	##LWBR
    ])
Code:
			(eq, ":event_type", multiplayer_event_lwbr_server),
			(store_script_param, ":type", 3),
			(store_script_param, ":var", 4),
			(store_script_param, ":value", 5),
			(store_script_param, ":value2", 6),
			(try_begin),
...
			(else_try),
				(eq,":type",lwbr_server_return_mod_version),
				(player_set_slot, ":player_no", slot_player_lwbr_mod_version, ":var"),
				(try_begin),
					(eq, lwbr_debug_mode, 1),
					(str_store_player_username, s1),
					(assign, reg1, ":var"),
					(display_message, "@DEBUG: Player {s1} mod version is {reg1}"),
				(try_end),
			(try_end),
		(else_try),
		##LWBR end
			(eq, ":event_type", multiplayer_event_set_item_selection),
			(store_script_param, ":slot_no", 3),
			(store_script_param, ":value", 4),

it's supposed to be sending the version of the player to the server but It doesn't seem to work and I don't even get the debug message, even tought debug mode is set to 1
 
Code:
(str_store_player_username, s1),
Needs to contain the player id.

How did you tested it? In game hosting will not work for you (since neg|multiplayer_is_server will fail; if someone joins your server, it should work).
 
The_dragon said:
Code:
(str_store_player_username, s1),
Needs to contain the player id.
oopsie
The_dragon said:
How did you tested it? In game hosting will not work for you (since neg|multiplayer_is_server will fail; if someone joins your server, it should work).
I have a dedicated server running and tested with multiple people including me. noone saw the debug(the clientside one)



EDIT:
Nevermind, I just fixed part of it, I switched around the "start_presentation" to the end and now the debug msg is appearing, but the server still doesn't recognize I have the mod and gives me the msg for players without the module



EDIT2: Ok I got it to work somehow, the log on the server gets the correct version shown, but when i try to acess that information it is always 0:

Code:
lwbr_player_joined_delay = (ti_server_player_joined, 15, 0, [],[
		(store_trigger_param_1,":player"),
		(player_get_slot, reg1, ":player", slot_player_lwbr_mod_version),
		(assign, reg2, lwbr_mod_version),
		(assign, reg3, "$g_min_version_required"),
		(str_store_player_username, s1, ":player"),
		(assign, ":kick", 0),
		(try_begin),
			(ge, reg1, "$g_min_version_required"),#if player has at least the required mod version
			(try_begin),
				(le, reg1, 0),
				(multiplayer_send_string_to_player, ":player", multiplayer_event_show_server_message, "@This server is running LWBR WarForge (v{reg2}), check the WB Nexus page for the latest download. Some features may not function properly without it."),
				(server_add_message_to_log, "@Player {s1} doesn't have the mod."),
			(else_try),
				(gt, lwbr_mod_version, reg1),
				(multiplayer_send_string_to_player, ":player", multiplayer_event_show_server_message, "@Your version of LWBR WarForge (v{reg1}) is outdated, check the WB Nexus page for the latest download. Some features may not function properly."),
				(server_add_message_to_log, "@Player {s1} has outdated mod (v{reg1})."),
			(else_try),
				(eq, lwbr_mod_version, reg1),
				(server_add_message_to_log, "@Player {s1} has up to date mod (v{reg1})."),
			(else_try),
				(lt, lwbr_mod_version, reg1),
				(multiplayer_send_string_to_player, ":player", multiplayer_event_show_server_message, "@Your version of LWBR WarForge (v{reg1}) is newer than the one on the server ({reg2}, please contact the server admin and ask him to update. Some features may not function properly."),
				(server_add_message_to_log, "@Player {s1} has up to date mod (v{reg1}). Server is outdated (v{reg2})"),
			(try_end),
		(else_try),
			(try_begin),
				(le, reg1, 0),
				(multiplayer_send_string_to_player, ":player", multiplayer_event_show_server_message, "@This server is running LWBR WarForge (v{reg2}), check the WB Nexus page for the latest download. You need at least version {reg3} to play on this server, you'll be kicked now."),
				(server_add_message_to_log, "@Player {s1} doesn't have the mod and will be kicked."),
				(assign, ":kick", 1),
			(else_try),
				(gt, lwbr_mod_version, reg1),
				(multiplayer_send_string_to_player, ":player", multiplayer_event_show_server_message, "@Your version of LWBR WarForge (v{reg1}) is outdated, check the WB Nexus page for the latest download. You need at least version {reg3} to play on this server, you'll be kicked now."),
				(server_add_message_to_log, "@Player {s1} has outdated mod (v{reg1}) and will be kicked."),
				(assign, ":kick", 1),
			(try_end),
		(try_end),
		(try_begin),
			(eq, ":kick", 1),
			(neg|player_is_admin, ":player"),
			(kick_player, ":player"),
		(try_end),
		])
 
(ti_server_player_joined, 15, 0,
That thing will never work. Special triggers does not take in account the delay and rearm intervals.(aren't you getting kicked right when you join the server?and not 15 seconds later?)

You need to make a trigger that will loop throu all players, then for each player you get the join time, then do current time - join time; check if it is greater than 3 (if 3 seconds passed since the client joined) then check if he is ok; if it is not, kick him.
 
This may happen because message display was turned off and not turned on back again.

Or it can happen if there are too many messages to display.

Check Notes -> Recent Messages screen.
 
Lav said:
This may happen because message display was turned off and not turned on back again.

Or it can happen if there are too many messages to display.

Check Notes -> Recent Messages screen.

Thank you very much for responding.

I already solved the problema.

I happen to use a faction created by me for the bands that appear in the quest.

Change the faction by outlaws and the problem was solved.

LoL  I have to learn a lot more if I want to create new factions  :oops:

another question:  How to string this quest with another?

Code:
#Neodrako Inicio de la Quest caballeros de calradia

[trp_antler, "start", [[eq,"$holy_relic",2]], "Saludos {playername}.","bye2",[]],
[trp_antler|plyr, "bye2", [], "Saludos a ti también, Antler.","close_window",[]],
[trp_antler, "start", [[eq,"$holy_relic",1]], "¿Encontraste la reliquia?","relic_find_question",[]],
[trp_antler|plyr, "relic_find_question", [(player_has_item,"itm_relic")], "¡Sí! Fue bastante difícil.", "relic_znaleziona",[(call_script,"script_end_quest","qst_relic")]],
[trp_antler|plyr, "relic_find_question", [], "No, aun no.", "close_window",[]],
[trp_antler, "relic_znaleziona", [], "¿En serio? Bueno, ¡felicidades {playername}! Decidí no darte la recompensa. Esta espada es tu recompensa. {Un guerrero /Una guerrera} como tu la necesitara mas que yo.","close_window",[[assign,"$holy_relic",2]]],
[trp_antler, "start", [[eq,"$holy_relic",0]], "Hola, {Aventurero/ Aventurera}! ¿Estás buscando un trabajo o algo así?", "god1",[]],
[trp_antler|plyr, "god1", [], "Sí!", "god2",[]],
[trp_antler, "god2", [], "Bueno. ¿Nunca ha oído nada sobre la Caballeros de Calradia?. En otro tiempo fueron una orden de caballería que protegía a la familia Imperial pero desde que los dirige Thyr  Son una banda de bastardos errantes o caballeros caídos. Ellos recientemente asaltaron el monasterio Suno y robaron una reliquia sagrada. Ahora, ellos deben de estar descansando cerca de la aldea de Sumbuja. Encuéntralos, mátalos a todos excepto Thyr. trata de persuadirlo para que te de información acerca de la ubicación de la reliquia. Espero que te quede bastante claro. Te pagaré 2.000 dinares.", "god3",[]],
[trp_antler|plyr, "god3", [], "Muy bien, esa es buena oferta. ¡Voy a recuperar esa reliquia!", "godyes",[
(setup_quest_text, "qst_relic"),
(str_store_string, s2, "@Un tipo llamado Atler me contó Una historia interesante. Caballeros caídos llamados  Los Caballeros de Calradia, recientemente Asaltaron la cripta de la familia imperial Suno y robaron la reliquia sagrada. Tengo que encontrarlos y después de la batalla, convencer a su líder Thyr de que me entregue la  reliquia sagrada. Esos bastardos, ahora deben estar cerca de Sumbuja!  "),
(call_script,"script_start_quest","qst_relic","trp_antler"), (set_spawn_radius,1),(spawn_around_party,"p_village_14","pt_caballeros_de_calradia")        

]],
  
[trp_antler|plyr, "god3", [], "No, no tengo tiempo para eso!", "close_window",[]],
[trp_antler, "godyes", [], "Excelente!", "close_window",[[assign,"$holy_relic",1]]],

[party_tpl|pt_caballeros_de_calradia,"start", [(eq,"$talk_context",tc_party_encounter),(neq, "$g_talk_troop", "pt_caballeros_de_calradia"),], " Alto  no des ni un paso mas, ¿que buscas?", "order2",[]],
[party_tpl|pt_caballeros_de_calradia|plyr,"order2", [], "Busco la reliquia sagrada que lograste profanando la cripta de la familia imperial. si me la entregas o me dices donde esta puede que no te cuelgue del primer árbol que vea.", "order3",[]],
[party_tpl|pt_caballeros_de_calradia,"order3", [], "Jajaja!  no te tome por un mercader. Primero dame cuatro millones de denares!", "order4",[]],
[party_tpl|pt_caballeros_de_calradia|plyr,"order4", [], "Ja...  muy gracioso.  No te tome por un bufón.... Prepárate a morir cobarde.", "close_window",[[encounter_attack]]],
[party_tpl|pt_caballeros_de_calradia,"order2", [], "No importa ...", "close_window",[(assign, "$g_leave_encounter",1)]],

[party_tpl|pt_caballeros_de_calradia,"start", [(eq,"$talk_context",tc_hero_freed),(neq, "$g_talk_troop", "pt_caballeros_de_calradia"),], "Me rindo. te entregare la reliquia si me dejas ir libre.","relikwia",[]],
[party_tpl|pt_caballeros_de_calradia|plyr,"relikwia", [], "¿Ya no eres tan gracioso no?  Entrégame la reliquia y sal de mi vista bastardo. ", "relikwia2",[]],
[party_tpl|pt_caballeros_de_calradia,"relikwia2", [], "Tómala y deja de mofarte de mi.......", "relikwia3",[(troop_add_item, "trp_player","itm_relic",)]],
[party_tpl|pt_caballeros_de_calradia|plyr,"relikwia3", [], "¿Ves esas colinas? corre rápido y desaparece antes de que decida honrar a los muertos que profanaste.", "close_window",[(assign, "$g_leave_encounter",1)]],

#Neodrako Fin de la Quest caballeros de calradia

thank you very much
 
The_dragon said:
(ti_server_player_joined, 15, 0,
That thing will never work. Special triggers does not take in account the delay and rearm intervals.(aren't you getting kicked right when you join the server?and not 15 seconds later?)

You need to make a trigger that will loop throu all players, then for each player you get the join time, then do current time - join time; check if it is greater than 3 (if 3 seconds passed since the client joined) then check if he is ok; if it is not, kick him.

that is really sad :sad: if those triggers worked with delay it would be much more efficient on the server... welp thank you anyway
 
Lord of Shadows said:
Are there any OSPs which add bows, crossbows and such?
Crossbows are rare. The only two packs I know about are OSP Weapons pack  on MB Repository (contains a single model) and item fantasy-style retexture pack by akosmo on Nexus Mods.

For bows, search members for usernames Havoc, Rath0s, bogmir, scicon and Spak. When you find them, go to profile -> Show Posts -> Show Topics and you'll be able to find their threads easily. Also look for Addonay Elven Weaponry on MB Repository.

Deutch1 said:
Is there an operations which stores the players renown?.
Renown is stored as troop slot value. So what you need is the slot index which can be found in module_constants.py. However there's a script "script_change_troop_renown" which is the recommended method to change renown (so if you ever wish to add some side-effects to changing renown, you can make those changes in a single point of code instead of thrawling your entire module for mentions of slot_troop_renown).
 
Hello everybody I have been making a mod for WFAS for quite a while now but when I thought I was finished, I changed my mind. I worked a lot on setting new values on weapons, new coldarms, tons and tons of new uniforms but I want ever more but I need some assistance. To start with I want to change all random scenes ie.random plains, random steppe etc. in singleplayer, to be replaced by a bunch of custom scenes. What I want to do is make around 20-30 custom scenes and instead of random scenes being generated, make the game randomly choose one of the custom scenes. The scenes will be with farms, random houses, maybe a grave or two to make the feel of the era be a bit more realistic because plain grass, bushes and trees is not enough for me. So can anyone help me with that? I can make the scenes myself but I have no idea where to put them or save them or any of that. Oh and is that even possible :lol:? Thanks in advance.
 
Searching the board for "replace random scenes" should give you a few threads where this subject was covered. Though usually people want to replace the random scenes because of unrealistic over-rugged terrain being generated. :smile:
 
Status
Not open for further replies.
Back
Top Bottom