randomperson
17 years ago
I am writing some of the upgrades for Generals British Forces and not being that experianced I don't understand how to write my own behavior moduals and what I want to do can't be copyed from existing code.

What I want to do is make an aircraft stelthed after an upgrade.

I also want to make units build quicker after an upgrade.

Are these even possible and if they are would it be possible to give sugestions on the code?
UserPostedImage
Sponsor
Me Myself and Pi
17 years ago
That's pretty tough to do. Even after creating the correct module, you'd need to make a command button. I'd recommend looking at other upgrades like Worker Shoes. I haven't experimented with this kind of stuff but maybe upgrades like that can be modified a little for price reduction. Also, you should be able to use that camouflage upgrade that rebels get for the air craft you want to modify.
randomperson
17 years ago

That's pretty tough to do. Even after creating the correct module, you'd need to make a command button. I'd recommend looking at other upgrades like Worker Shoes. I haven't experimented with this kind of stuff but maybe upgrades like that can be modified a little for price reduction. Also, you should be able to use that camouflage upgrade that rebels get for the air craft you want to modify.

Me Myself and Pi wrote:



I've already made other upgrades and done all the work except writing the behavior module. I used the Rebel code for the stealth, thanks for the tip
UserPostedImage
CG Apollos
17 years ago

That's pretty tough to do. Even after creating the correct module, you'd need to make a command button.

Me Myself and Pi wrote:


Are you kidding me? It's very easy to do!

What I want to do is make an aircraft stelthed after an upgrade.

randomperson wrote:


Is this a global upgrade or an individual unit upgrade?

I also want to make units build quicker after an upgrade.

randomperson wrote:


I'd have to look into that one; I know that price reduction is possible with a CostModifierUpgrade module tag (tech oil refinery), but I'm not 100% sure on build time reductions.
icewind
17 years ago
I know that build time reduction is possible.
But do you want it for every unit or just one kind of unit?
For every unit just take a look at the code used for the refinery.

For single units I don't think it's used in the original game but the Shockwave mod uses it.
You just have to copy the unit, add "Upgraded" or something to the name and change the build time.
Now you just have to copy a new command set and button for the building the unit is build but let it build the "upgraded" unit.
Now just make the upgrade itself change the command set of the building.
You can't blame me for my defeat, it's all the fault of my soldiers.
Making the web a weirder place, one forum at a time.
Derideal web comic.  Try it, it's good.
randomperson
17 years ago



What I want to do is make an aircraft stelthed after an upgrade.

AuroraAlphaHL2 wrote:


Is this a global upgrade or an individual unit upgrade?

randomperson wrote:

]

It dosn't matter now, I have done what i wanted to do



I also want to make units build quicker after an upgrade.

AuroraAlphaHL2 wrote:


I'd have to look into that one; I know that price reduction is possible with a CostModifierUpgrade module tag (tech oil refinery), but I'm not 100% sure on build time reductions.

randomperson wrote:



I might have to settle for that then, thanks for you help

UserPostedImage
randomperson
17 years ago
I am also trying to emulate the supply lines upgrade for america. I have found the code that tells the game how much to increse the capacity by but I can't find where this code is activated by the upgrade. There doesn't seem to be a behavior module and the command button is a standered one. Any ideas?
UserPostedImage
Me Myself and Pi
17 years ago
Did you look in the Upgrade.ini file? I think that's the one you're looking for.
randomperson
17 years ago
yes Upgrade_AmericaSupplyLines is the one but I can't find any code to do with this upgrade that activates a change in the code, is there one? if so where is it?
UserPostedImage
Me Myself and Pi
17 years ago
I did a search throughout the .ini files & couldn't find any code where I could change the percentage amount for the supply lines, but couldn't find it. I did find a few places where the cash bonus is manually put it. So for the Supply Drop Zone Crate, when the upgrade is purchased, $25 extra is added to the cash bonus. The same goes for the Oil Derrick. $20 is add to that too. But I couldn't find any percentages in reference to the supply lines. This is really weird. Is this what you're asking about?
randomperson
17 years ago
yes, I only want to do the standard increase though and I am completely stumped, I thought that it would be a standard modal but I can't find a reference anywhere
UserPostedImage
Me Myself and Pi
17 years ago
Yeah, I'm stumped myself. Another thing I tried is I renamed the supply lines upgrade in the hope the game would crash. Then I hoped that I could check the ReleaseCrashInfo.txt file to find where the source of the crash was. I made the change in the CommandSet.ini to be sure that that .ini file wouldn't cause the crash. When I tried the game, it game loaded up fine. But when I tested the supply lines upgrade, it had no affect on my chinooks. 😒 So my changes did affect the game.

Now, if the stuff that sets the percentage number is in an .ini file, I would've thought the game would crash. But it didn't.

So who knows how to change the number.