AdrianeMapMaker
9 years ago
Quick Question:

What Do I need To Made New Faction ;Like Philippines

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Sponsor
acidbrain
9 years ago
Ask Klingon he is the only one over here who knows that.~
Panem et kirkinses
Annihilationzh
9 years ago
I've been working on a tutorial and I need someone to test it for me to make sure it's easy to use. So this is the perfect opportunity. Here's the first two steps. Tell me if you have any issues. I'll post more steps afterwards.


STEP 1: Creating a clone general


Creating a general with no unique features is actually very simple. So this is step 1. In this tutorial we're going to clone laser general, but the clone will have an extra dozer and a free fuel air bomb.

So first off, open up PlayerTemplate.ini and look for this code:

PlayerTemplate FactionAmericaLaserGeneral
  Side              = AmericaLaserGeneral
  BaseSide          = USA
  PlayableSide      = Yes
  StartMoney        = 0
  PreferredColor    = R:0 G:0 B:255
  IntrinsicSciences = SCIENCE_AMERICA
  PurchaseScienceCommandSetRank1  = Lazr_SCIENCE_AMERICA_CommandSetRank1
  PurchaseScienceCommandSetRank3  = Lazr_SCIENCE_AMERICA_CommandSetRank3
  PurchaseScienceCommandSetRank8  = Lazr_SCIENCE_AMERICA_CommandSetRank8
  SpecialPowerShortcutCommandSet  = Lazr_SpecialPowerShortcutUSA
  SpecialPowerShortcutWinName     = GenPowersShortcutBarUS.wnd
  SpecialPowerShortcutButtonCount = 10
  DisplayName       = INI:FactionAmericaLaserGeneral
  StartingBuilding  = Lazr_AmericaCommandCenter
  StartingUnit0     = Lazr_AmericaVehicleDozer
  ScoreScreenImage  = America_ScoreScreen
  LoadScreenImage   = SAFactionLogoPage_US
  LoadScreenMusic   = Load_USA
  ScoreScreenMusic  = Score_USA
  ;HeadWaterMark    = SCTempSelectPortrait ; don't use unless we add a "generalshead for non selected generals
  FlagWaterMark     = WatermarkUSA
  EnabledImage      = SSObserverUSA
  BeaconName        = MultiplayerBeacon
  SideIconImage     = GameinfoAMRCA
  GeneralImage      = USA_Laser
  OldFaction        = No   ; This faction was NOT available in the original Generals and should NOT be available if the oldFactionsOnly flag is set
  ArmyTooltip       = TOOLTIP:BioStrategyLong_Pos5
  Features          = GUI:BioFeatures_Pos5
  MedallionRegular  = LaserGeneral_slvr
  MedallionHilite   = LaserGeneral_blue
  MedallionSelect   = LaserGeneral_orng
End

So, to turn this into a separate general, we will copy and paste this code to the bottom of the file and make some modifications. Like so:

PlayerTemplate FactionNEWGENERAL  ; Rename to make this into a separate general.
  Side              = AmericaNEWGeneral ; This is for world builder categories and allows you to have a unique control bar.
  BaseSide          = USA
  PlayableSide      = Yes
  StartMoney        = 0
  PreferredColor    = R:0 G:0 B:255
  IntrinsicSciences = SCIENCE_AMERICA SCIENCE_DaisyCutter ; This is the free fuel air bomb.
  PurchaseScienceCommandSetRank1  = Lazr_SCIENCE_AMERICA_CommandSetRank1
  PurchaseScienceCommandSetRank3  = Lazr_SCIENCE_AMERICA_CommandSetRank3
  PurchaseScienceCommandSetRank8  = Lazr_SCIENCE_AMERICA_CommandSetRank8
  SpecialPowerShortcutCommandSet  = Lazr_SpecialPowerShortcutUSA
  SpecialPowerShortcutWinName     = GenPowersShortcutBarUS.wnd
  SpecialPowerShortcutButtonCount = 10
  DisplayName       = INI:FactionNEWGENERAL ; This will change the displayed name of your general.
  StartingBuilding  = Lazr_AmericaCommandCenter
  StartingUnit0     = Lazr_AmericaVehicleDozer
  StartingUnit1     = Lazr_AmericaVehicleDozer ; The Second dozer. I've added this entire line.
  ScoreScreenImage  = America_ScoreScreen
  LoadScreenImage   = SAFactionLogoPage_US
  LoadScreenMusic   = Load_USA
  ScoreScreenMusic  = Score_USA
  FlagWaterMark     = WatermarkUSA
  EnabledImage      = SSObserverUSA
  BeaconName        = MultiplayerBeacon
  SideIconImage     = GameinfoAMRCA
  GeneralImage      = USA_Laser
  OldFaction        = No
  ArmyTooltip       = TOOLTIP:BioStrategyLong_Pos5
  Features          = GUI:BioFeatures_Pos5
  MedallionRegular  = LaserGeneral_slvr
  MedallionHilite   = LaserGeneral_blue
  MedallionSelect   = LaserGeneral_orng
