General Category > AI War Classic - Mods & Modding

MOD: UI convenience / bug fixes

(1/3) > >>

AdamMil:
The devs have said that they have only a couple hours per week to work on community-requested features. Because of that, a day or two ago I decided to create a mod to implement some requested features from the Mantis bug tracker. I started by implementing the features that I personally requested, but I think some of these will be useful for everyone. I also did a bit of bug-fixing.

* #15634: structure (e.g. turret) templates
* #15635: shift-select a subset of the selected units
* #15636: right-clicking enemy ships in the planet overview/summary should attack them
* #15637: clicking an enemy or ally in the planet overview/summary deselects your ships
* #15638: planet-specific auto build engineers (etc) builds the wrong number
* #15639: show warnings / alerts in the galaxy view
* #15690: Bottom-aligned context menus overlap the global unit selection buttons
* #3836: Allow auto-build sliders in CTRLS to work without having techHere are the details.

#15634: structure (e.g. turret) templates
This feature lets you save templates for groups of structures that you frequently construct. For instance, if you have a standard layout of turrets that you place around wormholes or in a system, you can save the group as a template and easily build more copies of it. The templates are global, so you can share them between campaigns. Here's how it works. First, select the items you want to save as a template. The items have to be the kind that can be directly constructed, but they don't actually have to be "buildings". (They could be directly constructable ships if you wanted.) Then alt-right-click to open the context menu and choose to save the template. I implemented a system with a fixed number of template slots for simplicity.


Later, when you want to build the template, deselect everything and alt-right-click again to open the context menu. Choose the template you want to load.


Move the ghost where you want it. (If you're building very close to a wormhole, you may have to be precise in your positioning.)


Click to place the template. Time saved! This is great in multiplayer when you don't want to annoy everyone by pausing the game to get some defenses up. It also works with a mobile builder when you want to quickly set up a beachhead in enemy territory.


Note that if building the template would exceed the cap for a particular type of object, the error message displayed might not show the correct object name.


#15635: shift-select a subset of the selected units
This feature lets you easily select a subset of the selected units. For instance, if you have a large blob selected, you can easily select just the ships you want. Here's how it works. First, have some ships selected. Then, hold down shift and click on each of the ships you want in the list. They'll turn yellow to show that they're part of the pending selection. (Shift-alt-click, shift-ctrl-click, and shift-alt-ctrl-click should work as expected: Shift-click again or shift-alt-click to remove the ship from the pending selection. Shift-ctrl-click to add a whole class of ships to the selection. Shift-ctrl-click again or shift-alt-ctrl-click to remove a whole class of ships from the selection.)


Finally, release the shift key to make that the new selection!



#15636: right-clicking enemy ships in the planet overview/summary should attack them
#15637: clicking an enemy or ally in the planet overview/summary deselects your ships
These two features, together, make it a bit easier to control your ships in a battle. First, if you have ships selected, you can right-click an enemy icon to attack a ship of that type. Right-clicking again attacks the next enemy of that type. This works with shift-attacking too. For instance, if you want to make a quick raid on the enemy's tachyon guardians, and you see in the planet overview/summary that they have four of them, you can simply shift-right-click the tachyon guardian icon four times to quickly add all of them to the attack queue. You should also be able to right-click an icon for an allied ship to move your selected units to the allied ship (although I haven't tested it). The second feature makes the game not deselect your units if you click on icons for enemies or allies. Instead it just moves the camera. So if you move the camera to an enemy, you can immediately attack without having to reselect your ships. Alternately, you can jump to an ally to see how they're doing without losing control of your own ships.

#15638: planet-specific auto build engineers (etc) builds the wrong number
This feature allows the per-planet auto-build settings to override the global settings. Normally, the per-planet settings are added to the global settings, so if your global settings say to auto-build two Mk I engineers and your per-planet settings say to build one Mk I engineer, the planet will end up building three of them. It's impossible to have per-planet settings build fewer units than the global settings. The mod fixes that by making per-planet settings override the global settings, so in the previous example, only one engineer would be built rather than three. The mod also allows you to specify that no engineers should be built. That is, rather than having zero mean "use the global settings", it uses -1 for that, so you can specify a per-planet value of zero in order to disable auto-building on a specific planet.


Note that if you apply the mod to an existing campaign, you may need to adjust your auto-build settings because they'll start building different numbers of items, and because most planets will specify zero for the auto-building. If you start a new campaign, no adjustment should be needed.


#15639: show warnings / alerts in the galaxy view
I tend to spend a lot of time in the galaxy view to get an overview of everything that's happening, but the game hides alerts, messages, and your selection while in that view. Because of that, I've lost many planets due to being unable to see the "200 enemy ships on ImportantPlanet" etc. alerts. So I've made all that stuff visible on the galaxy view, although I tried to hide unimportant messages. Having the selection visible is also nice so you can monitor the progress of a battle (or some repair work) while remaining in the galaxy view, and instantly retreat your ships if they get too damaged.


