Hello Cossacks3 Fans! My name is StriKe and I was quite annoyed by playing with a lot of cannons, mostly because they refused to attack a target automatically. After digging through some files I found out that cannons have a max. range of 2000 but only fire automatically at a range of 450. Furthermore the minimum range of the normal cannon-shot is 550, and after that they use their shrapnel-shot only. This leads to the problem that they are only able to fire their shrapnel-shot automatically. So this mod fixes it by increasing the automatic attack range from 450 to 2000. This only changes the basic cannons (no ships, towers, etc). With this mod your cannons will shoot at enemies in range automatically! This mod supports the Mod Manager, visible by the tag [MM]. You can get it here. Credits for the Mod Manager to Lieutenant-Général. Warranty: Feel free to use this mod as you like, however if you include this in another project I would appreciate some credit. Use it at your own risk! I haven't tried it in multiplayer and I do not know if it is allowed. If you get banned, or your computer explodes - you have been warned. -StriKe How to Install: Spoiler: Install Download the latest file from this link. Code: cannon autoattack.json Copy the file to: Code: Cossacks 3/mod Install the file via Mod Manager
So autofire works if you increase the range eh? Good to know, I was going to test it myself but got lazy. Or actually I got side-tracked with the Prussian Musketeer's building speed and trying to make towers shoot through walls.
Yep they do auto fire, the range is just super low (even lower than cossacks 1). It's almost the same range as the capture range. I may look into the tower thingy tomorrow if you want.
I know about the range, I read it my. I just wasn't sure if increasing it would work, that's all. Anyhow yeah, be my guest.
I tried this mod yesterday. Thank you thank you thank you. Now I can play this game in the style that I like. This should have been a part of the game from day 1.
Thanks! Check out my other mods too, they are mostly made to make the game more enjoyable while playing!
nice, I tried hat in my mod and cannons finally auto attack. I tried to do the same with mortars but they do not attack automatically. It takes so much times to destroy everything if capture is disabled. Why cant mortars attack by themselfes. I also tried to increase mortar dmg, the unit says it has 100 mortar dmg but it always inflitcs 250 dmg, even if I change that. I tried to make a upgrade with +mortar damage but it is useless. In fact I wanted to make a repeatable upgrade (like healing) so sooner or later the mortars had like 1000+ damage, but I thing I can skip that idea.
It's because in the weapons.script the mortar shot has a damage value. In the case of arrows (and muskets in my realism test mod) this is overridden here: // Use owner damage _weapon_SetWeaponUseOwnerDamage('NUCL2P2'); _weapon_SetWeaponUseOwnerDamage('STRELA'); _weapon_SetWeaponUseOwnerDamage('OSTRELA'); _weapon_SetWeaponUseOwnerDamage('NUCLGRE'); you need to add the following, and then your changes should take effect: _weapon_SetWeaponUseOwnerDamage('NUCL3MONO');
I found that in weapons.script except there was no _weapon_SetWeaponUseOwnerDamage('NUCL2P2'); I added that line aswell at NUCL3MONO but it still deals always 250 dmg. Edit: how did you managed to increase search radius of units if you do +range attack. in the script it only increases attack range but not search radius. For cannons that is no big deal because there are stand still most the time but I am thinking about a +attackrange upgrade for musketeers but that is useless unless I also increase the search radius.
[/QUOTE]I found that in weapons.script except there was no _weapon_SetWeaponUseOwnerDamage('NUCL2P2'); I added that line aswell at NUCL3MONO but it still deals always 250 dmg. Edit: how did you managed to increase search radius of units if you do +range attack. in the script it only increases attack range but not search radius. For cannons that is no big deal because there are stand still most the time but I am thinking about a +attackrange upgrade for musketeers but that is useless unless I also increase the search radius.[/QUOTE] That's because NUCL2P2 is the custom missile I created to facilitate musket accuracy. Try doing the same with 'NUCL3MONONEWDMG' as that also does 250 damage in weapons.script. Search radius is controlled in the unit script here: SetObjBaseSearchBuildVisionScore(objprop, objbase, 0, 800, 1, 100); As you can see, at the moment the Mortar has a search radius of 0
nice mortar work fine now. To the range problem. I have already figured out how to change basis units (I made small balance mod for C1 as well). The problem is however that I want a upgrade for 17c musketeers +5% attack range. if I do that the unit has 840 range but still has 800 search radius, so the unit behaves like without upgrade. I tried with +50% attack range. Thats not totally true if I select the shooter and right click direct on a enemy unit he fires from a great distance, but if I use go and attack everyone on the way he moves to his normal distance 800 and fires then. If I give him 800 attack range but 900 search radius, he moves to the enemy without firering
There are multiple values. There is a min range, max range, min search distance, max search distance and further below is the auto search distance.
for normal 17c musketeer: if I perform a range bonus research I will increase the attack range SetObjBaseWeapon(objprop, objbase, weapInd, 11, 90, 400, 800, 0, 100000, gc_obj_weapon_kind_bullet, True); However the search value must be the same as attack range to be of any use SetObjBaseSearchBuildVisionScore(objprop, objbase, 800, 400, 2, 20); So I had a look at gc_upg_type_attrangeperc in player.script I tried gPlayer[plInd].objbase[cid][iarr2].weapon[j].radiusmax := gPlayer[plInd].objbase[cid][iarr2].weapon[j].radiusmax*(1+value/100); gPlayer[plInd].objbase[cid][iarr2].weapon[j].search := gPlayer[plInd].objbase[cid][iarr2].weapon[j].search*(1+value/100); as well as some other methods but nothing workes, I am not really god in stuff like that.