Results 1 to 9 of 9

Thread: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

  1. #1
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    Does anyone know how to access these properties of a particuliar AiAircraft/AiAirGroup?

    • Serial Number
    • Paint Scheme (ie "Skin") file
    • Noseart left/right (file)
    • Whether or not markings are shown
    • Visual Weathering Setting
    • Loadout


    In short, all the things that you set in CloD in the "Plane" setup screens under "Plane Options" and "Plane Loadout Options".

    These items can all be set for a particular aigroup via a .mis file or ISectionFile. They are used constantly throughout the game, so they must be accessible in-game via coding somehow.

    But, I can't figure out how. Any ideas?

  2. #2
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    If these items are not accessible to mission builders, is it worthwhile to put in a feature request for a future version of CloD to make these things accessible?

    It seems like they would be quite useful. Very best case would be to have the capability to set/change them mid-mission. But at a minimum, and possibly quite easy to do, would be to make them readable.

  3. #3
    Team Fusion ♣_Spiritus_♣'s Avatar
    Join Date
    Dec 2013
    Location
    The Demon-Haunted World: Science as a Candle in the Dark
    Posts
    5,600
    Post Thanks / Like
    Blog Entries
    2
    Total Downloaded
    0

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    Nose art doesn't work as of now.

    Not really sure what you are asking though, most the other things you mention are changeable in the object properties tab in the FMB.
    Last edited by ♣_Spiritus_♣; Feb-09-2017 at 05:15.

  4. #4
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    Quote Originally Posted by 69th_Spiritus_Mortem View Post
    Nose art doesn't work as of now.

    Not really sure what you are asking though, most the other things you mention are changeable in the object properties tab in the FMB.
    I'm talking about accessing or changing them mid-mission via .cs scripts.

    You're right that they can be set easily via the mission file, which makes it even more frustrating if we can't even access (or change?) what we have set in the .mis file via the .cs scripts.

  5. #5
    Team Fusion ♣_Spiritus_♣'s Avatar
    Join Date
    Dec 2013
    Location
    The Demon-Haunted World: Science as a Candle in the Dark
    Posts
    5,600
    Post Thanks / Like
    Blog Entries
    2
    Total Downloaded
    0

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    I see, curious on why you would need to change any of it mid mission, except for the load out perhaps.

  6. #6
    Team Fusion Cybermat47's Avatar
    Join Date
    Aug 2013
    Location
    Australia
    Posts
    1,052
    Post Thanks / Like
    Total Downloaded
    3.61 GB

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    Quote Originally Posted by flug View Post
    I'm talking about accessing or changing them mid-mission via .cs scripts.

    You're right that they can be set easily via the mission file, which makes it even more frustrating if we can't even access (or change?) what we have set in the .mis file via the .cs scripts.
    May I ask why you want to change these things mid-mission?
    Author of the Their Finest Hour, Their Greatest Challenge, Desert Hawks, Eagles over Tobruk, On Ne Passe Pas!, and Rising from the Ashes campaigns for Cliffs of Dover Blitz and Desert Wings - Tobruk.

  7. #7
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    Quote Originally Posted by Cybermat47 View Post
    May I ask why you want to change these things mid-mission?
    #1. Why not? There might be a million different reasons why. Same as you would want to set them to different things at the start of the mission.

    #2. Specifically, see the R&R routine we have implemented in the TWC Mission Server.

    To be a bit more specific, I already know how to CHANGE those settings mid-mission.

    What I DON'T know how to do, and what I would like to know how, is how to read or DETECT what those various settings are in an aircraft that already exists. The specific reason I want to do that right now is so that I can give any certain pilot a new aircraft that has the exact same settings as his existing aircraft.

    As mentioned above, I can give the pilot an aircraft with any specific settings I want to, right now already. But what I **can't** do is figure out how to access the settings the pilot has on his current aircraft, so that I can duplicate them.

    And to be even more specific: If a person is in an aircraft with a certain preferred loadout, when you switch them to a different aircraft they are very, very annoyed if you just give them some old random loadout rather than their own preferred loadout. So, I want to be able to detect their current loadout so that I can duplicate it.

    Again, it's the **detection of current loadout** that is the difficulty. Once I know what the current loadout is, I can duplicate that no problem.

    Similarly this goes for skins. If you put an pilot in a new plane, they like to use their own personal skin. Why? I don't know, but they went to the bother of creating a personal skin and loading it up in the first place. So presumably they like it or something. When you transfer them to a new/different plane they would like to keep their skin--for the same reason, whatever that may be, that they wanted a person skin on their aircraft to begin with.

    So, again with skins, I have the same issue: I can SET the skin in the new aircraft to whatever I want. But I cannot **detect** what skin any given pilot has chosen to use for his/her aircraft.

    So, I would like to be able to detect these things--either at the start of the mission, or the middle or the end, or whenever.

    Obviously, this type of information is available to the CloD server in some way, because the info about loadout, skins, etc is transmitted across the server to other clients flying the same MP mission. So it's in there somewhere, I just don't know how to access it.

  8. Likes N/A liked this post
  9. #8
    Team Fusion Salmo's Avatar
    Join Date
    Nov 2011
    Posts
    2,332
    Post Thanks / Like
    Total Downloaded
    191.25 MB

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    * Serial Number ......................................... string SerialNumber = aircraft.HullNumber();
    * Paint Scheme (ie "Skin") file ......................... Not avalbale via script at runtime
    * Noseart left/right (file) ................................ Not avalbale via script at runtime
    * Whether or not markings are shown ............ Not avalbale via script at runtime
    * Visual Weathering Setting ........................... Not avalbale via script at runtime

    * Loadout ...... Loadouts are accessed by birthplace, not by aircraft themselves. So if you're interogating individual aircraft/airgroups then you would have to know/record which birthplace they spawned at. Try this methodology ....
    Code:
     
         AiBirthplace birthplace = somebirthplacereference;
         AiAircraft aircraft = someaircraftreference;
         System.Collections.BitArray weaponsmask = birthplace.GetWeaponsMask(aircraft.TypedName());
    Last edited by Salmo; Mar-08-2017 at 04:54.

  10. Likes TWC_Flug, N/A liked this post
  11. #9
    Ace
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    515
    Post Thanks / Like
    Total Downloaded
    130.02 MB

    Re: Accessing an aircraft/AiAirgroup's serial number, skin, loadout, etc?

    Thanks, Salmo--this is super helpful.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •