Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#2333109 - 09/07/07 12:37 PM Quick n00b OFP Editing question...  
Joined: Dec 2000
Posts: 5,600
Recluse Offline
Mediocrity Above All!
Recluse  Offline
Mediocrity Above All!
Hotshot

Joined: Dec 2000
Posts: 5,600
Randolph, NJ
Ok, some of you gurus are still out there...and OFP editing seems pretty close to ArmA editing, so maybe the answer will fit both:

I am messing around with the editor (OFP Resistance 1.96 with BAS Complete mod) and was trying to load a truck with some weapons. According to the various game references and editing guides I have seen, the loads for the Strela SAM should be "9K32Launcher" just as the weapon.

I can successfully load the launcher (4 in the case below):

truck addWeaponCargo["9K32Launcher",4];

and pick up empty launchers from the truck

but trying to add the ammunition as:

truck addMagazineCargo["9K32Launcher",20]; (or whatever other number I pick)

results in an error.

I guess I should have tried the West equivalent, AALauncher as well to see if that worked, but I didn't.

Is there some other descriptor for the 9K32 ammo that isn't described?

The syntax works fine with all the other weapons/ammo I have tried so far (e.g. RPGLauncher, SVDDragunov etc..)

Thanks!
Recluse


Long system spec sig follows:






PowerSpec G436
Lian Li ATX 205
MSI Z490 Plus Motherboard
Intel Core i7 10700K 3.8 GHz
32 GB RAM DDR4 1600
Nvidia RTX3070

Windows 10 Professional 64 Bit

Flight Gear:

Cougar Hotas S/N 26453
Thrustmaster RCS Rudder Pedals

#2333466 - 09/07/07 09:18 PM Re: Quick n00b OFP Editing question... [Re: Recluse]  
Joined: Apr 2002
Posts: 5,405
kramer Offline
Hotshot
kramer  Offline
Hotshot

Joined: Apr 2002
Posts: 5,405
Ohio
ok, after some investigation i figured out the easy way for you to do this! the answer is to use "Chris Henderson's ArmA/OFP Edit" available from his website.

http://www.chenderman.com/ARMAEDIT.htm

it will work with both armed assault and OFP. in the Tools/Options menu you can choose to use the editor with either armed assault or OFP.

the feature you want to use is the "Crate Builder Wizard" which will create a custom loadout for an ammo crate or for a vehicle.

what it does is create a .sqs file with the loadout you choose. then you just save the "mycrate.sqs" to the mission folder. place the line: [this] exec "mycrate.sqs" in the initilization box for either an ammo crate or a vehicle like an ammo truck and they will then contain the loadout you created in the "Crate Builder Wizard".

this is the easiest way to do it!

one thing i don't know is whether there is a limit to how much an ammo crate or vehicle can hold?

in the "Crate Builder Wizard" there is a checkbox that when checked will empty the "crate" of the standard load of weapons and ammo so that there is room for the weapons and ammo that you are adding in your custom loadout.

i hope this helps!


#2333565 - 09/08/07 01:11 AM Re: Quick n00b OFP Editing question... [Re: Recluse]  
Joined: Apr 2002
Posts: 5,405
kramer Offline
Hotshot
kramer  Offline
Hotshot

Joined: Apr 2002
Posts: 5,405
Ohio
one nice thing in Armed Assault is that the strela and stinger will "lock on" to their target and will usually hit them even at a distance. in OFP they don't seem to do this.

#2333997 - 09/09/07 12:42 AM Re: Quick n00b OFP Editing question... [Re: kramer]  
Joined: Dec 2000
Posts: 5,600
Recluse Offline
Mediocrity Above All!
Recluse  Offline
Mediocrity Above All!
Hotshot

Joined: Dec 2000
Posts: 5,600
Randolph, NJ
Thanks! I downloaded this utility but didn't get a chance to try it. Did you happen to test to see if it really works in a mission?

I still wonder why it doesn't work in the init field like all the other weapons. Will see if a script works any better.

Recluse


Long system spec sig follows:






PowerSpec G436
Lian Li ATX 205
MSI Z490 Plus Motherboard
Intel Core i7 10700K 3.8 GHz
32 GB RAM DDR4 1600
Nvidia RTX3070

Windows 10 Professional 64 Bit

Flight Gear:

Cougar Hotas S/N 26453
Thrustmaster RCS Rudder Pedals

#2334004 - 09/09/07 01:02 AM Re: Quick n00b OFP Editing question... [Re: Recluse]  
Joined: Apr 2002
Posts: 5,405
kramer Offline
Hotshot
kramer  Offline
Hotshot

