Some modding questions

Making or wanting help making your own asset? Check in here
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

[R-CON]Fastjack wrote:You mean something like an vehicle drop?
The first experiment I did was with the napalm bomb (supply object on it), for now I've decided to make the "scripted" airstrike, and I thouht the PCO objects has more useful options.

So, I've checked both - the unmanned PCO doesn't spawn PCO, nor DestoyableObject, at all.
I've checked PCO bomb, it works with static spawn point.
I'm not sure about but can you test to set the rotation different:
Excample :
ObjectTemplate.armor.addArmorEffect 30 e_dstate_jet_spin 0.25/-20.0/0 0/90/0
Almost the same, except the less shaking.
I think it's a conflict with winglift or engine modules.

Btw, this forces works fine on wreck - I've set the chaotic forces to it.
And if it works on wreck, maybe I'll be able to make the heatseeking missiles behavior to be more realistic...
I have an idea to give it the armor comp, so the missile will start to loose hp in flight, and just the one force in pseudo-chaotic directions as the armor effects...
Last edited by MaxP on 2018-02-28 12:47, edited 1 time in total.
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

Trying to make semi-static AC130, flying circular trajectory, with the AI gunner.
[Stuck on making rotational bundle with the plane body.
Haven't find anything better than using SatelliteControlObject on invisible radar tower.
Without it I cannot make something rotates being unmanned (or unboted)] - solved it, but got another problem.
If I set it on the map, all other static spawnpoint become inactive (red) within the "flight" radius.
What is the problem?

ANd I still cannot make the child bject to be destoyable (via its own collision mesh)...
Is it possible?
Last edited by MaxP on 2018-03-01 15:16, edited 3 times in total.
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

For those who would be interested, I've found the solutions for tracers on networked projectiles.
I've added the next effect to projectile (based on rpg trail):

Code: Select all

ObjectTemplate.create EffectBundle e_sniper_trail
ObjectTemplate.creator TSO-1:tso
ObjectTemplate.modifiedByUser "Anders"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
rem -------------------------------------
ObjectTemplate.addTemplate S_e_sniper_trail_Start
ObjectTemplate.addTemplate em_sniper_trail_hotspot
ObjectTemplate.setPosition 0/0/-0.0215499
rem -------------------------------------
rem begin Auto-generated effectProperties-part.
ObjectTemplate.AlphaIntensityRange 1/1
ObjectTemplate.AlphaIntensityUsed 0
ObjectTemplate.EmitScaleFactorRange 0.25/1
ObjectTemplate.EmitScaleFactorUsed 0
ObjectTemplate.EmitScaleFactorFromSpeed 0/5
ObjectTemplate.EmitSpeedScaleRange 0.25/1
ObjectTemplate.EmitSpeedScaleUsed 0
ObjectTemplate.EmitSpeedScaleFromSpeed 0/30
ObjectTemplate.AgeScaleFactorRange 1/1
ObjectTemplate.AgeScaleFactorUsed 0
ObjectTemplate.StartAgeRange 0/0
ObjectTemplate.StartAgeUsed 0
ObjectTemplate.SoundIntensityRange 1/1
ObjectTemplate.SoundIntensityUsed 0
rem end Auto-generated effectProperties-part.
ObjectTemplate.setStartOnEffects 0
ObjectTemplate.setStopOnEffects 0
ObjectTemplate.timeToLive CRD_NONE/3/0/0
ObjectTemplate.randomAgeFactor CRD_NONE/1/0/0
ObjectTemplate.startAtCreation 1
ObjectTemplate.speedFromPhysics 0

ObjectTemplate.create Sound S_e_sniper_trail_Start
ObjectTemplate.modifiedByUser "Anders"

