[General] Arab's fixes and changes

Making or wanting help making your own asset? Check in here
Post Reply
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

I got water splash effect for grenade working!! :D And yes they hurt players too!

Code: Select all

Code that's used for the US M67 Hand Grenade:
rem ---BeginComp :D efaultDetonationComp ---
ObjectTemplate.detonation.detonateOnWaterCollision 1
Objecttemplate.detonation.playmaterialeffectatsurface 1
Objecttemplate.detonation.maxdepthforexplosion 200
ObjectTemplate.detonation.endEffectTemplate e_exp_grenade 
Haven't tested for C4 yet.

This is during my experiments into trying to get a grenade to roll on the ground. I know there's attempts to make it happen, but they have been unsuccessful.

By snooping around on the bf editor forum, I found a way to do it. Thanks to [FH]ctz for posting the maxDepthForExplosion codehttp://www.bfeditor.org/forums/index.ph ... hl=grenade
Last edited by Arab on 2014-10-07 05:35, edited 10 times in total.
User avatar
Mineral
Retired PR Developer
Posts: 8534
Joined: 2012-01-02 12:37
Location: Belgium

Re: [Fixing] Files with typos

Post by Mineral »

Arab wrote:I fixed the wrong layout picture on the local screen for:
AAS Kashan Desert Large mode. It meant to be Canadian vs MEC, not US Army vs MEC.

I simply made a copy of mapOverview_gpm_cq_64.png, deleted mapOverview_gpm_cq_128.png and renamed the copy to mapOverview_gpm_cq_128.png.

All tested, problem doesn't apply to other modes of the same map. Currently looking at other map layouts, depending if I'm still interested.

Was easy to fix, just simply copied and pasted the correct image, deleted the bad image, renamed the copy of the previous image to the former bad image's name and tested and compared with pr and pr_edit.
[R-CON]Mats391 wrote:Dont worry about those. We have a tool to generate those overviews, chances are someone changes it to canadians and just forgot to regenerate the overviews.
Arab, when you load up a LARGE-128- layer in local mode, it will load the STD-64- layer. This is cause the local game mode doesn't seem to be able to load large layers. Not sure why :) In order to play large layers you'll need a dedicated server.

So the overviews are correct. You simply loaded std(with Canadians) instead of the actual large layer(with US). As mats says our overviews are made automatically by our build tools and are re-generated on every public release so are always up to date :)
Image
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

Video showing grenades working when thrown in the water.
YouTube

Also, I need to fix the small c4 because it doesn't detonate in the water.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [Fixing] Files with typos

Post by Mats391 »

I am a bit confused. Dont they already detonate under water?
CTRifle
Retired PR Developer
Posts: 1056
Joined: 2011-01-03 14:57

Re: [Fixing] Files with typos

Post by CTRifle »

No I dont think they did, or at least that deep. Usually itd only go off right at shore iirc
Image
Image
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

Not when the grenade is submerged in deeper water, and unlike before, it plays an underwater splash effect.

Code is in description on video. Will test on dedicated server and demo recording.

I can change the effect through the materialmanager, and I like to do it manually since BF2 Editor is nothing but annoying when it comes to saving the changes through it.

I think this was achieved before by previous reality devs, but it only worked on local.
Last edited by Arab on 2014-10-07 10:31, edited 2 times in total.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [Fixing] Files with typos

Post by Mats391 »

I see. But having it detonate at 200m below surface is a bit redundant. It should only be something like explosion radius + 50%. Either way good job, hope it works in dedicated :)
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

[R-CON]Mats391 wrote:I see. But having it detonate at 200m below surface is a bit redundant. It should only be something like explosion radius + 50%. Either way good job, hope it works in dedicated :)
Yeah, I know. That can be tweaked simply by lowering the value of Objecttemplate.detonation.maxdepthforexplosion, which I believe sets the effect and explosion to explode at any set distance. I'll test it now :cool:

Update
It works!

I'll record a demo too on local, and see if it will also show up.

