Jump to content
DerelictStudios Forums
Sign in to follow this  

While I'm Here... Are Special Powers Hardcoded Or Am I An Idiot?

Recommended Posts

Is there some kind of limit on special powers? I'm trying to clone the Bloodhound power so I can fly in other stuff rather than have it built in a warfactory, but for some reason I can't make another bloodhound-style support power. I can edit the old one, but whenever I try to clone it the button doesn't appear in the upper left. I think I did everything, but either it's hardcoded or there's something else I have to do.


I've added (cloned and name changed, that's it) the entries in SpecialPowerTemplate, LogicCommand, LogicCommandSet, ObjectCreationList, and the relative object the power is attached to, but nothing. My LogicCommand and LogicCommandSet entries are actually in the same file as the unit with this power, because my LogicCommand and ...Set .xmls came with random things missing and give me errors when I compile them.


Any advice would be appreciated.

Share this post

Link to post
Share on other sites

Nope it's not hardcoded but you need to add it to a looooot of places...


You need to add it to the



Also make sure you add it to the


in the main



Finally, make sure you actually define the button you want to appear, this needs to be done in the


and I think also in the



I think that is everything...


gl :)

Share this post

Link to post
Share on other sites

oof sorry, I've messed about with the names a little, the cnc3 one is called


it's in the /GlobalData folder with the other stuff


Also "UnitAbilityButtons" should be



hope that sorts you out ;)

Share this post

Link to post
Share on other sites

When editing the UnitAbilityButtonTemplateStore and PlayerPowerButtonTemplateStore be aware that these listings are game assets as a whole, you can´t just pull out one button and edit it like you could edit a single weapon template in it´s own file but must modify the complete ButtonTemplateStore. Also, you must change the ID of the ButtonTemplateStore that you edited, else the game will use the original one.

Edited by Golan

Share this post

Link to post
Share on other sites

Ugh damn, yeah another issue is that the new listing generally overwrites the old one, so you must include any buttons you want from the existing game in your new file.

Share this post

Link to post
Share on other sites

Ok, well, I think I've done all that, but it still isn't working. I think it's something to do with the command button, since if I edit everything other than that it works. Not sure what to make of this.

Edited by Accele

Share this post

Link to post
Share on other sites

No, it's still just refusing to work. No button is showing up or anything.


I've got time now, so I'm going to post what I've got here. This is for a unit called "FCS"


In SpecialPowerTemplates.xml

<!--		<GameDependency>
	</GameDependency> -->


In PlayerPowerButtonTemplates.xml


				Description="DESC:PlayerPowerBloodhound" />


In PlayerSpellBook

		<!-- US Call Support FCS -->


In LogicCommand



In LogicCommandSet (note that I'm simply adding the Cmd to GDIAirTowerCommandSet, I did correctly switch the CommandSet on my calling-it-in object to reflect that.



Also, later in LogicCommandSet...



In USCommandVehicle (this power is going to be deployed from a vehicle... to give a more overarching idea of what I'm doing: I'm trying to make one side with no base, just a command vehicle that calls for reinforcements. More flexible, more mobile, but of course less capable of holding ground and subject to getting the command vehicle blown up.


Anyway, in <behaviors>...



and later....



And the OCL it links to is fine. I checked by leaving everything else untouched except switching the OCL to my new one. And my mod.xml is fine.


I've also been able to simply add the unedited Bloodhounds power to the USCommandVehicle, so I know it works on vehicles.


Thanks for the help so far guys, I appreciate it.

Edited by Accele

Share this post

Link to post
Share on other sites

Ok, well, it works now. I still have no fucking clue exactly what I did (I just deleted it all and started over using the A10 mod example code as a base), although the playerpowerbutton thing helped a lot, because I was totally missing that when I originally made this thread.


Again, thanks a lot for the help guys. Hopefully I don't lose interest in this mod in a few weeks, lol.

Share this post

Link to post
Share on other sites

Yeah when I was having problems with my button in that thread I linked it was something wrong in the code somewhere, starting from scratch resolved the problem.

Share this post

Link to post
Share on other sites

Sometimes you need to flush the cache

CnC3\MOD SDK\BuiltMods\mods\mec2\data

(the contents of this folder)


I saved about 20% off the size of the latest mec build by doing this :o


The compiler seems really bad about clearing out its unused or old data.

Share this post

Link to post
Share on other sites

Speaking of that, I've discovered that a lot of times it will just refuse to override your old files with updated versions of them. Regular builtmods flushing is becoming important. It's weird though, the mod only got that way once it got big.


Anyway, another question. I've been hunting through the SkirmishAI stuff, and I'm looking for a way to make the AI use the specialpower I described in this thread. I suspect it's possible, although I admit I haven't seen the AI use Bloodhounds or Sniper Teams or the infantry one in combat, but they have used the Orca bombing run special and obviously will use Superweapons. Which all work on the same principle, right?


Anyway, I've got one side that exclusively calls things in (no base) so if I'm going to have any AI work at all I need to be able to do this. I've been looking through it for a little while now and I'm not seeing a good starting point, although I think I'm fairly familiar with what all the files are for.


If anyone has any advice on how to make the AI use a bloodhounds-style reinforcement it'd be much appreciated. Even more so if you can figure out a way to make them use the reinforcement and then do something with the units after, but honestly as long as it's sort-of halfway functional I'll be pleased.

Share this post

Link to post
Share on other sites

I guess, that's scripted stuff made with the World Builder. The xml's handle one general part, the sripts obviously the more detailed rest of how skirmish troops behave. You'd need to get the original Skirmish scripts for this if you don't want to rebuild them completely.

Edited by Dibelius

Share this post

Link to post
Share on other sites

How could I get a hold of the originals? I haven't heard anything about them, I didn't even think C&C3 used them at all.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this