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

0 Members and 2 Guests are viewing this topic.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1365 on: December 17, 2015, 08:24:04 pm »
Can someone explain me what is Spec RGB, Coeff and Flags in materials?

Offline Johny_Nawalony

  • First Lieutenant
  • *
  • Posts: 762
    • View Profile
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #1366 on: December 17, 2015, 09:49:23 pm »
Is it posibble , to make a mod which will increase maximum number of players on server umm for example from 200 to 250?
I can do paid skin comissions so yeah msg if ya want one

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1367 on: December 24, 2015, 09:54:52 pm »
Hi all, in my Crimean war mod there will be obviously many fortifications made of gabions and sandbags, so I'm facing a problem now - if these gabions will be made separately, there will be way too many polygons, so it will sinificantly decrease FPS even on good PC.
I made my own gabions, with 8 (instead of 12 like in NW) sides, and 1/3 gabions for lower rows, but still there will be too many polygons, I think (ca. 25 polygons per gabion, and I'll need hundreds of them). Also, these walls of gabions in 2-3 rows high can be made as couple polygons and gabions can be drawn on them, but I think it will be very poor image.
How many vertices and polygons can be in building, so it will not burn player's PC?:)
If there were already such fortifications in some mod, how is that problem solved there?

Plus, at least front gabions of gun positions must be destroyable, so another question is - how many destroyable objects can be on the map, so it will be good for performance? In Unreal engine each destroyable object is an agent, is it so in NW too?

P.S. Merry Christmas everybody:)

Offline Grozni

  • Second Lieutenant
  • *
  • Posts: 308
    • View Profile
  • Nick: RRA_10thRH_SoH_Grozni
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1368 on: December 24, 2015, 11:55:06 pm »
Hi all, in my Crimean war mod there will be obviously many fortifications made of gabions and sandbags, so I'm facing a problem now - if these gabions will be made separately, there will be way too many polygons, so it will sinificantly decrease FPS even on good PC.
I made my own gabions, with 8 (instead of 12 like in NW) sides, and 1/3 gabions for lower rows, but still there will be too many polygons, I think (ca. 25 polygons per gabion, and I'll need hundreds of them). Also, these walls of gabions in 2-3 rows high can be made as couple polygons and gabions can be drawn on them, but I think it will be very poor image.
How many vertices and polygons can be in building, so it will not burn player's PC?:)
If there were already such fortifications in some mod, how is that problem solved there?

Plus, at least front gabions of gun positions must be destroyable, so another question is - how many destroyable objects can be on the map, so it will be good for performance? In Unreal engine each destroyable object is an agent, is it so in NW too?

P.S. Merry Christmas everybody:)

My two cents, until someone gives a more educated answer.

You'll just have to improvise a lot.

One way is avoidance - all good mods avoided stuff which don't work well on M&B engine and focused on making other fun aspects work well.

But since rows of gabions are big part of your period's visual identity, I'd rather go with having row of gabions a single object, an actual single object so you have only outer faces while sides of gabion which touch don't have a face.