End
I've put comments in to show what I changed and why.

So now you can start up the game to make sure you haven't done anything wrong. It shouldn't crash. If you did it correctly, your new general will appear in the skirmish list with a weird name and there will be a very strange graphical glitch with the control bar when you play a match.



STEP 2: Fixing the bugs


You will need to create an entry in generals.csf to fix your general's name. The entry I created was INI:FactionNEWGENERAL as you can see in the above code (DisplayName). Alternatively, use this STR file as it's a lot simpler than using a csf editor. 

Next we'll fix the control bar. Open up ControlBarScheme.ini and look for the control bar you desire. Since this is a clone of laser general, I'm using laser general's controlbar.

ControlBarScheme AmericaLaserGeneral8x6
  ScreenCreationRes X:800 Y:600
  Side AmericaLaserGeneral

[...]

  PowerPurchaseImage GeneralsPowerWindow_American
End

Copy the huge lump of code and change the first and third lines to match your new general. Here's mine:

ControlBarScheme AmericaNEWGeneral8x6
  ScreenCreationRes X:800 Y:600
  Side AmericaNEWGeneral ; Must be the same as the side you've created in PlayerTemplate.ini

[...]

  PowerPurchaseImage GeneralsPowerWindow_American
End

Now you can start up the game to make sure you haven't done anything wrong. You should be able to play as your clone laser general without any bugs. At this point, you should now have a fully functioning new general and the next steps are to modify it to make it unique.
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.
klingondragon
9 years ago
I have a tutorial on my website . I'm currently working on updating it and making it easier to follow.

Until then it's good enough.
Annihilationzh
9 years ago

Until then it's good enough.

Originally Posted by: klingondragon 


The reason I started writing my tutorial is because of the sheer number of people PMing me because your tutorial doesn't work at all.