ObjectTemplate.create SpriteParticleSystem em_sniper_trail_hotspot
ObjectTemplate.modifiedByUser "Bruno"
ObjectTemplate.createdInEditor 1
ObjectTemplate.showInFirstPerson 1
ObjectTemplate.showInThirdPerson 1
ObjectTemplate.emitPrio High
ObjectTemplate.lodDistance Medium
ObjectTemplate.qualityLevel Low
ObjectTemplate.emitterType Standard
ObjectTemplate.isLocalSystem 1
ObjectTemplate.emitRadius 0/0/0
ObjectTemplate.emitRangeX CRD_NONE/0/0/0
ObjectTemplate.emitRangeY CRD_NONE/0/0/0
ObjectTemplate.emitRangeZ CRD_NONE/0/0/0
ObjectTemplate.randomRadialDirection 0
ObjectTemplate.radialDirection 0
ObjectTemplate.emitFrequency 15
ObjectTemplate.preWarmTime 0
ObjectTemplate.emitTime 0
ObjectTemplate.emitDelay 0
ObjectTemplate.isLooping 0
ObjectTemplate.emitSpeed 0
ObjectTemplate.emitDirection 0/0/-1
ObjectTemplate.timeToLive 0.1
ObjectTemplate.randomTimeToLive 0
ObjectTemplate.windAffectionFactor 0
ObjectTemplate.forceToWaterSurface 0
ObjectTemplate.waterSurfaceOffset 0.03
ObjectTemplate.rotationGraph 0/0/0/1
ObjectTemplate.alignRotationToSpeed 0
ObjectTemplate.transparencyGraph -0.8/-0.85/1/0.82
ObjectTemplate.gravity 0
ObjectTemplate.gravityGraph 0/0/0/0
ObjectTemplate.airResistanceGraph 0/0/0/0
ObjectTemplate.emitSpeedGraph 0/0/0/1
ObjectTemplate.randomSpeed 0
ObjectTemplate.randomDirectionAngle 0/0/0
ObjectTemplate.airResistance 0
ObjectTemplate.collisionEnable 0
ObjectTemplate.collisionSpeedAlongNormal 0
ObjectTemplate.collisionSpeedAlongPlane 0
ObjectTemplate.randomSize 0
ObjectTemplate.particleMaxSize 1
ObjectTemplate.sizeGraph -0.29/-0.81/1/1
ObjectTemplate.randomIntensity 0
ObjectTemplate.lightMapIntensityOffset 1
ObjectTemplate.color1 5/4.2549/3.41177
ObjectTemplate.color2 4.7451/1.43137/0.333333
ObjectTemplate.colorBlendGraph 0/0/1/0.54
ObjectTemplate.alphaCull 1
ObjectTemplate.particleType Additive
ObjectTemplate.drawOrder Back
ObjectTemplate.randomRotation 360
ObjectTemplate.randomRotationSpeed 0
ObjectTemplate.rotationSpeed 0
ObjectTemplate.pivotOffset 0/0
ObjectTemplate.selfShadowIntensity 1
ObjectTemplate.textureName objects\effects\textures\small_singles\aimpoint
ObjectTemplate.animationEnable 0
ObjectTemplate.animationSpeed 0
ObjectTemplate.animationPlayOnce 1
I'm not good with the effects, so if anybody can give me an idea how to improve it, I'll be very thankfull.

Another side-effect is the surface decals not showing on statics (and woking fine with the surface), and we need to set ObjectTemplate.penetrate.allowLiquidPenetration 0, otherwise th water effects doesn't work.
Anybody have an idea why the decals on statics are not showed for networked projectiles?
Last edited by MaxP on 2018-03-08 19:16, edited 3 times in total.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: Some modding questions

Post by Arab »

MaxP wrote:For those who would be interested, I've found the solutions for tracers on networked projectiles.
I've added the next effect to projectile (based on rpg trail):

Code: Select all

ObjectTemplate.create EffectBundle e_sniper_trail
ObjectTemplate.creator TSO-1:tso
ObjectTemplate.modifiedByUser "Anders"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
rem -------------------------------------
ObjectTemplate.addTemplate S_e_sniper_trail_Start
ObjectTemplate.addTemplate em_sniper_trail_hotspot
ObjectTemplate.setPosition 0/0/-0.0215499
rem -------------------------------------
rem begin Auto-generated effectProperties-part.
ObjectTemplate.AlphaIntensityRange 1/1
ObjectTemplate.AlphaIntensityUsed 0
ObjectTemplate.EmitScaleFactorRange 0.25/1
ObjectTemplate.EmitScaleFactorUsed 0
ObjectTemplate.EmitScaleFactorFromSpeed 0/5
ObjectTemplate.EmitSpeedScaleRange 0.25/1
ObjectTemplate.EmitSpeedScaleUsed 0
ObjectTemplate.EmitSpeedScaleFromSpeed 0/30
ObjectTemplate.AgeScaleFactorRange 1/1
ObjectTemplate.AgeScaleFactorUsed 0
ObjectTemplate.StartAgeRange 0/0
ObjectTemplate.StartAgeUsed 0
ObjectTemplate.SoundIntensityRange 1/1
ObjectTemplate.SoundIntensityUsed 0
rem end Auto-generated effectProperties-part.
ObjectTemplate.setStartOnEffects 0
ObjectTemplate.setStopOnEffects 0
ObjectTemplate.timeToLive CRD_NONE/3/0/0
ObjectTemplate.randomAgeFactor CRD_NONE/1/0/0
ObjectTemplate.startAtCreation 1
ObjectTemplate.speedFromPhysics 0

