Silent Crossbow, a call for help ...

Started by Stryker7, October 20, 2011, 08:40:30 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Stryker7

Ok guys, after many hours of working on this all last night and well into this morning, I have run into sort of a brickwall.  :D I have discovered a lot of useful info, but I need a little help or info if anyone can help.  I think I am really close to a resolution, but just need to narrow down what needs doing. I am not giving up just yet, it is just a fork in the road.
--------------------
First, to gibbed, at a post here  you said  " Oh, if you have any trouble with the tools do let me know, so I can get them fixed or improved. If you're interested in class / value definitions that are not described yet, you can ask for those too and I'll do them when I can.  "    

Does this offer of class files (Java ? ) pertain to DLC Fortunes pack ? I am still not EXACTLY sure as to what I need yet, but I do have a couple of ideas.

Is it possible, to get the bootstrap to w@&k with the DLC ? Are there any command line switches that might help me extract the contents of the different DLC .dat and .fat files ? Especially any XML or LUA files.

Do you know of any blanked/ empty classes files in any of the *.dat files ? The kind that developerers sometimes use in troubleshooting their code.

And lastly, is it possible to ADD DLC or blanked classes file to the Far Cry 2/modding/mypatch/generated/entitylibrarypatchoverride.fcb ?  I know that the file is generated when you run build_patch.bat , but will it inject classes files.

I believe that I read somewhere, that this is the file used by the developers to add their own modifications to the game, so that they didnt have to change thier original code.

---------------------

Now in an attempt to narrow down what classes files I might need from gibbed, I have a couple of questions for all of the brilliant and helpful modders here, ;)

The biggest potential problem is one that I thought bout some time this morning, and one that might I not be able to solve without some assistance.   

Has anyone seen references to, or know of a "trigger" for, the NPC-AI (artificial intelligence ) that changes their alert status For instance,  when a bullet or bomb hits within their proximity they go crazy and start running around.

If AI is how a shot, or the use of a weapon, "alerts" them, then I am not exactly sure how to proceed. AI programming is over my head, but with a little help or a nudge in the right direction, I may figure it out. It may be easier than the resolutions that I originally thought of, I just dont know yet.

There are a couple of parameters that I do believe effect the AI NPC in the weapons sections of the config files I have read.

1) Does anyone have any idea what all of the references to "STIM" are in the various settings for weapons ? 

2) PZ, did you ever find out what the ""bIsSilent" was for ? That may very well be an AI type of parameter. That is the best guess I could come up with.

Now to what I have discovered that I can most definitely resolve, with a little help from gibbed.

I was looking at XML and LUA files, in an attempt to get a better grasp as to how to resolve this issue. I even extracted what I could from the downloadcontent files, The enitity.fat and entity.dat files were very helpful and led to some real progress.

I started with looking at the references in the non-DLC files, to the "dart rifle" in the files I could read, for some of its parameters just as a starting point.

From the the 22_weapons.xml and 42_weapons.xml file , I know that the dart rifle, has code for the rifle itself, but the projectile (Dart_Rifle_DART) is specifically referenced, and has some of its own pararmeters, settings, and attributes.

It is the same for the crossbow, there are references for the crossbow, and then the arrow has some of its own settings. But all of the graphics and sound files for the arrow seem to be in the Entity files in the DLC. It was a long night ... forgive me if I forget some things. I was unable to locate any other XML or LUA references in the non-DLC files.

In the extracted DLC Entity files, within the Entity/graphics/weapons/dlc/crossbow folder, there are 3 arrow graphics ( ? )  files and they are referenced in the tools/projects/Far Cry 2/files/downloadcontent/dlc1/entitylibrary.filelist.

So, I believe that modding the crossbow itself is not necessary. I maybe wrong, as I often am ( Just ask my wife of almost 31 years )
but both the dart rifle and the crossbow have references for their projectiles. I havent dug into it, but more than likely, all of the weapons have such references.

Back on point. Now if the AI is not triggered into an elevated alert status just by the projectile striking something in their proximity, then it should be due to sounds and visuals of the explosion itself.

To this point, If it is triggered by sound and/or sight, then the class files, responsible for those can either be changed to a silent sound and/ or changing the pixels or textures to blank class files.

In short, EMPTY class files can be substitued for the ones that produce sounds or generate the pixles and texures that produce the visuals of an explosion. As a matter of fact, most developers include such class files, at least during the development process, for trouble shooting the game as it is being developed. Sometimes those class files are still present when the game is released.

