Results 1 to 23 of 23

Thread: OnBuildingKilled() Issues

  1. #1
    Ace No.401_Wolverine's Avatar
    Join Date
    Jan 2012
    Posts
    757
    Post Thanks / Like
    Total Downloaded
    974.2 KB

    OnBuildingKilled() Issues

    So with reference to the repaired OnBuildingKilled() script function and the usage of the following script:

    Code:
    public override void OnBuildingKilled(string title, Point3d pos, AiDamageInitiator initiator, int eventArgInt) {
    
    		        string[] parts = title.Split(new string[] { SEPARATOR }, StringSplitOptions.None);
    			DateTime now = DateTime.Now;
                            long pk = writeDestroyed(DESTROYED_TYPE_BUILDING, parts[2], "", now);
    			if (initiator.Player != null) { 
    				writeDestroyer(getInitiatorDescription(initiator), initiator.Player.Name() , pk); 
    			} else {
    				writeDestroyer(getInitiatorDescription(initiator), initiator.Actor.Name(), pk); 
    			}
            }
    It seems like there's code missing from a functioning method. When I add this code to our test mission I get the following on start up and the mission fails to continue loading properly:

    Capture.JPG

    Is the ATAG server showing this error on loading its missions? If not, can we please have the rest of the code related to using OnBuildingKilled() effectively in an MP mission? This would help mission and campaign designers immensely.

    Could be that some namespaces aren't being used in the mission? Or that the overall ATAG script contains other functions referenced but were omitted (ex. writeDestroyer, writeDestroyed etc.).

    The test mission file uses the following:

    Code:
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.IO;
    using maddox.game;
    using maddox.game.world;
    using maddox.GP;
    Is TF able to explain why the above ATAG code apparently works but the one I supplied doesn't? It's calling all the same data and seems actually be a lot simpler than the ATAG one since all it does is take the values from the OnBuildingKilled() method and display them when the code fires in the server messages. For reference:

    Code:
    public override void OnBuildingKilled(string title, Point3d pos, AiDamageInitiator initiator, int eventArgInt)
        {
            base.OnBuildingKilled(title, pos, initiator, eventArgInt);
    
            string BuildingName = title;
            string BuildingArmy = "";
            string PlayerArmy = "";
            string sectorTitle = "";
            string sectorName = GamePlay.gpSectorName(pos.x, pos.y);
    
            if (GamePlay.gpFrontArmy(pos.x, pos.y) == 1)
            {
                BuildingArmy = "England";
            }
            else if (GamePlay.gpFrontArmy(pos.x, pos.y) == 2)
            {
                BuildingArmy = "France";
            }
            else
            {
                BuildingArmy = "Neutral";
            }
    
            if (initiator.Player.Army() == 1)
            {
                PlayerArmy = "RAF";
            }
            else if (initiator.Player.Army() == 2)
            {
                PlayerArmy = "Luftwaffe";
            }
            else
            {
                PlayerArmy = "Unknown";
            }
    
            GamePlay.gpLogServer(null, "BUILDING:" + BuildingName + " in " + BuildingArmy + " was destroyed in sector " + sectorName + " by " + initiator.Player.Name() + " from the " + PlayerArmy + ".", new object[] { });
        }
    I'm missing an if statement in case the initiator isn't a player but simply an actor, but I don't think that is the problem. I'll add one and test it just to make sure.

    EDIT: Additional testing done with a simple script including a switch for initiator.Actor. AI bombers will trigger this script on a dedicated server and notifications will appear for destroyed buildings of all types. The debug message for Actor NOT null is displayed. Player destroyed buildings still do not appear. There is no Player NOT null message. The OnBuildingKilled() called but NULL PLAYER & NULL ACTOR message is not displayed either, so it appears that the OnBuildingKilled() code is simply not called at all when a player destroyed a building in multiplayer if they are not the host of the mission. Full script used below:

    Code:
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.IO;
    using maddox.game;
    using maddox.game.world;
    using maddox.GP;
    
    public class Mission : AMission
    {
        public override void OnBattleStarted()
        {
        }
    
        public override void OnBuildingKilled(string title, Point3d pos, AiDamageInitiator initiator, int eventArgInt)
        {
            base.OnBuildingKilled(title, pos, initiator, eventArgInt);
    
            string BuildingName = title;
            string BuildingArmy = "";
            string PlayerArmy = "";
            string sectorTitle = "";
            string sectorName = GamePlay.gpSectorName(pos.x, pos.y);
    
            if (GamePlay.gpFrontArmy(pos.x, pos.y) == 1)
            {
                BuildingArmy = "England";
            }
            else if (GamePlay.gpFrontArmy(pos.x, pos.y) == 2)
            {
                BuildingArmy = "France";
            }
            else
            {
                BuildingArmy = "Neutral";
            }
    
            if (initiator.Player != null)
            {
                if (initiator.Player.Army() == 1)
                {
                    PlayerArmy = "RAF";
                }
                else if (initiator.Player.Army() == 2)
                {
                    PlayerArmy = "Luftwaffe";
                }
                else
                {
                    PlayerArmy = "Unknown";
                }
    
                GamePlay.gpLogServer(null, "TEST MESSAGE FOR DEBUG PURPOSE. Player NOT null", new object[] { });
                GamePlay.gpLogServer(null, "BUILDING:" + BuildingName + " in " + BuildingArmy + " was destroyed in sector " + sectorName + " by " + initiator.Player.Name() + " from the " + PlayerArmy + ".", new object[] { });
            }
            else if (initiator.Actor != null)
            {
                if (initiator.Actor.Army() == 1)
                {
                    PlayerArmy = "RAF";
                }
                else if (initiator.Actor.Army() == 2)
                {
                    PlayerArmy = "Luftwaffe";
                }
                else
                {
                    PlayerArmy = "Unknown";
                }
                GamePlay.gpLogServer(null, "TEST MESSAGE FOR DEBUG PURPOSE. Actor NOT null", new object[] { });
                GamePlay.gpLogServer(null, "BUILDING:" + BuildingName + " in " + BuildingArmy + " was destroyed in sector " + sectorName + " by " + initiator.Actor.Name() + " from the " + PlayerArmy + ".", new object[] { });
            }
            else
            {
                GamePlay.gpLogServer(null, "TEST MESSAGE FOR DEBUG PURPOSE. OnBuildingKilled() called but NULL PLAYER & NULL ACTOR", new object[] { });
            }
        }
    
    }
    Last edited by No.401_Wolverine; Sep-18-2019 at 01:49.

  2. Likes Erpr.Gr.210_Molders liked this post
  3. #2
    Team Fusion ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    344
    Post Thanks / Like
    Total Downloaded
    608.24 MB

    Re: OnBuildingKilled() Issues

    That code fragment was meant as an example of how OBK works. It has been running on the ATAG server for several months and seems to work fine.

  4. #3
    Ace No.401_Wolverine's Avatar
    Join Date
    Jan 2012
    Posts
    757
    Post Thanks / Like
    Total Downloaded
    974.2 KB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by ATAG_Oskar View Post
    That code fragment was meant as an example of how OBK works. It has been running on the ATAG server for several months and seems to work fine.
    "Seems" to work fine? So several months ago, what did you do to test this code and make sure that it was reporting player destroyed buildings?

    If you don't have the time or the inclination to answer the questions I posed above in the first post of this thread, then can we just have the FULL ATAG script that includes the code fragment above? I can add in debug messages to it and then prove once and for all that this was actually fixed for the public. Because if it only works on ATAG because of something going on there that is undocumented and unknown to the community at large, it's not fixed.

    OR if you don't want to provide the full ATAG script, then just throw together a quick script that includes OnBuildingKilled() WORKING for players in MP on a dedicated server and send us that.

    I'm really trying to be positive here. I'm eager to work with this code. Help us out here. You guys supposedly fixed the damn thing. Prove it.
    Last edited by No.401_Wolverine; Sep-18-2019 at 22:39.

  5. #4
    Team Fusion ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    344
    Post Thanks / Like
    Total Downloaded
    608.24 MB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by No.401_Wolverine View Post
    "Seems" to work fine? So several months ago, what did you do to test this code and make sure that it was reporting player destroyed buildings?
    Before I posted yesterday I checked the database. It shows thousands of buildings destroyed over the last six weeks complete with timestamps and player names. This data is uploaded in near real time to the ATAG stats page.

    You can verify this by flying any mission. Any buildings you destroy should show up within two minutes on the stats page.

  6. Likes ATAG_Ribbs, ATAG_Snapper liked this post
  7. #5
    Ace No.401_Wolverine's Avatar
    Join Date
    Jan 2012
    Posts
    757
    Post Thanks / Like
    Total Downloaded
    974.2 KB

    Re: OnBuildingKilled() Issues

    Can you tell me with certainty that those buildings recorded in your logs were ones on the map NOT placed by a mission builder? You should have stats for a lot of lamp posts and civilian buildings and god knows what else in there if it is working properly.

    Remember, the key here is that buildings existing on the map BEFORE any intervention by a mission builder are the ones that are supposed to be showing up. So if ATAG's server has players bombing targets that are placed objects from the mission builder then it is not a valid way of verifying this code by checking ATAG stats. You need to place an EMPTY map on the ATAG server (save for a spawn point) bomb a building (any building) and see if it shows up in the stats. Throw a few AI bombers in as well to drop bombs on a city and see if those buildings show up as well.

    Again, because something is working on ATAG does not mean it works for everyone. Rearm/Refuel was an ATAG thing that did not work anywhere else and was closely guarded by ATAG.

    Did you look at the script I supplied? I don't see any difference in the way it's being called to the ATAG snip you posted. The only difference is ATAG is writing those values to a log it's putting up for stats whereas my script throws that information in real time to the screen for players to see. Why should that be the cause of a problem? If it is, then I would say the OnBuildingKilled() method is definitely NOT working still.

  8. Likes Cassius liked this post
  9. #6
    Ace Cassius's Avatar
    Join Date
    Dec 2011
    Posts
    2,593
    Post Thanks / Like
    Total Downloaded
    424.49 MB

    Re: OnBuildingKilled() Issues

    Looks like CloD version on ATAG server not the same we got in Steam...
    Or
    This is some kind of what...The method OnBuildingKilled() does not work in multiplayer. If it works on ATAG server, should be nice tell to community how to make it work.

    Xeon X5650 2.67GHz x2 64GB GTX 680 4Gb Acer GN246HL 1920x1080 Win 7 64 / Win 10

  10. Likes No.401_Wolverine liked this post
  11. #7
    Team Fusion ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    344
    Post Thanks / Like
    Total Downloaded
    608.24 MB

    Re: OnBuildingKilled() Issues

    Are you running your server in dedicated mode like the ATAG server?

  12. #8
    Ace No.401_Wolverine's Avatar
    Join Date
    Jan 2012
    Posts
    757
    Post Thanks / Like
    Total Downloaded
    974.2 KB

    Re: OnBuildingKilled() Issues

    and it appears that it's not fixed in MP (tested on dedicated server and local hosted and it behaves as before).
    Additional testing done with a simple script including a switch for initiator.Actor. AI bombers will trigger this script on a dedicated server and notifications will appear for destroyed buildings of all types. The debug message for Actor NOT null is displayed. Player destroyed buildings still do not appear. There is no Player NOT null message. The OnBuildingKilled() called but NULL PLAYER & NULL ACTOR message is not displayed either, so it appears that the OnBuildingKilled() code is simply not called at all when a player destroyed a building in multiplayer if they are not the host of the mission.
    Tested using Dedicated Server launched on 1&1 IONOS Windows Server 2012 R2 Cloud Server XXL 4vCore 8GB RAM 160GB SSD with CloD version 4.56 ContentBuild No.4182715 and 4.5 CloDWatchdog 64 (File Version 1.0.0.0 Size 143KB)
    Also Tested using Locally Launched Server on Windows 7 Pro i7-4790K @ 4.00GHz 16GB Ram with nVidia Geforce GTX 1080 Ti, 512GB Samsung 850Pro SSD using CloD version 4.56 ContentBuild No. 4182715

    Do you want my mission files as well? Attached.

    Do we need to clear cache or something? Is it that simple? I'll try that too! EDIT: Tested! No difference. Tested dedicated server and local host.

    Here's what happens when playing on LOCAL HOST. The PLAYER destroys a building messages will only appear if the HOST (ie the player who launches the local server) destroys a building. The same is the case for single-player, but we're not interested in this code for single-player:

    tested local.jpg

    So in the picture above you see that my code is working, the AI aircraft are destroying things. The player flown aircraft is destroying things! This is all being handled by the OnBuildingKilled() script. It's the only code in the file! These objects were not placed on the map, they are PART of the baked map. Great! The problem is and has always been that if you are playing multiplayer on LOCAL HOST the message is displayed only if the HOST or AI blows up a building. If you are playing DEDICATED SERVER, no one blowing up a building will generate these messages (but it seems AI will generate them). This has not changed with 4.56 at all. The million dollar question is: Why does it work in single-player and local host for the hosting player, but not in local-host multiplayer for people who connect to the server or in dedicated server for anyone who connects.

    And remember, it's not the messages I care about. It's the functioning of the script at all for players who connect to multiplayer sessions. The messages are just a way to debug the script to make sure it works. Which is why we came across this in the first place. The plan is to use this script to make new content for the game that could never be done before. I don't care if it puts up a message or writes a line to a stats file - that's up to the mission designer.
    Attached Files Attached Files
    Last edited by No.401_Wolverine; Sep-19-2019 at 20:11.

  13. Likes Rostic, Cassius liked this post
  14. #9
    Team Fusion ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    344
    Post Thanks / Like
    Total Downloaded
    608.24 MB

    Re: OnBuildingKilled() Issues

    Thanks for narrowing down the problem. Our goal was to get the code working on the ATAG server so that we would be able to assist other mission builders with that configuration.

    Please PM me to set up a time when I can connect with your server and talk on TS to debug this problem.

  15. Likes Cassius, ATAG_Ribbs liked this post
  16. #10
    Ace Cassius's Avatar
    Join Date
    Dec 2011
    Posts
    2,593
    Post Thanks / Like
    Total Downloaded
    424.49 MB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by ATAG_Oskar View Post
    Are you running your server in dedicated mode like the ATAG server?
    Yes, I use a second account CloD on win7x64 with 2 Zeon x5650 RAM 64 GB and run server by WatchDog 64.
    And I checked it from other account, other computer like simple player connected.
    #
    Seems some kind of movement has begun.

    Glory to the Creator!
    Last edited by Cassius; Sep-20-2019 at 01:17.

    Xeon X5650 2.67GHz x2 64GB GTX 680 4Gb Acer GN246HL 1920x1080 Win 7 64 / Win 10

  17. #11
    Team Fusion Artist's Avatar
    Join Date
    Nov 2012
    Posts
    1,995
    Post Thanks / Like
    Total Downloaded
    203.92 MB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by Cassius View Post
    Looks like CloD version on ATAG server not the same we got in Steam...
    No. The CloD version on ATAG Server is exactly the same as for everyone else.

  18. #12
    Ace Cassius's Avatar
    Join Date
    Dec 2011
    Posts
    2,593
    Post Thanks / Like
    Total Downloaded
    424.49 MB

    Re: OnBuildingKilled() Issues

    Some times ago Salmo posted new dll extensions for code. I mean that some new extensions allow this method to work on ATAG server.
    Ok. That fine.
    I am glad that it seems that finally the problem with this method will be accepted and maybe ways to solve it will be found.
    We can talk a lot about how this can change the quality of the created missions for various companies and events, but it will be better to see it already on a working project.
    I hope.

    Xeon X5650 2.67GHz x2 64GB GTX 680 4Gb Acer GN246HL 1920x1080 Win 7 64 / Win 10

  19. Likes 1lokos liked this post
  20. #13
    Ace No.401_Wolverine's Avatar
    Join Date
    Jan 2012
    Posts
    757
    Post Thanks / Like
    Total Downloaded
    974.2 KB

    Re: OnBuildingKilled() Issues

    Any information on whether this has been addressed? Patch notes still incorrectly list this as fixed.

  21. #14
    Team Fusion ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    344
    Post Thanks / Like
    Total Downloaded
    608.24 MB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by No.401_Wolverine View Post
    Any information on whether this has been addressed? Patch notes still incorrectly list this as fixed.
    There are two problems here, only one of which has been fixed. Buildings that are placed by the mission builder will report their destruction.

    Hard coded on map buildings do not report their destruction. This is because of London which has so many closely spaced buildings. A bomb there could destroy dozens or hundreds of buildings and generate lots of network traffic. We are not making any changes to the Channel map.

    The workaround is to place your own buildings on top of the hardcoded ones you want to track. The FMB has been updated so you can rotate objects in one degree increments to make this easier.

  22. #15
    Ace Rostic's Avatar
    Join Date
    Sep 2015
    Posts
    1,329
    Post Thanks / Like
    Total Downloaded
    5.00 MB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by ATAG_Oskar View Post
    ...
    Hard coded on map buildings do not report their destruction. This is because of London which has so many closely spaced buildings. A bomb there could destroy dozens or hundreds of buildings and generate lots of network traffic. We are not making any changes to the Channel map.
    ...
    Any plans to change this in the future?

    -----------------------------------

    Just a thought with the omission of many details in a possible implementation.

    If static objects has only 2 states "destroyed/not destroyed" (I mean no health bar, etc). All the NETWORK information of the static objects state can be represented as large BIT-array on the server and client sides. Synchronization should be implemented only in some radius around player.

    I looked at the buildings in London and average number of buildings in 100m2 is about 25. Let's assume that biggest bombers raid can destroy all the buildings in area 10000m2.
    10000m2 / 100m2 * 25 / 8 = (2500 buildings / 8) = 313 bytes + "extra bytes for offsets in full array, etc".
    Is this too much for network data that can be splitted in several packets? Comfortable delay to send info about so many static objects is several second.
    Last edited by Rostic; Jan-10-2020 at 15:22.
    Intel Core i7 8700K 3.7Ghz, DDR4 16Gb 2666Mhz, Asus Prime Z370-A, ADATA XPG SX8200 240Gb (PCIe Gen3x4), RTX 2060 6Gb

  23. #16
    Ace No.401_Wolverine's Avatar
    Join Date
    Jan 2012
    Posts
    757
    Post Thanks / Like
    Total Downloaded
    974.2 KB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by ATAG_Oskar View Post
    There are two problems here, only one of which has been fixed. Buildings that are placed by the mission builder will report their destruction.

    Hard coded on map buildings do not report their destruction. This is because of London which has so many closely spaced buildings. A bomb there could destroy dozens or hundreds of buildings and generate lots of network traffic. We are not making any changes to the Channel map.

    The workaround is to place your own buildings on top of the hardcoded ones you want to track. The FMB has been updated so you can rotate objects in one degree increments to make this easier.
    To be clear, hard coded on map buildings DO report their destruction in single-player, but DO NOT report their destruction in multi-player, possibly intentionally due to the network traffic possibilities as mentioned.

    The possible major benefits of this code in multi-player were based on utilizing the feature as it functions in single-player but in a multi-player environment. The work around is not feasible outside of methods that have already been utilized since day one of CloD (creating specific, known, mission scripted targets whether they overlap existing buildings or exist as unique mission designed structures/locations on their own). You can hardly put a static object over every single thing on the map.

    Ah well. Seems like it isn't a bug after all but an intentional neutering of the function.

    Question: Did you try to enable it to determine what the impact was on MP or did you just make an assumption of the impact and not try?
    Last edited by No.401_Wolverine; Jan-10-2020 at 15:21.

  24. #17
    Ace Rostic's Avatar
    Join Date
    Sep 2015
    Posts
    1,329
    Post Thanks / Like
    Total Downloaded
    5.00 MB

    Re: OnBuildingKilled() Issues

    And one more question.
    Right now if several players fly in same area and only one of them drop bombs to the target, all other players will see destroyed buildings same as the player that dropped bombs. So the data is already synchronized between players, but not delivered to the server to genetare event on the server side????
    Intel Core i7 8700K 3.7Ghz, DDR4 16Gb 2666Mhz, Asus Prime Z370-A, ADATA XPG SX8200 240Gb (PCIe Gen3x4), RTX 2060 6Gb

  25. #18
    ATAG Member ATAG_Ribbs's Avatar
    Join Date
    Jan 2012
    Posts
    1,843
    Post Thanks / Like
    Total Downloaded
    4.11 MB

    Re: OnBuildingKilled() Issues

    Knowing that Oskar is extremely busy working on things for 5.0. I really hope sometime after the dust settles you guys can get together and figure this out. I feel it's an extremely important feature for campaign builders.
    Cheers
    Ribbs

    INTEL I5 4670 /16 MB DDR3/ MSI Z97 PCMATE MB
    MSI GTX 1060 3 GIG
    WIN 7 64
    MS Sidewinder 2 precision pro Saitek x52 throttle quadrant


    By ATAG_Lewis

  26. #19
    Team Fusion ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    344
    Post Thanks / Like
    Total Downloaded
    608.24 MB

    Re: OnBuildingKilled() Issues

    I can confirm that no further changes are planned for TF5.

  27. #20
    Ace Cassius's Avatar
    Join Date
    Dec 2011
    Posts
    2,593
    Post Thanks / Like
    Total Downloaded
    424.49 MB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by ATAG_Oskar View Post
    There are two problems here, only one of which has been fixed. Buildings that are placed by the mission builder will report their destruction.

    Hard coded on map buildings do not report their destruction. This is because of London which has so many closely spaced buildings. A bomb there could destroy dozens or hundreds of buildings and generate lots of network traffic. We are not making any changes to the Channel map.

    The workaround is to place your own buildings on top of the hardcoded ones you want to track. The FMB has been updated so you can rotate objects in one degree increments to make this easier.
    No, they do not report about their destruction. I put two hangars at the airfild. One new place, one over of the hardcoded. No messages in multiplayer. In single Ok.
    I just checked by creating a server and connecting to it as a regular player. Or please share the method to use. I used OnBuildingKilled().
    Thanks.
    P.S.
    It seems that the creators of the missions and bombers have a very long time to go along this road.
    Cheсk Targets Please
    #
    I understood my mistake. Key phrase bug fixed, but they will report ...in future, not now...after the patch.
    Waiting.
    Looking forward!
    #
    And a little bit more ...
    Are you worried that ATAG Axis vs Allies Public Server has completely lost traffic?
    No bombers - no players. Fighters very quickly get tired of hunting one after another on maps with targets for bombers. IMHO
    Last edited by Cassius; Jan-12-2020 at 09:13.

    Xeon X5650 2.67GHz x2 64GB GTX 680 4Gb Acer GN246HL 1920x1080 Win 7 64 / Win 10

  28. #21
    Combat pilot
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    226
    Post Thanks / Like
    Total Downloaded
    68.75 MB

    Re: OnBuildingKilled() Issues

    Hard coded on map buildings do not report their destruction. This is because of London which has so many closely spaced buildings. A bomb there could destroy dozens or hundreds of buildings and generate lots of network traffic. We are not making any changes to the Channel map.
    FWIW my suggestion here would to be report destruction of buildings in industrial areas and military bases (ie, airfields) only. Also maybe restrict it to a relatively few classes of buildings--things that are a bit larger than a lamppost and only used in military or industrial areas.

    For mission building purposes, in civilian areas all you really need is a notification that that certain bomb landed in a civilian area. This could come with the existing onBombExplosion routine.

    This would massively cut down on the need for network communication about exactly which building was hit in places like London, while still allowing mission builders to use vast areas of industrial zones and military bases as targets without having to place thousands and thousands of buildings or stationary objects by hand.

    Also it would be a good way of implementing some war gaming best practices, where actions against civilian targets are strongly discouraged. You want to keep it military v. military. The most you want to do if a bomb hits a civilian area is maybe give the player or team some penalty points or a warning or something, but you don't need exact details about which buildings were hit to do that.

    That would still give mission builders the option to make one certain building a civilian zone "Army Headquarters" or whatever, and make it into a special target using the same types of techniques we use now. But by and large civilian areas are just there for looks.

    The reason we'd like to auto-detect buildings is in designing missions you'd like to be able to make every industrial area, every military base, every airfield, etc, an automatic "live" target for the mission without having to go through hours and hours of extra setup, adding thousands of additional new stationary objects to the map, just to achieve that effect.

    And you'd like to give players credit/points/recognition/whatever if their bombing actually destroyed things (buildings, whatever) vs just hit on the ground somewhere in that general area.
    Last edited by TWC_Flug; Jan-20-2020 at 18:13.

  29. Likes Cassius liked this post
  30. #22
    Combat pilot
    Join Date
    May 2015
    Location
    Kansas City, Missouri area
    Posts
    226
    Post Thanks / Like
    Total Downloaded
    68.75 MB

    Re: OnBuildingKilled() Issues

    Quote Originally Posted by TWC_Flug View Post
    The reason we'd like to auto-detect buildings is in designing missions you'd like to be able to make every industrial area, every military base, every airfield, etc, an automatic "live" target for the mission without having to go through hours and hours of extra setup, adding thousands of additional new stationary objects to the map, just to achieve that effect.
    Speaking of that, one way to achieve a good portion of that goal would be to give notification as part of onBombExplosion as to whether the bomb hit on water, civilian/residential territory, open fields, industrial area, airport, or military base and maybe a couple of other similarly useful categories (we do have road, railroad, and a couple of other similar categories already, which are helpful).

    For the purposes of TWC missions, if we knew water/civilian/industrial/military for bomb explosions we could do 95% or maybe 99% of what has taken dozens and dozens of hours to place thousands of stationary objects around the maps by hand. FYI we use certain 'special' stationary objects to place around in industrial areas, civilian areas, etc to mark them. When a bomb lands you can figure out if it is close to the nearest marker object and then you can tell if it is an industrial area, civilian area, airport, etc. Then you score points or knock out targets accordingly.

    The system actually works quite well but it takes a lot of time to place the special stationary objects (which is time the map designers have already put in to design various areas of those types) and having all those thousands and thousands of special stationaries definitely slows down mission loading & performance some. Plus, for all those reasons you end up having those features on only certain limited areas of the map rather than just having them universal, which is what I would like to see.

    My $.02 for the day.

    ($.04 when combined with the previous comment.)

  31. Likes Cassius liked this post
  32. #23
    Ace Cassius's Avatar
    Join Date
    Dec 2011
    Posts
    2,593
    Post Thanks / Like
    Total Downloaded
    424.49 MB

    Re: OnBuildingKilled() Issues

    +1000000
    onBombExplosion() is a good example of traffic load, and it works in multiplayer! At least it worked good on targets like airfields including SoW 4. Patch 4.312

    Xeon X5650 2.67GHz x2 64GB GTX 680 4Gb Acer GN246HL 1920x1080 Win 7 64 / Win 10

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
  •