.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

BCT Commander- Save $8.00
winSPWW2- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V > SEV Modders Knowledge Base

Reply
 
Thread Tools Display Modes
  #41  
Old December 7th, 2006, 02:47 AM
DeadMilkman's Avatar

DeadMilkman DeadMilkman is offline
Private
 
Join Date: Dec 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
DeadMilkman is on a distinguished road
Default Re: Component.txt Knowledge Base

Update: I found the problem with my original formula, I'm an idiot as usual, and missplaced a (.

So I have runs some tests, and all 4 of the methods discussed work as they should.
Method 1. using 40 - ( Int(([%Level%] - 1) / 7) * 10)
Method 2. using 40 - ( Trunc(([%Level%] - 1) / 7) * 10)
Method 3. using 40 - ( Round(([%Level%] - 1) / 7) * 10)
Method 4. using 40 - iif([%Level%] >= 19, 30, iif([%Level%] >= 15, 20, iif([%Level%] >= 8, 10, 0)))

Each method gives slightly different results as expected, except that Trunc and Int seem to be the same.

Hopefully this will be usefull to everyone.
__________________
It's not what you know...
It's not who you know...
It's what you know about who you know.
Reply With Quote
  #42  
Old December 7th, 2006, 03:03 AM
President_Elect_Shang's Avatar

President_Elect_Shang President_Elect_Shang is offline
Brigadier General
 
Join Date: Nov 2001
Location: WA
Posts: 1,894
Thanks: 5
Thanked 3 Times in 3 Posts
President_Elect_Shang is on a distinguished road
Default Re: Component.txt Knowledge Base

Excellent contribution; thank you DeadMilkMan!
__________________
President Elect Shang; Tal-Re Republic of Free Worlds
Welcome to Super Vegeta’s Big Bang Attack… Welcome to OBLIVION!
“Don Panoz made an awesome car and… an incinerator” Bill Auberlen
Reply With Quote
  #43  
Old December 21st, 2006, 02:51 PM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: Component.txt Knowledge Base

I know a lot of modders are interested in Space Yard Expansions. Once possible way to achieve that in SE:V is to use the "Space Yard Rate Modifier" ability on your expansion facility. Perhaps someone can test that and see if it works - I think it just might.
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
  #44  
Old December 21st, 2006, 04:24 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: Component.txt Knowledge Base

The next patch might have a very easy, clean way to do SYEs...
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #45  
Old September 4th, 2007, 11:57 PM

Devnullicus Devnullicus is offline
Sergeant
 
Join Date: Feb 2001
Location: Belmont, CA USA
Posts: 285
Thanks: 0
Thanked 0 Times in 0 Posts
Devnullicus is on a distinguished road
Default Re: Component.txt Knowledge Base

Does anyone know why this doesn't work? Specifically, it always gives shield points as if there were 0 stars in the system. [%NumberOfStars%] is used in Formulas.txt, so it should be usable in other places as well, correct?

Edit: I even tried putting the formula in formulas.txt and then using the name in components.txt and it still acts as if there are 0 stars. *sigh*. I really wish there were easy ways to add variables like this to formulae.

Code:

Name := Star Shield
Description := Generator that creates an energy field around a starship preventing damage that gets stronger the more stars there are in the star system
Picture Number := 52
Maximum Level := 20
Tonnage Space Taken Formula := 25 - trunc( ( [%Level%] - 1 ) * 0.7 )
Tonnage Structure Formula := 25 + trunc( ( [%Level%] - 1 ) * 0.75 )
Cost Minerals Formula := 200 + ( ( [%Level%] - 1 ) * 10 )
Cost Organics Formula := 100 + ( ( [%Level%] - 1 ) * 5 )
Cost Radioactives Formula := 160 + ( ( [%Level%] - 1 ) * 8 )
Supply Amount Used Formula := 0
Ordnance Amount Used Formula := 0
Can Be Placed On Vehicle Types := Ship, Base, Satellite, Weapon Platform, Drone
Can Be Placed In Ship Sections := Inner Hull, Outer Hull
Component Type List := Technological
General Group := Shields
Custom Group := 0
Number Of Requirements := 2
Requirements Evaluation Availability := AND
Requirements Evaluation Allows Placement := TRUE
Requirements Evaluation Allows Usage := TRUE
Requirement 1 Description := Empire must have at least tech level 1 in Shields.
Requirement 1 Formula := Get_Empire_Tech_Level("Shields") >= ( 1 + ( [%Level%] - 1) )
Requirement 2 Description := Empire must have at least tech level 1 in Stellar Manipulation.
Requirement 2 Formula := Get_Empire_Tech_Level("Stellar Manipulation") >= ( 1 + ( [%Level%] - 1) )
Number Of Abilities := 1
Ability 1 Type := Shield Generation
Ability 1 Description := Shield Generators provide [%Amount2%] normal shield points.
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := "Normal Shields"
Ability 1 Amount 2 Formula := 100 + ( ( [%Level%] - 1 ) * 10 ) + ( ( 50 + ( ( [%Level%] - 1 ) * 10 ) ) * [%NumberOfStars%] )
Weapon Type := None

__________________
How's my Programming? Call 1-800-DEV-NULL
Get the Space Empires V Editor and DevnullMod at http://www.devnullsoftware.com/se5
Reply With Quote
  #46  
Old September 5th, 2007, 12:57 AM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: Component.txt Knowledge Base

Check pg 52 of the modding pdf file - it has a short list of string substitutes that can be used in the data files.
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
  #47  
Old September 5th, 2007, 01:48 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: Component.txt Knowledge Base

Devnullicus said:
Does anyone know why this doesn't work? Specifically, it always gives shield points as if there were 0 stars in the system. [%NumberOfStars%] is used in Formulas.txt, so it should be usable in other places as well, correct?


I suspect that pretty much every data field has its own parser... or at least there are several parsers for different "types" of data fields, perhaps related to file. There is very little crossover in having functions and built-in variables that work in one place translate successfully to another. For example, only a system has any stars, so only files dealing with systems or stellar object properties would ever even need to consider having access to the [%NumberOfStars%] variable... or so Aaron's thinking seems to go.

Edit: I even tried putting the formula in formulas.txt and then using the name in components.txt and it still acts as if there are 0 stars. *sigh*. I really wish there were easy ways to add variables like this to formulae.

You cannot use formulas in Formulas.txt in any fields in the data files where they are not already used (pretty much just planet temperature/radiation/gravity field). There is absolutely no support for user-defined functions in the data files (only the AI/event/intel scripts).
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:15 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.