cRPG

cRPG => General Discussion => Topic started by: //saxon on June 15, 2014, 05:07:03 am

Title: More Penetration, and how to add it. [Solution Inside]
Post by: //saxon on June 15, 2014, 05:07:03 am
ok i cannot for the life of me find a single OP/thread/topic on this forum but i know its exact contents.

Basically it was about throwing penetration or just general missile penetration and instead of arrows for example just sticking out of you from their "arrow head" they would go half way into you and look like it actually penetrated you(no homo).

The person who made this OP/thread/topic also had a video on it showing off the throwing lance as he threw it at a horse and half of the throwing lance went into the horse instead of what we are seeing today being just the throwing lance tip sticking out of the horse.

Pictures i just taken myself on a single player mod and cRPG describing what im talking about:

cRPG Atm (notice the lance just sticking out by the tip after thrown full force into the body)
(click to show/hide)

What im looking to find how to do. on my own by coding some files im guessing, i found this on a mod. (throwing lance goes straight through and gets stuck half way after thrown full force into the body)
(click to show/hide)
(click to show/hide)
(click to show/hide)

If anyone could give me some help on how i can do this myself to make this happen say on my native module by doing it on my own please tell me  :) there has to be someone that knows!

Thanks in advance!

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Solution.
open "item_kinds1" file in the module folder
Locate all ranged ammo by pressing "Ctrl+F" and typing ranged ammo names, Example: "itm_javelins"
the line that will come up for "javelins" is this
(click to show/hide)
Now the number 75 that is highlighted red, is the current weapon length of the javelin, number 5 being the max ammo and so on, all you need to do is change the number 75 to a lower number and the lower The number is.. the more depth the penetration on the object you hit.

This goes for all the ranged items. its that simple, just don't change the melee script of the ammo item and you won't screw up the melee mode of it.

The weapon length number like the number 75 on the javelins code above, for all the other ranged ammo items like throwing spears and arrows etc the weapon length number is located at the same place, being the fourth number from the end of the line, number to the right of it is the max ammo, changing this will differ from how many arrows or throwing equipment you carry in one slot.

hope i could help.

and also if someone important can move this thread to suggestions now because its turned into a suggestion thread instead of a help thread, thanks :)
Title: Re: need a little help from community
Post by: Dionysus on June 15, 2014, 05:54:30 am
Shish-kebabing people with throwing lances with FULL PENETRATION would be pretty fucking metal, man!

WHITE WHALE HOLY GRAIL
Title: Re: need a little help from community
Post by: Morris on June 15, 2014, 07:47:22 am
YES

(click to show/hide)
Title: Re: need a little help from community
Post by: Yuang on June 15, 2014, 08:29:51 am
Really cool.
Title: Re: need a little help from community
Post by: FleetFox on June 15, 2014, 08:45:13 am
Voted yes, though it was a hard toss up between that and give them run  :P

(click to show/hide)
Title: Re: need a little help from community
Post by: //saxon on June 15, 2014, 03:32:44 pm
there must be someone that knows how to code this for all missile types! where is that someone! going to ask on IRC.
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 04:22:02 pm
I think you can't do it yourself.

I think we should reduce the length value while keeping the mesh above but there is only the devs who can do it.
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 05:12:02 pm
Ok, i confirm.
The weapon lenght must be reduced like by 50% in server side and the mesh must remain at current size client side for that it works.

Here is an exemple with the throwing spear mesh exaggeratedly enlarged (raised by 100%):

visitors can't see pics , please register or login



I tried to reduce the weapon lenght in the itemkind.txt but apparently it's only work in the server side.
We just have to wait a not too lazy dev..   :?
Title: Re: need a little help from community
Post by: //saxon on June 15, 2014, 05:28:21 pm
Ok, i confirm.
The weapon lenght must be reduced like by 50% in server side and the mesh must remain at current size client side for that it works.

Here is an exemple with the throwing spear mesh exaggeratedly enlarged (raised by 50%):

visitors can't see pics , please register or login



I tried to reduce the weapon lenght in the itemkind.txt but apparently it's only work in the server side.
We just have to wait a not too lazy dev..   :?

ok thanks for letting me know, this make alot of sense and i see that it works, but im trying to do it on my singleplayer module so do you know what item script to change the length and where i can find it

and also what to change it to?
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 05:35:49 pm
ok thanks for letting me know, this make alot of sense and i see that it works, but im trying to do it on my singleplayer module so do you know what item script to change the length and where i can find it

and also what to change it to?

You must change the weapon lenght value in the module_item.py
Exemple for the throwing spear:
(click to show/hide)

Do not edit the "_melee" after or your secondary mode will be fucked.

