Jump to content


Photo

Adding a New Faction


  • Please log in to reply
13 replies to this topic

#1 LtdColumbo

LtdColumbo
  • Members
  • 43 posts
  • Location:Switzerland

Posted 10 January 2007 - 05:46 PM

Hey there

I have problems modding again. :p

I added a new side to the game. I basicly copied the codes from angmar to start with. playertemplate.ini, commandsets for the castle and the porter, sience.ini, victorysystem.ini all edited and myfaction_fortress.ini and myfaction_porter.ini added

I aslo took the angmar_castle.bse, replaced the objects and saved it as myfaction_castle.bse ( there was no AREA like in BFME1 so i left that out..(?)..)
then changed the unpackfor_myfaction in myfaction_fortress.ini . however, when i try to add the unpackfor_myfaction -line in civilianbuildings.ini the game crashes on startup:

Unkown field "castletounpackforfaction"
error parsing in block object

when i leave then lines in civilianbuildings.ini away, it "crashes" ingame, 10 seconds after the fight began saying "defeated"

do you have an idea what i forgot or did wrong?

thanx

Edited by LtdColumbo, 11 January 2007 - 09:16 PM.


#2 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 10 January 2007 - 05:51 PM

What the name of tha faction ?

#3 Hard_Sander

Hard_Sander
  • Members
  • 244 posts

Posted 10 January 2007 - 05:59 PM