Joined: Apr 2002
Posts: 5,405
Ohio
yes it does work.

note that i named the .sqs file "mycrate" but you can name it anything you want so that you could have multiple trucks and crates with their own custom loadout.

i don't know for sure why you had a problem doing it your way. maybe a punctuation or syntax error? maybe there wasn't room in the truck? i do think that there is only so much room for weapons and ammo in a crate or truck, but i don't know that for sure.

i have not made any missions but it seems that this editor would be a good tool to use.

the standard armed assault and OFP weapons data is included but it is possible to add new weapons, units, etc. by editing the appropriate selection in the Tools menu.

#2334005 - 09/09/07 01:06 AM Re: Quick n00b OFP Editing question... [Re: kramer]  
Joined: Dec 2000
Posts: 5,600
Recluse Offline
Mediocrity Above All!
Recluse  Offline
Mediocrity Above All!
Hotshot

Joined: Dec 2000
Posts: 5,600
Randolph, NJ
Ok thanks for the reply. Oddly, I could use the init field to outfit a SOLDIER with the 9k32 or AALauncher magazines. The AddWeapon and AddMagazine worked... but the ..Cargo still doesn't. Maybe I did run out of room. I was using a basic 5T truck rather than a Crate or an AmmoTruck, so maybe it is a little bit out of bounds and causing a problem. I guess I should test with a Crate to make sure that the init field still works. Otherwise, I will go with a script. Thanks again for the research.

Recluse

Edit: Ok..I think you were right about the truck being too full. I found I could add the AA magazines to AmmoCrates and Empty Trucks. Apparently it was full up. I deleted a few other weapons (RPG Launchers) and the init sequence worked fine. I DO like the idea of a script, though as it is much more 'portable'.

Last edited by Recluse; 09/09/07 01:28 AM.

Long system spec sig follows:






PowerSpec G436
Lian Li ATX 205
MSI Z490 Plus Motherboard
Intel Core i7 10700K 3.8 GHz
32 GB RAM DDR4 1600
Nvidia RTX3070

Windows 10 Professional 64 Bit

Flight Gear:

Cougar Hotas S/N 26453
Thrustmaster RCS Rudder Pedals

#2334090 - 09/09/07 04:39 AM Re: Quick n00b OFP Editing question... [Re: Recluse]  
Joined: Apr 2002
Posts: 5,405
kramer Offline
Hotshot
kramer  Offline
Hotshot

Joined: Apr 2002
Posts: 5,405
Ohio
i did more research and found that there can be entries in a vehicle's config file that determine how many weapons and magazines it can carry. of course some of the default vehicles can't carry anything.

transportMaxMagazines = 20;
transportMaxWeapons = 5;

there is a commented config file at the OFP editing center that shows this.

http://www.ofpec.com/ed_depot/index_new.php?action=details&id=49&page=0&game=OFP&type=tu&cat=xyz

#2334227 - 09/09/07 03:46 PM Re: Quick n00b OFP Editing question... [Re: kramer]  
Joined: Dec 2000
Posts: 5,600
Recluse Offline
Mediocrity Above All!
Recluse  Offline
Mediocrity Above All!
Hotshot

Joined: Dec 2000
Posts: 5,600
Randolph, NJ
Interesting. If I read it right, the normal West 5t closed truck shouldn't be able to transport ammo at all! But it looks like it can.

Snippets from the vehicle config file:
<----- are my annotation

