Page 4 of 7

Re: [Fixing] Files with typos

Posted: 2014-09-10 09:38
by Arab
[R-DEV]Rhino wrote:Saving Menu/HUD textures this way allows you to use HUD textures from outside of the menu atlas.


And ye unless there is a proven performance difference to having the materials setup like that, its really not worth it since we use tools to edit our materials that save them like that and integrating your changes would need to be done again from scratch since a bunch of edits have been made and new materials added since the version you've been working with, and it will all just get reverted the next time the tools are used.
Hmm yeah, fair enough. It's annoying that through bfeditor, the save feature can be buggy and it's a pain.

Well, at the very least I can try to help out by fixing bugs :)

Ok, I've fixed this bug linked here: US alternative LAT kit incorrect geometries.
How I did it:
Editing all usa_riflemanat_alt, usa_riflemanat_altpara, usa_riflemanat_altsp, usa_riflemanat_altziptie.con, I went to this section here:

Code: Select all

ObjectTemplate.geometry.kit 12
and changed it to this

Code: Select all

ObjectTemplate.geometry.kit 6
[/b]It works now.

I've recorded the bug with the demo recorder, and then recorded the bug after the changes and it fixed it, no longer showing the spotter geometries but the riflemen_at. I tested on Local, Qwai River AAS-STD. USA is the US Army faction by the way.

I'll fully test the fix by trying each kit from both factions on that map, then I'll try on dedicated server co-op bot mode.

Edit: Seems like all of usa_riflemanap uses 6 for geometry.kit

Re: [Fixing] Files with typos

Posted: 2014-09-10 11:49
by Mats391
Arab wrote:
Well, at the very least I can try to help out by fixing bugs :)

Ok, I've fixed this bug linked here: US alternative LAT kit incorrect geometries.
How I did it:
Editing all usa_riflemanat_alt, usa_riflemanat_altpara, usa_riflemanat_altsp, usa_riflemanat_altziptie.con, I went to this section here:

Code: Select all

ObjectTemplate.geometry.kit 12
and changed it to this

Code: Select all

ObjectTemplate.geometry.kit 6
[/b]It works now.
Does not really fix it 100% as then he has AT4 on back and uses LAW, but still better than spotter :D
Arab wrote:
I've recorded the bug with the demo recorder, and then recorded the bug after the changes and it fixed it, no longer showing the spotter geometries but the riflemen_at. I tested on Local, Qwai River AAS-STD. USA is the US Army faction by the way.

I'll fully test the fix by trying each kit from both factions on that map, then I'll try on dedicated server co-op bot mode.
You dont have to go through all this. You can look at the kit geometries using BFMeshViewer. Just open "usa_kits1.skinnedmesh" for example and click through the "Geom [number]". The [number] is the same as in the con file.
Arab wrote: Edit: Seems like all of usa_riflemanap uses 6 for geometry.kit
Yes they do, but from usa_kits2 not usa_kits1. You have to be careful here

Re: [Fixing] Files with typos

Posted: 2014-09-11 09:09
by Arab
Thanks for that.

Would it be possible to transfer Geom 12 from us_kits1.skinnedmesh to usa_kits1.skinnedmesh and set the .con to that number?

Re: [Fixing] Files with typos

Posted: 2014-09-11 09:29
by Mats391
Arab wrote:Thanks for that.

Would it be possible to transfer Geom 12 from us_kits1.skinnedmesh to usa_kits1.skinnedmesh and set the .con to that number?
Yes, we could use the USMC geometry with LAW on it, but USMC looks very different to US Army so that is no good either.

Posted: 2014-09-11 09:45
by Mineral
Not OK solution. Waste of memory to load in all that stuff.

Re: [Fixing] Files with typos

Posted: 2014-09-11 13:43
by Mats391
[R-DEV]Mineral wrote:Not OK solution. Waste of memory to load in all that stuff.
Yep. Best would be to have someone make a new geometry or remove the LAW from alt AT and give AT4 geometry.
Does the US army still use the LAW?

