nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
looking to update the button image on the paladin purchase. i have it so it upgrades the paladin to elite status, i was just hoping to show that image on the purchase science window. it shows up on the war factory after i purchase the science.

curiosity question, is it possible to make it so it costs money to use all these special powers, particle cannon, carpetbomb, etc.??

and finally(i hope) i was trying to get the daisy cutter AND the MOAB. im going to explain this as best i can. i don't want to use the leaflet drop for the daisy cutter, but i will if i have to. i copied that code from the daisycutter to the leaflet drop and it worked but i couldn't change the button image from the leafletdrop to the daisycutter. i removed the upgrade to the MOAB from the AmericaStrategyCenter in commandset. i want to move that upgrade to the purchase science window at level 8 and have it as its own weapon, not an upgrade. can u, Annihilationzh, post code to help me out.




Sponsor
CommieDog
16 years ago

looking to update the button image on the paladin purchase. i have it so it upgrades the paladin to elite status, i was just hoping to show that image on the purchase science window. it shows up on the war factory after i purchase the science.

nimitz03 wrote:


You mean the image of the chevrons superimposed on the unit cameo? You'll have to make it yourself.

curiosity question, is it possible to make it so it costs money to use all these special powers, particle cannon, carpetbomb, etc.??

nimitz03 wrote:


No.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Annihilationzh
16 years ago

and finally(i hope) i was trying to get the daisy cutter AND the MOAB. im going to explain this as best i can. i don't want to use the leaflet drop for the daisy cutter, but i will if i have to. i copied that code from the daisycutter to the leaflet drop and it worked but i couldn't change the button image from the leafletdrop to the daisycutter.


Change the image on the commandbutton.

i removed the upgrade to the MOAB from the AmericaStrategyCenter in commandset. i want to move that upgrade to the purchase science window at level 8 and have it as its own weapon, not an upgrade.


Then copy the daisycutter code in Commandbutton.ini, CommandSet.ini, SpecialPower.ini and the command center, rename them and adapt it to what you want.

can u, Annihilationzh, post code to help me out.


There's a fine line between helping and doing it for you.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
sorry, Annihilationzh, for crossing that line, i was just fusterated with this last deal. every change i made caused the serious error box to pop up, thankfully i had backups. i will work on this tonight and post my results later. thanks commiedog, and special thanks to u Annihilationzh, for all the help you have given with my entire project.
nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
what exactly do i change in the command center?
nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
OK so far...

SpecialPower SuperweaponLeafletDrop
Enum = SPECIAL_DAISY_CUTTER
ReloadTime = 360000 ; in milliseconds
RequiredScience = SCIENCE_DaisyCutter
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 30000 ; Lifetime of a Look done belonging to the firing player
ViewObjectRange = 250 ; And how far it can see
RadiusCursorRadius = 170 ; shared by MOAB
ShortcutPower = Yes ;Capable of being fired by the side-bar shortcut.
AcademyClassify = ACT_SUPERPOWER ;Considered a powerful special power that a player could fire. Not for simpler unit based powers.
Not for simpler unit based powers.
End

CommandButton Command_LeafletDrop
Command = SPECIAL_POWER
SpecialPower = SuperweaponDaisyCutter
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_DaisyCutter SCIENCE_MOAB ;These will cause the buttons to change icons, nothing more
TextLabel = CONTROLBAR:DaisyCutter
ButtonImage = SACDaisyCutter
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipDaisyCutter
RadiusCursorType = DAISYCUTTER
InvalidCursorName = GenericInvalid

End

CommandButton Command_LeafletDropFromShortcut
Command = SPECIAL_POWER_FROM_SHORTCUT
SpecialPower = SuperweaponDaisyCutter
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_DaisyCutter SCIENCE_MOAB ;These will cause the buttons to change icons, nothing more
TextLabel = OBJECT:DaisyCutterBomb
ButtonImage = SACDaisyCutter
; ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipDaisyCutter
RadiusCursorType = DAISYCUTTER
InvalidCursorName = GenericInvalid

End