If you want to hide them temporarily, perhaps because they're obscuring a planet, you can press the Ctrl key.

#15690: Bottom-aligned context menus overlap the global unit selection buttons
This bug causes certain context menus to overlap other buttons in the UI. That wouldn't be a problem except that the game fails to consider Z-order when processing button clicks, so if a context menu overlaps the buttons along the bottom of the game window you won't be able to click the last few items in the context menu because they'll activate the buttons instead. I didn't fix the click processing in general but I fixed the problem that caused the menu to overlap the buttons in the first place. I'm a big user of assault transports and being unable to choose some of the items from the special unload menu was a frequent annoyance for me.

#3836: Allow auto-build sliders in CTRLS to work without having tech
This issue prevents you from moving the auto-build sliders for Mk II and Mk III engineers if you don't have the tech yet. If you save the CTRLS to disk when you have the tech and then load it in a new campaign, you can end up with Mk2/3 sliders set to build several per planet and no way to disable them (because you can't adjust the sliders). Then, when you unlock the tech, they instantly get built everywhere even when you didn't want that. So I made it possible to move the sliders before you have the tech. Of course it doesn't actually auto-build them until you get it.

Other Notes
I haven't done extensive testing, especially in multiplayer, although I've played with the mod for about 20 hours in single player. I've only tested it in Windows, but I expect that it'll work on other operating systems. Let me know if you have any problems! Be aware that new game updates will overwrite the mod and you'll have to install it again. I do hope the developers include these features in the game because creating this mod was painful and maintaining it will be a chore. To the devs: I'd be happy to work together on getting some of these features into the base game!

Download and Installation
The mod can be downloaded from http://www.adammil.net/blog/v123_AI_War_UI_Mod.html. Installation instructions are there as well.

TechSY730:
On one hand, its awesome someone has been putting time into messing with game logic at this "deep" level. Something I played around with earlier, but was shy about really doing much due to EULA issues. (See below)

On the other hand, this doesn't seem practical to keep up with patches. Thanks to the somewhat monolithic nature of the code and data, everything would need to be reapplied after every update, which is in many cases, extremely frequent in the "Arcen world". Also, it could very easily come to a place where the patch won't work anymore if the code bass changes too much.

Also, there is multiplayer sync issues. The network model is, quite frankly, rather " brittle", it doesn't take much difference between the clients and the server to cause big desyncs.

Also, there is the potential EULA issues about dissasembly and modifying game files. I would need to reread it in detail to be sure about this. I think Chris (x4000) has stated he won't like personally go after a person for doing this (EDIT: but I am not an authoritative source on this), but it would still be rude to just violate EULAs without additional explicit permission from the devs.

You probably want to ask Chris (the lead dev and founder of Arcen) if it is OK to publish this sort of stuff just to be sure.

AdamMil:
Hey, thanks for the reply.


--- Quote from: TechSY730 ---this doesn't seem practical to keep up with patches... everything would need to be reapplied after every update, which is in many cases, extremely frequent in the "Arcen world". Also, it could very easily come to a place where the patch won't work anymore if the code bass changes too much.
--- End quote ---
That's all true, which is why I'm hoping that some of these can be included in the base game (especially construction templates and shift-selection, which are good time-savers and shouldn't be controversial). Since they don't have much time for community-requested features, I thought I'd help by doing most of the implementation work. :-P  In any case, I'll maintain the mod as long as I'm actively playing the game.


--- Quote from: TechSY730 ---Also, there is multiplayer sync issues. The network model is, quite frankly, rather " brittle", it doesn't take much difference between the clients and the server to cause big desyncs.
--- End quote ---
That is an important issue, but I did think about it and I don't believe these changes will cause any multiplayer sync problems. It should be fine if some people have the mod and others don't. (That said, I don't have anyone to test it with.)


--- Quote from: TechSY730 ---Also, there is the potential EULA issues about dissasembly and modifying game files.
--- End quote ---
Well, I was careful not to violate any agreements that I've made.


--- Quote from: TechSY730 ---You probably want to ask Chris (the lead dev and founder of Arcen) if it is OK to publish this sort of stuff
--- End quote ---
I thought it might be pretentious to interrupt him with a personal email or something. I figured he could respond on the forums if he wanted to...

Anyway, I just want to make the game better. :-)

Aklyon:
This sounds like it would be rather relevant to here.

keith.lamothe:
I can't speak for Chris on how he feels about this sort of thing, but other than that:

Wow :)  Out of curiosity, did you do this by decompiling the Assembly-CSharp.dll, changing the source, and recompiling?  I mean, I hope you didn't have to resort to hex editing or whatnot.

Also I hope you used the existing construction template stuff from the 3.189 era rather than re-implementing it yourself.  Iirc I discontinued that feature during the unity port due to some serialization issues (not specific to unity, it just hadn't been working properly at all and we hadn't noticed til then) and didn't get around to re-implementing it because often placing turrets and such is more case-by-case than that really allows.

Navigation

[0] Message Index

[#] Next page

Go to full version