ObjectTemplate.create Sound S_e_sniper_trail_Start
ObjectTemplate.modifiedByUser "Anders"

ObjectTemplate.create SpriteParticleSystem em_sniper_trail_hotspot
ObjectTemplate.modifiedByUser "Bruno"
ObjectTemplate.createdInEditor 1
ObjectTemplate.showInFirstPerson 1
ObjectTemplate.showInThirdPerson 1
ObjectTemplate.emitPrio High
ObjectTemplate.lodDistance Medium
ObjectTemplate.qualityLevel Low
ObjectTemplate.emitterType Standard
ObjectTemplate.isLocalSystem 1
ObjectTemplate.emitRadius 0/0/0
ObjectTemplate.emitRangeX CRD_NONE/0/0/0
ObjectTemplate.emitRangeY CRD_NONE/0/0/0
ObjectTemplate.emitRangeZ CRD_NONE/0/0/0
ObjectTemplate.randomRadialDirection 0
ObjectTemplate.radialDirection 0
ObjectTemplate.emitFrequency 15
ObjectTemplate.preWarmTime 0
ObjectTemplate.emitTime 0
ObjectTemplate.emitDelay 0
ObjectTemplate.isLooping 0
ObjectTemplate.emitSpeed 0
ObjectTemplate.emitDirection 0/0/-1
ObjectTemplate.timeToLive 0.1
ObjectTemplate.randomTimeToLive 0
ObjectTemplate.windAffectionFactor 0
ObjectTemplate.forceToWaterSurface 0
ObjectTemplate.waterSurfaceOffset 0.03
ObjectTemplate.rotationGraph 0/0/0/1
ObjectTemplate.alignRotationToSpeed 0
ObjectTemplate.transparencyGraph -0.8/-0.85/1/0.82
ObjectTemplate.gravity 0
ObjectTemplate.gravityGraph 0/0/0/0
ObjectTemplate.airResistanceGraph 0/0/0/0
ObjectTemplate.emitSpeedGraph 0/0/0/1
ObjectTemplate.randomSpeed 0
ObjectTemplate.randomDirectionAngle 0/0/0
ObjectTemplate.airResistance 0
ObjectTemplate.collisionEnable 0
ObjectTemplate.collisionSpeedAlongNormal 0
ObjectTemplate.collisionSpeedAlongPlane 0
ObjectTemplate.randomSize 0
ObjectTemplate.particleMaxSize 1
ObjectTemplate.sizeGraph -0.29/-0.81/1/1
ObjectTemplate.randomIntensity 0
ObjectTemplate.lightMapIntensityOffset 1
ObjectTemplate.color1 5/4.2549/3.41177
ObjectTemplate.color2 4.7451/1.43137/0.333333
ObjectTemplate.colorBlendGraph 0/0/1/0.54
ObjectTemplate.alphaCull 1
ObjectTemplate.particleType Additive
ObjectTemplate.drawOrder Back
ObjectTemplate.randomRotation 360
ObjectTemplate.randomRotationSpeed 0
ObjectTemplate.rotationSpeed 0
ObjectTemplate.pivotOffset 0/0
ObjectTemplate.selfShadowIntensity 1
ObjectTemplate.textureName objects\effects\textures\small_singles\aimpoint
ObjectTemplate.animationEnable 0
ObjectTemplate.animationSpeed 0
ObjectTemplate.animationPlayOnce 1
I'm not good with the effects, so if anybody can give me an idea how to improve it, I'll be very thankfull.

Another side-effect is the surface decals not showing on statics (and woking fine with the surface), and we need to set ObjectTemplate.penetrate.allowLiquidPenetration 0, otherwise th water effects doesn't work.
Anybody have an idea why the decals on statics are not showed for networked projectiles?
Not sure. Could try adding ObjectTemplate.detonation.useMMOnEndEffect 1 to the projectile if it has a detonation component.
Image
Fastjack
PR:BF2 Contributor
Posts: 525
Joined: 2011-09-04 19:47

Re: Some modding questions

Post by Fastjack »