Demo works too, but sometimes being in a distance it doesn't show up.

I'll be going and applying these changes to other grenades, and see if I can change the effect and detonation depth, then I'll release the files here.
Last edited by Arab on 2014-10-08 07:57, edited 3 times in total.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [General] Arab's fixes and changes

Post by Arab »

Updated front page with grenade water explosion splashes for all grenades excluding grenade traps.

Still working on getting the c4_large water explosion splash right.

I disable the stickycollisioncomp and the splash explosion effect works, but no water splash when it gets in the water and I know that the default c4_large worked, but it exploded when it went in contact with water.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [General] Arab's fixes and changes

Post by Arab »

Fixed typo in lgb_mk13-18_1000lbdummy.tweak armament.

Problems:
1. *** Generated with Bf2Editor.exe wasn't rem'd
2. It was starting with ObjectTemplate.mass 1000 next to *** Generated with Bf2Editor.exe

Updated at the front page.

Will look for other comments that aren't rem'd, but after I go through the Bf2 Editor log.
Last edited by Arab on 2014-10-13 11:27, edited 2 times in total.
mries
Posts: 475
Joined: 2013-06-30 16:16

Re: [General] Arab's fixes and changes

Post by mries »

Are there plans by the DEV's to implement some of the fixes in to the next update?
Image

Image
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [General] Arab's fixes and changes

Post by Mats391 »

mries wrote:Are there plans by the DEV's to implement some of the fixes in to the next update?
Not only plans, already applied some of the fixes to the DEV build :)
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [General] Arab's fixes and changes

Post by Arab »

I didn't do the c4 fix properly and am doing it again.
Last edited by Arab on 2014-10-15 12:59, edited 1 time in total.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [General] Arab's fixes and changes

Post by Mats391 »

Arab wrote:I didn't do the c4 fix properly and am doing it again.
What is the issue? When i tested it, it worked fine
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [General] Arab's fixes and changes

Post by Arab »

[R-CON]Mats391 wrote:What is the issue? When i tested it, it worked fine
Large C4 doesn't detonate underwater, unless I am confused.

And I haven't tweaked the code for Russian and SP, unless I'm mistaken. I've already redone them, only step is to make the large c4 explode underwater.

-Fixed brimstone_missile.tweak by adding armor component from agm65_maverick.tweak

Code: Select all

rem ---BeginComp :D efaultArmorComp ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1
ObjectTemplate.armor.hitPoints 1
ObjectTemplate.armor.defaultMaterial 32
ObjectTemplate.armor.hpLostWhileUpSideDown 75
ObjectTemplate.armor.hpLostWhileInWater 50
ObjectTemplate.armor.hpLostWhileInDeepWater 80
ObjectTemplate.armor.hpLostWhileCriticalDamage 0
ObjectTemplate.armor.explosionForce 5
ObjectTemplate.armor.explosionForceMod 0
ObjectTemplate.armor.explosionForceMax 5
ObjectTemplate.armor.explosionDamage 400
ObjectTemplate.armor.explosionRadius 30
ObjectTemplate.armor.explosionMaterial 3721
ObjectTemplate.armor.criticalDamage 1
Without it, it causes this error in BF2Editor
Ignored Warning[ToolObject] : Trying to apply tweaks for template brimstone_missile that is of wrong type. Has it changed type?
Brimstone Missile

Another fix: I disabled the codes that pointed to files that didn't exist by commenting it out. Here is the list.
Log:

Code: Select all

*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/HudElementsThermal.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/air/HudElementsSu34Pilot.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/air/HudElementsSu34CoPilot.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/air/HudElementsF18Pilot.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/air/HudElementsF18CoPilot.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/air/HudElementsWZ11Pilot.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/air/HudElementsM163.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/air/HudElementsAircraftsPOVs.con"
*[Console] : Couldn't open console script "Menu/HUD/HudSetup/Vehicles/land/HudElementsCrows.con"
Disable unused vehicle files
Last edited by Arab on 2014-10-17 10:22, edited 7 times in total.
M42 Zwilling
Retired PR Developer
Posts: 613
Joined: 2012-06-10 11:27