Code:
class Truck5t : Truck
	{								// 5 ton truck
		
		fuelCapacity=200;
		transportSoldier = 12;
		DefaultWestMagazines(1)
		driverAction = ManActTruck5tDriver;
		cargoAction[] ={ManActTruck5tCoDriver,ManActTruck5tCoDriver,ManActCargo};
		cargoIsCoDriver[] = {true,true,false};
		transportAmmo = 0;<------------
		transportRepair = 0;
		transportFuel = 0;
		camouflage=4; 					// No camouflage colour  - easy to
									// spot
		weapons[]={TruckHorn};<-----------
		magazines[]={};<----------
		
		soundEngine[]={Vehicles\dieseltruckloop2,db-20,1};
		typicalCargo[]={Soldier, Soldier, SoldierLAW, SoldierLAW};



Long system spec sig follows:






PowerSpec G436
Lian Li ATX 205
MSI Z490 Plus Motherboard
Intel Core i7 10700K 3.8 GHz
32 GB RAM DDR4 1600
Nvidia RTX3070

Windows 10 Professional 64 Bit

Flight Gear:

Cougar Hotas S/N 26453
Thrustmaster RCS Rudder Pedals

#2334356 - 09/09/07 09:01 PM Re: Quick n00b OFP Editing question... [Re: Recluse]  
Joined: Apr 2002
Posts: 5,405
kramer Offline
Hotshot
kramer  Offline
Hotshot

Joined: Apr 2002
Posts: 5,405
Ohio
in my post above i state that: of course some of the default vehicles can't carry anything.

i should have said that some of the vehicles don't seem to have the ability to carry weapons and ammo because they don't have the lines about MaxWeapons and MaxMagazines. evidently something else controls a vehicles ability to carry weapons and ammo.

#2335241 - 09/11/07 03:29 AM Re: Quick n00b OFP Editing question... [Re: kramer]  
Joined: Dec 2000
Posts: 5,600
Recluse Offline
Mediocrity Above All!
Recluse  Offline
Mediocrity Above All!
Hotshot

Joined: Dec 2000
Posts: 5,600
Randolph, NJ
I downloaded and tried that ArmaEdit and it looks really great! Thanks for the steer!

Recluse


Long system spec sig follows:






PowerSpec G436
Lian Li ATX 205
MSI Z490 Plus Motherboard
Intel Core i7 10700K 3.8 GHz
32 GB RAM DDR4 1600
Nvidia RTX3070

Windows 10 Professional 64 Bit

Flight Gear:

Cougar Hotas S/N 26453
Thrustmaster RCS Rudder Pedals

#2337747 - 09/14/07 12:44 PM Re: Quick n00b OFP Editing question... [Re: Recluse]  
Joined: Dec 2000
Posts: 5,600
Recluse Offline
Mediocrity Above All!
Recluse  Offline
Mediocrity Above All!
Hotshot

Joined: Dec 2000
Posts: 5,600
Randolph, NJ
OK another question! I know several ways to code around the issue, but I would like to understand why it happens in the first place:

I created a multiplayer mission using a Respawn_West marker and set the RESPAWN="BASE" in the description.ext I did NOT make a RESPAWN_EAST marker.

Works fine! (I also did a little extra thing which I will describe at the end, but shouldn't matter to this discussion).


I put in a BMP with side EAST so it would be automatically crewed, but I made it PLAYABLE just in case there would be an opportunity for WEST to use it. This also made the CREW PLAYABLE, and on the MP screen there was an option to PLay EAST as well. Not intentional, but potentially interesting.

Problem was, when we killed the BMP, the crew members (Driver, Commander, Gunner) kept RESPAWNING at the RESPAWN_WEST marker!!! It was kind of a surprise and pretty fun, actually, but I wonder WHY it happened since they were clearly on the EAST SIDE.

I know I can fix this by either making the BMP Non-Playable or making it EMPTY and moving in some NON-PLAYABLE EAST troops in the init but I am confused as to why the EAST guys respawned at the WEST marker.

Now to the clever, I think, part which may or may not have a bearing on this behavior.

Since I wanted the multiplayers to respawn at a base marker (rather than at the exact spot, where you could just get killed again) and we might cover a lot of ground, I created triggers to be activated repeatedly by

RADIO ALPHA to "Respawn_West" setMarkerPos getPos pGuy
RADIO BRAVO to "Respawn_West" setMarkerPos getPos oGuy

(where pGuy is the leader of the 2 man group and oGuy is the other Guy)

Works great to move up into a good forward position, activate RADIO ALPHA and get the RESPAWN site moved up forward as well.

Recluse


Long system spec sig follows:






PowerSpec G436
Lian Li ATX 205
MSI Z490 Plus Motherboard
Intel Core i7 10700K 3.8 GHz
32 GB RAM DDR4 1600
Nvidia RTX3070

Windows 10 Professional 64 Bit

Flight Gear:

Cougar Hotas S/N 26453
Thrustmaster RCS Rudder Pedals


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Actors portraying US Presidents
by PanzerMeyer. 04/19/24 12:19 PM
Dickey Betts was 80
by Rick_Rawlings. 04/19/24 01:11 AM
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
Grumman Wildcat unique landing gear
by Coot. 04/17/24 03:54 PM
Peter Higgs was 94
by Rick_Rawlings. 04/17/24 12:28 AM
Whitey Herzog was 92
by F4UDash4. 04/16/24 04:41 PM
Anyone can tell me what this is?
by NoFlyBoy. 04/16/24 04:10 PM
10 Years ago MV Sewol
by wormfood. 04/15/24 08:25 PM
Pride Of Jenni race win
by NoFlyBoy. 04/15/24 12:22 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0