Devices (Full Version)

All Forums >> [New Releases from Matrix Games] >> War in the Pacific: Admiral's Edition >> Scenario Design and Modding



Message


dbmsts -> Devices (2/18/2011 11:20:19 AM)

I wanted to know what are the "Air Device" and "Air Use" Fields used for in the Devices section of the Editor.




tanjman -> RE: Devices (2/18/2011 11:32:44 AM)


quote:

ORIGINAL: dbmsts

I wanted to know what are the "Air Device" and "Air Use" Fields used for in the Devices section of the Editor.


Do you mean Alt Device & Alt Use? If so, the following was gleaned from a post by michealm.


Alt Device

Basically you can link devices in a sequence specifying what missions can use said device. The code will attempt to swap out any device that has a 'Alt use' value that is applicable to the mission being executed. It will find the first alternate device that is applicable for the mission being executed.

It is a simple method that can be horribly broken if you try to chain too many devices together or give it conflicting mission profiles.

For example: The 100kg SAP can be linked to the 100kg GP linked back to the 100kg SAP. This is done by putting the next device in the chain in the 'Alt device' field of the device\n (100kg SAP has AltDev of 100kg GP; which has AltDev of 100kg SAP) Now to keep the SAP limited to naval attack, you put 6 in the 'Alt use' field, and 120 (to use for land and AF attacks) for the other linked device.

Alt Use

Below are the values for the 'Alt use'. Just add the numbers of the missions that can use the device together.
- define PM_NAVAL_ATTACK 2 // used for naval attacks
- define PM_NAVAL_ATTACK2 4 // alternate for naval attack (like torp replacement)
- define PM_LAND_ATTACK 8 // used for land (ground/port) attack
- define PM_LAND_ATTACK2 16 // alternate for land (ground/port) attack
- define PM_AF_ATTACK 32 // used for airfield attack
- define PM_AF_ATTACK2 64 // alternate for airfield attack




dbmsts -> RE: Devices (2/18/2011 12:18:35 PM)

Sorry for my mistake. Yes it's Alt Device and Alt Use. Thanks for the reply that really helped. However there is one more question, when in aircraft section I change a bomb type for a particular plane, for e.g. I changed the bomb carried by the I-15-III to #201 "100 kg GP Bomb" instead of the #1880 "100 kg GP Bomb". When I went to the airgroups section and looked at the chinese squadrons flying the I-15-III, I noticed that the weapon was still the #1880 "100 kg GP Bomb", so I selected the drop down menu for the 'air class' and clicked on the I-15-III again then the weapon changed to what I wanted. Is there an easier way to update all the airgroups whenever I make a change in the aircraft section?




Herrbear -> RE: Devices (2/18/2011 8:14:41 PM)


quote:

ORIGINAL: tanjman


quote:

ORIGINAL: dbmsts

I wanted to know what are the "Air Device" and "Air Use" Fields used for in the Devices section of the Editor.


Do you mean Alt Device & Alt Use? If so, the following was gleaned from a post by michealm.


Alt Device

Basically you can link devices in a sequence specifying what missions can use said device. The code will attempt to swap out any device that has a 'Alt use' value that is applicable to the mission being executed. It will find the first alternate device that is applicable for the mission being executed.

It is a simple method that can be horribly broken if you try to chain too many devices together or give it conflicting mission profiles.

For example: The 100kg SAP can be linked to the 100kg GP linked back to the 100kg SAP. This is done by putting the next device in the chain in the 'Alt device' field of the device\n (100kg SAP has AltDev of 100kg GP; which has AltDev of 100kg SAP) Now to keep the SAP limited to naval attack, you put 6 in the 'Alt use' field, and 120 (to use for land and AF attacks) for the other linked device.

Alt Use

Below are the values for the 'Alt use'. Just add the numbers of the missions that can use the device together.
- define PM_NAVAL_ATTACK 2 // used for naval attacks
- define PM_NAVAL_ATTACK2 4 // alternate for naval attack (like torp replacement)
- define PM_LAND_ATTACK 8 // used for land (ground/port) attack
- define PM_LAND_ATTACK2 16 // alternate for land (ground/port) attack
- define PM_AF_ATTACK 32 // used for airfield attack
- define PM_AF_ATTACK2 64 // alternate for airfield attack



I am confused as I see no 40 in the list. Device 204 is Alt Dev 198; Alt Use 40. What does the 40 mean? The other way follows: Device 198 is Alt Dev 204; Alt Use 4

Thanks.





Ambassador -> RE: Devices (2/18/2011 8:24:46 PM)

You have to add the numbers.  40 is 32 + 8 : land and airfield attacks.  12 would be 4+8 (naval & land), 56 is 32+16+8 (both land and airfield).  The 120 referred to by tanjman is 8+16+32+64 (all land and airfield attacks).

With such a combination of "base" numbers, any number is a unique addition of some of the others.  Hence why a single field to determine the mission(s) where an alternate device is used : a single field, whether only one or several missions are concerned.




Herrbear -> RE: Devices (2/18/2011 9:05:59 PM)

quote:

ORIGINAL: Ambassador

You have to add the numbers.  40 is 32 + 8 : land and airfield attacks.  12 would be 4+8 (naval & land), 56 is 32+16+8 (both land and airfield).  The 120 referred to by tanjman is 8+16+32+64 (all land and airfield attacks).

With such a combination of "base" numbers, any number is a unique addition of some of the others.  Hence why a single field to determine the mission(s) where an alternate device is used : a single field, whether only one or several missions are concerned.


I think I understand. So for example (these devices are made up)


Device #10 500 lb Bomb------------Device #20 3.5" Ground Rocket
Alt Dev #20---------------------------Alt Dev #10
Alt Use 46 (32+8+4+2)-------------Alt Use 80 (64+16)

Device #10 Use for all naval attacks and land and airfield attack
Device #20 Use for alternate land and alternate airfield attack

Would this be correct?

Thank you.






Ambassador -> RE: Devices (2/18/2011 10:10:11 PM)

That's how I understand it (because I encoutered that type of coding in other domains), but I'm no privy to the inner workings of the game.




che200 -> RE: Devices (12/23/2011 2:48:23 PM)

So if i understand correctly we can change the settings when aircraft can use torpedoes in port attacks ?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.855469E-02