Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Jezze said:
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
how does one add a custom made map to the native lists of maps?

(without removing any of the other custom made maps made by other people)

http://forums.taleworlds.com/index.php/topic,112508.0.html

yes i know, but I've made a scene in my own module (just so i dont screw the native up), but when im trying to play this online only I can join because only i've got this module. Therefore I'd like to add it to the native (or if its possible to cRPG) and play it with other people, but im not sure how. Any idea how to do so?

Ask a server-admin to host your scene, or start your own multiplayer server with your scene.

I'd really like to but since nobody else but me has that module, I can't get anyone else to join.
Do you happen to know some server admins that might be willing to host my map?
 
Specialist said:
How would I make a sound play when someone joins a multiplayer server?
I know it'll be a script or template, but could someone give me a basic code to improve on? I haven't modded much MP

Thought I would repost.
Any help is appreciated.... :razz:
 
You'll want to use the appropriate mission template trigger (I forget exactly what it is at the moment...maybe ti_on_server_player_join...check header_triggers) to send out an event to the clients to play that sound.
 
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
how does one add a custom made map to the native lists of maps?

(without removing any of the other custom made maps made by other people)

http://forums.taleworlds.com/index.php/topic,112508.0.html

yes i know, but I've made a scene in my own module (just so i dont screw the native up), but when im trying to play this online only I can join because only i've got this module. Therefore I'd like to add it to the native (or if its possible to cRPG) and play it with other people, but im not sure how. Any idea how to do so?

Ask a server-admin to host your scene, or start your own multiplayer server with your scene.

I'd really like to but since nobody else but me has that module, I can't get anyone else to join.
Do you happen to know some server admins that might be willing to host my map?

If you only used scene props and items from Native, it should not be a problem. The guide explains all of it. And I don't know who wants to host it, what kind of scene is it?
 
MadocComadrin said:
You'll want to use the appropriate mission template trigger (I forget exactly what it is at the moment...maybe ti_on_server_player_join...check header_triggers) to send out an event to the clients to play that sound.

How do I make the client-server communication?
I knew about the trigger, but I didn't know about the clientside sound.... :sad:
 
Jezze said:
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
how does one add a custom made map to the native lists of maps?

(without removing any of the other custom made maps made by other people)

http://forums.taleworlds.com/index.php/topic,112508.0.html

yes i know, but I've made a scene in my own module (just so i dont screw the native up), but when im trying to play this online only I can join because only i've got this module. Therefore I'd like to add it to the native (or if its possible to cRPG) and play it with other people, but im not sure how. Any idea how to do so?

Ask a server-admin to host your scene, or start your own multiplayer server with your scene.

I'd really like to but since nobody else but me has that module, I can't get anyone else to join.
Do you happen to know some server admins that might be willing to host my map?

If you only used scene props and items from Native, it should not be a problem. The guide explains all of it. And I don't know who wants to host it, what kind of scene is it?

it is a siege scene. So i should just change the direction for compiling to the native module instead of my_first_mod, in the module_info file? After that I shoudl be able to host it myself? (I did only use scene probs from the native)
 
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
Jezze said:
TheWhiteHand said:
how does one add a custom made map to the native lists of maps?

(without removing any of the other custom made maps made by other people)

http://forums.taleworlds.com/index.php/topic,112508.0.html

yes i know, but I've made a scene in my own module (just so i dont screw the native up), but when im trying to play this online only I can join because only i've got this module. Therefore I'd like to add it to the native (or if its possible to cRPG) and play it with other people, but im not sure how. Any idea how to do so?

Ask a server-admin to host your scene, or start your own multiplayer server with your scene.

I'd really like to but since nobody else but me has that module, I can't get anyone else to join.
Do you happen to know some server admins that might be willing to host my map?

If you only used scene props and items from Native, it should not be a problem. The guide explains all of it. And I don't know who wants to host it, what kind of scene is it?

it is a siege scene. So i should just change the direction for compiling to the native module instead of my_first_mod, in the module_info file? After that I shoudl be able to host it myself? (I did only use scene probs from the native)

No, you can upload the scene to a server, you just need to add some lines of code to the Native module. Those are serverside compactible, so people dont have to download your module.

More info here:
http://forums.taleworlds.com/index.php/topic,131475.0.html
 
does anyone know how to force a lord to attack a castle/town in the module? finally got my script to work but now they just run around all unorganized, i want to make them start a warparty and attack the nearest castle, possible?

EDIT: also, how do i make a lord marshall? ignore this edit i found it :razz:
 
