project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
18 Nov 2018, 00:00:00 (PRT)
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 2018-11-09, 13:30   #11
[R-DEV]​Arab
PR:BF2 Developer
Supporting Member

Arab's Avatar
Default Re: Fuel code

Quote:
Originally Posted by Rhino View Post
Sorry lakinen I'm finding it hard to understand your posts but I take it you mean to display the heat bar, you just have a dummy weapon with the heat bar with the same heating and cooling settings as the engine and have that controlled by the throttle as well? Interesting idea, but does mean it only works if the driver has only one weapon, otherwise, you will lose the heat bar when switching weapons and also while switching weapons, the heat bar won't be running in the bg for that other weapon when you switch back to it.



Intresting, may have to look into that when I revisit the Frigate's code.
Going into more detail from the previous post, it's obviously defined in overheat.con which contains arguments and defined types per projectile type, diameter, firerate etc and referenced using the code structure below for all Vehicle GenericFirearms/Weapons like cannons and therefore makes the overheat penalty cooldown work properly for handheld weapons too:
Code:
include ../../../weapons/common/overheat.con "shell" "25mm" "1" "200"
Kinda how that works but I guess it's down to .con being suited more for the overheat engine component?

Arab is offline
Last edited by Arab; 2018-11-09 at 13:37..
Reply With Quote
Old 2018-11-09, 20:04   #12
lakinen
Default Re: Fuel code

Let's start from the beginning.
"Also couldn't find a way in BF2 to show the "fuel/heat"..."-I thought it was a question, so I tried to do it

"Sorry lakinen I'm finding it hard to understand your posts but I take it you mean to display the heat bar, you just have a dummy weapon with the heat bar with the same heating and cooling settings as the engine and have that controlled by the throttle as well?"

-Yup,but but I did not put the same heating and cooling settings as the engine,because this is just test.

"but does mean it only works if the driver has only one weapon, otherwise, you will lose the heat bar when switching weapons and also while switching weapons, the heat bar won't be running in the bg for that other weapon when you switch back to it."

-I did not think about it,because my goal is display heat.And I went with that thought,that driver of ship,car.. only drive nothing more.

And i do the test.I simulated that instead of the siren,i put heat bar-Successfully

"that controlled by the throttle as well?""-no success(i thought it would work,because I saw it in the editor that can change commands in throttle,but when i test dont work),only fire button.Maybe because of duplication of commands.

I just edit apc_horn_m113_noammocounter.tweak put inside:
Code:
ObjectTemplate.heatAddWhenFire 0.0253
ObjectTemplate.coolDownPerSec 0.3333
ObjectTemplate.overheatPenalty 4
numbers are not important,it's just for the test,and i put in apc_horn_m113,because i use Gopher.


Quote:
Originally Posted by Arab View Post
Code:
include ../../../weapons/common/overheat.con "shell" "25mm" "1" "200"
Kinda how that works but I guess it's down to .con being suited more for the overheat engine component?
I did not put that code inside,because that's how I see it,ratio of the bullet, grananates in relation to the speed of the ejection for heatbar

https://www.youtube.com/watch?v=Tk7FXZ5enHY
the sound of the siren in the video can be turned off

The idea was that when you go ahead you see the heating indicator.*for start)

and a list of functions that I found in BF2.exe which have some connections with heat,which maybe can use:
Code:
heatAddWhenFire
inheritHeatFromPrimary
killHeatSeekingMissile
inverseHeatBar
heatBarType
setHeatBarType
getHeatBarType
weaponHud.overheatSound
ObjectTemplate.overheatPenalty
ObjectTemplate.heatAddWhenFire
ObjectTemplate.inheritHeatFromPrimary
ObjectTemplate.InverseHeatBar 1
ObjectTemplate.setHeatBarType B
ObjectTemplate.setHeatBarType G
ObjectTemplate.weaponHud.overheatSound
SecondaryHeatColorAlpha
PrimaryHeatColorAlpha
PrimaryHeatValue
PrimaryHeatShow
SecondaryHeatValue
heatIncrement
Full code look like this:
Code:
rem -------------------------------------
ObjectTemplate.projectileTemplate horn_projectile
ObjectTemplate.keepProjectiles 5
ObjectTemplate.itemIndex 1
ObjectTemplate.heatAddWhenFire 0.0253
ObjectTemplate.coolDownPerSec 0.3333
ObjectTemplate.overheatPenalty 4

greeting

There's no real flame on your screen, it's just magic

[SIGPIC][/SIGPIC]
lakinen is offline
Last edited by lakinen; 2018-11-09 at 20:10..
Reply With Quote
Reply


Tags
code, fuel
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 12:44.