Throwing distance

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: Ade, prospero

Kokroch
Hatchling
Posts: 9
Joined: Sat Aug 27, 2016 7:37 am

Throwing distance

Postby Kokroch » Sun Sep 11, 2016 7:41 pm

Where I can change it for weapons?

tq

User avatar
cieply
Dragon
Posts: 331
Joined: Wed Jun 26, 2013 3:43 pm

Re: Throwing distance

Postby cieply » Mon Sep 12, 2016 7:55 pm

look, you have to show some commitment and do something on your own, for example:

in $BOD/Config/Control.py there is something like "Throw" ( $BOD == Blade-directory )
in $BOD/Lib and $BOD/Scripts are python scripts for the game, go there and search *.py files for 'Throw' word
you'll find it in $BOD/Lib/Basic_Funcs.py, go there and check, it refers to 'ThrowFunc', check the body of that function and it will be:

Code: Select all

def ThrowFunc (self, MyName): Actions.StdThrowObject (MyName)
then ckeck Actions.py for 'StdThrowObject'

Code: Select all

def StdThrowObject(EntityName): (...) me.AddAnmEventFunc("ThrowLightFacingEvent",ThrowReleaseEventHandler) (...)
and you see 'ThrowLightFacingEvent' in function 'ThrowReleaseEventHandler' and few lines later

Code: Select all

(...) impulse = me.Rel2AbsVector(0.0, -math.cos(angle)*F, -math.sin(angle)*F)
change impulse and see what happens

----
tip of a day: Actions is (python) module so to prevent you from restarting a map every single time you make a change in module use `reload(module)`, here:

reload(Actions) # in console
l'aria fresca,
vino puro, ...

Kokroch
Hatchling
Posts: 9
Joined: Sat Aug 27, 2016 7:37 am

Re: Throwing distance

Postby Kokroch » Tue Sep 13, 2016 4:00 pm

it is very difficult for my brain.. I think that there is an easier way..

Each weapon is different throw distance, such as an ice sword throw distance more than the flaming sword, where it can be changed?

User avatar
cieply
Dragon
Posts: 331
Joined: Wed Jun 26, 2013 3:43 pm

Re: Throwing distance

Postby cieply » Tue Sep 13, 2016 9:27 pm

it is very difficult for my brain.. I think that there is an easier way..
that's easy way
I gave you instruction how to find anything in the game
skip to last file given and try to play with impulse - you will see
Each weapon is different throw distance, such as an ice sword throw distance more than the flaming sword, where it can be changed?
it's not up to weapon but model - read the code around 'impulse' and you will understand
l'aria fresca,
vino puro, ...

Kokroch
Hatchling
Posts: 9
Joined: Sat Aug 27, 2016 7:37 am

Re: Throwing distance

Postby Kokroch » Wed Sep 14, 2016 6:03 pm

Blade of Darkness\Lib\Actions.py

I found the impulse option, but there are no information about specific weapon ..

User avatar
cieply
Dragon
Posts: 331
Joined: Wed Jun 26, 2013 3:43 pm

Re: Throwing distance

Postby cieply » Wed Sep 14, 2016 8:55 pm

I found the impulse option, but there are no information about specific weapon ..
start to use your brain - 8 and 18 lines earlier is everything explained - as I said it has nothing to do with weapon but everything with its model and its mass. The whole ThrowReleaseEventHandler() function is very self explanatory. All you can change is force and angle here, and you can't change mass of object.
l'aria fresca,
vino puro, ...

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Re: Throwing distance

Postby prospero » Sat Sep 17, 2016 1:58 pm

If you look in Lib/Actions.py in the function ThrowReleaseEventHandler you will see this line:

Code: Select all

F= me.Data.ThrowForce*34000.0
Try altering the 34000 to something bigger. Double it and see what happens.
Like most BOD editing it's a question of trial and error. I think you have to increase it quite a lot to make a noticeable difference.

Also, if you look in the tables in Reference.py

Code: Select all

DefaultObjectData['Chaosword']= [OBJ_WEAPON, 5, 0, 2.0, THR_STRAIGHT, [W_FLAG_2W,PI,2000,750,100,100,GolpeArmaEscudoMetal]]
The fourth value (2.0 in this case) is something to do with the throw. Try altering and see what happens.
I've messed around with these things before but can't recall exactly the effects.

Kokroch
Hatchling
Posts: 9
Joined: Sat Aug 27, 2016 7:37 am

Re: Throwing distance

Postby Kokroch » Mon Sep 19, 2016 5:01 pm

F= me.Data.ThrowForce*34000.0
Tq, it is working .. but for all weapons, if I change .ThrowForce*34000 to 100000 for suriken it throwing far ... but after throwing others weapons, for example icesword - I can't find it anymore..
OBJ_WEAPON, 5, 0, 2.0
no effect..

User avatar
cieply
Dragon
Posts: 331
Joined: Wed Jun 26, 2013 3:43 pm

Re: Throwing distance

Postby cieply » Mon Sep 26, 2016 9:15 pm

read carefully AutoCalcThrow() and ThrowReleaseEventHandler() and you'll see throw distance is directly proportional to force and inversely proportional to mass (it's basic physics). You cannot change it for every weapon unless you'll add some kind of cherry picking mechanism dependant on what the thrown object is.
l'aria fresca,
vino puro, ...

Kokroch
Hatchling
Posts: 9
Joined: Sat Aug 27, 2016 7:37 am

Re: Throwing distance

Postby Kokroch » Fri Sep 30, 2016 7:25 pm

That is, I need to change mass of the weapon? okey.. where I can find this option?


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 1 guest

cron