CommandSet AmericaCommandCenterCommandSet
1 = Command_ConstructAmericaDozer
2 = Command_EmergencyRepair
3 = Command_SpySatelliteScan
4 = Command_SpyDrone
5 = Command_Paradrop
7 = Command_A10ThunderboltMissileStrike
8 = Command_LeafletDrop
9 = AirF_Command_SpectreGunship
10 = Command_DaisyCutter ;NOTE THIS GETS UPGRADED BELOW
11 = Command_FireParticleUplinkCannonFromShortcut
12 = AirF_Command_CarpetBomb
13 = Command_SetRallyPoint
14 = Command_Sell
End


nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
i meant to ad this as well

CommandSet SCIENCE_AMERICA_CommandSetRank3
1 = Command_PurchaseScienceSpectreGunship1
2 = Command_PurchaseScienceSpectreGunship2
3 = Command_PurchaseScienceSpectreGunship3
4 = Command_PurchaseScienceA10ThunderboltMissileStrike1
5 = Command_PurchaseScienceA10ThunderboltMissileStrike2
6 = Command_PurchaseScienceA10ThunderboltMissileStrike3
7 = Command_PurchaseScienceEmergencyRepair2
8 = Command_PurchaseScienceEmergencyRepair3
10 = Command_PurchaseScienceParadrop2
11 = Command_PurchaseScienceParadrop3
13 = Command_PurchaseScienceLeafletDrop

CommandSet SpecialPowerShortcutUSA
1 = Command_SpyDroneFromShortcut
2 = Command_ParadropFromShortcut
3 = Command_A10ThunderboltMissileStrikeFromShortcut
4 = Command_EmergencyRepairFromShortcut
5 = Command_DaisyCutterFromShortcut
6 = Command_FireParticleUplinkCannonFromShortcut
7 = Command_SpySatelliteScanFromShortcut
8 = AirF_Command_SpectreGunshipFromShortcut
9 = Command_LeafletDropFromShortcut
10 = AirF_Command_CarpetBombFromShortcut

END
Annihilationzh
16 years ago

what exactly do i change in the command center?


I was referring to creating a new power, not editing an existing one. So it's not applicable.

You have:
SpecialPower = SuperweaponDaisyCutter
In the two CommandButton entries.
You need:
SpecialPower = SuperweaponLeafletDrop

Otherwise you'll have two buttons deploying the same ability.

Plus:
13 = Command_PurchaseScienceLeafletDrop
is obsolete if you're going to use SCIENCE_DaisyCutter.

sorry, Annihilationzh, for crossing that line


It's a lot faster when you know how to do everything by yourself. Far better for you to learn than for me to do it for you.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
if i had hair id be pulling it out, if this was my job, maybe you shouldn't have hired me, lol. i made the neccessary changes and i still get the error. i feel like im in over my head now. it's tempting to quit this, but ive come to far to stop now. theres gotta be an easier way to do this.

i have to go on record first by saying this, it would be so much easier if the original programmers didn't make 4 of everything, so much BS code in this game, it's not funny anymore, its stupid. and they wonder why the game crashes so much. i think entire forum would agree with me on this.

i don't know what im doing wrong. some guidence is needed.
Annihilationzh
16 years ago
I give up. I'm just going to post the code, it's far less time consuming.

In specialpower.ini I replaced the existing daisycutter and moab with these:

;-----------------------------------------------------------------------------
SpecialPower SuperweaponDaisyCutter
Enum = SPECIAL_DAISY_CUTTER
ReloadTime = 360000 ; in milliseconds
RequiredScience = SCIENCE_DaisyCutter
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 30000 ; Lifetime of a Look done belonging to the firing player
ViewObjectRange = 250 ; And how far it can see
RadiusCursorRadius = 170 ; shared by MOAB
ShortcutPower = Yes ;Capable of being fired by the side-bar shortcut.
AcademyClassify = ACT_SUPERPOWER ;Considered a powerful special power that a player could fire. Not for simpler unit based powers.
End