Re: [Fixing] Files with typos

Posted: 2014-09-13 14:14
by Arab
Is auto-balance fixed? I found something that prevents Squad Leaders and Commanders from being auto-balanced.
http://bf2tech.org/index.php/Quick_Tips <- This link has tips, including how to remove the 15-minute demo recording limitation.
http://bf2tech.org/index.php/Cookbook : ... nt_Handler

One method involves modifying Battlefield 2 files, which is okay now since gamespy is shutdown. But the other way is a wrapper. What I did, was place the code in the 2nd link inside init_py.

I'll test it out later tommorow. The way I'll do it is by increasing the bot size with a tool and starting the game in a dedicated co-op server, and immediately when I join, I'll be commander. I'll then kick out the bots from the other team to make auto-balance into effect. I'll also do it with the unmodified build to compare and see if it's really doing something.

Also, rems. Remming a line of code only rems that line of code, but beginrem and endrem rems out multiple codes.

Example:

Code: Select all

beginrem 
ObjectTemplate.create ObjectSpawner vnnva_vnnva_medic_alt_preloadspawner
ObjectTemplate.activeSafe ObjectSpawner vnnva_vnnva_medic_alt_preloadspawner
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 vnnva_medic_alt
endrem
Seeing that, I will go through all files and apply this change. I already applied it to the file that dictates the 'award' system, basically the one where you get rewarded with a ribbon and medal for completing challenges, and I will test it by running BF2Statistics which enables the 'Awards' system.
[R-CON]Mats391 wrote:Does the US army still use the LAW?
Yes they do http://en.wikipedia.org/wiki/M72_LAW#United_States
I'll just follow the tutorials here on how to create a new geometry using 3d studio max 9, and copy paste Geom 12 model out of us_kits1.skinnedmesh into the new geometry in usa_kits1.skinnedmesh, save it and then point the geometry file for the alternative rifleman_at to the new number and done! Of-course, you'd need to retexture it due to the usmc being a different branch of the military, but being placeholder it's okay I guess.

Re: [Fixing] Files with typos

Posted: 2014-09-28 05:01
by Fir3w411
How's this coming along so far Arab?

Re: [Fixing] Files with typos

Posted: 2014-09-28 11:04
by Mats391
hi,
the changes to autobalance are not needed. The SmartBalance from realityadmin already does not switch commanders or squad leaders.
On the "rem"-part, i am not really sure what you want to change. Having "beginrem...endrem" around a block or "rem" in front of every line in the block makes no difference.
Having a new geometry for the LAW would be awesome, but please do not base it on the USMC. Better take the normal (AT4) riflemanAT geometry, remove the AT4 and replace it with LAW. However i am unsure if this is doable just from the skinnedmesh files.

Re: [Fixing] Files with typos

Posted: 2014-09-28 12:04
by Mineral
it's not. You need the export scenes to do it right.

Re: [Fixing] Files with typos

Posted: 2014-09-29 09:45
by Arab
Yeah, I know remming is used for commenting on something and also for disabling one's code if placed next to it.

Question time.

1.There's some paragraphs with -----------------rem---------------- that seems to be added before and after a box of code. Does that mean that section meant to be rem'd?

2. Could finding some codes that don't do anything and removing them reduce drawcalls?

3. When I was playing in windowed-mode, co-op it showed at the top-left that 'scoring' returned no value or something. I downloaded a python decompiler, and decompiled realityscoring.pyc, then opened it up and there's a code with scoring. Will removing it do anything? I have trouble recompiling it because I fail everytime.

I think the crashes is because python is confused when players get awards/achivements but the system isn't totally disabled, so the server crashes.

Re: [Fixing] Files with typos

Posted: 2014-09-29 10:36
by Mats391
Arab wrote:Yeah, I know remming is used for commenting on something and also for disabling one's code if placed next to it.

