[Help] Custom Faction

Making or wanting help making your own asset? Check in here
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Help] Custom Faction

Post by Rhino »

the caches are somewhat spawns by python, or more it removes all the caches it doesn't need in insurgency only leaving the active ones it dose. And it finds them by looking for the ammo caches object name, rather than spawner name :p
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

I see.

Thanks for the help.
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

Can anyone explain to me where I can define the kit that is spawned when you use the dropkit function?

My factions have no dropkit function at the moment.. I click but nothing happens/doesn't spawn the unarmed kit.

Any ideas?

thanks in advance.
Image
rPoXoTauJIo
PR:BF2 Developer
Posts: 1979
Joined: 2011-07-20 10:02

Re: [Help] Custom Faction

Post by rPoXoTauJIo »

faction_inits.zip\spawners\spanwers_<team>.con

Code: Select all

ObjectTemplate.create ObjectSpawner <team>_UNARMEDKIT
ObjectTemplate.activeSafe ObjectSpawner <team>_UNARMEDKIT
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 <team>_unarmed
↑This?

As i understand, you have to create separate unarmed kit for every faction.
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

I'm pretty sure I have... but I will give it a look, maybe there's a typo somewhere.

EDIT: Found the issue. Since i'm sharing kits for both factions I have been using only the common file where I add all the kits and they were not faction specific. I had to add a faction unarmed to the faction file and now it works. Thanks for the hint.

Any idea how to get the UAV available for the faction? :)
Last edited by Onil on 2012-12-12 16:19, edited 1 time in total.
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

Anyone knows how to make so that an area (D.O.D) has a bigger outside bounds time for air vehicles then for ground vehicles including infantry?
Image
Moszeusz6Pl
Retired PR Developer
Posts: 939
Joined: 2010-06-24 13:41

Re: [Help] Custom Faction

Post by Moszeusz6Pl »

Create few combat areas, one for each kind of vehicle(CombatArea.vehicles 4) with different time allowed outside(CombatAreaManager.timeAllowedOutside 5.000000)

Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

i'm doing this on the GPO with notepad. Do you know which value related to which type of vehicle?

As in 4 is probably ground Infantry and Ground Vehicles I suppose so whats the value for Air Vehicles?
Image
rodrigoma
Posts: 1537
Joined: 2012-03-22 21:21

Re: [Help] Custom Faction

Post by rodrigoma »

VehicleType "0" = Land
VehicleType "1" = Sea
VehicleType "2" = Planes
VehicleType "3" = Choppers
VehicleType "4" = All
VehicleType "5" = Planes/Choppers
Here you go
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

Thanks, will test it out.
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

I really need some type of auto fire option (as in toggle when selected) for a weapon... anyone has any ideas?

If only something like this would work: ObjectTemplate.fire.autoFire 1

Unfortunately there is no such code in bf2 :(
Image
Moszeusz6Pl
Retired PR Developer
Posts: 939
Joined: 2010-06-24 13:41

Re: [Help] Custom Faction

Post by Moszeusz6Pl »

ObjectTemplate.fire.addFireRate
2 is for auto, 1 for burst and 0 for semi-auto. If you want weapon to have semi and auto fire mode do something like that:
ObjectTemplate.fire.addFireRate 0
ObjectTemplate.fire.addFireRate 2

Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

Thanks, but that's not what i'm looking for.

I want the weapon to automatically fire once it is selected, without the player having to click to fire.
Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Help] Custom Faction

Post by Rhino »

handheld or PCO weapon and what would you be using this for?
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

handheld.

I made a fake weapon to automatically reduce the ammo on the main weapon from the max amount of mags to 1 or 2 so that you only have that amount when you pickup the kit but can get the max amount if you resupply after.

But the fake weapon would have to fire once so that it automatically reloads and that will do the reset of the ammo on the main one. So I would need the fake weapon to automatically fire once it is selected by the player when he pickups the kit. I would probably need to have it on index 3 I suppose, unless if I could change the first selected index to be the number 9.
Image
lucky.BOY
Posts: 1438
Joined: 2010-03-03 13:25

Re: [Help] Custom Faction

Post by lucky.BOY »

What if you pick up a kit that has already been picked up? He would loose all ammo in that kit.
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

Yes well, if we can get it to fire automatically, we can then maybe make so that it only happens once as in the first time ever the kit is picked up. Perhaps with weapon overheat with a huge cool down time as long as that time doesn't reset when you drop the kit.

We're testing stuff... you have to fail quite a few times until you find a way to do what you want or eventually give up. ;)
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

Anyone knows if there is a way to increase the range of a weapon without increasing the velocity of the projectile? Can we do this using the mass and gravity of the projectile instead of its velocity?

I'm tweaking the arrows for our crossbow and want them to have a somewhat realistic velocity while still having proper range.
Image
Moszeusz6Pl
Retired PR Developer
Posts: 939
Joined: 2010-06-24 13:41

Re: [Help] Custom Faction

Post by Moszeusz6Pl »

Yes, in projectile configuration change ObjectTemplate.gravityModifier

Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help] Custom Faction

Post by Onil »

Thanks, I will take a look.

Still need to find a way for the weapon to fire on its own or reload on its own when it still has 1 bullet in it.
Image
Post Reply

Return to “PR:BF2 Community Modding”