If it is this method, that triggers the AI Alert status change, then it should be as simple as changing the reference or links to the class files in the configuration for the ARROW in our case, so that the ARROW does not explode, visually or auditorily.

I have seen this substitution of classes files method used in IL2 1946 mods and it works very well.

But the main thing is, narrowing how the alert status is changed, and if it is sight and sound of the explosion, cancel those events with the blank classes files.

A confession, I started thinking this morning, why not just use the dart rifle, instead of going to all this trouble ? Well, I said I would try, and I REALLY dont like to give up on something. Besides, I am learning some things, who says you can teach an old dog new tricks ? :bigsmile:


 

PZ

What you wrote makes sense, but I can't help much because I never discovered what bIsSilent is used for.  Changing that parameter in normally loud weapons did not make any difference.  It does sound like you're close to resolution, one way or another.

nexor

Someone go and help Mr Blade set up his pc, we need him, actualy..............
leave him behind just bring his brain           :anigrin:

PZ


gibbed

Quote from: Stryker7 on October 20, 2011, 08:40:30 PM
Is it possible, to get the bootstrap to w%&k with the DLC ? Are there any command line switches that might help me extract the contents of the different DLC .dat and .fat files ? Especially any XML or LUA files.
Bootstrap isn't set up to interact with the DLC files, what's your aim with DLC? modify properties?

Also, the class stuff I'm referring to is completely unrelated to Java.

Quote from: Stryker7 on October 20, 2011, 08:40:30 PM
Do you know of any blanked/ empty classes files in any of the *.dat files ? The kind that developerers sometimes use in troubleshooting their code.
Nope. Far Cry 2 is actually pretty well stripped of any debug / test stuff.

Quote from: Stryker7 on October 20, 2011, 08:40:30 PM
And lastly, is it possible to ADD DLC or blanked classes file to the Far Cry 2/modding/mypatch/generated/entitylibrarypatchoverride.fcb ?  I know that the file is generated when you run build_patch.bat , but will it inject classes files.
I'm not sure if entitylibrarypatchoverride will w@&k to override DLC content, I would think it can.

Quote from: Stryker7 on October 20, 2011, 08:40:30 PM
I believe that I read somewhere, that this is the file used by the developers to add their own modifications to the game, so that they didnt have to change thier original code.
Something like that. It's less code and more of a data structure that defines objects that the game can use.

I apologize if I'm being a bit vague, it's hard to describe technical details without getting knee deep into it. If it's still unclear let me know I'll try clarifying it further.

Stryker7

Quote from: gibbed on October 21, 2011, 03:04:40 PM
Bootstrap isn't set up to interact with the DLC files, what's your aim with DLC? modify properties?

I understand. One of the steps that I took in an attempt to modify the crossbow to use a silent arrow (as the title of this thread would imply) instead of an exploding one, was to rename my modding folder, created a new modding folder, and placed a copy your tools into that folder. I then backed up the woking patch.dat/ fat files and copied the entitylibrarypatch.dat/ fat files into the

Data_Win32 folder

I then renamed them to patch.dat/ fat and then ran bootstrap.bat. which failed completely. It gave me an error message, but I did not record the error, nor am I willing at this point in time, to try to re-create the scenario.

I then used the extraction tools on several of the files which worked with some success, but left quite a bit of unknown data. I assume that those would be data that bootstrap does not know how to handle, or needs more info to handle.

The AIM, was to create a Silent Crossbow which, as it turns out, it is the bolt or arrow that actually needs to be silenced .

Quote from: gibbed
Also, the class stuff I'm referring to is completely unrelated to Java.
Nope. Far Cry 2 is actually pretty well stripped of any debug / test stuff.

It was a QUESTION I posed (see Java ? ) rather than a statement of fact, and  was curiousity about the type classes files, because I have worked with JAVA classes files many many times over the last several years while modding IL2 1946. In other words, I do understand classes files, I was just curious as to their native language.

The question that I was actually posing, was, If I determine WHICH classes files I need, are you able to provide them for the DLC classes files. I understand Now, that your offer to provide classes files was restricted to the original FarCry 2 only.

No DLC, Fine, it is now clearly stated.

Quote from: gibbed
I'm not sure if entitylibrarypatchoverride will w@&k to override DLC content, I would think it can.
Something like that. It's less code and more of a data structure that defines objects that the game can use.

