Jump to content


Photo

Add a pre-existent unit to a new faction

horde newfaction rotwk

Best Answer knight errant, 20 August 2016 - 08:18 AM

I added this code to the farm.ini in the "ENGINEERING Parameters" and now it works


	Behavior = QueueProductionExitUpdate QueueProductionModuleTag
		UnitCreatePoint			= X:0.0 Y:-18.0 Z:0.0
		PlacementViewAngle		= 0
		NaturalRallyPoint		= X:0.0 Y:-18.0 Z:0.0
		ExitDelay				= STANDARD_HORDE_EXIT_DELAY
		UseReturnToFormation	= No
	End
	

(I found the coordinates of the "horde exit" with 3ds max8)

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 knight errant

knight errant
  • Members
  • 22 posts

Posted 19 August 2016 - 10:38 AM

Hello, recently i tried to add a unit of hobbits to a new faction that i've created.

I wanted to make that the hobbits could be recruited from farms so i added this to the commandset:

CommandSet HobbitFarmCommandSet
	1	= Command_ConstructInnElvenHobbitShirrif
	6	= Command_Sell
End

(I had added  already the code for the commandbutton)

 

But when i tried this in game the hobbits weren't a unit (If you selected one the other would not be selected)

So i tried to change the code to:

CommandSet HobbitFarmCommandSet
	1	= Command_ConstructRohanPeasantHorde
	6	= Command_Sell
End

And then to:

CommandSet HobbitFarmCommandSet
	1	= Command_ConstructGondorKnightHorde
	6	= Command_Sell
End

But nothing changed

So I wonder if there's a kind of permission for the faction to add a horde

Because i don't know what to do

 



#2 Easterling26

Easterling26
  • Members
  • 63 posts

Posted 19 August 2016 - 09:39 PM

Hello knight errant.

 

As far as I know there is no permission needed to add a unit or horde to faction or new building.

 

Your code in the commandset looks fine to me.

Have you modified the Hobbit horde in any way?

 

If your Hobbits are already in the game then you dont need to create a commandbutton

for them. I mean the vanilla hobbits.

 

Could you give me the code of your Hobbit Farm and also the code for your commandbutton?

Perhaps I can find the problem.

 

Does the same thing happen with other units aswell?

 

I think the problem is in your Hobbit Farm code.



#3 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 19 August 2016 - 10:29 PM

The farm structure needs the proper code to be able to spawn units. Compare it to another building that already creates units for a reference.

#4 knight errant

knight errant
  • Members
  • 22 posts

Posted 20 August 2016 - 06:55 AM

 

 

The farm structure needs the proper code to be able to spawn units

I didn't know it  

Thanks so much for the tip!

 

 

 

Have you modified the Hobbit horde in any way?

No

 

 

 

Could you give me the code of your Hobbit Farm and also the code for your commandbutton?

The commandbutton:

CommandButton Command_PorterConstructHobbitFarm
	Command       		= DOZER_CONSTRUCT
	Object        		= HobbitFarm 
	TextLabel     		= CONTROLBAR:ConstructMenFarm
	ButtonImage   		= BCFarm
	ButtonBorderType    = BUILD 
	DescriptLabel       = CONTROLBAR:ToolTipConstructMenFarm
	Radial				= Yes
	;InPalantir	   		= Yes
End
 

The farm code:

Spoiler

 

Thank you so much for the answers!   :thumbsuphappy:



#5 knight errant

knight errant
  • Members
  • 22 posts

Posted 20 August 2016 - 08:18 AM   Best Answer

I added this code to the farm.ini in the "ENGINEERING Parameters" and now it works


	Behavior = QueueProductionExitUpdate QueueProductionModuleTag
		UnitCreatePoint			= X:0.0 Y:-18.0 Z:0.0
		PlacementViewAngle		= 0
		NaturalRallyPoint		= X:0.0 Y:-18.0 Z:0.0
		ExitDelay				= STANDARD_HORDE_EXIT_DELAY
		UseReturnToFormation	= No
	End
	

(I found the coordinates of the "horde exit" with 3ds max8)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users