Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
kalarhan said:
Visconte said:
Is there any way I can change change the troops.txt for Napoleonic Wars so that it will work in multiplayer, or does it have to be the same for it to work?

the basic rule for MP is that both client (your module, on your gaming PC) and the server (runs the game network) need to have the same code, otherwise it will not allow you to play on it. There are always exceptions, but this is done to keep things compatible and to prevent cheating.

so you should add more details on what you are trying to change. What are you doing and with which troops.
also if you are adding new ones, or just changing normal troops.
if you only have the client, or if you also run a server.
why you don't want to use the modsys instead of .txt edit

that way the modders that know MP modding can help you

(also keep in mind that NW has its own forums, so you may want to check there as well. The DLC was created by another company, not TW)
I was hoping to make the Austrian infantry to have different headgear from the Hungarian infantry, since they both share the same item for their headgear. What I want is to make the Austrians use helmets and leave the shakos on the Hungarians. As it stands, I'm fine with either both of them using helmets or both of them having shakos, but ideally I would like the distinction
 
Visconte said:
kalarhan said:
Visconte said:
Is there any way I can change change the troops.txt for Napoleonic Wars so that it will work in multiplayer, or does it have to be the same for it to work?

the basic rule for MP is that both client (your module, on your gaming PC) and the server (runs the game network) need to have the same code, otherwise it will not allow you to play on it. There are always exceptions, but this is done to keep things compatible and to prevent cheating.

so you should add more details on what you are trying to change. What are you doing and with which troops.
also if you are adding new ones, or just changing normal troops.
if you only have the client, or if you also run a server.
why you don't want to use the modsys instead of .txt edit

that way the modders that know MP modding can help you

(also keep in mind that NW has its own forums, so you may want to check there as well. The DLC was created by another company, not TW)
I was hoping to make the Austrian infantry to have different headgear from the Hungarian infantry, since they both share the same item for their headgear. What I want is to make the Austrians use helmets and leave the shakos on the Hungarians. As it stands, I'm fine with either both of them using helmets or both of them having shakos, but ideally I would like the distinction
Item assignment is handled server side only.
 
Visconte said:
_Sebastian_ said:
Item assignment is handled server side only.
Yeah, that's what I was worried about

If you are talking about giving existing troops different existing item I  think its  possible. Been doing it a lot on my native server. But yea, it needs basic ModSys editing, txt's wont do.
 
Tigersong said:
Just wondering- is there a ModSys for the Linux version of Warband? If not, would it be difficult to create?

modsys is written with Python 2.x, so you can use it with any OS compatible with Python 2.x, and that includes Linux on all flavours (Ubuntu, etc).

if your issue is the .bat file, just open it on a text editor. You can easily create a .sh file that does the same thingy. Also on the tutorial section you should find a post that has a working version.
:arrow: https://forums.taleworlds.com/index.php/topic,331679.msg7840755.html#msg7840755

 
Should I decrease the weapon speed and increase the weight or decrease troop's stats for more realistic and slow animations?

Plus: how can I add a new quick battle mode? There is battle and siege. I would like to add sea battle too.
 
HyperCharge said:
Should I decrease the weapon speed and increase the weight or decrease troop's stats for more realistic and slow animations?

Plus: how can I add a new quick battle mode? There is battle and siege. I would like to add sea battle too.

weapons is the kind of thingy you just need to test until you get happy with the results. Also remember the player has a option to increase/decrease speed (game options). Why don't you create several versions, give them to the player and test them in combat?

keep in mind that medieval weapons were quite light (weight), no matter if one or two handed. Don't let Holywood movies influence you too much  :mrgreen:

for quick battles: its a huge presentation, you just need to locate the widgets and add extra code in there. You could even create a fresh new UI. It is not hardcoded. You may also look at VC code. Presentation "game_custom_battle_designer"
Code:
(else_try),
              (eq, "$g_quick_battle_game_type", 3), #naval battle
 
kalarhan said:
Khamukkamu said:
MT trigger such as ti_on_agent_killed_or_wounded to only occur after every 60 seconds

it is confusing, but those triggers are not the same as a timed trigger. We have two basic types:

- timed triggers (on a schedule): you can set the timer (keep trying = 0, every 1 second = 1, every 30 seconds = 30, etc)
- event based triggers: they fire based on something that just happened. In your example, it is the defeat of a agent

