My own artillery specifically aim for my troops

正在查看此主题的用户

So I have 2 active cannons on the field.  First battle with them I made the mistake where I just charged the enemy.  This resulted 5 of my troops wiped out from my own cannons.  I understand that you need to be careful with instructions regarding them; so next battle, I tried something different.

1) Instructed all troops to follow me (cannoneers stayed at cannons)
2) Led them off to the right away from the cannons and not forward towards enemy army
3) Cannons should of had no friendlies in their way and had clear shots of the enemy charging at us
4) Cannons rotated TO US and fired on my army  :shock:
5) Pretty sure I heard the enemy army laughing their arses off at the sight

So I wanted to know what -if anything- I did wrong in this scenario.  The cannons deliberately changed their aim to fire own their own troops.  Would definitely like for them to unload hell's fury onto the actual enemy  :smile:

EDIT: Grammar

Once again; thank you for this delightful mod and I am quite happy that you still are updating it after all this time.

EDIT: Should also point out that cannoneers sometimes spawn outside of the map preventing the match from ending; you have to enable cheats and do the ctrl-alt-f4 in order to finish the match.

EDIT 2: Canonneers sometimes fire their cannons right at the start of battle where they are in front of the cannons; so they will immediately kill themselves.
 
Haha, cannoneer retards.

No, seriously. Thanks for posting this. I'll look into this. Note that you can set a point to aim at for the cannoneers manually.
First select the cannoneer's regiment, it's number 4 I believe. Then hold F1 to put a flag somewhere on the battlefield. The cannoneers will now aim at this point.
Hold fire makes the cannoneers stop firing.

About the spawning of cannons and cannoneers outside the map borders. The cannons will spawn on the highest hill within a range of 30 meters. I might shorten this.

EDIT 2: Canonneers sometimes fire their cannons right at the start of battle where they are in front of the cannons; so they will immediately kill themselves.
I heard of a rule for cannoneers to never stand before the cannon's barrel  :iamamoron:.
 
Thank you for the quick replies I'll try holding F1 and manually setting where to aim for them for now on. 

I should note that I seem to have repeated this issue with them targeting their own army.  It seems to happen when you tell everyone or the artillery the "Follow Me" command.  The Cannoneers will follow you....only with their sights; not their physical bodies.

With the cannons spawning outside of the map; I would imagine that there has to be some variable that holds the map border coordinates.  Instead of limiting the 30 meters I would just put the border coordinates/variables into your formula.  Let's say you have a function made that looks for the highest point in within 30 meters of spawn; we'll call it findHighPoint().  This function returns the coordinate(s) of the highest point within 30 meters.  You can then say something like:

var cannonPlaced = false;
var incompatibleCoordList = "";
while (cannonPlaced = false){
    //get 1st or new high point coordinates
    var cannonPosition = findHighPoint();
    // make sure the coordinates are not already in the incompatible coordinates list
    for(var position : incompatibleCoordList) {
        if(cannonPosition == position)
            // these coordinates have already been used and been flagged as bad; modify or get new value for cannonPosition; this part will likely need to be refined.
            cannonPosition.X -= (int)Math.random(10);
            cannonPosition.Y -= (int)Math.random(10);
    }
   
    // if coordinates are not already listed as bad; then make sure they are within the map boundary.
    if((cannonPosition.X < mapBoundary.X) && (cannonPosition.Y < mapBoundary.Y)){
        placeCannons();
        cannonPlaced = true;
    } else {
        // make sure that the coordinates are added to the incompatible coordinates list.
        incompatibleCoordList.add(cannonPosition);
    }
}

This will allow the cannons to (theoretically) be placed within the map boundary without sacrificing or constantly tweaking the 30 meter distance check.

EDIT: added in some comments.  Also, sorry for the java-like suedocode; I just could never get the hang of Python.

EDIT 2: Speaking of finding distances/coordinates; I have been seeing a lot of red text messages saying "At script: cf_calculate_distances".  Not sure what exactly this seems to be but I've been seeing this more often as I further progress into the game.

EDIT 3: Might as well place this out there since I'm on a role; I noticed that the bug where nameless infantry (who are also unequipped of armor and weapons) are spawning in conquered cities (the soldiers in the garrison will say something like "x20")) is still happening.
 
Thank you. I really like when people of the community actually help finding solutions for problems. +1

It is possible to bring in the map boundaries in the script, but I still think tweaking the 30m to 25m or so is much easier  :smile:.

The script errors regarding cf_calculate_distances is about AI seafaring. It will be completely replaced as of the new update. Errors with '-1' can be safely ignored.
 
后退
顶部 底部