;-----------------------------------------------------------------------------
SpecialPower SuperweaponMOAB
Enum = SPECIAL_DAISY_CUTTER ;Stays as daisy cutter, because this is really an upgrade to the original...
ReloadTime = 360000 ; in milliseconds
RequiredScience = SCIENCE_MOAB
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 30000 ; Lifetime of a Look done belonging to the firing player
ViewObjectRange = 250 ; And how far it can see
RadiusCursorRadius = 170
ShortcutPower = Yes ;Capable of being fired by the side-bar shortcut.
AcademyClassify = ACT_SUPERPOWER ;Considered a powerful special power that a player could fire. Not for simpler unit based powers.
End


In factionbuilding.ini, I went to the command center and changed the following:

Behavior = OCLSpecialPower ModuleTag_20
SpecialPowerTemplate = SuperweaponDaisyCutter
UpgradeOCL = SCIENCE_MOAB SUPERWEAPON_MOAB
OCL = SUPERWEAPON_DaisyCutter
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
End

Into:

Behavior = OCLSpecialPower ModuleTag_20
SpecialPowerTemplate = SuperweaponDaisyCutter
OCL = SUPERWEAPON_DaisyCutter
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
End
Behavior = OCLSpecialPower ModuleTag_MOAB
SpecialPowerTemplate = SuperweaponMOAB
OCL = SUPERWEAPON_MOAB
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
End


In CommandButton.ini, I placed the following at the bottom of the file:

CommandButton Command_MOAB
Command = SPECIAL_POWER
SpecialPower = SuperweaponMOAB
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_MOAB
TextLabel = CONTROLBAR:UpgradeAmericaMOAB
ButtonImage = SAMOAB
DescriptLabel = CONTROLBAR:TooltipUSAUpgradeMOAB
RadiusCursorType = DAISYCUTTER
InvalidCursorName = GenericInvalid
End

CommandButton Command_MOABFromShortcut
Command = SPECIAL_POWER_FROM_SHORTCUT
SpecialPower = SuperweaponMOAB
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
Science = SCIENCE_MOAB
TextLabel = CONTROLBAR:UpgradeAmericaMOAB
ButtonImage = SAMOAB
DescriptLabel = CONTROLBAR:TooltipUSAUpgradeMOAB
RadiusCursorType = DAISYCUTTER
InvalidCursorName = GenericInvalid
End

Then I edited:

CommandButton Command_FAKECOMMAND_PurchaseScienceMOAB
Command = PURCHASE_SCIENCE
Options = SCRIPT_ONLY ;Hide it so we can't purchase it in the interface.
Science = SCIENCE_MOAB
ButtonImage = SAMOAB ;Copy this image when DaisyCutter has MOAB science.
TextLabel = CONTROLBAR:MOAB ;Used for controlbar button (with hotkey)
ConflictingLabel = OBJECT:MOAB ;Used for shortcut button (no hotkey)
DescriptLabel = CONTROLBAR:TooltipMOAB ;Copy this text when DaisyCutter has MOAB science.
End

into:

CommandButton Command_FAKECOMMAND_PurchaseScienceMOAB
Command = PURCHASE_SCIENCE
Science = SCIENCE_MOAB
ButtonImage = SAMOAB
ButtonBorderType = ACTION
TextLabel = CONTROLBAR:MOAB
ConflictingLabel = OBJECT:MOAB
DescriptLabel = CONTROLBAR:TooltipMOAB
End

In Science.ini:

This:

Science SCIENCE_MOAB
PrerequisiteSciences = SCIENCE_AMERICA
SciencePurchasePointCost = 0; note that this means "not purchasable", NOT "free"!
IsGrantable = Yes
End

Became:

Science SCIENCE_MOAB
PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank5
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = CONTROLBAR:UpgradeAmericaMOAB
Description = CONTROLBAR:TooltipMOAB
End



In CommandSet.ini:

CommandSet SpecialPowerShortcutUSA
1 = Command_SpyDroneFromShortcut
2 = Command_ParadropFromShortcut
3 = Command_A10ThunderboltMissileStrikeFromShortcut
4 = Command_EmergencyRepairFromShortcut
5 = Command_DaisyCutterFromShortcut
6 = Command_FireParticleUplinkCannonFromShortcut
7 = Command_SpySatelliteScanFromShortcut
8 = Command_CIAIntelligenceFromShortcut
9 = Command_SpectreGunshipFromShortcut
10 = Command_LeafletDropFromShortcut
END

