Page 1 of 1

Throwing distance

Posted: Sun Sep 11, 2016 7:41 pm
by Kokroch
Where I can change it for weapons?

tq

Re: Throwing distance

Posted: Mon Sep 12, 2016 7:55 pm
by cieply
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

Re: Throwing distance

Posted: Tue Sep 13, 2016 4:00 pm
by Kokroch
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?

Re: Throwing distance

Posted: Tue Sep 13, 2016 9:27 pm
by cieply
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

Re: Throwing distance

Posted: Wed Sep 14, 2016 6:03 pm
by Kokroch
Blade of Darkness\Lib\Actions.py

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

Re: Throwing distance

Posted: Wed Sep 14, 2016 8:55 pm
by cieply
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.

Re: Throwing distance

Posted: Sat Sep 17, 2016 1:58 pm
by prospero
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.

Re: Throwing distance

Posted: Mon Sep 19, 2016 5:01 pm
by Kokroch
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..

Re: Throwing distance

Posted: Mon Sep 26, 2016 9:15 pm
by cieply
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.

Re: Throwing distance

Posted: Fri Sep 30, 2016 7:25 pm
by Kokroch
That is, I need to change mass of the weapon? okey.. where I can find this option?