If I set it on the map, all other static spawnpoint become inactive (red) within the "flight" radius.
What is the problem?
Add to the spawnpoints the option ObjectTemplate.setAllowSpawnCloseToVehicle 1
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

[R-DEV]Arab wrote:Not sure. Could try adding ObjectTemplate.detonation.useMMOnEndEffect 1 to the projectile if it has a detonation component.
Doesn't work. BTW, what this parameter do?
'[R-DEV wrote:Arab']Add to the spawnpoints the option ObjectTemplate.setAllowSpawnCloseToVehicle 1
Thanks, I'll try.
And the same question :)
Does it allow the soldiers spawn close to vehicle when it's occupied?
User avatar
Mineral
Retired PR Developer
Posts: 8534
Joined: 2012-01-02 12:37
Location: Belgium

Post by Mineral »

Allows spawnpoints to ignore the possibility of a vehicle being too close to it and disabling spawning as protection. Happens a lot to PR mainbases so we use it by default on all maps.
Image
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

[R-DEV]Mineral wrote:Allows spawnpoints to ignore the possibility of a vehicle being too close to it and disabling spawning as protection. Happens a lot to PR mainbases so we use it by default on all maps.
Big thanks ))
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

Is there any way to make the indepedently destroyable child, attached to the vehicle?
AfterDune
Retired PR Developer
Posts: 17094
Joined: 2007-02-08 07:19

Post by AfterDune »

Only if you attach it as a (sleeping) objectspawner.
Image
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

[R-DEV]AfterDune wrote:Only if you attach it as a (sleeping) objectspawner.
You mean to use the holdobject parameter, as I understand?
AfterDune
Retired PR Developer
Posts: 17094
Joined: 2007-02-08 07:19

Re: Some modding questions

Post by AfterDune »

That's the one, couldn't remember the exact name :p .
Image
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

[R-DEV]AfterDune wrote:That's the one, couldn't remember the exact name :p .
Thanks, it works :)

The real problem for now that the bost can't spawn on moving spawn point. Is there any solution?
Maybe I can set a some kind of delay for RotationalBundle to start the rotation?
Last edited by MaxP on 2018-03-19 12:06, edited 3 times in total.
User avatar
ALADE3N
PR:BF2 Developer
Posts: 577
Joined: 2016-02-13 17:34
Location: Philippines

Re: Some modding questions

Post by ALADE3N »

MaxP wrote:Thanks, it works :)

The real problem for now that the bost can't spawn on moving spawn point. Is there any solution?
Maybe I can set a some kind of delay for RotationalBundle to start the rotation?
yo bro, i also have that ac130 add-on.. can you share the tweak file of that? that's dcon_ac130 right?
Image
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

HeneraLuna wrote:that's dcon_ac130 right?
No, this is the CLI_AC130 :)
can you share the tweak file of that?

The con and tweak of the rotation object:

Code: Select all

ObjectTemplate.create Bundle ac130_static
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.collisionMesh mobileradar_ch_dest
ObjectTemplate.mapMaterial 0 metal_solid 0
ObjectTemplate.mapMaterial 1 rubber 0
ObjectTemplate.mapMaterial 2 metal_thin 0
ObjectTemplate.mapMaterial 3 lambert1 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.geometry
ObjectTemplate.addTemplate ac130_static_disc

ObjectTemplate.create RotationalBundle ac130_static_disc
ObjectTemplate.hasCollisionPhysics 0
ObjectTemplate.physicsType 3
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.geometryPart 1

include ac130_static.tweak

Code: Select all

GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe Bundle ac130_static
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry
ObjectTemplate.setCollisionMesh mobileradar_ch_dest
ObjectTemplate.mapMaterial 0 metal_solid 0
ObjectTemplate.mapMaterial 1 rubber 0
ObjectTemplate.mapMaterial 2 metal_thin 0
ObjectTemplate.mapMaterial 3 lambert1 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh

ObjectTemplate.activeSafe RotationalBundle ac130_static_disc
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
rem -------------------------------------
ObjectTemplate.addTemplate S_ac130_static_disc_RotationRpm
ObjectTemplate.addTemplate cli_ac130_static_spawner
ObjectTemplate.setPosition 2000/800/0
ObjectTemplate.setRotation 0/0/24
rem -------------------------------------
ObjectTemplate.setMaxSpeed -1.6/0/0
ObjectTemplate.setContinousRotationSpeed -1.6/0/0
Then for the vehicle:

