Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Code:
(try_for_agents,":agent _no"),
          (agent _is _alive, ":agent _no"),
         (agent_get _ horse, ":agent _horse",  ":player_agent"),
          (ge,  ":agent _horse", 0),
          (agent _get _position, ":agent", pos1),
     (agent_set _scripted _destination, ":agent", pos1, 1),
          (entry_point _get _position, pos2, 2),
          (agent_set _scripted_destination, ":agent", pos2, 1),
(try_end),
 
Jesus Christ, on my last visit this topic had only 250 pages.
Anyways, here's a quick Q from me: I have two rectangular mesh overlays, one of which shows the player's stamina, and the other is a black background. The problem is that when I update the real overlay's size, the background pops up on top of it and blocks it. How can bypass that? Are there any "bring to front", "send to back" or similar operations?
Thanks in advance.
 
Lumos said:
Anyways, here's a quick Q from me: I have two rectangular mesh overlays, one of which shows the player's stamina, and the other is a black background. The problem is that when I update the real overlay's size, the background pops up on top of it and blocks it. How can bypass that? Are there any "bring to front", "send to back" or similar operations?
I would suggest copying the materials for the meshes into your mod with a new name (if necessary) and adjusting the render order in the flags window of OpenBrf. If I remember correctly, higher numbers are rendered in front of lower ones, and with the same number it might depend on something else or just be random.
 
Lumos said:
Jesus Christ, on my last visit this topic had only 250 pages.
Anyways, here's a quick Q from me: I have two rectangular mesh overlays, one of which shows the player's stamina, and the other is a black background. The problem is that when I update the real overlay's size, the background pops up on top of it and blocks it. How can bypass that? Are there any "bring to front", "send to back" or similar operations?
Thanks in advance.
Overlays are rendered in the order they are declared, and apparently altering an overlay also affects it's positioning. However there's a way around - container overlays (and their contents) are always rendered on top of all other overlays (but later-declared container will still render on top of earlier-declared container). So if you want to bring your overlay to front, put it into a container overlay.

Container overlays only appeared in 1.143 though. If you are working with 1.134 or earlier, then no luck, you'll have to figure out how the game changes rendering order for regular overlays and re-touch all your overlays in proper order.
 
Wait, what? Are you sure container overlays weren't there earlier? I'm pretty sure I had to fiddle with them in Madmin during 1.134, and the operations worked on a 1.134 exe.  :???:
 
MadocComadrin said:
Wait, what? Are you sure container overlays weren't there earlier? I'm pretty sure I had to fiddle with them in Madmin during 1.134, and the operations worked on a 1.134 exe.  :???:
My mistake, confused WB 1.134 and MnB 1.010 module systems.
 
Posted this in the WSE thread. Okay, so, I used this script
Code:
("cf_gun_fire", [
(store_trigger_param_1, ":agent_id"),
(agent_get_player_id,":player",":agent_id"),
(try_begin),
	(multiplayer_is_server),
	(try_begin),
		(multiplayer_get_my_player, ":player"),
		(ge, ":player", 0),
		(get_player_agent_no, ":player"),
		(try_begin),
			(agent_get_look_position, pos1, ":player"),
			(position_move_z, pos1, 165, 0),
			(position_move_y, pos1, 50, 0),
			(position_rotate_x, pos1,0), 
			(init_position,pos2),
			(copy_position, pos2, pos1),
			(set_fixed_point_multiplier, 100),
			(try_begin),
				(store_random_in_range,":randomX",-3,3),
				(store_random_in_range,":randomZ",-3,3),
				(position_rotate_x, pos2,":randomX"),
				(position_rotate_z, pos2,":randomZ"),
				(spawn_missile, ":player", pos2, 2000, "itm_crossbow", "itm_yellow_paintball_shot"),
			(try_end),
		(try_end),
	(try_end),
(try_end),
]),
To attempt to remove cheaters and add semi-auto. I call the script upon weapon firing. Now, the problem is that this causes all agents on the map with weapons using this script to shoot the paintball (airsoft pellet now, just changed it up).

So: I shoot, and my purposely spawned 50 MP bots also shoot. Then they all shoot and everyone has a wall of paintballs flying in front of them. Any ideas? I'm all out of them. :/

My only question is: How the he** do I make this work in MP?
 
No idea what's wrong, but I'm pretty sure this operation:

(get_player_agent_no, ":player"),

is supposed to be run in single-player context only.
 
I really do hope someone answers my question. I am a newbie, but I really want to learn to mod this wonderful game for one reason and one reason only. I want to make the world map akin to the Armored Princess game, with static mobs, a pseudo turn based simulacrum if you will. I want to introduce a certain structure to the campain gameplay, in order to remove the tedious grind system that is curently in place (in my humble opinion, of course) keeping the battles as they are right now.

The question is can I make parties that don't move on the world map ? I know I can make a new map, with new cities and villages and bandit camps, but can I make a Party of Enemies that GUARDS and BLOCKS a certain mountain pass, for example, and DOESNT MOVE FROM THAT SPOT and that CAN'T BE KITTED ?

Thank you !
 
ms_ts_2007 said:
I really do hope someone answers my question. I am a newbie, but I really want to learn to mod this wonderful game for one reason and one reason only. I want to make the world map akin to the Armored Princess game, with static mobs, a pseudo turn based simulacrum if you will. I want to introduce a certain structure to the campain gameplay, in order to remove the tedious grind system that is curently in place (in my humble opinion, of course) keeping the battles as they are right now.

The question is can I make parties that don't move on the world map ? I know I can make a new map, with new cities and villages and bandit camps, but can I make a Party of Enemies that GUARDS and BLOCKS a certain mountain pass, for example, and DOESNT MOVE FROM THAT SPOT and that CAN'T BE KITTED ?

