Suggestion: CO-exclusive units
Inspired by Sebastien Vakerics' fan designs for different units, I think there should be support for units that are exclusive to one or more COs. Maybe a variable that restricts a unit to being built by only specified COs, which could also be used to prohibit COs from building them.
i already thought about that idea. The only reason i didn't implemented it yet is the lack of units. I will contact Sebastien if i'm allowed to use his sprites. -> none the less i'll add an option to add custom specific units.
Okay added the option a CO can now say if a unit can be build in addition to the normal units of a building. See the new callback getCOUnits(co, building), where you can return the ID's of additional units. I tested it by allowing infantries to be build from any building. :D A CO can also make multiple units buildable.
Next step add CO specific units
And again thx for the idea. Makes it one more person who likes to have something like that
o7
Let that issue open. Pls. ;) Since the actual units are missing. Helps me to remember that it's not completed. Though i i apprieciate your efford.
Flak could finally have his Indirect Bombers.
Later on there could be a modding tutorial for adding new units/COs/gameplay adjustment patches.
As for modding take a look here: https://github.com/Robosturm/Commander_Wars/wiki/Commander-Wars-Modding-Tutorial If something is missing unclear give feedback and i'll try to adjust the wiki page.
I don't know where to ask this but I want to know: How do I update my build of the game? I want to try using this new feature you've implemented and try giving Flak his indirect bombers.
Hi GuardianTempest,
Not sure what you mean with "update my build". So i'm guessing: If you mean you downloaded and builded Commander Wars on your pc following this https://github.com/Robosturm/Commander_Wars/wiki/Build-Infrastructure Then you have to download the current source code version from github and recompile it that's all. If you mean to update your current Commander Wars Version just copy and replace your existing version with the released files. If you mean something different i need more details.
Kind regards Robosturm
Huh, well I didn't actually. I was wondering if it's possible to update the already-built using the updated files on Git, the resources to compile the app seemed pretty out of reach of my comprehension although I appreciate the tutorial (thanks for that).
EDIT: Wait, the current release is also updated? Huh, that's neat. I thought the changes would be ported to the next Beta...or perhaps I'm wrong?
EDIT2: Ah, there's a new Beta release, thanks!
flak_bombers v1.zip Thank you for waiting, here's my attempt at giving Indirect Bombers to Flak. I can't seem to make 'em exclusive to Airports and there's some bugginess with them as well (such as the battlefield not updating unless you press B/check the range of a unit). On the other hand, the easiest fix would be to change a parameter in the unit's file...
Constructor.prototype = UNIT;
var FLAKBOMBER = new Constructor();
to
Constructor.prototype = UNIT;
var BOMBER = new Constructor();
However it replaces Flak's default bombers as a consequence (I want both bombers available to him).
Hi i fixed the problem with the bombers not beeing only buildable with airports. Take a look at the flak script for that. Not sure what you mean with bugginess but i found a bug in the bomber script. I assume you don't have a sprite for the indirect bombers, but during a movement you wrote down to use those sprites i changed it to bombers, which should fix the bugginess. Here the changes: flak_bombers.v1.zip
Note: i found a bug which makes co-specific units not resupplyable. Fixed for the next release.
Thank you very much for the fixes as well as the helpful comments to let me understand what's going on. I wanted this to be part of the sample mods added in the release as a cheeky add-on (and also for for any other novice modders looking for examples).
There's still a few more adjustments to be done, though it's just increasing ammo to 9 and maybe i increasing max range to 4.
if you are done tell me or if you need some more infos I'll try to give you the information you need.
Right. It's functionally complete and ready for adding, but the only bug remaining is that the main unit portrait doesn't display. As far as the code goes, it should use the bomber's close-up image but in-game it doesn't. Maybe it's just me, or it's already fixed in the next build.
I guess you missed the close up scripts. Create a Folder script/battleanimations/ in the mod and copy the BATTLEANIMATION_BOMBER Script from the main files and change it like you changed the bomber unit script.
The game seperates the close up or battleanimation sprites and the unit scripts.
Take a look here for some details about Battleanimations. Note this is the documentation for the upcoming Beta 6. ;) https://github.com/Robosturm/Commander_Wars/wiki/Commander-Wars-Battleanimation-System
Thank you, the fix works. Interesting documentation, complicated but it seems pretty neat so far. The bottom two sections might confuse new readers for being giant blocks of text and the code comments aren't parsed (and would seem like random asterisks).
Well i tried to reduce the battleanimations to an as simple as possible approach. And i tried to write down the sequence in which the animations are played forming an actual animation. Fixed the wrongly parsed comments. -> github showed it correctly in the preview....