Posted by: AdrianeMapMaker - Thursday, February 2, 2017 5:10:37 AM
[b]Quick Question:
What Do I need To Made New Faction ;Like Philippines[/b]
Posted by: acidbrain - Thursday, February 2, 2017 5:21:22 AM
Ask Klingon he is the only one over here who knows that.~
Posted by: Annihilationzh - Thursday, February 2, 2017 7:34:49 AM
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:
[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[/code]
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:
[code=plain]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[/code]
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, [url=http://www.cnclabs.com/forums/cnc_postsm61967_-Public-Sources.aspx#post61967]use this STR file as it's a lot simpler than using a csf editor.[/url]
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.
[code]ControlBarScheme AmericaLaserGeneral8x6
ScreenCreationRes X:800 Y:600
Side AmericaLaserGeneral
[...]
PowerPurchaseImage GeneralsPowerWindow_American
End[/code]
Copy the huge lump of code and change the first and third lines to match your new general. Here's mine:
[code]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[/code]
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.
Posted by: klingondragon - Thursday, February 2, 2017 8:20:35 AM
I have a [url=http://klingondragon.16mb.com/generals/new]tutorial on my website[/url]. I'm currently working on updating it and making it easier to follow.
Until then it's good enough.
Posted by: Annihilationzh - Thursday, February 2, 2017 3:23:25 PM
[quote=klingondragon;143387]Until then it's good enough.[/quote]
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.
Posted by: klingondragon - Thursday, February 2, 2017 7:59:46 PM
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.
Posted by: AdrianeMapMaker - Friday, February 3, 2017 1:57:49 AM
[b]Then ....
I will just them into a big with a directory of
-Data\INI\MyFaction.ini am i right ?[/b]
[b]...And wait how about its Skirmish Ai Build List?[/b]
Posted by: klingondragon - Friday, February 3, 2017 4:09:57 AM
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).
Posted by: AdrianeMapMaker - Friday, February 3, 2017 4:29:16 AM
nope The Skirmish Ai Build List INI?
Posted by: klingondragon - Friday, February 3, 2017 8:56:06 AM
I don't mess with it because ...
[quote=KlingonDragon]Because it works in conjunction with skirmish scripts ...[/quote]
Posted by: AdrianeMapMaker - Wednesday, February 8, 2017 4:39:38 AM
Posted by: klingondragon - Wednesday, February 8, 2017 5:50:53 AM
I'll have a look this afternoon.
I have to take my mum into town first.
Posted by: klingondragon - Wednesday, February 8, 2017 10:09:16 AM
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.
Posted by: acidbrain - Wednesday, February 8, 2017 11:52:10 AM
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:
[code]
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:
(-1) : 0x0045630C
(-1) : 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:
(-1) : 0x77BB92E2
(-1) : 0x77BB92B5
[/code]
I commented out all the buttons in the commandset except the clear mines button and this error was there:
[code]
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:
(-1) : 0x77BB92E2
(-1) : 0x77BB92B5
[/code]
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
Posted by: AdrianeMapMaker - Thursday, February 9, 2017 3:08:28 AM
[b]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).[/b]
Posted by: klingondragon - Thursday, February 9, 2017 6:53:29 AM
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.
Posted by: AdrianeMapMaker - Friday, February 10, 2017 6:19:14 PM
[b]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?[/b]
Posted by: klingondragon - Friday, February 10, 2017 6:38:53 PM
The tutorial did tell you how to fix the UI stuff. csf editor.
Posted by: AdrianeMapMaker - Friday, February 10, 2017 6:46:11 PM
Yah ... I Know That Already ...
But New Problem is Arise How My Ai Philippines Build Buildings?
Posted by: klingondragon - Saturday, February 11, 2017 7:20:32 AM
The same way as you build your CC.
Make the object, make the command button, add the command button to the dozer command set.
Posted by: acidbrain - Saturday, February 11, 2017 9:35:55 AM
[code=plain]
SideInfo America
ResourceGatherersEasy = 2
ResourceGatherersNormal = 2
ResourceGatherersHard = 2
BaseDefenseStructure1 = AmericaPatriotBattery ;PhilippinesGattlingCannon in your case
; You can change these to your own sciences if they are ready
SkillSet1
Science = SCIENCE_PaladinTank
Science = SCIENCE_StealthFighter
Science = SCIENCE_A10ThunderboltMissileStrike1
Science = SCIENCE_A10ThunderboltMissileStrike2
Science = SCIENCE_A10ThunderboltMissileStrike3
Science = SCIENCE_SpectreGunshipSolo
Science = SCIENCE_DaisyCutter
End
SkillSet2
Science = SCIENCE_PaladinTank
Science = SCIENCE_StealthFighter
Science = SCIENCE_Pathfinder
Science = SCIENCE_Paradrop1
Science = SCIENCE_Paradrop2
Science = SCIENCE_Paradrop3
Science = SCIENCE_DaisyCutter
End
End
;Skirmish AI Build List
SkirmishBuildList America
Structure AmericaCommandCenter
Location = X:501.22 Y:546.25
Rebuilds = 0
Angle = -135.00
InitiallyBuilt = No
AutomaticallyBuild = Yes
END ;Structure AmericaCommandCenter
Structure AmericaPowerPlant
Location = X:770.43 Y:727.79
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaPowerPlant
Structure AmericaPowerPlant
Location = X:759.90 Y:555.84
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaPowerPlant
Structure AmericaPowerPlant
Location = X:374.82 Y:371.69
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaPowerPlant
Structure AmericaPowerPlant
Location = X:477.11 Y:174.62
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaPowerPlant
Structure AmericaPowerPlant
Location = X:189.19 Y:522.00
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaPowerPlant
Structure AmericaPowerPlant
Location = X:418.35 Y:827.10
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaPowerPlant
Structure AmericaAirfield
Location = X:767.04 Y:376.40
Rebuilds = 0
Angle = -135.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaAirfield
Structure AmericaBarracks
Location = X:247.52 Y:734.59
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaBarracks
Structure AmericaParticleCannonUplink
Location = X:594.59 Y:635.72
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaParticleCannonUplink
Structure AmericaStrategyCenter
Location = X:384.36 Y:652.24
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaStrategyCenter
Structure AmericaSupplyDropZone
Location = X:515.66 Y:347.88
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaSupplyDropZone
Structure AmericaSupplyDropZone
Location = X:637.41 Y:490.20
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaSupplyDropZone
Structure AmericaSupplyDropZone
Location = X:488.83 Y:760.27
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaSupplyDropZone
Structure AmericaSupplyDropZone
Location = X:322.39 Y:502.03
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaSupplyDropZone
Structure AmericaWarFactory
Location = X:650.93 Y:843.45
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaWarFactory
Structure AmericaWarFactory
Location = X:259.56 Y:289.71
Rebuilds = 0
Angle = -135.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaWarFactory
Structure AmericaPatriotBattery
Location = X:676.07 Y:670.51
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
END ;Structure AmericaPatriotBattery
END ;SkirmishBuildList FactionAmerica
[/code]
Posted by: AdrianeMapMaker - Saturday, February 11, 2017 11:13:37 PM
Thanks , Guys.
But However i Noticed That My Ph Faction doesnt Use Any Music .. How to get rid out of this ?
What should i change?
Posted by: acidbrain - Sunday, February 12, 2017 12:42:23 AM
If you want your faction to have music you have to create a skirmish folder for your faction, i think the gla music would fit the ph the best so you can just copy the music scripts from the gla to your ph folder...
I was full of sjit now i read it back, if you want music you have to add the music to the civilian folder, create a folder named 'PH Music' or something and copy/paste the scripts from 'GLA Music', rename the counters and timers to PH.
Posted by: AdrianeMapMaker - Sunday, February 12, 2017 6:15:01 AM
What are You Talkin about Using Worldbuilder or the ini thingy?
; Just give Me an Example , Thanks In Advanceeeeeeeeeeeeeeeeeeeeeeeeee
Posted by: acidbrain - Sunday, February 12, 2017 9:03:16 AM
[quote=adrianemapmaker;143545]What are You Talkin about Using Worldbuilder or the ini thingy?
; Just give Me an Example , Thanks In Advanceeeeeeeeeeeeeeeeeeeeeeeeee[/quote]
Adriane, READ the scripts and READ the posts, there is and ini example in post #21, you can find that ini file in 'Data/INI/Default', it's called 'AIData.ini'...Good Luck
Posted by: AdrianeMapMaker - Friday, February 17, 2017 6:24:38 AM
[quote=acidbrain;143544]If you want your faction to have music you have to create a skirmish folder for your faction, i think the gla music would fit the ph the best so you can just copy the music scripts from the gla to your ph folder...
I was full of sjit now i read it back, if you want music you have to add the music to the civilian folder, create a folder named 'PH Music' or something and copy/paste the scripts from 'GLA Music', rename the counters and timers to PH.[/quote]
[b]Now I Have The Scripts For The WorldBuilder And I Notice Do I really Need To this At All of My Maps ,Export Import , Import And Import Again ; I am sure There's A way to get Rid out of this ?[/b]
Posted by: acidbrain - Friday, February 17, 2017 6:31:36 AM
Edit the EA skirmish scripts, you don't have to add them to all maps if you do that...