Page 2 of 2

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-03-02 20:42
by Arab
Yeah the icons. So you mean apply it to mines because they sometimes disappear for late players?

I will change it to 5m

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-03-02 21:03
by Mats391
Arab wrote:Yeah the icons. So you mean apply it to mines because they sometimes disappear for late players?

I will change it to 5m
I still dont understand what you mean :? ??: Could you just post the code where you added it?
By no means this should be added to the projectiles. That would break them.

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-03-03 07:00
by Arab
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 :D
So, I add a child object to something like at_mine.tweak file located in objects_weapons_server.zip/weapons/handheld?

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-03-03 12:45
by Mats391
Arab wrote:So, I add a child object to something like at_mine.tweak file located in objects_weapons_server.zip/weapons/handheld?
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.tweak
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 1
Here i added the "e_mine_test_effect" as a child to the projectile. You would have to create the effect as well. Either in another .con/.tweak file or just the same.
But as i said before this most likely wont fix the issue.

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-03-10 11:27
by Arab
I'll add the mine explosion effect as a childsobject. I have hopes that it would work.

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-03-25 23:25
by Arab
*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

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-04-26 12:11
by Arab
Last Bump. Could a moderator rename this thread to
Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-04-26 14:43
by Mats391
Did you manage to test if your attempt to fix pre-joining mines not showing up worked?

Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-04-26 15:26
by Mineral
Arab wrote:Last Bump. Could a moderator rename this thread to
Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix
Done :D Keep up your good work. Although I'd say keep us posted with more screens/videos and general updates. Otherwise it gets confusing fast.

Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-04-26 16:23
by Arab
[R-DEV]Mineral wrote:Done :D Keep up your good work. Although I'd say keep us posted with more screens/videos and general updates. Otherwise it gets confusing fast.
Thanks Mineral :-) I will get pics vid recorded and posted on Sunday.
[R-CON]Mats391 wrote:Did you manage to test if your attempt to fix pre-joining mines not showing up worked?
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 ;)

Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-07-16 11:22
by Arab
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.

Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-07-16 12:36
by Mats391
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.

Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2014-07-21 10:09
by Arab
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!

Re: [WIP] Detonatable, Tripflare and Mines Icon Enabler 1.1 + Mine M15 Fix

Posted: 2015-11-07 09:45
by Tommygun
Was this feature going to end up in one of the new releases? Or were there further problems?