Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Anyone know how I can replace the brown blur when an arrow/bolt is fired with a particle on a specific bolt item?

I'm talking about you shooting the crossbow but instead of a bolt it's a water splash or something.
 
Mysterious_A said:
Anyone know how I can replace the brown blur when an arrow/bolt is fired with a particle on a specific bolt item?

I'm talking about you shooting the crossbow but instead of a bolt it's a water splash or something.
In CommonRes, there's a certain .brf file which holds the 'flying_missile' mesh. That mesh is the brown blur.


Anyway, I've got another question. Can you 'use' scene props which have no collision mesh? You know, press the F key. And the prop has spr_use_time(x).
 
GetAssista said:
duck83 said:
Those have the same amount of mip maps, flags are the same, so for branches mesh original and mine textures have the same '30000' number. Shader is the same too.
What about material rendering flags

I'm not sure if those are the same as 'Flags' (named so in OpenBrf), though I guess that yes. For meshes those are set at 30000 and for materials at 100, for textures at 0 and at bump textures (named as normal maps) at 4.

If that's the thing you're talking about, then I'm stucked.
 
Sinisterius said:
Anyway, I've got another question. Can you 'use' scene props which have no collision mesh? You know, press the F key. And the prop has spr_use_time(x).
To answer myself..

No. You can't Use the prop without a collision body.
 
A noob question here:

I am at this moment using a Warband Mod (MOD 1= any simple native-like mod) . Now I would like to insert some firearms and items from another different mod (MOD2 = Finland at WW2 mod ) into the one I am using.
I am able to text edit those files ( I mean the item_Kinds1.txt , troops.txt, ... )with the Mood Tools v1.05.

I would like to insert those firearms, items, and their animations and weapon specific graphics.

What should I do ?
1st- add the rows (data) from item_kinds1.txt from MOD2 to MOD1
2nd- add all related files about textures in the exact folder
is this right? or should I do something more?
could it work simply this way? or Do I need to make more complex changes?
I am noob so i won't know how to make it if it should be more difficult to insert those weapons into the mod I am using now .
Thanks!

 
Don't even try. I don't think it'll be easy to copy the animations (don't even know where they are... actions.txt?), and even if you manage, it may not work. I haven't played Finland at WW2, so I don't know whal level of complexion we are talking about.
But, if you do what you said, you should be able to use the rifles as single-shot muskets.
Oh, I almost missed that you didn't say anything about .brf files. You must copy not only the textures, but the .brf files in the "Resource" folder. Not all files, but only those with the rifles (.brf files hold the data about items, scene props and other 2D/3D stuff - the 3D model, the texture reference, etc.). You can use OpenBRF (look for it in the "Unofficial Editing Tools" subboard if you don't have it) to check which of the .brf files you need (e.g. which files contain the rifle models).
But, I repeat, I have not played Finland at WW2, so I don't know if this is possible for them to work right. It should be, but I can't be sure.
 
Hi,
Is there any function giving chosen lord kingdom?
For Example:  giving me kingdom of swadia.
Can it be this feature? (store_troop_faction,<destination>,<troop_id> ? )
Thx for help.
 
Lumos said:
Don't even try. I don't think it'll be easy to copy the animations (don't even know where they are... actions.txt?), and even if you manage, it may not work. I haven't played Finland at WW2, so I don't know whal level of complexion we are talking about.
But, if you do what you said, you should be able to use the rifles as single-shot muskets.
Oh, I almost missed that you didn't say anything about .brf files. You must copy not only the textures, but the .brf files in the "Resource" folder. Not all files, but only those with the rifles (.brf files hold the data about items, scene props and other 2D/3D stuff - the 3D model, the texture reference, etc.). You can use OpenBRF (look for it in the "Unofficial Editing Tools" subboard if you don't have it) to check which of the .brf files you need (e.g. which files contain the rifle models).
But, I repeat, I have not played Finland at WW2, so I don't know if this is possible for them to work right. It should be, but I can't be sure.
Thanks for your answer Lumos
Well.. adding the .brf files from "resources" folder  would not be a problem, couse their name tells about the exact weapon/item... the same about the .dds files on "Textures" folder