Alakeram said:
does anyone know how to force a lord to attack a castle/town in the module? finally got my script to work but now they just run around all unorganized, i want to make them start a warparty and attack the nearest castle, possible?
If you look at the scripts npc_decision_checklist and party_set_ai_state, that should give you a good idea.
Essentially you'll be using  (party_set_ai_behavior,<party_id>,<ai_bhvr>) and (party_set_ai_object,<party_id>,<party_id>), as well as setting the slot equivalents.

In fact, you may even be able to just call party_set_ai_state...
 
Say,I want to add a companion to a npc party.However,when I have enabled the option "show_party_ids_instead_of_names",all the npc hero parties have the same id:
kingdom_hero_party
How do I make then,a difference between King Harlaus' party,King Yargolek's party and Boyar Meriga's party?
 
I try to add some option of race like to be Undead.
But when i test, I play as the Undead. But the game say to me as "Lady" or "Queen" or "Madame" in Dialogues.
Are there was something i had forget?
 
Given this:
Vornne said:
It seems get_angle_between_positions doesn't calculate anything to do with relative postions, just the relative angles; which seems a bit pointless, as the difference in angles is easy to get with simple subtraction - though not entirely, since it returns fixed point values (higher precision than position_get_rotation_around_z). I was testing code to display get_angle_between_positions between a scene prop and the player agent's positions, and it seemed that movement without rotation didn't affect the result.

Would the proper way to identify the angle between two agents (to determine if, say...hypothetically...a horse is within a respectable "cone" in front of a braced-spear agent) to use trigonometry functions, since there is no operation that will produce the correct result?

So, essentially I need to run the arc-tangent of the change in X divided by the change in Y to actually get the angle between the positions?
EDIT - like so:
Code:
                          (position_get_x, ":x", pos1),
			  (position_get_x, ":x2", pos2),
			  (position_get_y, ":y", pos1),
			  (position_get_y, ":y2", pos2),
			  (val_sub, ":x", ":x2"),
			  (val_sub, ":y", ":y2"),
			  (val_abs, ":x"),
			  (val_abs, ":y"),
			  (store_atan2, ":angle", ":y", ":x"), #first value is y, second is x 
                          (convert_from_fixed_point, ":angle"),
 
MadocComadrin said:
Pretty much yes. I'd check first to see if the agent is in front of the pikeman though, to save you some headaches/time.
Right, I'd been using that. But that got me to thinking is "behind" relative or absolute?

If relative (based on agent's rotation), then there would likely need to be a check for whether X or Y should be opposite/adjacent, right?
 
Caba`drin said:
If relative (based on agent's rotation), then there would likely need to be a check for whether X or Y should be opposite/adjacent, right?
So it definitely is based on an agent's rotation...which does make sense...so then I believe I need a check as noted above. I'm a bit stumped on what that would be on the onset.
 
Oh, that's what you meant. Wouldn't the transform to local/parent/whatever operation assure that x is opposite and y is adjacent (assuming it works like I think it does)?
 
MadocComadrin said:
Oh, that's what you meant. Wouldn't the transform to local/parent/whatever operation assure that x is opposite and y is adjacent (assuming it works like I think it does)?
Both are giving me odd results. (Not that I've ever been able to fully understand what either is supposed to do.)

I've essentially dropped this trigger into the town_visit_castle template and am running circles around ladies
Code:
  (2, 0, 0, [], [
                (get_player_agent_no, ":player"),
		(agent_get_position, pos1, ":player"),
                (try_for_agents, ":agent"),
		       (agent_get_troop_id, ":troop", ":agent"),
			(troop_is_hero, ":troop"),
			(neq, ":troop", "trp_player"),
			(agent_get_position, pos2, ":agent"),
			(position_transform_position_to_parent, pos2, pos1, pos2), #tried local, too...local makes more sense, but still doesn't seem right, or consistent
			#(neg|position_is_behind_position,pos2,pos1),
			  (position_get_x, ":x", pos1),
			  (position_get_x, ":x2", pos2),
			  (position_get_y, ":y", pos1),
			  (position_get_y, ":y2", pos2),
			  (val_sub, ":x", ":x2"),
			  (val_sub, ":y", ":y2"),
			  (val_abs, ":x"),
			  (val_abs, ":y"),
			  (store_atan2, ":angle", ":y", ":x"), #first value is y, second is x 
			  
			  # (get_angle_between_positions, ":angle", pos1, pos2),
			  # (val_abs, ":angle"), 
			  (convert_from_fixed_point, ":angle"),
			  #(store_sub, ":angle", 90, ":angle"),
			  (assign, reg0, ":angle"),
		      (display_message, "str_reg0"),
		(try_end),
	]),

I'll pick back up on this in a few hours...but thanks kindly for the assist.

Current hunch is to use pos1's rotation_around_z to determine ordering of x/y as opp/adj
 
Status
Not open for further replies.
Back
Top Bottom