Code: Select all

ObjectTemplate.create ObjectSpawner cli_ac130_static_spawner
ObjectTemplate.activeSafe ObjectSpawner cli_ac130_static_spawner
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 [spawned object]
ObjectTemplate.setObjectTemplate 2 [spawned object]
objectTemplate.holdObject 1
ObjectTemplate.minSpawnDelay 9999
Objecttemplate.maxnrofobjectspawned 1
Objecttemplate.nrofrespawns 0
ObjectTemplate.teamOnVehicle 1
ObjectTemplate.team [team]
You can spawn any object, like ats_tow :)
But even if you'll make it static and bots will spawn in it, they won't be able to fire at distances more than level's maximum visibility, even if they had camera near the target.
Last edited by MaxP on 2018-03-19 10:49, edited 2 times in total.
User avatar
ALADE3N
PR:BF2 Developer
Posts: 577
Joined: 2016-02-13 17:34
Location: Philippines

Re: Some modding questions

Post by ALADE3N »

MaxP wrote:No, this is the CLI_AC130 :)


The con and tweak of the rotation object:

Code: Select all

ObjectTemplate.create Bundle ac130_static
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.collisionMesh mobileradar_ch_dest
ObjectTemplate.mapMaterial 0 metal_solid 0
ObjectTemplate.mapMaterial 1 rubber 0
ObjectTemplate.mapMaterial 2 metal_thin 0
ObjectTemplate.mapMaterial 3 lambert1 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.geometry
ObjectTemplate.addTemplate ac130_static_disc

ObjectTemplate.create RotationalBundle ac130_static_disc
ObjectTemplate.hasCollisionPhysics 0
ObjectTemplate.physicsType 3
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.geometryPart 1

include ac130_static.tweak

Code: Select all

GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe Bundle ac130_static
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry
ObjectTemplate.setCollisionMesh mobileradar_ch_dest
ObjectTemplate.mapMaterial 0 metal_solid 0
ObjectTemplate.mapMaterial 1 rubber 0
ObjectTemplate.mapMaterial 2 metal_thin 0
ObjectTemplate.mapMaterial 3 lambert1 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh

ObjectTemplate.activeSafe RotationalBundle ac130_static_disc
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
rem -------------------------------------
ObjectTemplate.addTemplate S_ac130_static_disc_RotationRpm
ObjectTemplate.addTemplate cli_ac130_static_spawner
ObjectTemplate.setPosition 2000/800/0
ObjectTemplate.setRotation 0/0/24
rem -------------------------------------
ObjectTemplate.setMaxSpeed -1.6/0/0
ObjectTemplate.setContinousRotationSpeed -1.6/0/0
Then for the vehicle:

Code: Select all

ObjectTemplate.create ObjectSpawner cli_ac130_static_spawner
ObjectTemplate.activeSafe ObjectSpawner cli_ac130_static_spawner
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 [spawned object]
ObjectTemplate.setObjectTemplate 2 [spawned object]
objectTemplate.holdObject 1
ObjectTemplate.minSpawnDelay 9999
Objecttemplate.maxnrofobjectspawned 1
Objecttemplate.nrofrespawns 0
ObjectTemplate.teamOnVehicle 1
ObjectTemplate.team [team]
You can spawn any object, like ats_tow :)
But even if you'll make it static and bots will spawn in it, they won't be able to fire at distances more than level's maximum visibility, even if they had camera near the target.
ooohhhh...the cli_ac130, i had a copy of this vehicle before my pc got its mobo fried
Image
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: Some modding questions

Post by MaxP »

[R-DEV]Arab wrote: For the lag issue, I have a theory.
Replace the BasicInfo used in projectiles with ProjectileInfo, and test.
The theory is that having different networkableInfo names can make the networking run more organized and therefore run more efficient.
Haven't implemented this to the mod due to the level of test required to make sure there's no glitches, but it's worth a try.
After many hours of playing I've collected some info.
1. Using different networkable masks doesn't lead to any noticeable effect, the perfomance remains the same, as the collision calculating.
2. While using networkable with PMLinear prediction mode has some impact on perfomance for my server (Celeron 1820), and the best collision detection, the PMNone mode is a good choice, 'cause it has better collsion detection than non-networked projectile, and has minimal impact on perfomance.
But it still has collision detection problems with moving targets (not so noticable as in the vanilla mode), i.e. I've seen bullet from 7.62x54 hits the running soldier at 5 m and he survived (in my settings that bullet deals double hp damage on that distance), while I didn't see something like that with the PMLinear prediction.
3. The "red line" for my server is the ~20 soldiers firing at 900 s/m at one time, while the weapons with 600 s/m doesn't seems to have any noticeable perfomance impact.
Arab
PR:BF2 Developer
Posts: 2898
Joined: 2012-05-18 03:37