I think actions.txt is not changed at all from the original native version. At least I can not see any firearm related animation inserted there in the Finland at WW2 mod.

But What I really would like to know is: Apart from Adding the items in the item_kinds1.txt, and the resources and the textures... should I consider anything else?
I don't know.. perhaps something related to physics or other kind of weapon animations, or something I should add to another .txt file wihch could be related to weapons and their use? ... couse I´m a total noob and don't know if it could work in that simple way

So.. are the files meshes.txt, particle_systems.txt, or any other file  , related to any changes in weapons, their animations, their graphics/textures that could make this procedure not to work?
 
So I'm trying to use some codes from the Curtain of Fire mod for the original mount and blade.

They don't seem to be working for me though and I can't figure out if I did something wrong or if they're just not compatible to Warband.

Here's what I tried:

["wave",        "Wave",        [("speck",0)], itp_type_crossbow |itp_unique|itp_primary|itp_two_handed|itp_no_pick_up_from_ground ,itcf_shoot_pistol,
182 , weight(0)|difficulty(0)|spd_rtng(43) | shoot_speed(66) | thrust_damage(49,pierce)|max_ammo(2),imodbits_missile,
[(ti_on_weapon_attack, [(try_for_range,reg5,1,500),
                            (particle_system_burst, "psys_game_water_splash_2", pos1, 15),
                            (position_move_y,pos1,10),
                            (copy_position,pos2,pos1),
                            (position_set_z_to_ground_level, pos2),
                            (get_distance_between_positions,":dist",pos1,pos2),
                            (lt,":dist",10),
                            (particle_system_burst, "psys_game_water_splash_3", pos1, 15),
                            (particle_system_burst, "psys_game_water_splash_2", pos1, 15),
                            (play_sound,"snd_footstep_water"),
                            (try_for_agents,":agent"),
                              (agent_get_position,pos2,":agent"),
                              (get_distance_between_positions,":dist",pos1,pos2),
                              (lt,":dist",300),
                              (agent_set_hit_points,":agent",0,0),
                              (agent_deliver_damage_to_agent,":agent",":agent"),
                            (end_try),],)]],

But when I go in game the character just extends his hand and shoots a crossbow bolt from it...

Thoughts?
 
That's not the point. try_for_range opens a loop, and try_for_agents open another one - yet you only have 1 closing end_try/try_end. In fact, reg5 isn't even used - its sole purpose is to increase the effective range of weapon (up to 500*10 centimeters). Along that path, waves will appear, and any agent within 3 meters of that path should be killed.
 
Everthen said:
But What I really would like to know is: Apart from Adding the items in the item_kinds1.txt, and the resources and the textures... should I consider anything else?
I don't know.. perhaps something related to physics or other kind of weapon animations, or something I should add to another .txt file wihch could be related to weapons and their use? ... couse I´m a total noob and don't know if it could work in that simple way
Told you. I haven't played teh mod, but particle_systems may do something (if fire and somekes comes out of the barrel when you fire, then you need it).

Everthen said:
So.. are the files meshes.txt, particle_systems.txt, or any other file  , related to any changes in weapons, their animations, their graphics/textures that could make this procedure not to work?
The same thing I said a couple of lines above. :grin:
meshes.txt is for the 2D pictures - like when you recruit troops, meet bandits, etc.
NB: The file contains not the pictures, but the references to them. The pictures are in brf files.
And to make the game read .brf files, you must add them in module.ini:
If you have a file called "new_crazy_gun_models.brf" and want to make the game read it, add this line in the bottom of module.ini
Code:
load_mod_resource = new_crazy_gun_models
I think you get how it's done. :wink:



Mysterious_A said:
When I go in game the character just extends his hand and shoots a crossbow bolt from it...
I don't have the time to check the code, but I'll certainly like this effect for some weapons... :mrgreen:
 
