|  | 
| 
 
 
 
 
 
 
 
 
    
    
 |  | 
 
 
	
		|  |  |  
	
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 06:19 PM
			
			
			
		 |  
	| 
		
			
			| 
 First Lieutenant |  | 
					Join Date: Jan 2005 
						Posts: 689
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Component-dependant engines 
 I've introduced power reactors to the game, basically just a generic component, and I'm trying to get the engines dependant on it being present for them to work. Since it's not possible to add new 'abilities' from what I could find out, that means I had to use the Get_Design_Specific_Component_Count() function. I first tried putting it in the 'to use' requirement field of the engine without any luck, then I tried using it in the 'movement amount' formula on the engines( i.e. tried setting movement point amount to 0 if no reactor present). 
 There's simply no way this will work. My two test designs, one with reactor another without, always fly at the same speed. I tried getting a little creative after a while, but alas, reactor or not, it doesn't make any difference between the two ships' speeds. They both fly either 1-2 m/s, or 10 m/s, dependant on how I set up the formula, while I basically want the one with the reactor to fly 10 m/s and the one without to fly 1 m/s( or 0 m/s, but that doesn't seem to be possible).
 
 If it wasn't for my very limited capabilities, I'd say the function didn't work properly making it unable to find the reactor component.
 
 Any ideas?
 
			
			
			
			
				  |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 06:45 PM
			
			
			
		 |  
	| 
		
			
			| 
 National Security Advisor |  | 
					Join Date: Nov 2000 
						Posts: 5,085
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 That function doesn't work on components.
 You can have a weird workaround by using the method SJ used in GG for his Crew requirement, though..
 
 One way:
 
 Requirement 5 Description                       := Ship requires more reactors to properly power its engines.
 Requirement 5 Formula                           := iif(Get_Design_Abilty_Total("Standard Movement") > 2), Get_Design_Abilty_Total_AITAG01 > 1, 1)
 
 You can't use that as-is, because I don't remember the format for the AI tags. What this does is if the number of standard move goes above 2, it requires a reactor before the design can be built. It won't slow down due to battle damage, though.
 
 
 
 
				__________________ 
				Phoenix-D
 
I am not senile. I just talk to myself because the rest of you don't provide adequate conversation. 
-Digger |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 08:08 PM
			
			
			
		 |  
	| 
		
			
			| 
 First Lieutenant |  | 
					Join Date: Jan 2005 
						Posts: 689
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 I tried with a 
 Requirement 6 Formula                           := Get_Design_Ability_Component_Count("AI Tag 16") > 0
 
 on the frigate ship type just to test it, but it easily lets me make a ship without it, no warning at all. The reactor component has the "AI Tag 16" ability and everything. *shrug*
 |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 08:34 PM
			
			
			
		 |  
	| 
		
			
			| 
 National Security Advisor |  | 
					Join Date: Nov 2000 
						Posts: 5,085
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 iifs might not work in that file, then. :/ Did you try just the AI tag? 
				__________________ 
				Phoenix-D
 
I am not senile. I just talk to myself because the rest of you don't provide adequate conversation. 
-Digger |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 08:37 PM
			
			
			
		 |  
	| 
		
			
			| 
 First Lieutenant |  | 
					Join Date: Jan 2005 
						Posts: 689
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 Uhuh, think I might have made a mistake.
 Yah, looks like it's working now, thanks. Would be nice if there could be a function that looked for a specific ability description, so we could just use the 'Description Only' ability instead of wasting the AI tags and such.
 |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 09:44 PM
			
			
			
		 |  
	| 
		
			|  | 
 Shrapnel Fanatic |  | 
					Join Date: Jul 2001 Location: Southern CA, USA 
						Posts: 18,394
					 Thanks: 0 
		
			
				Thanked 12 Times in 10 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 Actually, there is. Kwok made much use of it in Balance Mod, such as this "ability" on the SDD:
 Ability 2 Type                                  := Description Only
 Ability 2 Description                           := Automatically used if a ship is successfully boarded, destroying the ship and the attacking ship.
 Ability 2 Scope                                 := Space Object
 Ability 2 Range Formula                         := 0
 Ability 2 Amount 1 Formula                      := 0
 Ability 2 Amount 2 Formula                      := 0
 |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 09:54 PM
			
			
			
		 |  
	| 
		
			
			| 
 Corporal |  | 
					Join Date: Mar 2006 
						Posts: 117
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 
	Quote: 
	
		| Raapys said: Would be nice if there could be a function that looked for a specific ability description, so we could just use the 'Description Only' ability instead of wasting the AI tags and such.
 
 |  Something like that would really open up our modding options and eliminate the need for the AI tags.
 
I was thinking about something like this:
 Code: 
 Ability 1 Type                        := Unique StringAbility 1 Description                 :=
 Ability 1 Scope                       := Space Object
 Ability 1 Range Formula               := 0
 Ability 1 Amount 1 Formula            := "UW Basketweaving"
 Ability 1 Amount 2 Formula            := 0
 
 
Then have a functions like Get_Design_Ability_Unique_String("UW Basketweaving") or some such.
 
Of course, the best thing would be if we could simply add do-nothing abilities to the Main_Strings.txt file!    |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 10:10 PM
			
			
			
		 |  
	| 
		
			
			| 
 First Lieutenant |  | 
					Join Date: Jan 2005 
						Posts: 689
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 That's what I was thinking, would make it all much easier.
 Fyron: Yeah, the description only ability is there; unfortunately there's not a Get_Design_Ability_Description_Component_Count("Description here")'ish function. If there was we could add unique 'identifying' abilities to all components we wanted, we'd just need to have a unique description.
 |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 11:17 PM
			
			
			
		 |  
	| 
		
			|  | 
 National Security Advisor |  | 
					Join Date: Oct 2001 Location: Toronto, Canada 
						Posts: 5,624
					 Thanks: 1 
		
			
				Thanked 14 Times in 12 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 You can actually give an ability any name you want and use formulas for amount1 or amount2 to produce different sorts of data for display purposes.  Not sure, but I would think you could use the Get... function with it since it returns just the string. |  
	
		
	
	
	| 
			
			 
			
				December 7th, 2006, 11:39 PM
			
			
			
		 |  
	| 
		
			
			| 
 Corporal |  | 
					Join Date: Mar 2006 
						Posts: 117
					 Thanks: 0 
		
			
				Thanked 0 Times in 0 Posts
			
		
	      |  |  
    
	| 
				 Re: Component-dependant engines 
 When I try to use "Test" as an ability on a component I get an "Unknown Value" error.
 I don't think I'm following what you're saying, CK.
 |  
	
		
	
	
	
	
	
	
	| 
	|  Posting Rules |  
	| 
		
		You may not post new threads You may not post replies You may not post attachments You may not edit your posts 
 HTML code is On 
 |  |  |  |  |