If you really must have lots of destructable gabions then go with the way NW walls are made - they are not actual destructable object but cannonball is coded to make them change their state once it collides with them and explosion is coded to change their state if in radius. This way you don't rely on game engine's costly destructable objects but on a piece of code which activates only during cannonball's flight or when TNT explodes. You would still have lots of objects but they wouldn't be flagged destructible (by the way I have no clue how costly a destructable game object is, but i'm sure they are not as costly as spawning an agent since they only have a collider object and no other stuff like AI attached). This would make sense since a piercing bullet hole shouldn't be able to destroy (or even penetrate) a gabion while explosions did the job. As for infantry destroying gabions with bayonets and sabres, I'd have no problem leaving that out since it looks a bit stupid, a melee weapon would likely get stuck inside rather than reduce its hit points. If you think infantry must be able to remove gabions then you could code a special button/action just for that. In any case I don't see how infantry could use melee weapon strikes to destroy gabions as they are piled together and able to withstand a cannonball strike, so imho it would make perfect sense to use this solution rather than destructable objects.

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1369 on: December 25, 2015, 01:48:54 am »
I thought there is only one way to make object destructable - the way you described, make models of object and destroyed object, and then use dark magic in scripts:)
I made these "1/3 gabions" (I don't want to make them as single object, I place them higher/lower, with different angles, so it is more realistic) for rows, where gabions are not completely seen (but it seems, almost all gabions will be not completely seen, it makes things a little easier), each "1/3 gabion" has 21 vertices and 12 faces (I think I must replace ground top on all gabions - there are holes, when I make second row, but it will add only 2-3 more vertices per gabion, I guess) so lowest row looks now like this:

Spoiler


[close]

I think I'll need ca. 500 gabions per row, there will be 3 rows, so there will be 1500 gabions, so it will be ca.30000 vertices (but it is without batteries on both sides of tower), is it too many for building, or is it OK?
« Last Edit: December 25, 2015, 01:58:13 am by Ivkolya »

Offline Grozni

  • Second Lieutenant
  • *
  • Posts: 308
    • View Profile
  • Nick: RRA_10thRH_SoH_Grozni
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1370 on: December 25, 2015, 02:28:47 am »
I thought there is only one way to make object destructable - the way you described, make models of object and destroyed object, and then use dark magic in scripts:)
I made these "1/3 gabions" (I don't want to make them as single object, I place them higher/lower, with different angles, so it is more realistic) for rows, where gabions are not completely seen (but it seems, almost all gabions will be not completely seen, it makes things a little easier), each "1/3 gabion" has 21 vertices and 12 faces (I think I must replace ground top on all gabions - there are holes, when I make second row, but it will add only 2-3 more vertices per gabion, I guess) so lowest row looks now like this:

Spoiler


[close]

I think I'll need ca. 500 gabions per row, there will be 3 rows, so there will be 1500 gabions, so it will be ca.30000 vertices (but it is without batteries on both sides of tower), is it too many for building, or is it OK?

Well the usual way to make a scene prop destructable is by giving it proper flags, you have examples of that in module_scene_props.py. That way it reacts to any sort of melee or projectile strike but having lots of those may burden the server, not sure. If destructable objects are a burden, I would expect this to reflect in causing server lag and not the FPS lag (unless maybe if you're hosting server through your game rather than having dedicated server). I think primary reason NW walls are not made destructable the usual way is so common weapons can't affect them, but maybe this saves performance as well, like I said, not sure.

30,000 vertices is good, but then it depends on how many times 30000 you plan to have, but I think you're good. You will get most accurate answer by testing yourself. Get a FPS counter, load some heavy NW map with lots of complex scene props and note the FPS (keep in mind you would have to be standing at map corner and look towards the map center to get most FPS burden). Then make a scene in your mod with number of polygons known to you (for example 20 objects X 30000 vertices) and compare. Btw, sharing your findings here may be useful to some other folk in future.

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1371 on: December 25, 2015, 11:18:52 am »
OK, thanks for answer! Main question you've answered, if 30000 vertices are not that bad, so it is possible to make fortifications of separate gabions:)
I guess, I'll make gabions with even less count of vertices, and there will be LOD's too, so maybe it will be not that burden for server:)

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1372 on: December 25, 2015, 01:51:57 pm »
http://s18.postimg.org/o9m976049/transparento2.png

Put it in the layer above your flag.
I don't understand. Could somebody explain me how to do it?

Offline Grozni

  • Second Lieutenant
  • *
  • Posts: 308
    • View Profile
  • Nick: RRA_10thRH_SoH_Grozni
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1373 on: December 25, 2015, 02:07:25 pm »
http://s18.postimg.org/o9m976049/transparento2.png

Put it in the layer above your flag.
I don't understand. Could somebody explain me how to do it?

What he means is, put that as transparent layer above the flag layer in graphics editing software of your choice, like Photoshop or Gimp (free). Doing it in that way won't distort your image to make it look like it's a waving piece of cloth, but having that layer added over your image will trick the eye a bit. Adding transparent layer is simple to do, falls under basic knowledge of editing graphics, and is something you should learn to do before trying to mod textures. Exporting the image into .DSS is a bit trickier, you will need to install plugin for photoshop or gimp, and to import it into game you need to copy .dss into your mod's Textures folder and use openBRF to alter a material to use your texture or crate new material. Tutorials for all that could be found on this or taleworlds forum.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1374 on: December 25, 2015, 02:08:46 pm »
http://s18.postimg.org/o9m976049/transparento2.png

Put it in the layer above your flag.
I don't understand. Could somebody explain me how to do it?

What he means is, put that as transparent layer above the flag layer in graphics editing software of your choice, like Photoshop or Gimp (free). Doing it in that way won't distort your image to make it look like it's a waving piece of cloth, but having that layer added over your image will trick the eye a bit. Adding transparent layer is simple to do, falls under basic knowledge of editing graphics, and is something you should learn to do before trying to mod textures. Exporting the image into .DSS is a bit trickier, you will need to install plugin for photoshop or gimp, and to import it into game you need to copy .dss into your mod's Textures folder and use openBRF to alter a material to use your texture or crate new material. Tutorials for all that could be found on this or taleworlds forum.
I know texturing and stuff. But can I do this with the flags in paint.net too?

nevermind, I figured it out. Thanks!

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1375 on: December 26, 2015, 09:45:49 am »
I have a problem. Anytime I press C, the soldier doesn't say anything. What could be the problem?
EDIT: He says something, but after a long time. Also Officer classes should be able to say something every second, but they aren't
« Last Edit: December 26, 2015, 09:49:22 am by Dazzer »

Offline usnavy30

  • Colonel
  • *
  • Posts: 1983
  • Former Freelance Modder
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1376 on: December 26, 2015, 09:53:18 am »
I have a problem. Anytime I press C, the soldier doesn't say anything. What could be the problem?
EDIT: He says something, but after a long time. Also Officer classes should be able to say something every second, but they aren't
The problem for the soldier not saying anything when you press C could be because the sound file is a different type from the one that is coded. Most commonly it is a .ogg file to replace in the module_sounds with .wav files. As for the long delay, that might be caused by the sound file itself. I do not know how to fix it off the top of my head.
New officer troops need to be coded in module_scripts for the bonuses and all to take effect, including NCOs, musicians and generals.
How To Run A Mod Installer.exe
Quote
Hello.. I have a problem... It says I don't have Mount&Blade Warband: Napoleonic War and I have to buy it
Try joining a regular Napoleonic Wars server and then re-running the installer.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1377 on: December 26, 2015, 09:56:35 am »
I have a problem. Anytime I press C, the soldier doesn't say anything. What could be the problem?
EDIT: He says something, but after a long time. Also Officer classes should be able to say something every second, but they aren't
The problem for the soldier not saying anything when you press C could be because the sound file is a different type from the one that is coded. Most commonly it is a .ogg file to replace in the module_sounds with .wav files. As for the long delay, that might be caused by the sound file itself. I do not know how to fix it off the top of my head.
New officer troops need to be coded in module_scripts for the bonuses and all to take effect, including NCOs, musicians and generals.
Thanks. And do you know where is the line including the script for officer, NCO and musicians?

Offline usnavy30

  • Colonel
  • *
  • Posts: 1983
  • Former Freelance Modder
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1378 on: December 27, 2015, 12:36:40 am »
It's in module_scripts near the top of the file, just search for trp_british_infantry_drum and you should find the section.
How To Run A Mod Installer.exe
Quote
Hello.. I have a problem... It says I don't have Mount&Blade Warband: Napoleonic War and I have to buy it
Try joining a regular Napoleonic Wars server and then re-running the installer.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1379 on: December 27, 2015, 09:26:44 pm »
How to make specular map in paint.net? I'm using Specular plugin but it looks weird and in-game it's really ugly