I'm not sure for this but it's seems to be that for me.
Title: Re: need a little help from community
Post by: //saxon on June 15, 2014, 06:41:42 pm
You must change the weapon lenght value in the module_item.py
Exemple for the throwing spear:
(click to show/hide)
where can i find that module_item.py? can i search for a line or something in the start up search bar?
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 07:00:44 pm
http://download2.taleworlds.com/mb_warband_module_system_1158.zip

http://forums.taleworlds.com/index.php/board,12.0.html
http://forums.taleworlds.com/index.php/topic,12372.0.html
http://mbmodwiki.ollclan.eu/Official_Module_System_Documentation:_Part_01

Good reading  :mrgreen:
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 07:36:47 pm
If you are too lazzy to, there is my item_kind.txt modified for native: http://www.mediafire.com/view/7n6u4t6csocoxv9/item_kinds1.txt
Title: Re: need a little help from community
Post by: Krex on June 15, 2014, 08:24:46 pm
where can i find that module_item.py? can i search for a line or something in the start up search bar?


http://download2.taleworlds.com/mb_warband_module_system_1158.zip

http://forums.taleworlds.com/index.php/board,12.0.html
http://forums.taleworlds.com/index.php/topic,12372.0.html
http://mbmodwiki.ollclan.eu/Official_Module_System_Documentation:_Part_01

Good reading  :mrgreen:

If you have some time,Id definetly recommend reading^^
Title: Re: need a little help from community
Post by: Switchtense on June 15, 2014, 08:29:45 pm
Changing the weapon length server side, but keeping the Mesh at its current length. Pretty simple but genius solution :D

But would that not cause minor problems such as hit detection for melee? Since the length will still be the same looks wise, but when swinging you would not clip with half of the spear since the server side length is actually shorter.
Or am I just being stupid here?
Title: Re: need a little help from community
Post by: //saxon on June 15, 2014, 08:40:53 pm
Changing the weapon length server side, but keeping the Mesh at its current length. Pretty simple but genius solution :D

But would that not cause minor problems such as hit detection for melee? Since the length will still be the same looks wise, but when swinging you would not clip with half of the spear since the server side length is actually shorter.
Or am I just being stupid here?
well i can see why you think that but a throwing weapon that can also be used as melee, they have two separate lines in the module file, one for the throwing mode and one for the melee mode, all we need to do is change the throwing mode line but leave the melee one the same, talking about the length stat in the script that is.


and thanks for your help matt2507 il read into it, appreciate it!
Title: Re: need a little help from community
Post by: Krex on June 15, 2014, 09:37:34 pm
and thanks for your help matt2507 il read into it, appreciate it!

You should also take a look at the OSP section,there is tons of stuff(items,features)that you can add to your module just to experiment around a little.
Title: Re: need a little help from community
Post by: //saxon on June 15, 2014, 10:24:33 pm
If you are too lazzy to, there is my item_kind.txt modified for native: http://www.mediafire.com/view/7n6u4t6csocoxv9/item_kinds1.txt
what lines have changed compared to the vanilla native file? can you specify?

also i downloaded that module program and i have 2 folders, do i need to extract them to a certain location to open the Module_items.py?
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 11:14:09 pm
what lines have changed compared to the vanilla native file? can you specify?

also i downloaded that module program and i have 2 folders, do i need to extract them to a certain location to open the Module_items.py?

I changed all arrows and long throwing stuff.


