[WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Yeah the icons. So you mean apply it to mines because they sometimes disappear for late players?
I will change it to 5m
I will change it to 5m
Last edited by Arab on 2014-03-02 20:55, edited 1 time in total.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
I still dont understand what you meanArab wrote:Yeah the icons. So you mean apply it to mines because they sometimes disappear for late players?
I will change it to 5m
By no means this should be added to the projectiles. That would break them.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
So, I add a child object to something like at_mine.tweak file located in objects_weapons_server.zip/weapons/handheld?Another thing about the invisible mines for players that join late. this is an optimization in the bf2 engine. new players do not get information about old projectiles. in normal vbf2 this is no problem as you have no persistent projectiles, but in PR it is. One way you could try to fix it is by having a child object that does get send to new players. Maybe simply adding an effect would work, but i doubt it. This is also something thats hard to test alone![]()
Last edited by Arab on 2014-03-03 07:14, edited 4 times in total.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Yes you add it to the projectile. The at_mine is only the weapon that spawns the mine. They are both to be found in the same at_mine.tweakArab wrote:So, I add a child object to something like at_mine.tweak file located in objects_weapons_server.zip/weapons/handheld?
It could look something like this:
Code: Select all
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.create GenericProjectile at_mine_Projectile
ObjectTemplate.modifiedByUser nfe
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.createNotInGrid 1
ObjectTemplate.createdInEditor 1
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1000
ObjectTemplate.armor.defaultMaterial 155
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.explosionForce 0
ObjectTemplate.armor.explosionDamage 0
ObjectTemplate.armor.explosionRadius 0
ObjectTemplate.armor.explosionMaterial 49
ObjectTemplate.armor.wreckExplosionMaterial 49
ObjectTemplate.armor.wreckHitPoints 0
rem ---EndComp ---
rem ---BeginComp :D efaultCollisionComp ---
ObjectTemplate.createComponent DefaultCollisionComp
ObjectTemplate.collision.hasCollisionEffect 1
ObjectTemplate.collision.bouncing 1
rem ---EndComp ---
rem ---BeginComp :D efaultDetonationComp ---
ObjectTemplate.createComponent DefaultDetonationComp
ObjectTemplate.detonation.explosionMaterial 49
ObjectTemplate.detonation.explosionRadius 12
ObjectTemplate.detonation.explosionForce 6
ObjectTemplate.detonation.explosionDamage 3000
ObjectTemplate.detonation.endEffectTemplate e_exp_MineExp
ObjectTemplate.detonation.useMMOnEndEffect 1
ObjectTemplate.detonation.triggerRadius 1
ObjectTemplate.detonation.triggerType MTYVehicle
ObjectTemplate.detonation.triggerVictimMinSpeed 1
ObjectTemplate.detonation.detectionRadius 15
rem ObjectTemplate.detonation.allowFriendlyFireDetonation 1
rem ---EndComp ---
rem ---BeginComp :D efaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp :D efaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 0
rem ---EndComp ---
ObjectTemplate.geometry at_mine
ObjectTemplate.setCollisionMesh at_mine
ObjectTemplate.mapMaterial 0 Collision_Material 155
ObjectTemplate.mass 5000
ObjectTemplate.drag 10
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 155
rem -------------------------------------
ObjectTemplate.addTemplate S_at_mine_Projectile_Looping
[color=Red][b]ObjectTemplate.addTemplate e_mine_test_effect[/b][/color]
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/9999/0/0
ObjectTemplate.material 155
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.armingDelay 15
ObjectTemplate.localPredictOnClient 1
ObjectTemplate.damage 0
ObjectTemplate.visibleOn3dMap 1
ObjectTemplate.3dMapIcon 9
ObjectTemplate.canPickup 1But as i said before this most likely wont fix the issue.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
I'll add the mine explosion effect as a childsobject. I have hopes that it would work.
Last edited by Arab on 2014-03-10 11:45, edited 1 time in total.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
*UPDATE*
I have sucessfully added the childs object. It's based on the Mine Explosion Effect. I did this by making a copy of the mineexp.tweak file, renaming it to minefix.tweak, replace all words with minefix, removed the sound codes, lightsource, enabled looping, disabled the slight shaking by disabling animation, disabled 1st person and 3rd person view so nothing can be seen.
Only thing to do is test this puppy out on a server and have it with some players placing mines, then a few people come in to join late to see if the mines are there. Not sure if Dedicated Server tool will display it in the server.
Here is the full files uploaded.
To Install:
1. Make a copy of 'PR' in the Battlefield 2 Mod directory and rename it to 'PR_Edit'
2. Open PR_Edit -> Content
3. From PR_Edit/Content -> Open objects_common_server.zip -> Effects -> impacts -> explosions -> e_exp_mineexp
4. From Mine_Fix.zip, open objects_common_server.zip -> Effects -> impacts -> explosions -> e_exp_mineexp and drag those folders to the PR_Edit/Content/Objects_common_server directory
5. From PR_Edit/Content -> Open objects_weapons_server.zip -> weapons -> handheld ->
6. From Mine_Fix.zip, Open objects_weapons_server.zip -> weapons -> handheld -> and drag those folders to the PR_Edit/Content/Objects_weapons_server directory
I have sucessfully added the childs object. It's based on the Mine Explosion Effect. I did this by making a copy of the mineexp.tweak file, renaming it to minefix.tweak, replace all words with minefix, removed the sound codes, lightsource, enabled looping, disabled the slight shaking by disabling animation, disabled 1st person and 3rd person view so nothing can be seen.
Only thing to do is test this puppy out on a server and have it with some players placing mines, then a few people come in to join late to see if the mines are there. Not sure if Dedicated Server tool will display it in the server.
Here is the full files uploaded.
To Install:
1. Make a copy of 'PR' in the Battlefield 2 Mod directory and rename it to 'PR_Edit'
2. Open PR_Edit -> Content
3. From PR_Edit/Content -> Open objects_common_server.zip -> Effects -> impacts -> explosions -> e_exp_mineexp
4. From Mine_Fix.zip, open objects_common_server.zip -> Effects -> impacts -> explosions -> e_exp_mineexp and drag those folders to the PR_Edit/Content/Objects_common_server directory
5. From PR_Edit/Content -> Open objects_weapons_server.zip -> weapons -> handheld ->
6. From Mine_Fix.zip, Open objects_weapons_server.zip -> weapons -> handheld -> and drag those folders to the PR_Edit/Content/Objects_weapons_server directory
You do not have the required permissions to view the files attached to this post.
Last edited by Arab on 2014-04-04 05:43, edited 11 times in total.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Last Bump. Could a moderator rename this thread to
Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Last edited by Arab on 2014-04-26 12:28, edited 3 times in total.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Did you manage to test if your attempt to fix pre-joining mines not showing up worked?
- Mineral
- Retired PR Developer
- Posts: 8534
- Joined: 2012-01-02 12:37
- Location: Belgium
Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
DoneArab wrote:Last Bump. Could a moderator rename this thread to
Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Thanks Mineral[R-DEV]Mineral wrote:DoneKeep up your good work. Although I'd say keep us posted with more screens/videos and general updates. Otherwise it gets confusing fast.
Sadly, no. I promise to do it on Monday: Host a server, I place a mine field at base and count number of mines, wait for people to join, see if they are same number throughout the round, use battlerecorder. Probably record the round and post it as an extra[R-CON]Mats391 wrote:Did you manage to test if your attempt to fix pre-joining mines not showing up worked?
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Ok guys, new update. It's been a long time, about roughly 3 months but I've learned so much.
I thought of a solution to the Mine, C4 that disappears.
Simply add ObjectTemplate.setNetworkableInfo BasicInfo to the .tweak file(s)
I got this idea from seeing what it does, and according to this website it: "Set the name of the network id for this object. Once set, other players will be able to see the object moving, rotating, etc., over the network.", which is exactly what we are aiming for. (There's a networkable limit of 1024)
We can all see projectiles being fired, and all that, so why not apply it to explosives? This will also possibly fix the grenade not exploding glitch too.
There's also some things that I don't think need Networkables, such as the UAV (Unless it's part of the vehicle lazing, not sure if removing it will affect it). Removing those lines may, in my opinion, prevent the jittering-lag seen in servers and removing un-needed networkables like the invisible objects can improve stability. Also, looking at all the codes and removing leftovers.
As for the test, well in theory, it doesn't do anything. It's just a cosmetic tweak. The setNetworkableInfo should work though, and I think the Battlefield 2's Optimization Code would therefore not come into play.
In simple english for those who don't understand technical mumbo-jumbo: There is a chance it can be fixed simple, but it hasn't been tested yet, and I don't have time to host a server and babysit.
Update Removing the Networkable on the Markers makes it not appear on the map I think. Could be something else.
I thought of a solution to the Mine, C4 that disappears.
Simply add ObjectTemplate.setNetworkableInfo BasicInfo to the .tweak file(s)
I got this idea from seeing what it does, and according to this website it: "Set the name of the network id for this object. Once set, other players will be able to see the object moving, rotating, etc., over the network.", which is exactly what we are aiming for. (There's a networkable limit of 1024)
We can all see projectiles being fired, and all that, so why not apply it to explosives? This will also possibly fix the grenade not exploding glitch too.
There's also some things that I don't think need Networkables, such as the UAV (Unless it's part of the vehicle lazing, not sure if removing it will affect it). Removing those lines may, in my opinion, prevent the jittering-lag seen in servers and removing un-needed networkables like the invisible objects can improve stability. Also, looking at all the codes and removing leftovers.
As for the test, well in theory, it doesn't do anything. It's just a cosmetic tweak. The setNetworkableInfo should work though, and I think the Battlefield 2's Optimization Code would therefore not come into play.
In simple english for those who don't understand technical mumbo-jumbo: There is a chance it can be fixed simple, but it hasn't been tested yet, and I don't have time to host a server and babysit.
Update Removing the Networkable on the Markers makes it not appear on the map I think. Could be something else.
Last edited by Arab on 2014-07-16 13:53, edited 12 times in total.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Yes, that could help. Not sure if you know it, but most projectiles to not use BasicInfo. They have no networkable set.
If you could test the UAV thing it would be nice. Not sure if it will work tho. You can just host a local dedicated server and join that.
If you could test the UAV thing it would be nice. Not sure if it will work tho. You can just host a local dedicated server and join that.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
I found a way to quickly check all files within minutes.
This is to allow more than 15 files to be opened at one time. This saves so much time, ensures 100% accuracy and less stress than the usual.
Firstly, follow this tutorial to allow windows to open more than 15 items at once, and USE option 2:
Context Menu Items Missing - Fix when more than 15 Files are Selected - Windows 7 Help Forums
Set the D-Word value to 200 for now, and adjust higher if your computer is able to handle it.
To restart explorer.exe, press Control-Alt-Delete, go to Task Manager and close explorer.exe and then go to File -> New Task (Run...) -> Type 'explorer.exe' (Without marks) and press enter.
Then in Windows Explorer, go to content, extract the files, go to the folder, go to the search box (In Windows 7 + '8') and type in ".con" (Without Quotation Marks) and then you can quickly select them all, and press enter. Then, click on the close button or alt-f4.
I've set mine to 2,000 but after a while of searching 3,000 files my start menu disappeared. So sometimes you have to Control-Alt-Delete, go to Task Manager and close explorer.exe and then go to File -> New Task (Run...) -> Type 'explorer.exe' (Without marks) and press enter.
Best thing to find all .con, .tweak files is to use a program called Everything. It's a search program that's instant, and basically very useful for modding. Shameless advertising, but seriously, try it.
Point it to the pr_edit, content directory, type in .con and it finds all files fast!
This is to allow more than 15 files to be opened at one time. This saves so much time, ensures 100% accuracy and less stress than the usual.
Firstly, follow this tutorial to allow windows to open more than 15 items at once, and USE option 2:
Context Menu Items Missing - Fix when more than 15 Files are Selected - Windows 7 Help Forums
Set the D-Word value to 200 for now, and adjust higher if your computer is able to handle it.
To restart explorer.exe, press Control-Alt-Delete, go to Task Manager and close explorer.exe and then go to File -> New Task (Run...) -> Type 'explorer.exe' (Without marks) and press enter.
Then in Windows Explorer, go to content, extract the files, go to the folder, go to the search box (In Windows 7 + '8') and type in ".con" (Without Quotation Marks) and then you can quickly select them all, and press enter. Then, click on the close button or alt-f4.
I've set mine to 2,000 but after a while of searching 3,000 files my start menu disappeared. So sometimes you have to Control-Alt-Delete, go to Task Manager and close explorer.exe and then go to File -> New Task (Run...) -> Type 'explorer.exe' (Without marks) and press enter.
Best thing to find all .con, .tweak files is to use a program called Everything. It's a search program that's instant, and basically very useful for modding. Shameless advertising, but seriously, try it.
Point it to the pr_edit, content directory, type in .con and it finds all files fast!
Last edited by Arab on 2014-07-21 12:32, edited 4 times in total.
-
Tommygun
- Posts: 325
- Joined: 2011-03-16 08:08
Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Was this feature going to end up in one of the new releases? Or were there further problems?