Re: Some modding questions

Post by Arab »

MaxP wrote:After many hours of playing I've collected some info.
1. Using different networkable masks doesn't lead to any noticeable effect, the perfomance remains the same, as the collision calculating.
2. While using networkable with PMLinear prediction mode has some impact on perfomance for my server (Celeron 1820), and the best collision detection, the PMNone mode is a good choice, 'cause it has better collsion detection than non-networked projectile, and has minimal impact on perfomance.
But it still has collision detection problems with moving targets (not so noticable as in the vanilla mode), i.e. I've seen bullet from 7.62x54 hits the running soldier at 5 m and he survived (in my settings that bullet deals double hp damage on that distance), while I didn't see something like that with the PMLinear prediction.
3. The "red line" for my server is the ~20 soldiers firing at 900 s/m at one time, while the weapons with 600 s/m doesn't seems to have any noticeable perfomance impact.
Nice work :)

Yeah same experience when I was testing back then.

Recently discovered that adding the Emitter (which loads the tracer effect) as a child to the common projectile does work but has side effects.

1. Tracer disappears after 1.5 seconds. Maybe add ObjectTemplate.hasOnTimeEffect 1 to projectile?
2. Tracer might not follow projectile. I fixed this initially by adding in 'ObjectTemplate.addChild 1' but need to record and review 3P footage to see if it's fixed

Here's the code (Uses .con and .tweak in own folder):

Code: Select all

rem *** Generated with Bf2Editor.exe [created: 2004/9/16 12:22]
ObjectTemplate.activeSafe EffectBundle p_tracer_tank_g_bundle
ObjectTemplate.creator DSU-1 :d su
rem -------------------------------------
ObjectTemplate.addTemplate p_tracer_tank_g_emitter
rem -------------------------------------
ObjectTemplate.setStartOnEffects 0
ObjectTemplate.setStopOnEffects 0
ObjectTemplate.timeToLive CRD_NONE/-1/0/0
ObjectTemplate.randomAgeFactor CRD_NONE/0/0/0
ObjectTemplate.startAtCreation 0
ObjectTemplate.speedFromPhysics 1
ObjectTemplate.physicsType Point

ObjectTemplate.create Emitter p_tracer_tank_g_emitter
ObjectTemplate.creator DSU-1 :d su
ObjectTemplate.modifiedByUser dsu
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.template p_tracer_tank_g
ObjectTemplate.addChild 1
rem ObjectTemplate.intensity CRD_NONE/125/0/0
ObjectTemplate.positionalSpeedInDof CRD_UNIFORM/0/0/0
ObjectTemplate.positionalSpeedInUp CRD_UNIFORM/0/0/0
ObjectTemplate.positionalSpeedInRight CRD_UNIFORM/0/0/0
ObjectTemplate.rotationalSpeedInDof CRD_UNIFORM/0/0/0
ObjectTemplate.rotationalSpeedInRight CRD_UNIFORM/0/0/0
ObjectTemplate.startRotation CRD_NONE/0/0/0
ObjectTemplate.zRotation CRD_NONE/0/0/0
ObjectTemplate.zRotationSnap 1
Image
AlonTavor
PR:BF2 Developer
Posts: 2991
Joined: 2009-08-10 18:58

Re: Some modding questions

Post by AlonTavor »

I am 99% sure PredicitonMode (PM) Only affects clients. This is how clients will predict/interpolate object positions. This should not affect server performance.

Linear has issues when constantly setting position through python, which is why lasers in PR aren't smooth, we used PMNone.

Let me just make sure: are you testing performance on a dedicated server and not a listen server? Networkables are meaningless on a listen server.
Fastjack
PR:BF2 Contributor
Posts: 525
Joined: 2011-09-04 19:47

Re: Some modding questions

Post by Fastjack »

So, I've checked both - the unmanned PCO doesn't spawn PCO, nor DestoyableObject, at all.
I've checked PCO bomb, it works with static spawn point.
What is the full name and path of the object you try to spawn on the added objectspawner on your unmanned AC130?
Post Reply

Return to “PR:BF2 Community Modding”