Question time.

1.There's some paragraphs with -----------------rem---------------- that seems to be added before and after a box of code. Does that mean that section meant to be rem'd?

2. Could finding some codes that don't do anything and removing them reduce drawcalls?

3. When I was playing in windowed-mode, co-op it showed at the top-left that 'scoring' returned no value or something. I downloaded a python decompiler, and decompiled realityscoring.pyc, then opened it up and there's a code with scoring. Will removing it do anything? I have trouble recompiling it because I fail everytime.

I think the crashes is because python is confused when players get awards/achivements but the system isn't totally disabled, so the server crashes.
1. The parts with "rem ---------------------- " are just for readability. They are usually used to section of things like AmmoComp etc. No impact on the game, just for the modder.

2. No. Code that does nothing (e.g. a VehicleHud on a projectile) will simply be ignored.

3. You dont need to compile it for BF2 to be able to use it. Just remove the .pyc and let it work of your .py file. The stuff is only compiled cause not everyone is supposed to access it.
Back to the scoring stuff: i dont know what you are talking about. Scoring does work, doesnt it? You get points, kills etc. Or do you mean the global scoring stuff for ranks?

Re: [Fixing] Files with typos

Posted: 2014-09-30 09:42
by Arab
[R-CON]Mats391 wrote:1. The parts with "rem ---------------------- " are just for readability. They are usually used to section of things like AmmoComp etc. No impact on the game, just for the modder.
3. You dont need to compile it for BF2 to be able to use it. Just remove the .pyc and let it work of your .py file. The stuff is only compiled cause not everyone is supposed to access it.
Back to the scoring stuff: i dont know what you are talking about. Scoring does work, doesnt it? You get points, kills etc. Or do you mean the global scoring stuff for ranks?
That's good.

Scoring works, but I want to fully stop the global scoring stuff for ranks and awards because I have a feeling it's not totally blocked from PR, and could cause a crash. Again, I'm no expert I'm just throwing things around, using my small technical knowledge and snooping to fill in the blanks.

I'm looking here:
https://bf2stats.googlecode.com/hg/Serv ... /medals.py

And I'm thinking. Is there any way to stop Battlefield 2's award system with python?

Some Players also report some oddity like receiving a kill point when they didn't do anything.

Re: [Fixing] Files with typos

Posted: 2014-09-30 13:26
by Amok@ndy
but you know that the Award system is used for Admin Messages right ?

Re: [Fixing] Files with typos

Posted: 2014-10-01 09:11
by Arab
[R-DEV]Amok@ndy wrote:but you know that the Award system is used for Admin Messages right ?
No I didn't.

Is there any program that can automatically add text under certain lines for each document like

Code: Select all

*Walk*
objects/weapons/handheld/(name-of-weapon)/AnimationSystem1p(/3p).inc
[b]animationBundle.fadeInTime 0.4
animationBundle.fadeOutTime 0.2
[/b] ?

Re: [Fixing] Files with typos

Posted: 2014-10-01 09:48
by Mats391
Notepad++. Use file filters + regular expressions. It is a bit tricky when doing it for first time, but useful for many things once mastered :)

Re: [Fixing] Files with typos

Posted: 2014-10-01 12:47
by Arab
[R-CON]Mats391 wrote:Notepad++. Use file filters + regular expressions. It is a bit tricky when doing it for first time, but useful for many things once mastered :)
Thanks Mats. Viva la Notepad++! (I'm using it by the way)

Re: [Fixing] Files with typos

Posted: 2014-10-01 14:53
by Psyrus
Arab wrote:Thanks Mats. Viva la Notepad++! (I'm using it by the way)
Regular expressions - An introduction

http://regex.bastardsbook.com/

Should be a useful resource for you

Re: [Fixing] Files with typos

Posted: 2014-10-05 07:27
by Arab
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.

Re: [Fixing] Files with typos

Posted: 2014-10-05 08:31
by Mats391
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.