Became:

CommandSet SpecialPowerShortcutUSA
1 = Command_SpyDroneFromShortcut
2 = Command_ParadropFromShortcut
3 = Command_A10ThunderboltMissileStrikeFromShortcut
4 = Command_EmergencyRepairFromShortcut
5 = Command_DaisyCutterFromShortcut
6 = Command_FireParticleUplinkCannonFromShortcut
7 = Command_SpySatelliteScanFromShortcut
8 = Command_CIAIntelligenceFromShortcut
9 = Command_SpectreGunshipFromShortcut
10 = Command_MOABFromShortcut
END

And I added button 11 here:

CommandSet AmericaCommandCenterCommandSet
1 = Command_ConstructAmericaDozer
2 = Command_SpectreGunship
4 = Command_LeafletDrop
5 = Command_A10ThunderboltMissileStrike
6 = Command_Paradrop
7 = Command_SpyDrone
8 = Command_EmergencyRepair
9 = Command_DaisyCutter
10 = Command_SpySatelliteScan
11 = Command_MOAB ;<--- this one
13 = Command_SetRallyPoint
14 = Command_Sell
End

And:

CommandSet SCIENCE_AMERICA_CommandSetRank8
1 = Command_PurchaseScienceDaisyCutter
2 = Command_PurchaseScienceLeafletDrop
3 = Command_PurchaseScienceSpectreGunship
4 = Command_FAKECOMMAND_PurchaseScienceMOAB
END

This does not need to be changed, but I suspect you might have changed it, so to be safe, I'm including it.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
the module of the americacommandcenter and the options line was screwing me up. im still looking at the code. for me it's alot easier to see what i was doing wrong, when i see how it is done right. im not just copying and pasting the code like you probly think, i reading it and trying to understand it and learn from it. gimme a couple minutes, and i will update.
nimitz03
  • nimitz03
  • 66.5% (Friendly)
  • Private Topic Starter
16 years ago
success!! i want to take this time and thank you for your patience through this entire ordeal. in retrospect i think alot of the confusion on my part came from the fact i used the leaflet drop instead of coping and pasting like i should have done in the first place. note, the button image for the daisycutter is the same AFTER the science is purchased, so on the shortcut list and the commandcenter ive got two images of the MOAB, but both drop there respective payloads. i will figure out myself how to change the button images. ive got a couple more minor tweaks and ill be done with USA. i hope you don't mind but ive got a couple more questions, lol. on the firebases, can i limit the attack rotation to 180 degrees? ive increased the range and power of it, and when, like say a sneak attack happens, all turrets turn towards the threat, u get the picture. better yet, can u limit the attacks to specifically armor, ignoring attacking infantry. just a thought. another question, can i delete all the BS code, like inside the specific generals files. for example, inside superweaponsgeneral.ini, i only used the power plant, emp patriot, aurora, and the weapons pertaining to it, can i delete the barracks on down? can i move what i keep into the factionbuilding, americaair, americavehicle, respectively, and then delete those specific generals files?

like i said before thank you for your input and especially your patience
Annihilationzh
16 years ago

on the firebases, can i limit the attack rotation to 180 degrees?


I don't think so.

better yet, can u limit the attacks to specifically armor, ignoring attacking infantry.


The best way to do this is to give it another damage type that doesn't harm infantry. That way it won't attack them at all.

another question, can i delete all the BS code, like inside the specific generals files. for example, inside superweaponsgeneral.ini, i only used the power plant, emp patriot, aurora, and the weapons pertaining to it, can i delete the barracks on down? can i move what i keep into the factionbuilding, americaair, americavehicle, respectively, and then delete those specific generals files?


You can if you also remove any linked code in the other files, but I don't know why you would, it's pointless. You can completely remove all generals by changing "StartsEnabled = yes" in ChallengeMode.ini to "StartsEnabled = no"
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.