Thank you !

(party_set_flags, ":party", pf_is_static, 1),  # This will make party never move again
 
dunde said:
ms_ts_2007 said:
I really do hope someone answers my question. I am a newbie, but I really want to learn to mod this wonderful game for one reason and one reason only. I want to make the world map akin to the Armored Princess game, with static mobs, a pseudo turn based simulacrum if you will. I want to introduce a certain structure to the campain gameplay, in order to remove the tedious grind system that is curently in place (in my humble opinion, of course) keeping the battles as they are right now.

The question is can I make parties that don't move on the world map ? I know I can make a new map, with new cities and villages and bandit camps, but can I make a Party of Enemies that GUARDS and BLOCKS a certain mountain pass, for example, and DOESNT MOVE FROM THAT SPOT and that CAN'T BE KITTED ?

Thank you !

(party_set_flags, ":party", pf_is_static, 1),  # This will make party never move again
Or, if you are not spawning the party in game, but adding it via the file module_parties, you add the flag pf_is_static in the appropriate place (see the file for other parties marked pf_is_static).

Not sure why no one MP-versed has replied to you Specialist, but the following is my guess--if you are passing an agent number to this script via the ti_on_weapon_use or _init_missile, or whichever trigger and you've got that part down (you know you have the correct agent), then I think a bunch of what you are having trouble with in this script is superfluous anyway.
Specialist said:
Code:
("cf_gun_fire", [
(store_trigger_param_1, ":agent_id"),
#(agent_get_player_id,":player",":agent_id"), #not needed, you already have the agent id and nothing below uses the player id
#(try_begin), #not needed, the script is marked as cf...or remove the cf
	(multiplayer_is_server),
	#(try_begin), #not needed regardless, you don't have any client-side processing below, so it should just stop reading if it isn't the server
		#(multiplayer_get_my_player, ":player"), #none of the following are necessary...or really doing anything.
		#(ge, ":player", 0),
		#(get_player_agent_no, ":player"),
		#(try_begin), #none of these try blocks are needed because you don't have a single else_try or anything getting processed outside of the try block
			(agent_get_look_position, pos1, ":agent_id"), #use the agent_id passed to the script, not ":player"
			(position_move_z, pos1, 165, 0),
			(position_move_y, pos1, 50, 0),
			(position_rotate_x, pos1,0), 
			(init_position,pos2),
			(copy_position, pos2, pos1),
			(set_fixed_point_multiplier, 100),
			#(try_begin),
				(store_random_in_range,":randomX",-3,3),
				(store_random_in_range,":randomZ",-3,3),
				(position_rotate_x, pos2,":randomX"),
				(position_rotate_z, pos2,":randomZ"),
				(spawn_missile, ":agent_id", pos2, 2000, "itm_crossbow", "itm_yellow_paintball_shot"),  #use the agent_id passed to the script, not ":player"
			#(try_end),
		#(try_end),
	#(try_end),
#(try_end),
]),
My only question is: How the he** do I make this work in MP?
 
Good point. Al i should have to do then is store a script parameter based on the item. Or even skip the parameter altogether
 
So (can't test it for another two hours or so), but Caba's code then should most likely work, yes?

Code:
("cf_gun_fire", [
(store_trigger_param_1, ":agent_id"),
	(multiplayer_is_server),
			(agent_get_look_position, pos1, ":agent_id"), #use the agent_id passed to the script, not ":player"
			(position_move_z, pos1, 165, 0),
			(position_move_y, pos1, 50, 0),
			(position_rotate_x, pos1,0), 
			(init_position,pos2),
			(copy_position, pos2, pos1),
			(set_fixed_point_multiplier, 100),
			#(try_begin),
				(store_random_in_range,":randomX",-3,3),
				(store_random_in_range,":randomZ",-3,3),
				(position_rotate_x, pos2,":randomX"),
				(position_rotate_z, pos2,":randomZ"),
				(spawn_missile, ":agent_id", pos2, 2000, "itm_crossbow", "itm_yellow_paintball_shot"),  #use the agent_id passed to the script, not ":player"
]),

Or do I not even need the trigger parameter stored?
 
Is it possible to add a bandit party to the map that only spawns once?

Say I wanted to add a party called "Dracula is thirsty, we're out to get him some milk", but rather than having the same party spawning over and over again, like the looters do, I only wanted one unique party on the map. How would I go about doing this?
 
Specialist said:
Or do I not even need the trigger parameter stored?
If you are getting the ID from the calling trigger, you need to store it to be able to use it.

Cozur said:
Is it possible to add a bandit party to the map that only spawns once?

Say I wanted to add a party called "Dracula is thirsty, we're out to get him some milk", but rather than having the same party spawning over and over again, like the looters do, I only wanted one unique party on the map. How would I go about doing this?
Check header operations for the operations set_spawn_radius and spawn_party, and look over the file module_scripts for uses of spawn party (like when bandits or merchant caravans are spawned) to get a better idea of the things that need to be setup when you spawn a new party (like setting its AI behaviors, etc).
 
I have no problem adding a new bandit party, I'm just looking for a way to limit them to a single spawn.

What hoping there was a guide somewhere.
 
Cozur said:
I have no problem adding a new bandit party, I'm just looking for a way to limit them to a single spawn.

What hoping there was a guide somewhere.
Then only call the spawning code once, from whatever causes them to spawn--dialog, menu, or if time, then simple_triggers.

For a guide, I'd recommend looking at Jik's module system tutorial (I think part of it involves spawning a party) or this making new quests. Should walk you through it.

edit - or Tutorial: Creating new spawn points/parties
 
Status
Not open for further replies.
Back
Top Bottom