[General] Arab's fixes and changes

Making or wanting help making your own asset? Check in here
Post Reply
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [Fixing] Files with typos

Post by Mats391 »

I dont know a lot about jet physics, but messing with gravity or mass can have huge impacts on their performance. So any increaser there would have to be countered by increased throttle and what not.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

Yeah I know. A correction: It's mass and gravity that makes it heavier, not one or another.
Last edited by Arab on 2014-07-25 07:59, edited 2 times in total.
Psyrus
Retired PR Developer
Posts: 3841
Joined: 2006-06-19 17:10

Re: [Fixing] Files with typos

Post by Psyrus »

Arab wrote:Yeah I know. A correction: It's mass and gravity that makes it heavier, not one or another.

Video: Bye Bye Su-25a.avi - Speedy Share - upload your files here

Tried uploading it to TinyPic, but it failed 2 times :neutral:
That's a 625MB file, it looks like you just uploaded the raw fraps capture :neutral:

At least pass it through a x264 encoder first :)

I think this one is decent, not sure
VideoLAN - x264, the best H.264/AVC encoder

Then upload it to youtube, much easier for everyone.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

Saved in Windows Live using Youtube Setting, so it's reduced to 52 mb and uploaded to youtube here ;)

Last edited by Arab on 2015-09-18 11:51, edited 3 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 »

Arab wrote:Saved in Windows Live using Youtube Setting, so it's reduced to 52 mb and uploaded to youtube here ;)

SU 25 Debris and Slow Falling Fix - YouTube
Still looks rather slow to me. Also maybe you can show a video where you get destroyed/leave vehicle while flying horizontal?
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

For now, I'll focus on what things really need networkables and what don't, and then I'll work on making the jet example heavier, with the handling being the same.

Just a question. In objects_common_server\common\fixed_carrier and firebase etc I deleted the networkables there and tested it, and there was no change. Is there a reason for it?
User avatar
Mineral
Retired PR Developer
Posts: 8534
Joined: 2012-01-02 12:37
Location: Belgium

Post by Mineral »

As in tested with multiple players on a dedicated server? That's the only way to test networkables. Fixed firebases need them I think as they are part of the gpo's?

Sent from my XT1052 using Tapatalk
Image
K4on
Retired PR Developer
Posts: 5055
Joined: 2009-05-08 19:48

Re: [Fixing] Files with typos

Post by K4on »

ObjectTemplate.mapMaterial 0 Airplane 184
ObjectTemplate.mapMaterial 1 penetrable_glass 1006
ObjectTemplate.mapMaterial 2 Airplane 184
ObjectTemplate.mapMaterial 3 Wreck 60
ObjectTemplate.mapMaterial 4 Rubber 102
ObjectTemplate.mapMaterial 5 UNDEFINED 31
ObjectTemplate.mapMaterial 6 Rubber 102
The second parameter in mapMaterial is simply a name to make it easier to read, i think

Yep Wreck, Rubber, UNDEFINED, are just descriptions.
Though, I wouldn't ever trust them blindly and check if its really the material what gets described. You can check this with the meshviewer for example.

Regarding gravity and mass etc.: do not touch if you don't know what you are doing. It has a major impact on the vehicle physics.
Its always easier to use the editor and see live what kind of impact such a change has.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

[R-DEV]K4on wrote:Yep Wreck, Rubber, UNDEFINED, are just descriptions.
Though, I wouldn't ever trust them blindly and check if its really the material what gets described. You can check this with the meshviewer for example.

Regarding gravity and mass etc.: do not touch if you don't know what you are doing. It has a major impact on the vehicle physics.
Its always easier to use the editor and see live what kind of impact such a change has.
Will do.

Well, unless I read about how the Bf2 Engine works, then I'll have some difficulty, so better do research on how to use the BfEditor. I already learnt how to load a mod with it (like pr_edit), which is good.

Don't expect miracles though, I'm not a proper coder like the modders here :razz: and I'm a big noob
[R-DEV]Mineral wrote:As in tested with multiple players on a dedicated server? That's the only way to test networkables. Fixed firebases need them I think as they are part of the gpo's?

Sent from my XT1052 using Tapatalk
I am testing them right now on a multiplayer server through bf2_w32ded on Co-Op mode on Muttrah. Would that work?

Actually, I know that when I try to enter a vehicle and it says There is a problem with the connection, then it means that it needs a networkable.

Basically, something static doesn't need a networkable, but something that moves needs one, though not necessarily.