Re: [General] Arab's fixes and changes

Post by M42 Zwilling »

Code: Select all

-Fixed brimstone_missile.tweak by adding armor component from agm65_maverick.tweak
That's not actually why that error is showing up. It's because it's created as a SimpleObject in the .con and tweaked as a GenericProjectile in the .tweak. I'll fix it in our version, thanks for finding that though. :)
Image


"How many posts have there been about how much better PR was back in 0.X? The fact is that if we played the older versions we would start to remember the shortcomings, but we tend to hold onto the good memories tighter than the bad ones." - Murphy
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [General] Arab's fixes and changes

Post by Arab »

'[R-DEV wrote:M42 Zwilling;2039580']

Code: Select all

-Fixed brimstone_missile.tweak by adding armor component from agm65_maverick.tweak
That's not actually why that error is showing up. It's because it's created as a SimpleObject in the .con and tweaked as a GenericProjectile in the .tweak. I'll fix it in our version, thanks for finding that though. :)
That's cool :)

I think I spotted something wrong with the tow code. It's using tow2 as a geometry for tow_missile.con and tow_missile.tweak.
Tow2 is not in the same folder as tow_missile, but maybe I'm wrong, and the fact is the system can look for geometries outside of the folder but I am not sure.

The tow_missile.con, like all .cons, meant to point to look at tow_missile.tweak for the geometry, and in tow_missile.tweak, it shows tow2 as a geometry, but since it's tow_missile, I think it could increase the risk of a crash due to the system getting confused after a while.

C4 Hydrophobic bug is caused by ObjectTemplate.allowLiquidPenetration 0. Simply removing it fixed it.

Will upload the new c4 files later.
Last edited by Arab on 2014-10-18 00:51, edited 4 times in total.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [General] Arab's fixes and changes

Post by Mats391 »

Arab wrote:That's cool :)

I think I spotted something wrong with the tow code. It's using tow2 as a geometry for tow_missile.con and tow_missile.tweak.
Tow2 is not in the same folder as tow_missile, but maybe I'm wrong, and the fact is the system can look for geometries outside of the folder but I am not sure.

The tow_missile.con, like all .cons, meant to point to look at tow_missile.tweak for the geometry, and in tow_missile.tweak, it shows tow2 as a geometry, but since it's tow_missile, I think it could increase the risk of a crash due to the system getting confused after a while.

C4 Hydrophobic bug is caused by ObjectTemplate.allowLiquidPenetration 0. Simply removing it fixed it.

Will upload the new c4 files later.
The C4 thing is already fixed in the dev buil. In general you just need to point out where the bug is (and how to fix it :) ) and not necessarily upload the fixed files. The files your work with and the most recent ones sometimes differ quite a lot, so it is more work to merge them than just applying small fixes.

@TOW
You can use geometries that are located in other folder without a problem. They only need to be in the same folder for this:

Code: Select all

GeometryTemplate.create BundledMesh tow_missile
CollisionManager.createTemplate tow_missile
That creates the geometry and it can be used anywhere else. Another thing to note is that you need to create the geometry/collision before applying it to any object. BF2 loads things in alphabetic order, so in the case of the TOWs this is fine (geometry gets created in tow_missile.con). Doing this wrong will most likely cause an error or make the object not use any geometry at all.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [General] Arab's fixes and changes

Post by Arab »

I think pointing out the bugs would be much easier than trying to pack the files etc and to be honest it would be easy that way :)

Is zipline from the xpack still used? I think I asked that question before, and it was answered.
piepieonline
Retired PR Developer
Posts: 433
Joined: 2009-07-22 00:41

Re: [General] Arab's fixes and changes

Post by piepieonline »

Yes, in the ninja kit :P

Aside from that, I don't believe so? Why..?
Image
Post Reply

Return to “PR:BF2 Community Modding”