As I seem to be continuing to write little bits of code, adding orders or what-have-you without creating a comprehensive mod, I try to minimize the impact on the rest of the code to make it easy for players to use or modders to incorporate if they so choose. However, avoiding global variables/new slots isn't always possible...which brings me to my point, the questions:

Without forcing a user to follow the steps outlined by Mordachai here to adjust the module system compiling process to maintain global variables, will new global variables or new slots always break save games?

Is there an in-code way to minimize/eliminate breaking saves if new globals or new slots are added?
 
Changing slot order, or order of the data which they refer to, will certainly impact savegames. To my understanding, the savegame contains data up to the highest slot used - so if you create a new slot beyond that it might break the game. As to global variables - I usually keep the same variable.txt from a previous build anyways. To avoid using too many global variables, consider using existing (and unused) valid slots instead.
 
Me again.

So I tossed that other code and picked up the one that sounded the most like what I was trying to do. In the Curtain of Fire Mod you could shoot this "crossbow" item and a wave of water would sweep the terrain killing everything in its path (like Somebody described). I figure all I have to do is make it deal damage instead of just killing and reduce the range, right?

For it to work though I think I have to use a mission template Mirathei said (in the readme) he used on all battle templates. Just copying and pasting the template doesn't seem to work though...

Here are the codes:

["wave","Wave", [("speck",0)],itp_type_crossbow |itp_unique|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol, 4938 , weight(4)|spd_rtng(89) | shoot_speed(100) | thrust_damage(25 ,  blunt)|max_ammo(2)|weapon_length(65),imodbits_missile,
[(ti_on_weapon_attack, [(play_sound,"snd_footstep_water"),(assign,":distance",99999),(try_for_agents,":agent"),
                              (agent_is_alive,":agent"),
                              (agent_is_human,":agent"),
                              (agent_get_look_position, pos2, ":agent"),
                              (get_distance_between_positions,":dist",pos1,pos2),
                              (lt,":dist",":distance"),
                              (assign,":chosen",":agent"),
                              (assign,":distance",":dist"),
                            (end_try),
                            (assign,reg55,":chosen"),
                            (agent_get_position,pos5,":chosen"),
                            (position_set_z_to_ground_level, pos5),
                            (position_move_y,pos5,250),],)]],

and

      (0.1, 0, 0, [],[(ge,reg55,0),(particle_system_burst, "psys_tsunami", pos5, 100),
                          (try_for_agents,":killed"),
                              (agent_is_alive,":killed"),
                              (neg|agent_has_item_equipped,":killed","itm_black_helmet"),
                              (agent_get_position,pos1,":killed"),
                              (get_distance_between_positions,":dist",pos1,pos5),
                              (lt,":dist",200),
                              (agent_set_hit_points,":killed",0,0),
                              (agent_deliver_damage_to_agent,":killed",":killed"),
                          (end_try),
                          (position_move_y,pos5,80),
                          (position_set_z_to_ground_level,pos5),]),

      (ti_before_mission_start, 0, 0, [], [(assign,reg55,-1)]),

My limited knowledge tells me the template says whenever there's a particle system burst of tsunami the "kill all in path" effect kicks in. Where does reg55 play in though?

Thoughts?
 
Somebody said:
Changing slot order, or order of the data which they refer to, will certainly impact savegames. To my understanding, the savegame contains data up to the highest slot used - so if you create a new slot beyond that it might break the game. As to global variables - I usually keep the same variable.txt from a previous build anyways. To avoid using too many global variables, consider using existing (and unused) valid slots instead.

Thanks for your response Somebody. Definitely helpful.

I'm full of questions lately, though, it seems. Is there a way to get the size of a battle scene? In a way that you can compare an agents position and determine if they are X distance from the edge of the scene?

I'm not sure if I just missed an operation or if there is a bit of code necessary that I haven't reasoned out.
 
get_scene_boundaries                  = 1799  # (get_scene_boundaries, <position_min>, <position_max>),
It's used by the minimap and by the AI to find high ground. x and y components are filled.
 
Status
Not open for further replies.
Back
Top Bottom