Jump to content


Photo

Selecting Gondor or Rohan Castle


  • Please log in to reply
3 replies to this topic

#1 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 12 August 2007 - 10:24 PM

Im trying to make it so ill be able to play as both Gondor and Rohan in a skirmish. I know it involves creating a new faction, but i want to be able to have both a Gondor Castle and a Rohan Castle at the same time. Does anyone know how to do this??? :mellow:

#2 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 13 August 2007 - 08:14 AM

You don't need to create a new faction for that actually. I can think of two ways how to achieve what you want... one method is quite complex coding, buggy but not too much work, the other is easier coding, less buggy, but you'd need to edit every map...

The first version would be to edit the castle plot the way I did it for BFME+... I think I've explained it somewhere in this forum, so use the search button and try to find the topic. The downsides are that, unless you manage to improve my code, you cannot use the castle as a starting point (that's why we used the outposts)...

The other is that you would copy the castle plot object, give it a new name (CastleFlagSpecial, for example), set that Gondor receives the Rohan base, and add that plot to all the maps. If you want to use heroes and upgrades of Rohan too, you'd need to adjust that aswell.

Both ways are quite difficult though, and require quite some work...

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#3 Hobbitccd17

Hobbitccd17
  • New Members
  • 28 posts

Posted 13 August 2007 - 02:10 PM

Could you explain how to do the second thing?

#4 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 13 August 2007 - 02:17 PM

Basicly look for Object CastleFlag, copy the whole code and give it a new name (CastleFlagSpecial would do the trick).

Then find that bit of code in your new object:
Behavior = CastleBehavior ModuleTag_castle
		SidesAllowed = Gondor FROM_PLAYER FROM_AI FROM_SCRIPT
		SidesAllowed = Rohan FROM_PLAYER FROM_AI FROM_SCRIPT
		SidesAllowed = Mordor FROM_PLAYER FROM_AI FROM_SCRIPT
		SidesAllowed = Isengard FROM_PLAYER FROM_AI FROM_SCRIPT
		UseSecondaryBuildList = Yes ; NOTE: Castles and lumber mills use Secondary Build lists. Only Camps use Primary Build lists.
	  
		UseTheNewCastleSystemInsteadOfTheClunkyBuildList = Yes
		  CastleToUnpackForFaction  = Gondor  Castle_Gondor GONDOR_FLAG_CASTLE_UNPACK_COST
		  CastleToUnpackForFaction  = Rohan  Castle_Rohan  ROHAN_FLAG_CASTLE_UNPACK_COST
		  CastleToUnpackForFaction  = Mordor  Castle_Mordor MORDOR_FLAG_CASTLE_UNPACK_COST 
		  CastleToUnpackForFaction  = Isengard  Castle_Isengard ISENGARD_FLAG_CASTLE_UNPACK_COST

		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 = 420.0
		ScanDistance = 150
	End

Then, at the very least, change
CastleToUnpackForFaction  = Gondor  Castle_Gondor GONDOR_FLAG_CASTLE_UNPACK_COST
to
CastleToUnpackForFaction  = Gondor  Castle_Rohan GONDOR_FLAG_CASTLE_UNPACK_COST
You might want to edit stuff for the other factions aswell though.

Now do the same for the other versions of the castle (CastleFlagNW etc.).

Then add this new plot object to a map in Worldbuilder and test. If you want it to work out better, you'd need to do a another bunch of changes (other base object, upgrades, heroes, ...).

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users