This is bfme2, you probably followed the tutorial on the main site? A good start, but some things are a bit different in bfm[color=#000000]e2. There is no need to edit victorysystem.ini, since it is no longer used. In bfme2 you start with a fortress, so you should put in your playertemplete your fortress name. I suggest you make a childobject of the angmar fortres and put in a different commandset to build your new porter. Then add your new faction to the CastleToUnpackForFatcion behaviour (don't know how it is exactly named, it shouldn't be so hard to find. And add your faction there. There is no need to mess with civilianbuildings.ini.

#4 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 10 January 2007 - 06:58 PM

Please tell me where can i download tutorial ?

#5 Hard_Sander

Hard_Sander
  • Members
  • 244 posts

Posted 10 January 2007 - 07:34 PM

Check on the main site. Press the big Red Thingie at the top. I'll just the link: http://the3rdage.net/beginner.php

#6 LtdColumbo

LtdColumbo
  • Members
  • 43 posts
  • Location:Switzerland

Posted 10 January 2007 - 08:50 PM

thank you i'll try it! :blush:

#7 Fingulfin

Fingulfin

    I Like Pi3. Do you?

  • Hosted
  • 1,752 posts
  • Location:California, USA
  • Projects:Staying Alive.
  •  This place looks familiar. I can't remember why.

Posted 10 January 2007 - 09:06 PM

I also wrote a few tutorials on adding a new faction:
Part I
Part II
Posted Image
--------------------------------------
"You look like a ghost of your former self..."

#8 LtdColumbo

LtdColumbo
  • Members
  • 43 posts
  • Location:Switzerland

Posted 10 January 2007 - 09:37 PM

Like this: ?
Playertemplate.ini:
[color=#CC0000]PlayerTemplate FactionRune[/color]
	[color=#FF0000]Side						  = Angmar[/color]
	PlayableSide				  = Yes		
	Evil					  = Yes
	StartMoney					= 0
	MaxLevelMP				= #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_DEFAULT PLAYER_PURCHASE_POINTS_GRANTED )
	MaxLevelSP				= #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_GOOD PLAYER_PURCHASE_POINTS_GRANTED )
	PreferredColor				= R:143 G:50 B:50
	StartingBuilding			= RuneFortress
	
;------------- NO STARTING UNITS FOR YOU -------
	
	[color=#FF0000]StartingUnit0 		= RunePorter 
	StartingUnitOffset0 	= X:1 Y:160 Z:0

	StartingUnit1 		= RunePorter
	StartingUnitOffset1 	= X:30 Y:250 Z:0[/color]
	
	[color=#FF0000]StartingUnitTacticalWOTR		= RunePorter
	StartingUnitTacticalWOTR		= RunePorter[/color]
	IntrinsicSciences			= SCIENCE_ANGMAR
	IntrinsicSciencesMP 			= SCIENCE_ANGMAR
	SpellBook				= RuneSpellBook
	SpellBookMp				= RuneSpellBook
	PurchaseScienceCommandSet		= RuneSpellStoreCommandSet
	PurchaseScienceCommandSetMP		= RuneSpellStoreCommandSet
	DisplayName				= INI:FactionAngmar
	DefaultPlayerAIType			= AngmarSkirmishAI; Needs to exist before I can change it.
	BeaconName				= MultiplayerBeacon
	LightPointsUpSound			= MordorLightPointsUp
	ObjectiveAddedSound			= Gui_MissionObjectiveNew
	ObjectiveCompletedSound			= Gui_MissionObjectiveCompleted
	InitialUpgrades				= Upgrade_AngmarFaction;Any upgrades this player template is born with.

	// NOTE: It is very important that the create-a-hero be the first buildable hero, to ensure that the create-a-hero and the ring hero are always 
	// attached to the first two buttons in the command set.

	BuildableHeroesMP			= CreateAHero AngmarHwaldar AngmarKarsh AngmarMorgramir AngmarRogash AngmarWitchking
	BuildableRingHeroesMP			= MordorSauron_RingHero
	SpellStoreCurrentPowerLabel 		= APT:SpellStoreCurrentRingPower
	SpellStoreMaximumPowerLabel 		= APT:SpellStoreMaximumRingPower
	ResourceModifierObjectFilter 		= RESOURCE_MODIFIER_OBJECT_FILTER
	ResourceModifierValues			= 100 100 100 100 90 85 80 75 71 68 66
	MultiSelectionPortrait			= UPAngmarArmy
	LoadScreenMusic				= Shell2MusicForLoadScreen
End


AngmarFortress.ini

[color=#CC0000]ChildObject AngmarFortressCitadelRune AngmarFortressCitadel[/color]

; ***DESIGN parameters ***
	DisplayName		 = OBJECT:AngmarFortress
	Description		 = OBJECT:IsengardFortressDescription
	Side				= Angmar
	EditorSorting	   = STRUCTURE
	ThreatLevel			= 1.0
	CommandPointBonus	= GENERIC_FORTRESS_COMMAND_POINT_BONUS

	BuildCost		   = 0
	BuildTime		   = ANGMAR_FORTRESS_BUILDTIME		 ; in seconds
	VisionRange		 = ANGMAR_FORTRESS_VISION_RANGE		  
	ShroudClearingRange = ANGMAR_FORTRESS_SHROUD_CLEAR	

	[color=#FF0000]CommandSet				= NEWAngmarFortressCommandSet[/color]

	WeaponSet
		Conditions			= None
		Weapon				= PRIMARY AngmarFortressBattleTowerBow
		AutoChooseSources	= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End

the castle commandset:
CommandSet AngmarFortressCommandSet
	InitialVisible = 7
	//Main Menu
	[color=#FF0000]1	= Command_ConstructRunePorter[/color]
	2	= Command_SelectRevivablesAngmarFortress
	3   	= Command_SelectUpgradesAngmarFortress
	4	= Command_FireWeaponAngmarFortressSanctumFrostball
	6	= Command_Sell

	//Upgardes Menu
	8	= Command_PurchaseUpgradeAngmarFortressBanners
	9	= Command_PurchaseUpgradeAngmarFortressSpikes
	10	= Command_PurchaseUpgradeAngmarFortressIceMunitions
	11	= Command_PurchaseUpgradeAngmarFortressHouseOfLamentation
	12	= Command_PurchaseUpgradeAngmarFortressIceWalls
	13	= Command_PurchaseUpgradeAngmarFortressSanctum
	14	= Command_RadialBack
	
	//Hero Menu
	15	= Command_RingHeroReviveSlot		// Note that we need an extra slot for the ring hero.
	16	= Command_CreateAHeroReviveSlot		// Note we also need an extra slot for the Create A Hero
	17	= Command_GenericReviveSlot1		//Revives any hero. Use Slot1-Slot8 and keep them UNIQUE within the same commandset! 
	18	= Command_GenericReviveSlot2		
	19	= Command_GenericReviveSlot3		
	20	= Command_GenericReviveSlot4		
	21	= Command_GenericReviveSlot5		
	22	= Command_GenericReviveSlot6		
	23	= Command_GenericReviveSlot7		
	24	= Command_RadialBack				
End

and the porter INI:
CommandSet RunePorterCommandSet
	   1	  = Command_Stop
	   2	  = Command_PorterExtinguishFire
	   3	  = Command_ConstructRuneMill
	   4	 = Command_ConstructAngmarBarracks
	   5	  = Command_ConstructAngmarDen
	   6	  = Command_ConstructAngmarHallofTwilight
	   7	 = Command_PorterConstructMenStable
	   8	  = Command_ConstructAngmarForgeWorks
	   9	  = Command_ConstructAngmarSentryTower
	   10	 = Command_ConstructAngmarWallHub
	   [color=#CC0000]11	 = Command_PorterConstructRuneFortress [/color] 
 
End

and i will have to make a new .ini file for my new porter, right?

thnx-a-lot cam-e-lot


edit:

plus ofcourse: angmarfortress.ini

Behavior = CastleBehavior ModuleTag_castle
//This refers to the side and name of the .BSE file used to unapck the fortress
CastleToUnpackForFaction = Dwarves Fortress_Angmar
CastleToUnpackForFaction = Elves Fortress_Angmar
CastleToUnpackForFaction = Men Fortress_Angmar
CastleToUnpackForFaction = Wild Fortress_Angmar
CastleToUnpackForFaction = Isengard Fortress_Angmar
CastleToUnpackForFaction = Mordor Fortress_Angmar
CastleToUnpackForFaction = Angmar Fortress_Angmar
CastleToUnpackForFaction = Arnor Fortress_Angmar
CastleToUnpackForFaction = Rune Fortress_Rune ; <---------------is this correct?

Edited by LtdColumbo, 10 January 2007 - 09:44 PM.


#9 LtdColumbo

LtdColumbo
  • Members
  • 43 posts
  • Location:Switzerland

Posted 10 January 2007 - 10:16 PM

LOL

Something important is missing:
The game starts but i dont have any porters as starting units nor a castle.

I have nothing and the game of couse says i was defetead

#10 Fingulfin

Fingulfin

    I Like Pi3. Do you?

  • Hosted
  • 1,752 posts
  • Location:California, USA
  • Projects:Staying Alive.
  •  This place looks familiar. I can't remember why.

Posted 10 January 2007 - 10:28 PM

"Fortress_Rune" is your .bse file right? Is it added to your .BIG properly?

EDIT: I see what is wrong... You need to put the Angmar Fortress as the fortress you are starting with. FortressRune is an object, not a base!

Edited by Fingulfin, 10 January 2007 - 10:29 PM.

Posted Image
--------------------------------------
"You look like a ghost of your former self..."

#11 LtdColumbo

LtdColumbo
  • Members
  • 43 posts
  • Location:Switzerland

Posted 11 January 2007 - 11:21 AM

ok i tried around but i can't get it to work..

i added child objects to the angmarfortress.ini:

//Rune Fortress
ChildObject Angmarfortess_Rune AngmarFortress
	   
		Side				= Rune

	BuildTime		   = 15
		CommandSet				= RuneFortressCommandSet
	Behavior = CastleBehavior ModuleTag_castle
		  CastleToUnpackForFaction  = Rune Fortress_Angmar		

		FilterValidOwnedEntries = ANY +STRUCTURE +WALK_ON_TOP_OF_WALL +BASE_FOUNDATION +TACTICAL_MARKER	   ;Anything that does not fit this filter will be given to the neutral player, so the template can have rocks and props.

		MaxCastleRadius = 90.0
		FadeTime = 2.0; 2 seconds
		
		InstantUnpack = Yes		
		KeepDeathKillsEverything = Yes

		EvaEnemyCastleSightedEvent = EnemyFortressSighted
	
	 End


   
End


and angmarporter.ini:

ChildObject RuneProter AngmarPorter
	CommandSet	= RunePorterCommandSet
	Side = Angmar
	 CommandPoints = 0
	DisplayName = OBJECT:AngmarPorter
End


the changes in playertemplate.ini:

PlayerTemplate FactionRune
	Side						  = Rune
	PlayableSide				  = Yes		
	Evil					  = Yes
	
	StartingBuilding			= AngmarFortress
	
		StartingUnit0		 = RunePorter 
	StartingUnitOffset0	 = X:1 Y:160 Z:0

	StartingUnit1		 = RunePorter
	StartingUnitOffset1	 = X:30 Y:250 Z:0

still when starting a skirmish game, i get two porters but no fortress. means death after 10 seconds

cna someone explain please what is wrong/missing

thnx a lot

Solinx: Changed bold tages into code tags

Edited by Solinx, 14 January 2007 - 07:49 PM.


#12 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 14 January 2007 - 07:53 PM

Haven't got the time to read the whole topic, but I see that your starting building is still named 'AngmarFortress', while you created your own called 'Angmarfortess_Rune'

Could be it.

Solinx
Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#13 LtdColumbo

LtdColumbo
  • Members
  • 43 posts
  • Location:Switzerland

Posted 14 January 2007 - 09:48 PM

Thanx Solnix for having a look. ;)

I tired StartingBuilding = Angmarfortress_Rune

But i get no castle at all when i do that.. i have no clue..

Haven't got the time to read the whole topic, but I see that your starting building is still named 'AngmarFortress', while you created your own called 'Angmarfortess_Rune'

Could be it.

Solinx



#14 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 14 January 2007 - 09:53 PM

Alright, I have two busy weeks coming, so I can't promise you anything, but I will try to give it a closer look.

Solinx
Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users