Author Topic: Have a question about Modding? Ask Here!  (Read 307971 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1710 on: June 14, 2018, 11:25:08 pm »
Hello all! I have a strange issue - two cannons spawn in one position on my new map in all modes except Editing Scene mode, in this mode there is only one cannon at that place (so I can't delete second cannon). Second cannon, invisible in editing scene mode, was placed like that by me a long time ago, when I only started work on this scene and I have no idea what I did, so this cannon spawns automatically. I can provide files of that scene, if someone can help me with that and I will be very grateful :)
« Last Edit: June 19, 2018, 10:42:23 am by Ivkolya »

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1711 on: July 02, 2018, 09:39:19 am »
Another quick question - I want to add handgrenades to my mod, I changed range and max_ammo for Holy Hand Grenade, but I want grenade to explode after some time (like mortar shell), not on impact, but I can't find the script of timed explosion in module_scripts.py, can someone show me it?:)

And I still have strange cannon, which appears only in gamemodes (and not in scene editing mode), but when I delete in some gamemode barrel of the cannon (I can't select cannon's wood to delete it too) and restart the map - the cannon appears again.

Offline Thunderstormer

  • FSE Developer
  • ****
  • Posts: 6309
  • Worse than Hotler
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1712 on: July 02, 2018, 10:17:42 am »
Another quick question - I want to add handgrenades to my mod, I changed range and max_ammo for Holy Hand Grenade, but I want grenade to explode after some time (like mortar shell), not on impact, but I can't find the script of timed explosion in module_scripts.py, can someone show me it?:)

And I still have strange cannon, which appears only in gamemodes (and not in scene editing mode), but when I delete in some gamemode barrel of the cannon (I can't select cannon's wood to delete it too) and restart the map - the cannon appears again.

mortar shells blow up on impact, not by time in NW.  Crates blow up after an amount of time, and going off memory, i believe the timer stuff for that is in the scene props file. 


a lot of things are different in scene editing mode compared to the regular modes.   Ideally, you make the map you want in scene edit mode, then you play that map in an actual game mode for testing things out.  because of the differences, it is best advised to only change stuff in scene edit game mode.   try removing the cannon in scene edit game mode.

another minor note, if you remove a prop, it is best to just start the map again rather than hit reset.
Should you need to talk to me regarding NA1 or or something regarding admining or the admins, PM me here on the forums and not on steam.  *

*This does not include Official Server Admins.

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1713 on: July 02, 2018, 10:59:32 am »
Thank you for answer! I will try use script of crate explosion.

As fow second part - I placed that gun a very long ago in testing purposes and I think I placed it in some game mode, not in the scene editing mode. But strangely this particular gun doesn't appear in scene edit mode at all. Other guns are OK though. Maybe data of that gun is stored somewhere else?
And yes, I restart map usually rather than reset it.
« Last Edit: July 02, 2018, 02:57:22 pm by Ivkolya »

Offline Conduct

  • Volunteer
  • *
  • Posts: 1
    • View Profile
Re: Have a question about Modding? Ask Here!
« Reply #1714 on: July 06, 2018, 11:48:11 am »
Hello! I am new to modding and I would like to know if there is a way to display the regiment officer instead of the troop, in the commander battle troop select menu? In misson_presentations

(store_mul,":troop_view",":troop_no", 2), #with weapons
(create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_game_party_window", ":troop_view"),

I have tried setting ":troop_no" to ":my_player_no" but he comes up naked :( Any ideas? Thank you so much!

Offline Armis

  • Corporal
  • *
  • Posts: 22
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1715 on: July 12, 2018, 06:29:35 am »
HI so I am a mod developer and I have recently discovered how to create new factions from scratch on Napoleonic Wars I am adding new items to my new factions and I have gotten to the point where I give new regiments new colours and new regiment standards but the flag doesn't wave in the air like the others it just sticks solid, I am trying to figure out how to fix that if someone could let me know what file and what line I need to edit I would gladly appreciate it.

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1716 on: July 15, 2018, 06:13:49 pm »
Hello all, how can I assign to one unit two or more firearms simultaneously? And btw how can I add mare than 4 items to one unit?

Offline Maximilius

  • Sergeant
  • *
  • Posts: 279
  • Modding Whore
    • View Profile
  • Nick: Vitallion
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1717 on: July 19, 2018, 01:01:20 am »
Anyone got the latest version of the NW MS? All I can find is the MS from NW release, a tad useless now its been updated to the extent that it has been.

Offline pete99

  • First Sergeant
  • *
  • Posts: 71
  • Gang Warily
    • View Profile
  • Nick: Drummond
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #1718 on: August 05, 2018, 02:05:00 pm »
Anyone got the latest version of the NW MS? All I can find is the MS from NW release, a tad useless now its been updated to the extent that it has been.

If you are still looking for this:

https://www.moddb.com/mods/mount-and-musket-battalion-mod/news/napoleonic-wars-patch-12-released

Down at the bottom.

AeroNinja

  • Guest
Re: Have a question about Modding? Ask Here!
« Reply #1719 on: August 06, 2018, 03:06:01 pm »
So I want to compile my module. But I get a few errors. My path is correct and the folder name is also correct. I have not used backwards slashes as stated in the module_info.py file.

It transfers some text files over but not all. Can anyone help me asap with this?
« Last Edit: August 06, 2018, 03:50:10 pm by Ἀχιλλεύς »

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1720 on: August 09, 2018, 09:50:04 pm »
How to say in Python "agent's active animation is"? I mean while some animation is active, some script is executed. Maybe somewhere in game it is used?

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1721 on: August 10, 2018, 11:50:05 am »
Nevermind, I think I figured it out
« Last Edit: August 10, 2018, 03:41:33 pm by Ivkolya »

Offline Coldstreamer

  • First Lieutenant
  • *
  • Posts: 1661
  • Leader of 1er Suisse, Ski Instructor, Paintballer
    • View Profile
    • My Youtube Channel
  • Nick: J-Man11
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1722 on: August 14, 2018, 11:50:02 pm »
How do you change the colour of say.. A plume in a hat, or the colour of the hat?  I know how to change the uniform but can do you change the hat colour?  Also, how do you edit the hat, say make a bearskin into something like a Bicorner..?

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1723 on: August 20, 2018, 09:02:34 pm »
How do you change the colour of say.. A plume in a hat, or the colour of the hat?  I know how to change the uniform but can do you change the hat colour?  Also, how do you edit the hat, say make a bearskin into something like a Bicorner..?

If I understood your question right, then for changing colour of the hat or of a plume, you'll need to change textures (via Photoshop or Gimp2 as example), for making bearskin into bicorner you'll need 3Ds Max or Blender or Wings3D (two latter are free to use)

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1724 on: August 20, 2018, 09:11:26 pm »
Hi all, have a very difficult and important for me question. I need to make standing and walking animations with rifle on the left shoulder, when left hand is under rifle's butt, like here
Spoiler
[close]
I am not good at animations and especially with understanding and using flags, but I'm sure, that flag arf_stick_to_left_hand will not help me, because I need rifle for these two animations to be higher relatively to hand than it is in NW (and of course at the left hand), so I guess I'll need new model of rifle for these two animations, with new coordinates.
So question is - is it possible, make appear this new rifle model only for these two animations instead of usuall model of rifle? Or there is easier way to archieve needed rusults?

P.S. By the way, I can't make flag arf_stick_to_left_hand work, rifle is always in right hand, what I am doing wrong?
Here's the code for animation:
Code
 ["stand_crossbow", 0, amf_client_prediction,
   [2.0, "staff_cstance", 0, 60, arf_use_stand_progress|arf_cyclic|arf_stick_item_to_left_hand, 0, (0, 0, 0), 0.0], 
("staff_cstance" is animation from NW "staff_cstance_musket")


UPD.: I was thinking, what if try to solve it via vertex animation? I mean, make vertex animation of two models - one usual and one with other coordinates, so it will like I need. Here cmes the question - how make game to use vertex animation and, accordingly, another model of rifle for animations of standing and walking? (In NW there is vertex animation in animation of firing musket and in reload animation, but I don't understand how is it working, never saw tutorial about adding vertex animation to skeletal animation)

Spoiler

[close]
Here I made model of rifle with new coordinates and attached it to left hand (like shield in Warband).


Three years later I came back to this idea of holding the musket's butt with left hand animation, but still no luck. And still the flag "arf_stick_item_to_left_hand" does nothing in different animations I've edited in testing purposes. Can this flag be restricted only to reloading animations? Or maybe I'm doing something wrong?

Now I guess I need for this a script, which will move and rotate wielded item (musket) for animations of standing and walking (better solution), or if it will not be possible - it can be solved by a script, which will replace wielded musket with another item (the same mesh, but moved and rotated as needed), which is a more clumsy solution.

I tried to write a script with second solution (just to see if it will change wielded item to another one while certain animations are active), but it seems it doesn't work. Here is my script (I am very-very new to coding, so I realize that this code can be stupid, I made this script by analyzing other scripts, module builds without errors, but nothing is changed in game):

My code
Code
  ("cf_replace_weapon_while_anim_is_active",
  [
    (store_script_param, ":agent_id", 1),

    (agent_is_active,":agent_id"),   
    (agent_get_animation,":cur_anim",":agent_id",1),                  #if current animation is:
    (this_or_next|eq,":cur_anim","anim_stand_staff"),                 # When player stands
    (this_or_next|eq,":cur_anim","anim_turn_right_staff"),           # When player turns right
    (this_or_next|eq,":cur_anim","anim_turn_left_staff"),             # When player turns left
    (this_or_next|eq,":cur_anim","anim_walk_forward_staff"),          # When player walks forward
                 (eq,":cur_anim","anim_walk_backward_staff"),          # When player walks backward

    (try_begin),
       (agent_get_wielded_item,":item_id",":agent_id",0),                      #if agent has item
       (this_or_next|is_between,":item_id","itm_french_mousquiton","itm_cannon_ball_dummy"),     #item is a carbine or
                    (is_between,":item_id","itm_french_charleville","itm_french_art_off_sword"),     #item is a musket
       (agent_equip_item,":item_id","itm_flag_france_45e"),                                          #give to the agent other item (flag for testing purposes)
    (try_end)   
  ]),
 
[close]

Can someone help me with making soldier stand and walk with musket in proper position on the left shoulder?


I asked this three years ago and get no answer, maybe I'll be lucky this time :)