Page 4 of 4

Re: Some modding questions

Posted: 2018-03-26 12:35
by Arab
[R-CON]Fastjack wrote:What is the full name and path of the object you try to spawn on the added objectspawner on your unmanned AC130?
Maybe it's missing ObjectTemplate.preCacheObject 1

http://www.bfeditor.org/forums/index.ph ... eobject-1/

Re: Some modding questions

Posted: 2018-03-26 17:24
by Fastjack
I dont know Arab.

I think that the problem could be what AfterDune mentioned in the Megaseat topic:
Ah, I think I figured out why my Chinook-passenger vehicle didn't show up. It seems that the passenger-vehicle needs to be loaded BEFORE the main vehicle. Not through GPO, but through the way BF2 is loading the files. It loads alphabetically and in this case is very strict about it.

In other words:

gb_the_chinook -> gb_the_chinook_passengers -> doesn't work
gb_the_chinook -> a_gb_the_chinook_passenger -> works fine

Re: Some modding questions

Posted: 2018-03-26 19:50
by MaxP
I am 99% sure PredicitonMode (PM) Only affects clients. This is how clients will predict/interpolate object positions. This should not affect server performance
When I've wrote about my observations, I've thought about the windowed mode influence.
Maybe it was the cause. Sometimes the fps drops down a lot (from 60 to ~46) with it, so I need to ckeck it more.
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.
Yes, only on dedicated (due to the listen server launch problems on stock BF2.exe)
[R-CON]Fastjack wrote:What is the full name and path of the object you try to spawn on the added objectspawner on your unmanned AC130?
Not AC-130, if it matters :)
This is the PCO with tu-95 model, that is driven by the force.
It has the following spawner tweaks:

ObjectTemplate.create ObjectSpawner tu95_bomb_spawner
ObjectTemplate.activeSafe ObjectSpawner tu95_bomb_spawner
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 tu95_bomb_PCO
ObjectTemplate.setObjectTemplate 2 tu95_bomb_PCO
ObjectTemplate.minSpawnDelay [number]
ObjectTemplate.spawnDelayAtStart 1
ObjectTemplate.team 2

The bomb PCO has the following tweak (cutted the unneccesary stuff):
ObjectTemplate.activeSafe PlayerControlObject tu95_bomb_PCO
ObjectTemplate.setNetworkableInfo BasicInfo
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1
ObjectTemplate.armor.hitPoints 1
ObjectTemplate.armor.defaultMaterial 90
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.explosionForce 50
ObjectTemplate.armor.explosionDamage 950
ObjectTemplate.armor.explosionRadius 90
ObjectTemplate.armor.explosionMaterial 56
ObjectTemplate.armor.wreckHitPoints 0
ObjectTemplate.armor.destroyOnSpectacularDeath 1
ObjectTemplate.armor.addArmorEffect 0 e_exp_Xlarge2 0/-2/0 0/0/0

ObjectTemplate.geometry sc1000
ObjectTemplate.setCollisionMesh sc1000
ObjectTemplate.mapMaterial 0 metal 32
ObjectTemplate.mass 1000
ObjectTemplate.gravityModifier 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Point

But I've tried different PCOs, of course.
Maybe it's missing ObjectTemplate.preCacheObject 1
Thanks, I'll try it.
It loads alphabetically and in this case is very strict about it.
I've noticed something similar when I've tried to remove the small_collonly0.collisionmesh file from the pickup kits folder. I.e. in the following stucture:
Vehicle
--PickupKits
----CH
------AT_ATS_CH
------Support_CH_RPK
the file must be only in the first folder in the alphabetical order, AT_ATS_CH.
If I put it only in the Support_CH_RPK/Meshes folder, the server crashes at 30%, that means collision problems.
'[R-DEV wrote:Arab']Here's the code (Uses .con and .tweak in own folder):
I'll try to check it, but I'm afraid is still will be CTD with the networkabled projectiles.

Re: Some modding questions

Posted: 2018-03-26 21:20
by Fastjack
The object you try to spawn on your force driven object must be loaded first in alphabetical order and than the force driven object that spawns it.

Re: Some modding questions

Posted: 2018-03-27 07:12
by MaxP
[R-CON]Fastjack wrote:The object you try to spawn on your force driven object must be loaded first in alphabetical order and than the force driven object that spawns it.
Thanks, it works :)
But only when I moved the bomb file to the spawner folder - it was in the different archives, and as I understand, the game mount archives from serverarchives.con from bottom entries to the top, and the spawner was loaded before the spawned object.

The only two problems is:
- the spawned bomb-PCO geometry is not shown (wth?)
- the unmanned PCO (spawner) cannot be dest?oyed by triggered projectile, like AA missiles with proximity detonation.
Mayby with the direct impact, but I've added Heatobject_asset object to the plane, and the heat missiles cannot lock the target:

Code: Select all

ObjectTemplate.create TargetObject HeatObject_Asset
ObjectTemplate.timeToLive 0
ObjectTemplate.targetType TTHeat
ObjectTemplate.disableWhenEmptyVehicle 0
ObjectTemplate.disableWhenWreck 1

Re: Some modding questions

Posted: 2018-05-04 12:06
by MaxP
About the forces.
I've found out that the force objects on effects works very strange in a client-server mode (I use dedicated server), like shown in this video: https://youtu.be/Ag5elWD2OoI
(also this is the cause of the SatNav's smoke screen not working).

But - I've also noticed that in PR there are some effects with forces for helicopters.
It makes the heli's to shake after taking critical damage.
Is this effect designed for network games only, and works as it was supposed, or it is really must to twist the heli's?