Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
sillyfuntimes said:
Using morgh,

get module system for your mod (like Native 1.172). Use Morghs with .py files, or include your troops manually. Remember to include them between the old mercs. Compile the code (see tutorial on how to setup modsys). Start a new game (can't use a old savegame). That way the game will recognize your new mercenaries and it won't screw up all the rest.

alternative: if you don't want them to show up in taverns, and all you want is to change the costs (wages or hiring cost), you should edit the scripts that handle that, by including whatever new rules you want. 
 
I'm working on a super neat hunting osp. I already have boar and unicorn models (from age of machinery osp, the same ones used in pw mod). However, I would really like to add a unicorn that can be found on rare occasions, and drops a super valuable horn. Anyone know of an osp that has one? or do I just have to add a horn to a horse model?
 
Hi all,

Looking at our code, I saw that the they (original coders) put some triggers as 0.1, or 0.5, etc...

Example:
Code:
 (0.1, 0, 0, [],

Is this acceptable? Does it work properly? Or is there a better way to do this? Why not just use 0?

Thanks!
 
Khamukkamu said:
Hi all,

Looking at our code, I saw that the they (original coders) put some triggers as 0.1, or 0.5, etc...

Example:
Code:
 (0.1, 0, 0, [],

Is this acceptable? Does it work properly? Or is there a better way to do this? Why not just use 0?

Thanks!

Should work fine. It basically means it will trigger every .1 of a warband game hour. If you have 0, I think it causes divided by zero errors or something like that.
 
Khamukkamu said:
Ok, it's an MT trigger though, so I'm guessing instead of hour, they're seconds.

Trigger parameters are only place in module system where decimals are allowed. Dont know how they work in single player, but in multiplayer they are surely seconds.
 
Thanks all, I'll leave it as is then.

Unrelated question:

I want to dabble into particle systems :smile:

In TLD, the original devs tried having Orcs / Uruks spill black blood. They created the below particle systems for it:

Code:
("game_blood_black", psf_billboard_3d |psf_randomize_size|psf_randomize_rotation,  "prt_mesh_blood_black_1",
     500, 0.65, 3, 0.5, 0, 0,        #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.0, 0.7), (0.7, 0.7),          #alpha keys
     (0.1, 0.7), (1, 0.7),      #red keys
     (0.1, 0.7), (1, 0.7),       #green keys
     (0.1, 0.7), (1, 0.7),      #blue keys
     (0.0, 0.015),   (1, 0.018),  #scale keys
     (0, 0.05, 0),               #emit box size
     (0, 1.0, 0.3),                #emit velocity
     0.9,                       #emit dir randomness
     0,                         #rotation speed
     0,                         #rotation damping
    ),
    ("game_blood_black_2", psf_billboard_3d | psf_randomize_size|psf_randomize_rotation ,  "prt_mesh_blood_black_3",
     2000, 0.6, 3, 0.3, 0, 0,        #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.0, 0.25), (0.7, 0.1),        #alpha keys
     (0.1, 0.7), (1, 0.7),      #red keys
     (0.1, 0.7), (1, 0.7),       #green keys
     (0.1, 0.7), (1, 0.7),      #blue keys
     (0.0, 0.15),   (1, 0.35),    #scale keys
     (0.01, 0.2, 0.01),             #emit box size
     (0.2, 0.3, 0),                 #emit velocity
     0.3,                         #emit dir randomness
     150,                       #rotation speed
     0,                       #rotation damping
     ),

And then put it in the specified skins:

Code:
#5
  ( "orc", skf_use_morph_key_20,
    "orc_body", "orc_calf_l", "o_handL",
    "orc_head", orc_face_keys,
    ["orc_ears01","orc_ears02","orc_ears03","orc_ears04", "orc_hair01","orc_hair02","orc_hair03","orc_hair04","orc_hair05","orc_hair06","orc_hair07","orc_hair08","orc_hair09","orc_hair10","orc_hair11"], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
    [], #beard meshes ,
    ["orc_hair_ears"], #hair textures
    ["orc_hair_ears"], #beard_materials
    [("face_orc_a",0xffffffff,["orc_hair_ears"],[0xffffffff]),
     ("face_orc_b",0xffffffff,["orc_hair_ears"],[0xffffffff]),
     ("face_orc_c",0xffffffff,["orc_hair_ears"],[0xffffffff]),     
     ], #man_face_textures,
    [(voice_die,"snd_orc_die"),(voice_hit,"snd_orc_hit"),(voice_grunt,"snd_orc_grunt"),(voice_grunt_long,"snd_orc_grunt_long"),(voice_yell,"snd_orc_yell"),(voice_victory,"snd_orc_victory")], #voice sounds
    "skel_orc", 1.0,
    psys_game_blood_black,psys_game_blood_black_2,
    [[1.7, comp_greater_than, (1.0,face_width), (1.0,temple_width)], #constraints: ex: 1.7 > (face_width + temple_width)
     [0.3, comp_less_than, (1.0,face_width), (1.0,temple_width)],
     [1.7, comp_greater_than, (1.0,face_width), (1.0,face_depth)],
     [0.3, comp_less_than, (1.0,eyebrow_height), (1.0,eyebrow_position)],
     [1.7, comp_greater_than, (1.0,eyebrow_height), (1.0,eyebrow_position)],
     [-0.7, comp_less_than, (1.0,nose_size), (-1.0,nose_shape)],
     [0.7, comp_greater_than, (1.0,nose_size), (-1.0,nose_shape)],
     [2.7, comp_greater_than, (1.0,chin_size), (1.0,mouth_nose_distance), (1.0,nose_height), (-1.0,face_width)],
     ]
  ),

Blood is still red :sad:

What did they get wrong? Everything seems right, when I read the code. Maybe we just can't change blood colour?

Thanks in advance.
 
Khamukkamu said:
Why not just use 0?

depends on each case (what are you doing), the amount of CPU work that could cause lag, your testing, etc.

You will use the interval of time (frames) that makes sense for each trigger.



The Archduke of Hell said:
I am curious as to what would be the effects of having two factions that share the same faction leader?
you will have to test how your mod will handle that case. There is no hardcoded rule against it, just be ready to handle special cases for AI, combat, factions relations, diplomacy, ....
 
So, you use $players_kingdom to find the players kingdom, but what if the player is a merc? I want to give the player the ability to hunt in a kingdom's territory as long as the player is nobility. How can I figure this out?

I asked literally the same question last year. Its $player_has_homage...
 
So, I'm wondering about my hunting mod. If the player is poaching, they lose relation with the kingdom for the duration they are poaching. If they successfully poach without getting caught, the relation is restored. The problem is, if the player is attacked by bandits, the relation isnt restored, even though bandits arent really the ones who should get them in trouble for poaching. So my question is, where would I add code to restore the relation of the player if encountered by bandits?
 
Somebody said:
Just don't let the relationship drop in the first place if the encounter isn't with a proper kingdom's party?

Ramaraunt said:
If the player is poaching, they lose relation with the kingdom for the duration they are poaching.

sounds to me (kind confusing post) that he is using a artificial and temporary relation drop to make the player's party enemy of the kingdom while he is doing the poaching, so if a lord sees him he will be hunted down for the crime.

Why don't you use a trigger and a system (like a global or slots) to control the state? If poaching, force relationship with faction to -100. If poaching is over, restore to previous value. Trigger can check state every so often (like every hour or so). You can also combine this with a game menu/presentation to represent the start/end of the action, plus any new dialogs.
 
How do I raise the height of a particle effect on the world map? Say I want the village smoke to appear 10 meters above the village, once it's been looted.
 
hi guys, i was wondering if there's a way to change the appearance of ''Tracks'' (from the tracking skill)? I like tracking in M&B but I hate the ugly multicoloured arrows pointing here there and everywhere on the ground, just something that bugs me.
I saw some custom tracks in the Game of Thrones mod, which seemed to have darker coloured hoof marks for tracks rather than arrows, and I was wondering how I make them like that in my other mods?
kind regards
 
AFKRaccoon said:
hi guys, i was wondering if there's a way to change the appearance of ''Tracks'' (from the tracking skill)? I like tracking in M&B but I hate the ugly multicoloured arrows pointing here there and everywhere on the ground, just something that bugs me.
I saw some custom tracks in the Game of Thrones mod, which seemed to have darker coloured hoof marks for tracks rather than arrows, and I was wondering how I make them like that in my other mods?
kind regards
The texture of the tracks is on the map_misc.dds (it is the arrow). You can change the arrow into any other symbol, but keep in mind that the actual track-mesh is also shaped like a regular triangle. You find the track-mesh in map_icon_meshes.brf, which you van view with the openBRF program. I believe you can change the mesh, too, and use something else if you do not like the triangle-form, but I have never tested it. How to avoid the changing colours, I have no idea. The easiest way to have horse marks is just replacing the arrow with hoof marks on the map_misc.dds. Just keep in mind, that the actual mesh is a triangle and anything painted on the texture outside of the triangle shape will not be visible. You can preview the shape and how your ew texture fits in openBRF, if you turn the wireframe option on.
 
Is there a way to automate game saves?
It would be very helpful for players and testers of mods under development.
If one could easily go back several days, there would be much less grief from players.
An alternative is a save shortcut or popup other than having to press gui buttons.
GDW
 
Status
Not open for further replies.
Back
Top Bottom