I'm not even saying it's just badly written; it will legitimately crash the game if you follow it precisely.
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.
klingondragon
9 years ago
Works fine for me (and no one's ever PMed me about it (and I would be the logical person to PM)). The main reason I'm updating it is to fix my sentence structure to clear up some confusion.
AdrianeMapMaker
9 years ago
Then ....
I will just them into a big with a directory of

-Data\INI\MyFaction.ini am i right ?







...And wait how about its Skirmish Ai Build List?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
Forget about big files until you actually finish your mod.
Then move your files to the big such that the file path starts with the folder directly below the game root (e.g.: Data, Art, Maps, etc.).

As for the skirmish stuff, I've never got that working. Because it works in conjunction with skirmish scripts, and I'm not a particularly good script writer(I can do all the logic and make it all do what I want, but I've never done anything as complex as a complete set of skirmish scripts).
AdrianeMapMaker
9 years ago
nope The Skirmish Ai Build List INI?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
I don't mess with it because ...

Because it works in conjunction with skirmish scripts ...

KlingonDragon wrote:


AdrianeMapMaker
9 years ago
Hey Klingon ...

As I Expected As Always ;In My First Time . The Game Crashes ; I Dont Know Why.


But Thanks Id See My Country In The Worldbuilder For A Minute Thanks Klingon😁
UserPostedImage

Here's The Code That I'd Imitate That You'd Being Contributed In Your Site ; Just Download The Zip,Thanks.

;-----------------------------------------------------------------------------------------------------
;-PlayerPhilippines---------------------------------------------------------------------------
;-----------------------------------------------------------------------------------------------------

;-PlayerTemplate------------------------------------------------------------------------------
PlayerTemplate FactionPhilippines
  Side              = Philippines
  PlayableSide      = Yes
  StartMoney        = 0
  PreferredColor    = R:0 G:0 B:255
  IntrinsicSciences = SCIENCE_AMERICA
  PurchaseScienceCommandSetRank1  = SCIENCE_Philippines_CommandSetRank1
  PurchaseScienceCommandSetRank3  = SCIENCE_Philippines_CommandSetRank3
  PurchaseScienceCommandSetRank8  = SCIENCE_Philippines_CommandSetRank8
  SpecialPowerShortcutCommandSet  = SpecialPowerShortcutUSA
  SpecialPowerShortcutWinName     = GenPowersShortcutBarUS.wnd
  SpecialPowerShortcutButtonCount = 5
  DisplayName       = INI:FactionPhilippines
  StartingBuilding  = PhilippinesCommandCenter
  StartingUnit0     = PhilippinesVehicleDozer
  ScoreScreenImage  = America_ScoreScreen
  LoadScreenImage   = SAFactionLogoPage_US
  LoadScreenMusic   = Load_USA
  ;HeadWaterMark    = SCTempSelectPortrait ; don't use unless we add a "generalshead for non selected generals
  FlagWaterMark     = WatermarkUSA
  EnabledImage      = SSObserverUSA
  BeaconName        = MultiplayerBeacon
  SideIconImage     = GameinfoAMRCA
End

;-ControlBarScheme----------------------------------------------------------------------
ControlBarScheme Philippines8x6
  ScreenCreationRes X:800 Y:600
  Side Philippines
  QueueButtonImage SCBigButton
  RightHUDImage SULogo
  BuildUpClockColor R:0 G:0 B:0 A:160
  ButtonBorderBuildColor R:67 G:108 B:190 A:255   ;blue
  ButtonBorderActionColor R:1 G:175 B:2 A:255     ;Green
  ButtonBorderUpgradeColor R:208 G:108 B:0 A:255  ;Orange
  ButtonBorderSystemColor R:207 G:195 B:2 A:255   ;yellow
  CommandBarBorderColor R:124 G:62 B:0 A:255   ;blue

  GenBarButtonIn SUBarButtonGen2IN
  GenBarButtonOn SUBarButtonGen2ON
  CommandMarkerImage SUEmptyFrame

  ToggleButtonUpIn SUMaxMinHU
  ToggleButtonUpOn SUMaxMinU
  ToggleButtonUpPushed SUMaxMinPU

  ToggleButtonDownIn SUMaxMinH
  ToggleButtonDownOn SUMaxMin
  ToggleButtonDownPushed SUMaxMinP

OptionsButtonDisabled SUOptionsI
BuddyButtonDisabled SUChatI
BeaconButtonDisabled SUBeaconI

  OptionsButtonEnable SUOptions
  OptionsButtonHightlited SUOptionsH
  OptionsButtonPushed SUOptionsP
  IdleWorkerButtonEnable SUWorkerE
  IdleWorkerButtonHightlited SUWorkerH
  IdleWorkerButtonPushed SUWorkerP
  IdleWorkerButtonDisabled SUWorkerI
  BuddyButtonEnable SUChat
  BuddyButtonHightlited SUChatH
  BuddyButtonPushed SUChatP
 
  BeaconButtonEnable SUBeacon
  BeaconButtonHightlited SUBeaconH
  BeaconButtonPushed SUBeaconP

  GeneralButtonEnable SUGeneral
  GeneralButtonHightlited SUGeneralH
  GeneralButtonPushed SUGeneralP
  GeneralButtonDisabled SUGeneralI

  UAttackButtonEnable SUUAttackI
  UAttackButtonHightlited SUUAttackH
  UAttackButtonPushed SUUAttackP

  MinMaxButtonEnable SUMinMax
  MinMaxButtonHightlited SUMinMaxH
  MinMaxButtonPushed SUMinMaxP

  MinMaxUL X:639 Y:433
  MinMaxLR X:698 Y:459
  GeneralUL X:722 Y:429
  GeneralLR X:787 Y:458
  UAttackUL X:184 Y:426
  UAttackLR X:206 Y:450
  
  OptionsUL X:195 Y:490
  OptionsLR X:229 Y:514
  WorkerUL X:195 Y:516
  WorkerLR X:229 Y:540
  ChatUL X:195 Y:568
  ChatLR X:229 Y:592
  BeaconUL X:195 Y:545
  BeaconLR X:229 Y:566
  PowerBarUL X:259 Y:470
  PowerBarLR X:537 Y:476

  GenArrow GLALevelUP

  MoneyUL X:360 Y:443
  MoneyLR X:439 Y:462
  ExpBarForegroundImage SUExpBar
  ImagePart
    Position X:0 Y:399
    Size X:800 Y:200
    ImageName InGameUIGLABase
    Layer 4 ;; layer means how deep the image will be drawn, it's a number between 0-5 with 0 being on top 
  End
End

;---------------------------------------------------------------------
;-NewFactionUnits--And Others------------------------------------
;---------------------------------------------------------------------

;Note :NewFactionUnits--And Others Are on the Zip


  00ProMod.zip (210kb) downloaded 60 time(s).
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
I'll have a look this afternoon.
I have to take my mum into town first.
klingondragon
9 years ago
Did you stop and test as you went along?

Can you tell me at what point things went wrong?

There seems to be problems with your mod which have nothing to do with the tutorial.
acidbrain
9 years ago
The commandset 'CommandSet SCIENCE_AMERICA_CommandSetRank1' is used twice so one must be renamed to 'CommandSet SCIENCE_Philippines_CommandSetRank1', you forgot to rename it...

The commandbutton 'Command_ConstructPhilippinesGattlingCannon' doesnt exist because it is 'Command_ConstructChinaGattlingCannon', you forgot to rename it...

Two typo mistakes, sjit happens...
Adriane there are two files in 'Command and Conquer Generals Data' called 'ReleaseCrashInfo' and 'ReleaseCrashInfoPrev', in these files you can see where the problem is and was, the prev file is the previous error...
This was in there when i started the game without changing stuff in your mod:

Release Crash at Wed Feb 08 17:31:03 2017
; Reason Error parsing INI file 'Data\INI\CommandSet.ini' (Line: 'CommandSet PhilippinesDozerCommandSet  ')


Last error:
Exception is access violation
WinMain at 4017d0
Error code: EXCEPTION_ACCESS_VIOLATION
Description: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Access address:00000004 was read from.

Stack Dump:
  <Unknown>(-1) : <Unknown> 0x0045630C
  <Unknown>(-1) : <Unknown> 0x6D6D6F43

Details:
Register dump...
Eip:0045630C	Esp:0018DB54	Ebp:0340AAD0
Eax:00000001	Ebx:0018E543	Ecx:05149050
Edx:0340AA50	Esi:00000000	Edi:00000000
EFlags:00010246 
CS:0023  SS:002b  DS:002b  ES:002b  FS:0053  GS:002b
EIP bytes dump...

Bytes at CS:EIP (0045630C)  : 8B 4E 04 85 C9 74 07 E8 B8 A5 FF FF 8B F0 8D 4C 24 20 C7 44 24 18 FF FF FF FF E8 55 C9 FB FF 85 


Current stack:
  <Unknown>(-1) : <Unknown> 0x77BB92E2
  <Unknown>(-1) : <Unknown> 0x77BB92B5

I commented out all the buttons in the commandset except the clear mines button and this error was there:

Release Crash at Wed Feb 08 17:47:10 2017
; Reason Error parsing INI file 'Data\INI\CommandSet.ini' (Line: 'CommandSet SCIENCE_AMERICA_CommandSetRank1  ')


Last error:


Current stack:
  <Unknown>(-1) : <Unknown> 0x77BB92E2
  <Unknown>(-1) : <Unknown> 0x77BB92B5

I changed 'CommandSet SCIENCE_AMERICA_CommandSetRank1' to 'CommandSet SCIENCE_Philippines_CommandSetRank1' and started to uncomment the buttons in the 'CommandSet PhilippinesDozerCommandSet' one at a time and tested if the game worked, when i uncommented 'Command_ConstructPhilippinesGattlingCannon' an error occured again so then i knew that there was something wrong with that button...
I showed you a way of seeking errors now so if you are smart you dont copy/paste stuff from my answer but you start to debug your own mod the way i just described, good for your learning curve...

I suggest you start using the 'ReleaseCrashInfo' files from now on.

Greetz
Panem et kirkinses
AdrianeMapMaker
9 years ago
Ohh Thanks Guysss!!!!!!!

Yeah Sure 'Acidbrain' Thanks For Reminding Me For The Info Crash Thanks
And Thanks For Your Tutorial Klingon .

Sorry For Disturbing You Klingon ; You Must Improved Makin Tutorials (In Part Of Making Powers).

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
The thing is, you're creating new powers. I just use existing ones. It really is as simple as copy a module and the purchase command. You don't need to mess around with special powers and sciences.
AdrianeMapMaker
9 years ago
Hey Guys Update:

It Worked Like A Charm Guys ; But Since Some Are Undone With Some Object CommandSets And The User Interface ;(Missing INI:FactionPhilippines).

Nice Tutorial.

Soon I Will Attach The Needs Of Modder So He/She Can Just Rename/Change it; With Credits of you.

By The Way How My Ai Philippines Build Their Buildings ? How
Using What?

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
The tutorial did tell you how to fix the UI stuff. csf editor.
AdrianeMapMaker
9 years ago
Yah ... I Know That Already ...

But New Problem is Arise How My Ai Philippines Build Buildings?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
The same way as you build your CC.
Make the object, make the command button, add the command button to the dozer command set.