event based triggers, if you look at header_triggers.py, have a negative value (like -17), which is just a code for the engine (this is not a timed trigger, it is a event trigger, and the event is code 17). They are also independent, so if you have 30 agents dying at the same time, you would have the trigger firing 30 times (once for each agent).

now if you were trying to implement some feature/new mechanic: explain what do you need to do. By using a combination of tools (like triggers + global variables) you can create some interesting new things.

Oh, I was just looking for ways to optimize a battle, and one of the ways I could do it was remove weapons when an agent is killed. However, as some players like picking up stuff from the field, I want it only to trigger X seconds after the agent is killed, hence the question regarding re-arming the trigger. :smile:
 
Khamukkamu said:
Oh, I was just looking for ways to optimize a battle, and one of the ways I could do it was remove weapons when an agent is killed. However, as some players like picking up stuff from the field, I want it only to trigger X seconds after the agent is killed, hence the question regarding re-arming the trigger. :smile:

Ah, so you don't need a re-arm, just to use the delay timer for the consequence block.

Or to use a storage system and a clean up trigger from time to time similar to VC.


This is used to remove items from sea battle (they tend to get stuck on geometry and them floating around as the boats move away)
Code:
  (2.7, 0, 0, [],	#FLYING ITEMS	# VC-1804
    [
      (try_for_prop_instances, ":item_instance", -1, somt_spawned_unsheathed_item),
        (scene_prop_slot_eq, ":item_instance", scene_prop_timer, 0),
        (scene_prop_set_slot, ":item_instance", scene_prop_timer, 1),
        (prop_instance_get_position, pos1, ":item_instance"),
        (position_set_z, pos1, -3500),
        (prop_instance_animate_to_position, ":item_instance", pos1, 500),
        (scene_prop_fade_out, ":item_instance", 500),
      (end_try),
use the slot to control the waiting period (10 seconds, 30seconds, etc). A example of adding to the count can be seem on this trigger (used to remove heads after decapitation)
Code:
  (10, 0, 0, [],#VC-3296
    [
      (try_for_prop_instances, ":instance", "spr_head"),
        (scene_prop_get_slot, ":timer", ":instance", scene_prop_timer),
        (val_max, ":timer", 0),
        (try_begin),
          (lt, ":timer", 3),
          (val_add, ":timer", 1),
          (scene_prop_set_slot, ":instance", scene_prop_timer, ":timer"),
        (else_try),
          (eq, ":timer", 3),
          (scene_prop_fade_out, ":instance", 2000),
          (val_add, ":timer", 1),
          (scene_prop_set_slot, ":instance", scene_prop_timer, ":timer"),
        (end_try),
      (end_try),
  ]),
 
I have question about operation: (stop_all_sounds, [options]). From version 1.153 onwards option "2" is not doing anything, only "0" or "1" are valid, isn't it?

Thanks.
 
zidozido said:
hey guys how do i add freelancer to my not native based mod ?

kalarhan said:
depending on how different your modsys is (1200) you will need to adapt a lot of code. Also it is likely you will need to fix issues with Freelancer old version to work with engine 1.170+

so get the latest working version of Freelancer. Learn how it works. Apply that code (not copy and paste, you will need to implement it on your mod yourself), fix a bunch of bugs and issues, and after many hours of work you will have a version of freelancer + 1200.
 
Is there a way to use the reinforcement system of Warband for Multiplayer with a custom pool of soldiers?
Let's say I add x different soldiers to a pool of both factions.
Now I want to have the wave/reinforcement script to spawn soldiers like on Native if too less of one team exist.
Tried figuring out making an own one, but it's just too complicated or I am stuck, here my try:

Wave/Respawn System:
Maximal soldiers on map allowed: 200 Soldiers/Agents
Spawn Rate for Ranged: 35%
Spawn Rate for Infantry: 50%
Spawn Rate for Cavalry: 15%
Base idea: First spawn HIGHEST tiers then at end spawn LOWEST tiers

 
Hi all,

I'd like to be able to block a passage (e.g don't allow crossing of a center that serves as a bridge in a river). I'm trying to think of ways to do this for both player and AI, and I am not sure where to start (maybe a trigger that fires when player or AI is near the center?). Anyone has any experience in doing so?

Thanks in advance.
 
Status
Not open for further replies.
Back
Top Bottom