Things that don't work (so far):
-Fobs
-PRBot Camera Vehicle
-Command Post (Not in Minimap and invisible)

Weird thing:
-Spawn dot at the sea on USMC side. I went to click on the dot and spawn, and it sent me to the dock. Not sure if related to networkable or not.
Last edited by Arab on 2014-07-27 11:26, edited 12 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 »

Basically anything that needs to by synchronized with the client needs it. So it is not only about moving, but also damage or position changes in general through warping etc.
I doubt that you will find a lot of objects that wrongly have networkable set. However some child objects do not need it. Such as firearms on vehicles, looking at those you will have more luck finding unnecessary stuff i think.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

[R-CON]Mats391 wrote:Basically anything that needs to by synchronized with the client needs it. So it is not only about moving, but also damage or position changes in general through warping etc.
I doubt that you will find a lot of objects that wrongly have networkable set. However some child objects do not need it. Such as firearms on vehicles, looking at those you will have more luck finding unnecessary stuff i think.
How about something like a bipod for the hmg?
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: [Fixing] Files with typos

Post by Mats391 »

Arab wrote:How about something like a bipod for the hmg?
Try it :)
Hauteclocque
Retired PR Developer
Posts: 3312
Joined: 2008-10-02 17:55

Re: [Fixing] Files with typos

Post by Hauteclocque »

[R-CON]Mats391 wrote:The second parameter in mapMaterial is simply a name to make it easier to read, i think.
[R-DEV]K4on wrote:Yep Wreck, Rubber, UNDEFINED, are just descriptions.
Though, I wouldn't ever trust them blindly and check if its really the material what gets described. You can check this with the meshviewer for example.
You are both correct about the descriptions. Every exporter has his way to name materials.

"UNDEFINED" appears when the exporter doesn't assign a (several) tri(s) of one of the collision meshes to a proper material. It's a mistake that can be easily fixed by the exporter himself checking the material list in max or via code like you did successfully. Just be sure of what kind of material to apply using meshviewer as K4aon said or the bf2editor after having toggled the collision meshes.
Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Fixing] Files with typos

Post by Rhino »

I would by far recommend using the BF2 Editor, especially for Vehicle col Meshes as checking them in BFMeshView can be a real pain since they are separated into each sub part etc.

Just make sure you check all col0, col1 and col2 also since some materials that might be designated correctly on col0, might not be on col1 or col2 etc which could cause seriously problems, especially if its a problem on col0 or col1.
Image
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

[R-DEV]Rhino wrote:BFMeshView can be a real pain since they are separated into each sub part etc.
IT is a pain, though it worked for 1 hour until lately, it spat out 'drawvismesh object variable or with block variable not set' :-x

I don't know how to use the editor to import a mesh to find out what gfx is used, but I know where the folder is, so it's easy.

I'll just go through the textures and make sure it's ^2, meaning 128 x 128, 256 x 256, 512 x 512 etc and saving it according to the thread for .dds here.

And I absolutely hate Windows 7's Explorer bar. There's no 'Go back' button, meaning you got to mash the back button and it's just a headache.
Last edited by Arab on 2014-08-02 04:00, edited 2 times in total.
SevenEleven
Posts: 42
Joined: 2014-07-16 12:24

Re: [Fixing] Files with typos

Post by SevenEleven »

Are you going to change hades peak? Some of the flags in AAS aren't worded how they should be.
Image
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

Sure, I think I can :)


So there's two programs. Bf2MeshCheck (New), and BfMeshView. One for finding errors, and the other one the fixer.

Link: ByteHazard's BF Tools (Didn't realize it has a .DDS Checker & BF2 Lightmap Deleter!)

Bf2MeshCheck 1.0.0 and BfMeshView.

To use both programs and make them work:

1. Right-Click on 'meshcheck.exe' and click 'Properties'
2. At the far-bottom, you should see 'Attributes'. You should see a warning, saying 'This file comes from another computer.' Press Unblock.
3. Run as Admin

For the Mesh Viewer, do the same.

Mesh Check is awesome because it scans. checks for duplicate col's and errors, and allows you to double-click on it to fix it. Really cool stuff!

Now, to use Bf2Mesh View, open it up.

We want to configure it to first point to the mod directory.

Before we start, we need to extract the files we need to modify from .zip. Any type of BF2 Tools most likely doesn't support archiving, so you need to extract the files so that they can be read.

So, 1. Go to the content folder on 'pr_edit'
"C:\Program Files\Origin Games\Battlefield 2 Complete Collection\mods\pr_edit\content"
2. Extract 'Object_Statics_Client' to the objects (as a folder)

