Modding Commanders - Custom Unit Deployment
Posts: 12
I am trying to create a custom unit deployment commander ability, and it works perfectly, except that I cannot find a way to link it to the commander. I tried making a custom archtype upgrade, but it doesn't seem to apply it when the commander is picked.
I messed with every setting but could not find any method of getting the ability to appear when the commander was selected.
Please can somebody shed some light on this?
Posts: 817 | Subs: 5
Although the files in the category 'commander' can be cloned, but the game does not use them. Which means it is not possible to edit commanders that way.
There is a workaround! Each commander unlocks 5 upgrades. These can be found in the category 'commander', select one of the ability links and press the spacebar, then the upgrade link is shown within the ability.
If you make a custom ability and set the requirement to one or more of those player upgrades, then the ability will be unlocked after a commander with the upgrade(s) is selected. It is important that the new ability is added in the player ability list in the category 'army' > abilities.
Without that the ability will never be visible.
Posts: 12
Posts: 12
The lag is really bad, and happens no matter the map nor circumstances. We're talking freezing for multiple seconds with less than a second inbetween, rendering the match over because it's impossible for me to keep playing.
I have no idea what causes this, have you got the faintest clue? It is frustrating, usually it only happens mid way through the match but I find with more AIs present it happens earlier on.
My best guess is it's the AI attempting to do something it can't and getting confused or something, causing lag as it loops? It usually begins with a normal lag spike due to lots going on, and will then persist. I've disabled a lot of regular spawns and abilities as I wanted to "rebuild" CoH2 from the ground up, slowly re-adding bits once I'm happy with them.
For Context, my Mod aims to make the game mainly tank-focused, similarly to ones like Tank Combat 7.8, but with a lot more vehicles, unique abilities and functions, and better balance, creating a unique and more nuiansced experience while also being simpler and more straight forward than vanilla (I suck at vanilla, mainly an issue with paying attention and not floating resources / idling units)
Posts: 817 | Subs: 5
There are some settings in ai_settings\default_skirmish_<difficulty> to reduce the amount of parallel actions and how long it remembers locations. I set pathing_theat_memory_duration from 120 to 30. And I use in tatic_retry_timeout_defaults a minimum of 3 seconds.
Besides that, abilities with filters, aura's and interval_actions also have a bad impact on the performance. OKW's Forward Receivers is one example of an ability that causes lag (abilities\west_german\always_on_ability\dispatch_ability\sws_halftrack_forward_receivers). The combination of always_on with the timed_action should really be avoided. In this case, the animator_set_state action can be directly in the action_table, without the timer around it.
If lag appeared recently, then retrace your steps. What kind of changes did you make since the last test?
Posts: 12
Posts: 12
Posts: 12
I can then re-add them, as upgrades to the HQ for armies; picking any one would lock the rest out, and would then unlock that commanders abilities which I can modify to require that upgrade.
This way I would also have complete creative freedom with regards to giving which abilities to which commanders, no messing about with archtypes or anything of the sort.
Posts: 100 | Subs: 1
I don't know the specifics of your mod but my guesses are:
1. Pathing. Will take up the most processing power and maps are key. A map with bad pathing will lead to lag as units will not be able to move to where they want to. If you aren't already, use a 2v2 vanilla map.
2. Test conditions. If you're using cheat commands it'd be easy to just set your HQ as invincible and go afk. This is bad since the AI has trouble moving all of its forces to attack a base, even in vanilla. In general having idle units is bad for some reason and will cause a lot of lag.
3. Abilities. Units will scan an area around them constantly for the opportunity to use an ability. This will cause lag. You can consider removing some abilities for AI with an AI specific upgrade.
4. Units and popcap. If your mod has a lot of them then it's going to compound the issue.
Diagnosing the source of lag is very time consuming. Good luck.
Posts: 12
Windows 10 64-bit
Intel Core i5 7600 @ 3.50Ghz
32GB DDR4 Ram
MSI H110M ECO Motherboard
Intel HD Graphics 630 (no dedicated GPU)
I run the game in lowest settings. My mod has a lot of custom vehicles which you can build quickly and cheaply, and sets pop cap to 200 for all players, to allow for constant, large-scale tank battles. Almost all vehicles have at least 1 ability, and some have upgrades too.
I use Cheat Commands II simply to enable extra camera zoom and for placement of defense turrets (indestructible, immobile tanks with powerful guns I added that prevent the enemy AI zerg rushing our base territory, or make it costly to do so), and also I use the no win condition mode; I prefer to just infinitely fight. I do not set my HQ to invincible.
I play on lots of different maps, but only ones that look professionally made and are quite small, I do not play on big maps as I prefer close quarters, scrappy combat and don't like the long distances.
Posts: 12
Just had a new idea: I can completely remove commanders from the game, or rather just leave them useless with no abilities / functions.
I can then re-add them, as upgrades to the HQ for armies; picking any one would lock the rest out, and would then unlock that commanders abilities which I can modify to require that upgrade.
This way I would also have complete creative freedom with regards to giving which abilities to which commanders, no messing about with archtypes or anything of the sort.
Regarding this idea, I have attempted it with success; I now have a "Commander" that you can upgrade to on the ostheer HQ, which unlocks two tank deployment abilities. I just need to add more "Commanders" and make/re-enable abilities for them, and make the upgrades mutually exclusive.
Posts: 12
Posts: 100 | Subs: 1
Posts: 12
Posts: 12
Posts: 100 | Subs: 1
If you're really committed to diagnosing why it's lagging take FPS logs of both vanilla and your mod as baseline comparisons.
Then make a copy of your mod and start reverting changes half at a time. i.e. delete half of the things in the 'instances' folder for your copied mod, then see if there's lag. If it doesn't lag then the issue would be in the deleted half, if it does lag then delete half again. Repeat this process until you've narrowed it down.
This method is known as half splitting. It's useful but only if there's a singular cause. It also wont work if the cause is from two instances in conjunction i.e. a unit with an ability. For your purposes the causes would most likely be within the abilities, sbps, ebps, or any of the ai folders so I'd start by deleting those first.
You'll want to take extra care to not overwrite your mod with the copy. Ultimately it'd take several hours to diagnose but perhaps you'll get lucky.
Posts: 12
Livestreams
13 | |||||
871 | |||||
23 | |||||
20 | |||||
4 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.595215.735+10
- 3.34957.860+14
- 4.1101614.642+2
- 5.305114.728+1
- 6.916405.693-2
- 7.273108.717+24
- 8.721440.621+3
- 9.1041674.607-2
- 10.17146.788+1
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
8 posts in the last week
37 posts in the last month
Welcome our newest member, dreilandechode
Most online: 2043 users on 29 Oct 2023, 01:04 AM