I guess it was the entitylibrarypatchoverride.fcb that is generated by your program, and the fact that the only entitylibrarypatch.dat/ fat  files anywhere in the original FC2 folder, is in the Data_Win32/downloadcontent  folder.

I just made a guess, that I think most modders would make, that the "entitylibrarypatchoverride", overrides the  entitylibrarypatch. The very name of the file really through me a curve there. As well as your statement on this page where you stated 

"entitylibrarypatchoverride.fcb was added in a patch to allow as an easy way for developers to override entities in all other *.fcb files without having to update the originals (because they're huge as gently caress). This is our entrance into overriding new stuff.

That statement is crystal clear now.

Quote from: gibbed
I apologize if I'm being a bit vague, it's hard to describe technical details without getting knee deep into it. If it's still unclear let me know I'll try clarifying it further.

Not to worry, we have cleared up things quite a bit. Without the ability to properly extract the files, modify the files, get the classfiles that you offered to provide, and more importantly, be able to (take your pick from any of the following) inject, re-intergrate, insert, recomplie into, or otherwise include these files into the fcb, fat, or dat files, that the game uses, then the entire point of my effort is entirely mute.

I apperciate your efforts, time, and willingness to share you tools with the community, but for those of us that have and play the DLC, this restricts us to what we can mod. That is fine, it is your tool-set after all, you can do with it as you please.

Thanks again for your what you have managed to do, and have a nice life.

Stryker7

Guys, this attempt at a mod, from my perspective, is DEAD.

I did manage to extract what I believed to be the relevant files from the DLC content, I even KNOW  that the explosions of the arrows (as referenced in the XML files ) use the exploding barrel content,  to generate both sounds and visuals.  The following code was  found in many of the xml files generated with gibbed's tools.

Spoiler
<PartSys Name="dlc1_particles.dlc1.crossbow_arrow_explo" Id="{B6D20E24-8302-434B-9E15-C7851FBFB5E9}">
    <PartEmit Name="dlc1_particles.Explosives.Barel_explosion.haze" Id="{B623CC1B-F3F1-467B-BA7C-BE8FCE58A082}" Active="1" StaticSize="1" PosOffset="0,0,1" RotOffset="0,0,0" degRotOffset="1" EmitDuration="0.1" EmitLoop="0" NbInitPart="1" MaxEmitDist="500" FadeEmitDist="400" InterpEmit="0" TweakInitLifeTime="1" EmitDirAxisAngle="0" degEmitDirAxisAngle="1" EmitDirAxisSpread="20" degEmitDirAxisSpread="1" EmitDirPlaneAngle="0" degEmitDirPlaneAngle="1" EmitDirPlaneSpread="180" degEmitDirPlaneSpread="1" EmitFlag="32" EmitVolRadius="0.5" EmitVolHalfSizeX="0" EmitVolHalfSizeY="3" EmitVolHalfSizeZ="0" UniformSize="1" RandomMirrorU="1" RandomMirrorV="1" CameraScalingDistance="0" CameraScaling="1" InitGravityDir="0,0,-1" LocalGravity="0" DiffuseTexture="graphics\GFX\_Common\GFX_haze_simple_nocolor.XBT" NormalTexture="" Geometry="" BlendType="1" RandomColor="0" HDRMul="3" RandomAlpha="0" NearFade="1" AlphaTestValue="0" AlphaDissolve="0" FramePerSecond="0" FramePerSecondVariant="0" FrameCount="1" FramePlayOnce="0" FrameRandomStart="0" Ambient="0" LightingExponent="2" NormalMapped="0" ZOffset="2" Soft="1" SoftRange="2" FarSoftDistance="-1" FarSoftRange="1" WaterReflection="1" Masked="0" DistortionEnabled="0" DistortionTexture="graphics/gfx/_common/gfx_default.xbt" DistortionSpeedU="0.25" DistortionSpeedV="0.25" DistortionTilingU="1" DistortionTilingV="1" DistortionStrength="0.005" Flags="0">

I was not sure how to include the information from the XML files I extracted, back into the information that would be intergrated into the game itself.

I do understand now, that extracting, editing, or modding of the DLC, is not, and may not ever be possible. I thought it was good idea, and invested a couple of nights (I w@&k nights and sleep days ) working towards this. I KNOW I was right on the verge of having the Silent Crossbow mod for those interested, but as it turns out, it was a futile effort.

Anyone that thinks that they might wish to attempt to further this attempt, feel free. I am willing to share the information I did manage to gather, beyond that, someone else will have to finish this one. 