Now we are ready to configure it.
1. Go to Options, Preferences.
Here, we have the Mod/Texture Paths section. We want to add our mod, which in this case is PR (Project Reality).
2. Click 'Add...' and go to your mod directory, and select 'pr_edit'.


Now we want to setup associations. It's located beneath, and it's not hard to figure this part out ;)

At the far-bottom, under Miscellaneous, you can allow it to maximize (fill up the screen) on start, and change the color of the stage.

Finally, go back to the program, and go to 'Options'. Select 'Load Textures', 'Load Samples' and 'Load Con', then click 'Remember Settings'.

It can both crash sometimes, and be stubborn, so I try to run it on XP Mode SP3 for best compatibility.

To use Bf2 Mesh Check.
1. Open up the 'pr_edit mod' folder, go to contents, go to your extracted archive folder and copy the directory from explorer
2. Paste to 'Mod Path' box

Use normal scan for best results.

Now to go through Errors and their meanings

Code: Select all

[list=1]
[*][size=125]NaNs[/size]

[b]Meaning:[/b] Bad Vertices. The number next to Nan is the number of Vertices that needs fixing.

[b]How to fix:[/b] Double-click it, and then go to 'Tools', then 'Fix Mesh'. Go to File -> Save, and click 'Yes' to replace.
[*][size=125]duplicate: GEOM LOD1[/size]

[b]Meaning:[/b] There's a duplicate lod with the same image file. Next to it shows which one it is.

[b]How to fix:[/b] Double-click it, and then look at the col's, and right-click the duplicate number (Whatever on the error) and click on delete. Go to File -> Save to save.
[*][size=125]polycount: GeomX LODX[/size]

[b]Meaning:[/b] Too many polygons on a mesh

[b]How to fix:[/b] Reduce the polygons with a modelling program, eg: 3dsmax 2009.
[*][size=125]drawcalls: GeomX LODX[/size]

[b]Meaning:[/b] High Draw Call.

[b]How to fix:[/b] Cull the Draw Calls. Reduce unnecessary draw calls like pixel lights etc
[*][size=125]mixup: GeomX LODX/Polycount: GeomX LODX[/size]

[b]Meaning:[/b] Different Models for the same mesh? Not sure and also polycount is high

[b]How to fix:[/b] Delete any mesh that's different from the original and reduce polycount
[/list]
When I see if a mesh is fixed, I click on 'Start' again to make sure the issue disappeared.

I believe that fixing Static Meshes + Removing Useless Networkables (Some, the ones that are needed for clients to see etc - With testing obviously) + Fixing .dds dimensions (^2) & saving mipmaps + .Con and .Tweak tweaking = Huge Performance Boost and Stability! I already tried out the fixes that removes the bad vertices and duplicates (Not all of them), and I notice a difference.

Though I've yet to fully complete all of them, and run a benchmark, I believe this will be the end of performance issues and instability.
Last edited by Arab on 2014-08-03 13:22, edited 24 times in total.
LITOralis.nMd
Retired PR Developer
Posts: 5658
Joined: 2010-04-10 16:15

Re: [Fixing] Files with typos

Post by LITOralis.nMd »

Arab wrote: And I absolutely hate Windows 7's Explorer bar. There's no 'Go back' button, meaning you got to mash the back button and it's just a headache.
It can be added with an AutoHotKey script...

By default, Backspace goes backwards through the history, "breadcrumb style navigation"

Instead, make Backspace go up one level, like in Windows XP...

Make Backspace in Windows 7 or Vista Explorer Go Up like XP Did
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: [Fixing] Files with typos

Post by Arab »

Just a quick update for devs: I finally found a way to fix the annoying error message with BF2MeshChecker:

Basically, make the folder like this:
C:\Games\Battlefield 2\mods\prtest\

and paste the extracted folder in prtest, and then on Mod Path, use 'C:\Games\Battlefield 2\mods\prtest\' (Or whatever drive your computer is.

Basically, it complains when it has a special character in it's directory path, so you can make it called anything as long as no characters are used.
Last edited by Arab on 2014-08-04 13:17, edited 1 time 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 »

It is really awesome to see that you are working on fixing stuff that piled up over the time. :)
I am a bit unsure if this MeshChecker tool does not screw things up. I dont know a lot about meshes and modelling, but you should always be sceptical with automated tools.
Post Reply

Return to “PR:BF2 Community Modding”