Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Amman de Stazia said:
there is an operation to set speed (in metres per second)....  can't remember exactly, but its something logical, like agent_set_speed
That operation can only be used to limit speed, and only on non-player agents.
 
Every time i call this event (server event), I get an unrecognised opcode error pointing to a line in that script:

Code:
      (else_try),
          (eq, ":event_type", multiplayer_event_presentation_server),
         (store_script_param, ":presentation", 3),
         (store_script_param, ":player_no", 4),
		 
		(try_begin),
			(neq|multiplayer_is_dedicated_server),
			(start_presentation, ":presentation"),
		(try_end),
			
         (multiplayer_send_int_to_player, ":player_no", multiplayer_event_presentation_player, ":presentation"),

Anyone seeing the mistake?
 
1.How can I make new object on the world map, I mean not castle, village or town. I mean mercenary camp, or small colony.
2. Is it possible to make faction X can go by the ocean, and faction Y cant go by the ocean?
Look at my signature :razz:
@Down. Thanks :smile: 2. I mean for eg: I have made sea travelling for all factions, how to disable it for some factions?
 
Zowi said:
1.How can I make new object on the world map, I mean not castle, village or town. I mean mercenary camp, or small colony.
2. Is it possible to make faction X can go by the ocean, and faction Y cant go by the ocean?
Look at my signature :razz:
1. Every object on the world map is a party. So you need to create a new party. If you want it to look different, you will need a new map icon. Map icons are declared in module_map_icons.py. If no existing map icon suits you, you will need to use another mesh. So you need either skills in 3D modelling for that, or you could browse through existing game meshes (in Warband/CommonRes folder) and try using them as map icons (you may need some trial&error with scaling factor).

2. By default, factions cannot go by the ocean. You have to write your own code to convert a NPC party to a ship. This means, that whatever conditions you will set in your code, will work.

You might also be interested in this thread: http://forums.taleworlds.com/index.php/topic,184843.0.html
 
Hello guys!
I added new weapon to Multiplayer game, but I want it to be (client side) visible ONLY on my server.
Of course leaving it visible on other servers won't give me anything except confusion - it won't work there anyway.
So is there any way to do this ?
Something like:
(try_begin),
  (eq, current_server_name, "my server"),
  (item_set_slot, "itm_new_sword", slot_item_multiplayer_item_class, multi_item_class_type_sword),
(try_end),
Thanks in advance !
 
ilovemyhedgehog said:
Im try to find one but i can't find a complete one just parts of them.
Horses are items. You add them the same way you are adding all other items - by editing module_items.py and inserting new tuples (or copying and editing existing ones).
 
Lav said:
ilovemyhedgehog said:
Im try to find one but i can't find a complete one just parts of them.
Horses are items. You add them the same way you are adding all other items - by editing module_items.py and inserting new tuples (or copying and editing existing ones).

so i just copy an existing horses code and change its name to what the name of my mesh is?
 
ilovemyhedgehog said:
so i just copy an existing horses code and change its name to what the name of my mesh is?
Yes. Also change the internal name (the first string), it must be unique. The rest (horse displayed name and stats) can be left as is, though it's a nice touch to edit that stuff as well.
 
["horse_swa_chidan_hunter", "Chidan Hunter", [("hunting_horse", 0)], itps_horse_normal, 0, 650, abundance(40)|hit_points(95)|body_armor(9)|difficulty(3)|horse_speed(47)|horse_maneuver(44)|horse_charge(13)|horse_scale(9:cool:, imodbits_horse_average, [], [fac_kingdom_1]],

Red is internal name (AKA handle), this is what you use in module system to reference your horse.

Green is the item displayed name.

Blue is the mesh.

Zbyh said:
Hello guys!
I added new weapon to Multiplayer game, but I want it to be (client side) visible ONLY on my server.
Of course leaving it visible on other servers won't give me anything except confusion - it won't work there anyway.
So is there any way to do this ?
Something like:
(try_begin),
  (eq, current_server_name, "my server"),
  (item_set_slot, "itm_new_sword", slot_item_multiplayer_item_class, multi_item_class_type_sword),
(try_end),
Thanks in advance !
I may be wrong as I never dealt with MP aspect of Warband modding, but I think it's better to have the same item settings for client and server. Instead of giving item different properties on server and client, find the code which displays the item to the player, and place your hack there.
 
so i just need to have the mesh file in my meaterals folder and my textures in my texture folder put my edited horse code in and have load_mod_textures  load_mod_resource= mynewhorse(meshname) ? does the mesh have to say mynewhorsename_horse?
 
Lav said:
Zbyh said:
Hello guys!
I added new weapon to Multiplayer game, but I want it to be (client side) visible ONLY on my server.
Of course leaving it visible on other servers won't give me anything except confusion - it won't work there anyway.
So is there any way to do this ?
Something like:
(try_begin),
  (eq, current_server_name, "my server"),
  (item_set_slot, "itm_new_sword", slot_item_multiplayer_item_class, multi_item_class_type_sword),
(try_end),
Thanks in advance !
I may be wrong as I never dealt with MP aspect of Warband modding, but I think it's better to have the same item settings for client and server. Instead of giving item different properties on server and client, find the code which displays the item to the player, and place your hack there.
The thing is, in MP to see/take new item you added, you need to add it to server AND to client. Client sided item list isn't generated, based on server settings. It's purely client side. So if you add new item only on server, it won't give you anything at all, because without client side modification you won't see this item.
To be able to use this item, I need to modify client side files as well as server side.
But when I modify client side files, I'll see this new item in every MP server. It won't work there (only client side modification), but i'll see it.
I want to avoid this somehow, by client side activating item only on some specific server.
 
Lumos said:
My question: How do I assign a time limit to a quest?
slot_quest_expiration_days

Zbyh said:
The thing is, in MP to see/take new item you added, you need to add it to server AND to client. Client sided item list isn't generated, based on server settings. It's purely client side. So if you add new item only on server, it won't give you anything at all, because without client side modification you won't see this item.
To be able to use this item, I need to modify client side files as well as server side.
But when I modify client side files, I'll see this new item in every MP server. It won't work there (only client side modification), but i'll see it.
I want to avoid this somehow, by client side activating item only on some specific server.
Erm... Have you tried giving your mod a different name? So the client running your mod cannot connect to servers running a different mod?
 
Status
Not open for further replies.
Back
Top Bottom