For the module, you just need the "Module_system 1.xxx" folder, extract it and you get all pyton files.
If you want to compile it (for getting the item_kind.txt" as exemple) you must specifie a path in "module_info.py" like that:
Quote
# Point export_dir to the folder you will be keeping your module
# Make sure you use forward slashes (/) and NOT backward slashes (\)

export_dir = "D:/Native_test/"

After that, just launch "build_module.bat" in the folder. You must have pyton instaled for compiling.
If that don't work with pyton instaled, just put "python.exe" in the folder with the "build_module.bat"

All .py file are text file, edit it with notepad++
Your module folder should look like that:
visitors can't see pics , please register or login
Title: Re: need a little help from community
Post by: //saxon on June 15, 2014, 11:19:32 pm
I changed all arrows and long throwing stuff.


For the module, you just need the "Module_system 1.xxx" folder, extract it and you get all pyton files.
If you want to compile it (for getting the item_kind.txt" as exemple) you must specifie a path in "module_info.py" like that:
After that, just launch "build_module.bat" in the folder. You must have pyton instaled for compiling.
If that don't work with pyton instaled, just put "python.exe" in the folder with the "build_module.bat"

All .py file are text file, edit it with notepad++
ok i did that and it works and it came up with exporting all the files in the module i presume, so can i just edit the weapon lengths now and it will work?
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 11:24:00 pm
ok i did that and it works and it came up with exporting all the files in the module i presume, so can i just edit the weapon lengths now and it will work?

Yep, just edit the weapon lenght value.

Don't forget to specify the exporting folder. Sometimes i miss it and it's realy boring, thrust me  :mrgreen:
Normaly, the default path is "C:/Program Files/Mount&Blade/Modules/Native/".

For ranged projectiles you must edit lines 265 to 270 and 1093 to 1111

I tried it and it's realy cool to see an arrow pass trough the head off an ennemy, i realy hope some devs read that post.
Title: Re: need a little help from community
Post by: matt2507 on June 15, 2014, 11:31:52 pm
Changing the weapon length server side, but keeping the Mesh at its current length. Pretty simple but genius solution :D

But would that not cause minor problems such as hit detection for melee? Since the length will still be the same looks wise, but when swinging you would not clip with half of the spear since the server side length is actually shorter.
Or am I just being stupid here?

I didn't see any trouble when i test it. projectiles are fast so that doesn't make a difference.

And for melee, like saxon said, there is two lines, it's like you have to different weapons so there is no problem.
See that pic:
(click to show/hide)

You got two lines, the first for primary mode and the second with "_melee" at the end for the secondary mode.
Title: Re: need a little help from community
Post by: //saxon on June 15, 2014, 11:47:30 pm
well it worked and ive successfully done it, its actually very quick and easy and it would only take the developers a few mins to do this, and then patch the game.

thanks for your help matt you're a very kind gentleman and you have solved my troubles on this case  :D!
Title: Re: need a little help from community
Post by: Dark_Blade on June 15, 2014, 11:55:51 pm
your font is so nerdic lol
Title: Re: need a little help from community
Post by: Macropus on June 16, 2014, 12:04:44 am
The only problem that I see with this method - does it make projectiles penetrate solid objects like walls etc as well?
Title: Re: need a little help from community
Post by: Sniger on June 16, 2014, 12:08:57 am
visitors can't see pics , please register or login

(click to show/hide)
Title: Re: need a little help from community
Post by: matt2507 on June 16, 2014, 12:31:40 am
The only problem that I see with this method - does it make projectiles penetrate solid objects like walls etc as well?

No.

i wish i knew, good idea. perhaps not completely impale  :lol: but yeah, more penetration animation/gfx wise would be cool. the way its animated/look now is odd, not realistic... physics! btw penetrating a fucking horse? like all the way through? :lol: i think you have seen too many movies mate  :lol:

You can make it to penetrate like 25% or less/more.
Title: Re: need a little help from community
Post by: BlueKnight on June 16, 2014, 12:49:31 am

(click to show/hide)


haha :mrgreen: I believe only the pr0s use black taskbars alligned to the left ^^. I have mine very similar but a bit less adjusted.

EDIT: Also good job helping fellow cRPG player! That's a positive spirit!
Title: Re: need a little help from community
Post by: matt2507 on June 16, 2014, 12:57:47 am
haha :mrgreen: I believe only the pr0s use black taskbars alligned to the left ^^. I have mine very similar but a bit less adjusted.

EDIT: Also good job helping fellow cRPG player! That's a positive spirit!

It's juste more convenient for double screen and also because that's look cool :mrgreen:
Title: Re: need a little help from community
Post by: //saxon on June 16, 2014, 01:19:50 am
yes you can adjust the "impale depth" by decreasing/increase the missile weapon length in the item_kinds file.

so if you think its going to deep just increase the length of the projectile and it will come more out of the model it hits, decrease the length and it will go deeper into the model.

what makes this illusion look realistic is the actual mesh/texture and model size stays the same but the game think the weapon is smaller so it hits things after the actual end of the model hit the object, if that makes any sense at all.
Title: Re: More Penetration, and how to add it. [Solution Inside]
Post by: Kafein on June 16, 2014, 01:54:33 am
I was going to reply yes before reading. A posteriori it was a good idea.
Title: Re: More Penetration, and how to add it. [Solution Inside]
Post by: Taser on June 17, 2014, 04:48:42 am
I just want to say that when I saw the title.. the OP was not at all what I expected.
Title: Re: More Penetration, and how to add it. [Solution Inside]
Post by: //saxon on June 18, 2014, 12:11:04 am
I just want to say that when I saw the title.. the OP was not at all what I expected.
lol, ye kind of xrated, right?   :rolleyes:
Title: Re: More Penetration, and how to add it. [Solution Inside]
Post by: no_rules_just_play on June 21, 2014, 06:00:26 pm
Anybody cares to share his edited file?
Title: Re: More Penetration, and how to add it. [Solution Inside]
Post by: jack786 on June 21, 2014, 10:14:39 pm
I wanted to press yes, but then I saw give them run. Guess what
Title: Re: More Penetration, and how to add it. [Solution Inside]
Post by: //saxon on June 22, 2014, 04:22:03 am
Anybody cares to share his edited file?
its really like the easiest thing to do, but the person who has the server client needs to do it, might be a lazy person

but its just changing 1 number on each of the items "code line" in the item_kinds1.txt file, its that simple.