Sorry guys.

Art Blade

Quote from: nexor63 on October 21, 2011, 01:18:20 AM
Someone go and help Mr Blade set up his pc, we need him, actualy..............
leave him behind just bring his brain           :anigrin:

I read that.

Quote from: PZ on October 21, 2011, 10:05:16 AM
:cheesy:

I noticed that, too.

:anigrin:

[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

TheStranger

Hmm thx for your efforts Stryker. Unfortunately I also mentioned that some things don't w@&k for the DLC. I deactivated the autoreload for allk weapons, but the DLC weapons still autoreload - so I guess that's the problem.

Stryker7

Quote from: TheStranger on October 22, 2011, 03:45:47 AM
Hmm thx for your efforts Stryker. Unfortunately I also mentioned that some things don't w@&k for the DLC. I deactivated the autoreload for allk weapons, but the DLC weapons still autoreload - so I guess that's the problem.

Yeah, I dont think I managed to get all of the folder and data stucture extracted, but I got over 7000 files. Some were noticable as rml files, and I succesfully converted several of those to XML files. That is why I said I thought I was REALLY close to having it w@&k. I can tell you, that the explosion that you get when the arrow stikes the target, is nothing but the various parts of a barrel explosion, with different settings.

I will show you real quick here, This information exist in 4 of the 8 files in one directory. I know I read so much in 2 nights, that my eyeballs hurt.

Spoiler

From modding_DLC/DLC1/__UNKNOWN/root.xml/1DD6343E.root.xml

<CParticlesSystemParamResource ID="dlc1_particles.dlc1.crossbow_arrow_explo" crc_ID="929536514">
    <CParticlesEmitterParamResource ID="dlc1_particles.explosives.barel_explosion.haze" crc_ID="2427839" />
    <CParticlesEmitterParamResource ID="dlc1_particles.explosives.barel_explosion.metal_shards" crc_ID="1049785092" />
    <CParticlesEmitterParamResource ID="dlc1_particles.explosives.barel_explosion.fireball2" crc_ID="3049264822" />
    <CParticlesEmitterParamResource ID="dlc1_particles.explosives.barel_explosion.fireball" crc_ID="531888041" />
    <CParticlesEmitterParamResource ID="dlc1_particles.explosives.barel_explosion.thin_smok" crc_ID="1874556847" />
    <CParticlesEmitterParamResource ID="dlc1_particles.explosives.barel_explosion.smoke_ground" crc_ID="451707996" />
    <CParticlesEmitterParamResource ID="dlc1_particles.explosives.barel_explosion.shockwave" crc_ID="2062928104" />
</CParticlesSystemParamResource>



Anyway, all the sound files are in one directory, but no way to know the format.

There are over 4000 "UNKNOWN" files It is just a total mess.

And with no real hope of being able to repack the files, so that FC2 can use them, it is just TOTALLY wasted time and effort.

I thougth I could make it w@&k, but just dont have the tools or enough knowledge I guess.


Art Blade

Let's buy UBI and distribute their Developer Kits here.
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

nexor

Thank you very much for trying Stryker, I know I speak for the rest of us, we are very gratefull for this

humongous task you took on to try and mod the crossbow....... :-)) B-$

Art Blade

Quote from: nexor63 on October 22, 2011, 12:10:05 PMI know I speak for the rest of us, we are very gratefull for this

Well, I'm not.


Because I don't have a crossbow.  :-()
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

nexor

Quote from: Art Blade on October 22, 2011, 02:35:14 AM
I read that.

I noticed that, too.

:anigrin:

A...gee....we were just having some fun while you were away, hello Art, how are you        :anigrin:

Art Blade

it was fun reading all those comments, mate, chillax  :-()
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

nexor

i'm chilled, you should know by now that I like chirping    :angel:

Art Blade

so you're chilled? I find that reply a little lax.

:lamp: Which, in combination, leads to chillaxed.

So yes.. I'm with you, your chirpness  :-D
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Stryker7

Quote from: Art Blade on October 22, 2011, 12:32:19 PM
Well, I'm not.

Because I don't have a crossbow.  :-()

To quote Steve Martin, So kiillll Meeeeee.  :-D

I should have commented too, and would have but I didnt know that you werent having a major life crisis. Guess I should have joined in on the fun.  >:D

Art Blade

[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

Tags:
🡱 🡳

Similar topics (2)