.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   SEV Modders Knowledge Base (http://forum.shrapnelgames.com/forumdisplay.php?f=154)
-   -   Modding SEV Thread Questions (http://forum.shrapnelgames.com/showthread.php?t=30358)

Suicide Junkie November 2nd, 2006 11:35 AM

Re: More data weirdness
 
There is a bug in 1.08 that will allow those to match even though they shouldn't.

President_Elect_Shang November 3rd, 2006 06:24 PM

Re: More data weirdness
 
Why do troops run when they have only received minor damage? I mean seriously; I have seen troops who have lost a little over half their armor turn and run. What setting controls this?

Edit: I seem to have a problem with what appears a simple question. Maybe I need more coffee? Anyway I want a component that will base its level off of two other tech areas.

Get_Empire_Tech_Level("Industrial Tech") >= (1 + ([%Level%] - 1)) Get_Empire_Tech_Level("High Tech") >= ([%Level%] - 1)

So when a player has Industrial Tech 2 and High Tech 3 the resulting item will have a level of 5 (2+3=5). How would I write that one?

President_Elect_Shang November 4th, 2006 02:44 AM

Re: More data weirdness
 
bump

Captain Kwok November 4th, 2006 11:46 AM

Re: More data weirdness
 
PES - It was a bug with troops. It has been fixed post v1.08, so looked for it in Mon/Tue patch.

President_Elect_Shang November 4th, 2006 12:10 PM

Re: More data weirdness
 
Cool, what about the second part of my question; the edited in portion?

Elsemeravin November 6th, 2006 04:19 AM

Re: More data weirdness
 
Some time ago we talked about creating a weapon whose damage was depending on some other component (like batteries for electric weapons).

I tried with the following:

Weapon Type := Direct Fire
Weapon Delivery Type := Energy Bolt
Weapon Target Type List := Ship, Base, Planet, Fighter, Satellite, Drone, Troop, Weapon Platform, Building
Weapon Damage Type Formula := "Normal"
Weapon Space At Range Distance Increment := 10.0
Weapon Space Min Damage At Range := 0.0
Weapon Space Max Damage At Range := 0.0
Weapon Space To Hit Modifier At Range := 0.0
Weapon Space Min Damage Modifier Formula := iif([%Range%] <= 10 , 10 + 50 * Get_Design_Ability_Total("AI Tag 02",1) , 0)
Weapon Space Max Damage Modifier Formula := iif([%Range%] <= 10 , 10 + 50 * Get_Design_Ability_Total("AI Tag 02",1) , 0)
Weapon Space To Hit Modifier Formula := 0
Weapon Ground At Range Distance Increment := 10.0
Weapon Ground Min Damage At Range := 0.0
Weapon Ground Max Damage At Range := 0.0
Weapon Ground To Hit Modifier At Range := 0.0
Weapon Ground Min Damage Modifier Formula := 0
Weapon Ground Max Damage Modifier Formula := 0
Weapon Ground To Hit Modifier Formula := 0 - [%Range%]
Weapon Reload Rate MS Formula := 10000
Weapon Display Type := Bolt
Weapon Space Display Effect Name := Small Bolt 6
Weapon Ground Display Effect Name := Bolt 6
Weapon Explosion Effect Name := [Random Specific Type] Weapon Explosion
Weapon Sound Effect Name := Small Telekinetic Projector
Weapon Bolt Speed := 0.06

and the link component has:

Ability 3 Type := AI Tag 02
Ability 3 Description := Provides the ship with 5kT of strength.
Ability 3 Scope := Space Object
Ability 3 Range Formula := 0
Ability 3 Amount 1 Formula := 5
Ability 3 Amount 2 Formula := 0


But it seems the function Get_Design_Ability_Total does not work in this formula. Would someone have an idea about this problem ? http://forum.shrapnelgames.com/image...s/confused.gif

Thanks in advance http://forum.shrapnelgames.com/image...es/biggrin.gif

shinigami November 6th, 2006 08:29 AM

Re: More data weirdness
 
Have you tried:

Weapon Space Min Damage Modifier Formula := iif([%Range%] <= 10 , 10 + 50 * (Get_Design_Ability_Total("AI Tag 02")) , 0)
Weapon Space Max Damage Modifier Formula := iif([%Range%] <= 10 , 10 + 50 * (Get_Design_Ability_Total("AI Tag 02")) , 0)

President_Elect_Shang November 6th, 2006 10:20 AM

Re: More data weirdness
 
Quote:

Elsemeravin said:
But it seems the function Get_Design_Ability_Total does not work in this formula. Would someone have an idea about this problem ? http://forum.shrapnelgames.com/image...s/confused.gif

I tried the same ability only it was on a ship in the VehicleSizes.txt; it didn’t work there either. I wonder if the formula works. If it does maybe we just need an example from Aaron to get it working right.

Can anyone tackle my question? I want to make a component whose total level is based on the total of two tech areas. Here is what I have so far:

Get_Empire_Tech_Level("Industrial Tech") >= (1 + ([%Level%] - 1)) OR Get_Empire_Tech_Level("High Tech") >= ([%Level%] - 1)

In my test game I have not gotten far enough to attain High Tech 1. I have only reached Industrial Tech 2 and thus far the components level is “Level 2” right where it should be. So does anyone want to take a stab at this?

Phoenix-D November 6th, 2006 11:57 AM

Re: More data weirdness
 
That won't give you the total of the two, PES. What it'll do is base the level on the higher of the two (most likely..).

If you want it based on the average between the two, it'd be simpler to do:
((Get_Empire_Tech_Level("Industrial Tech") + Get_Empire_Tech_Level("High Tech")) / 2) >= (1 + ([%Level%] - 1))

President_Elect_Shang November 6th, 2006 02:15 PM

Re: More data weirdness
 
So I am allowed to add them together in one line... ahh!
I thought I had to seperate them with something, like AND, OR, anything. Cool!

Phoenix-D November 6th, 2006 02:20 PM

Re: More data weirdness
 
AND/OR would return rather wacky results in this situation..

President_Elect_Shang November 6th, 2006 02:27 PM

Re: More data weirdness
 
The only change I am making to your suggestion is to remove the divide by 2 portion. I didn’t want the average I want the two to add together.

Fyron November 6th, 2006 04:22 PM

Re: More data weirdness
 
You can make whatever formulas you want, so long as you get some sort of boolean value in the end (I assume anything that is not 0 from arithmetic functions would be "true").

Elsemeravin November 6th, 2006 04:36 PM

Re: More data weirdness
 
Quote:

shinigami said:
Have you tried:

Weapon Space Min Damage Modifier Formula := iif([%Range%] <= 10 , 10 + 50 * (Get_Design_Ability_Total("AI Tag 02")) , 0)
Weapon Space Max Damage Modifier Formula := iif([%Range%] <= 10 , 10 + 50 * (Get_Design_Ability_Total("AI Tag 02")) , 0)

I did, still not working. http://forum.shrapnelgames.com/images/smilies/fear.gif
Any help from the big guys ? http://forum.shrapnelgames.com/image...ies/tongue.gif

Phoenix-D November 6th, 2006 04:48 PM

Re: More data weirdness
 
Get_Design_Ability isn't working right in many files at the moment.

Elsemeravin November 6th, 2006 04:53 PM

Re: More data weirdness
 
Quote:

Phoenix-D said:
Get_Design_Ability isn't working right in many files at the moment.

Thanks for the confirmation. I guess I'll focus on something else meanwhile. http://forum.shrapnelgames.com/images/smilies/smirk.gif

President_Elect_Shang November 7th, 2006 09:57 PM

Re: More data weirdness
 
I wonder if it would be possible to pull this thread apart. You know, move the on topic comments to there relative sections. Then a person wouldn’t need to skim through 25 pages of this that and the next thing. Just so I don’t confuse anyone the thread itself should stay incase anyone wants to read through it.

Tampa_Gamer November 7th, 2006 10:38 PM

Re: More data weirdness
 
I suppose the easiest thing to do is cut/paste good information into relevant posts as they appear.

President_Elect_Shang November 7th, 2006 11:00 PM

Re: More data weirdness
 
That’s what I was thinking but wasn’t sure if there was a better/faster way. I think I will start on that sometime in the near future. Here’s an idea, I will edit this post to comment on what page I am on, starting with page one of this thread (which is my page 25) and working forward. See what I mean? If I edit this post to read “Page 12” than I am on page 12; so simple even I can’t screw it up!

PAGE: 0

Kana November 14th, 2006 07:52 PM

Unit Launch options
 
Is it possible to mod the launch components for units to restrict the size of the unit launchable? I'm fairly sure its not possible, but maybe someone has an idea...

Phoenix-D November 14th, 2006 08:47 PM

Re: Unit Launch options
 
Sort of. You can create new unit types to represent the different sizes..

President_Elect_Shang November 14th, 2006 09:55 PM

Re: Unit Launch options
 
That's the only way. Why what do you have up your sleeve? Can I take a peak?

Kana November 15th, 2006 01:13 AM

Re: Unit Launch options
 
Quote:

Phoenix-D said:
Sort of. You can create new unit types to represent the different sizes..

Yeah but I can do that anyway...What I want is the launcher to be able to...Oh I get it...Like a Light Fighter Launcher, as apposed to a Bomber launcher...the Launcher component looks for Light Fighter or Bomber...cool...

Am I seeing this right?

Phoenix-D November 15th, 2006 01:36 AM

Re: Unit Launch options
 
Correct. The only problem is you have to specify the new unit in all the components and target types..

Kana November 15th, 2006 02:24 AM

Re: Unit Launch options
 
Yet if I'm making the units from scratch and including them already, then it wouldnt be that much of a problem...

Bascially what I wanted where to emulate the launch tubes, balcony/track system, and shuttle bays for SFB. Also PF links, and bombers. Bombers cant be launched from ships, so I was trying to find a way to limit them to just planets. Plus limiting fighters only from using the launch tubes as apposed to the regular shuttles from the shuttle bay. I assume I can list multiple unit types for each launch component. Like a shuttle bay could launch a shuttle, fighter, or even drop a mine out occasionally...

Now the only question is can I limit what the cargo hold ability can carry?


Phoenix-D November 15th, 2006 02:26 AM

Re: Unit Launch options
 
True. However the targeting list would probably get a bit unwieldy after a while.

President_Elect_Shang November 15th, 2006 03:37 AM

Re: Unit Launch options
 
Yes you can list multiple types. For example my shuttles bays can launch a shuttle or a pinnace. XO Racks can fire (launch) XO Weapon Pods or HAWK Pods. As for the cargo part afraid not; there is no way to control the types of cargo that can be stored. If you say a component has 50csp (cargo storage points) than anything that can be held as cargo will be eligible for storage in that 50csp component.

Kana November 15th, 2006 03:47 PM

Re: Unit Launch options
 
Thats what I figured...I guess as long as the 'oversized' unit cant be launched, it would just be taking up cargo space, which I guess is ok. I was just hoping we would be able to mod cargo cap it specific stuff, like troops, population, etc. I guess I will have to add an additional ability to the Barracks component to make it special.

President_Elect_Shang November 15th, 2006 05:35 PM

Re: Unit Launch options
 
Well, let’s take my HAWK Pods for instance. If I wanted to say that you can only store HAWK Pods in a new component called the HP Mag I could give the HP Mag the cargo ability, basically set it up to be the same as any cargo storage component. Then (and I haven’t tested this part) I should be able to add a requirement along these lines to ALL OTHER components that could also potentially store the HAWK Pod.

HAWK Pod Mag
Requirement 1 Description := This component can not be used to store HAWK Pods.
Requirement 1 Formula := Get_Design_Ability_Percentage_Of_Hull_Space("Stora ge Cargo Space Amount", "HAWK Pod") <= 0

Now I have not tested this! However, if it works and you are willing to add it to all the storage type components it would do what you are looking for.

Phoenix-D November 15th, 2006 05:38 PM

Re: Unit Launch options
 
Won't work. SE5 only checks the requirements when designing, building or retrofitting a ship.

EDIT: and this is a good thing. Otherwise you'd be unable to make components obsolete. http://forum.shrapnelgames.com/images/smilies/happy.gif

President_Elect_Shang November 15th, 2006 05:40 PM

Re: Unit Launch options
 
Gee what a thought! Who in their right mind would want to create generational components?

President_Elect_Shang November 15th, 2006 05:53 PM

Re: Unit Launch options
 
You can’t make components obsolete right now!

Phoenix-D November 15th, 2006 06:31 PM

Re: Unit Launch options
 
Yes you can, once the bug about requirements checking during design is fixed. http://forum.shrapnelgames.com/image...ies/tongue.gif

If you checked requirements on a ship, during a game, your Ion Engine ship could stop dead just because you had CT engines available to build..

Elsemeravin November 15th, 2006 06:43 PM

Re: Unit Launch options
 
Quote:

President_Elect_Shang said:
You can’t make components obsolete right now!

you can by simply add a "Get_empire_tech_level("toto") <= 5" requirement.

Phoenix-D November 15th, 2006 06:53 PM

Re: Unit Launch options
 
Nope. That isn't checked except on savegame load.

President_Elect_Shang November 15th, 2006 08:19 PM

Re: Unit Launch options
 
Or you can do it the way I am. Build an entire Mod based on generational tech. Test it by saving then reloading the game for needed updates and tweaking. And THEN proclaim to Phoenix-D and CPT Kwok that it is all working fine and THEY are wrong generational does work!

Wait… that really happened! http://forum.shrapnelgames.com/images/smilies/shock.gif http://forum.shrapnelgames.com/image...es/redface.gif http://forum.shrapnelgames.com/images/smilies/fear.gif

Sorry guys, I still feel bad about that one.

Phoenix-D November 15th, 2006 10:29 PM

Re: Unit Launch options
 
As I recall I'm the one that suggested the idea in the first place without testing it properly, so.. http://forum.shrapnelgames.com/image...ies/tongue.gif

Elsemeravin November 16th, 2006 03:11 AM

Re: Unit Launch options
 
Quote:

President_Elect_Shang said:
Build an entire Mod based on generational tech.

Can you explain (again?) what you mean by "generational tech" ? I haven't seen anything new here so I might have missed your point. http://forum.shrapnelgames.com/image...s/confused.gif

President_Elect_Shang November 16th, 2006 01:01 PM

Re: Unit Launch options
 
This is essentially SE4 style tech were you can phase out one component in favor of another after meeting certain requirements. For example let’s say you start the game with Ion Engines and after reaching tech level 3 in area A and tech level 5 in area B the Ion Engine is removed from the components list and replaced by the Nuclear Engine. As it stands now you can design both those components and set the requirements to phase the one out when the other is developed. The problem is that SE5 is only checking the Components.txt file when the game is loaded, so using the above example the Ion Engine will stay in the components list with the Nuclear Engine until you the player quits SE5. When you start it back up the Ion Engine will be removed and only the Nuclear Engine will be available. The foundation of my mod rests on generational components. If this is not fixed by Aaron I am doomed. And it would hurt even more because I have been trying to create this mod since pre-Gold SE4 days.

Elsemeravin November 16th, 2006 02:50 PM

Re: Unit Launch options
 
However if I undertand correctly, you can still make the Ion Engine unusable once the Nuclear Engine is available, even if it is still appearing in the list.

Is that so different from what you expect ? It seems to be just a display glitch, isn't it ?

President_Elect_Shang November 16th, 2006 03:19 PM

Re: Unit Launch options
 
I don’t know of a way to make components unusable without adding restrictions to the vehicles they are to be used in. Also if they can be made unusable that would just make for a mod doomed to failure. Ask yourself if you would really want to play a mod that clutters the ship design screen with components that you aren’t even allowed to use? What you are describing is closer to a semi-generational component. Any generational mod must, by nature, have the components removed from the list.

If you can’t imagine what I am saying start a game of SE4, give yourself all tech to start with, go to design a ship, then make sure the “Only Latest” button is not selected. Now try scanning through all that. That is an example of what I am coining as semi-generational. Keep in mind this is an example of semi-generational. Meaning the components may be outdated but you can still use them. In the example above and in your question the components aren’t usable. They are just cluttering up space, in other words almost semi-generational.

Phoenix-D November 16th, 2006 03:31 PM

Re: Unit Launch options
 
Nope. If an item is displayed, you can use it. And the point is to get it off the list, really; making it unusable is just a side-effect.

Elsemeravin November 16th, 2006 04:42 PM

Re: Unit Launch options
 
I understand what you want to achieve and am trying to help you find a way out of this dead-end (in my limited abilities http://forum.shrapnelgames.com/images/smilies/wink.gif).
In that case, can't you use requirement like below to avoid the current bug:

[%level%] <= Get_Empire_Tech_Level("Ion Engine") OR [%level%] <= Get_Empire_Tech_Level("Nuclear Engine") + 10

And you have max level for Ion Engine Tech of 10 and requirement for Nuclear Engine Tech like:
Get_Empire_Tech_Level("Ion Engine") >= 10

Of course you still have the name problem (the engine will have the same name...) which will be only display glitch http://forum.shrapnelgames.com/image...ies/tongue.gif

President_Elect_Shang November 16th, 2006 05:37 PM

Re: Unit Launch options
 
The components may be related by function but they are too different to build into a progression system like the one SE5 is using now. I think that is what you are trying to build in your post. I did try to make the components into a progressive system using iif statements. However, this did not work for many reasons.

Still I‘m not sure I follow your example. In your example the component will progress to tech level 10 in the tech area Ion Engine then the tech area Nuclear Engine will take over. This will affect what tech area controls the item but will not change the component that is being put in the ship unless that item is changing based on a formula that calls on [%Level%] to calculate cost or some such thing.

A true generational component uses one tech area to progress by, so the Ion Engine in our previous example would be set at tech level 1 for area A and the Nuclear Engine at tech level 3 in area A. Then you will need a trigger tech area, tech area B. So when you are at level 1 tech area A and B you have the Ion Engine. When you reach level 3 tech area A nothing happens until you reach level 4 in tech area B. At that time the generational effect kicks in and the Ion Engine is removed and the Nuclear Engine is released. Reading my earlier post I see I didn’t explain this very well. Since all of us modders dealt with generational components in SE4 I just assumed the bare explanation would do; my fault and my apologies for being so vague. Also I did test placing tech area A and B on the same requirement line using both AND and OR. The problem remains that the file needs to read afresh.

Maybe if you could give a little more detail please? Also keep in mind that the current problem to generational components is not the set up in the components requirements. The problem is that, no matter how you the requirements, the hard code tells the game to look at the Components.txt file once at load and that’s it. I do appreciate your thoughts and don’t want to discourage you from posting them. Maybe there is a backdoor and as you point out we may yet find it by sharing thoughts.

Elsemeravin November 16th, 2006 06:30 PM

Re: Unit Launch options
 
I'm sorry but I still don't get what is the difference between your "Ion engine" and your "Nuclear Engine" except the name.
Does the Nuclear engine has anything different from Ion Engine except the name and maybe 1 bonus mvt point ?

I understand now that you want only 1 Tech which provides 2 components, but I'm still interested in the difference you desire between the two engines http://forum.shrapnelgames.com/images/smilies/happy.gif

President_Elect_Shang November 16th, 2006 07:52 PM

Re: Unit Launch options
 
The engine thing was only an example. I don’t use a Nuclear or Ion Engine in my mod. Here is an actual component from the Mod. At high Tech level 2 and Force Weapons level 1 you get the Force Projector. At High Tech level 4 and Force Weapons 2 You get the Force Beam. Here are the differences between the two and also why they must be entered as different components and not as progressive components:

1. The name but that’s a given! http://forum.shrapnelgames.com/images/smilies/happy.gif
2. Tonnage Space, this could be done with an iif statement but not a formula.
3. Cost, which could be done with an iif statement but not a formula.
4. Vehicle type it can be placed on.
5. Requirements Formula.
6. Abilities change.
7. Min and max weapon damage changes.
8. Weapon To Hit modifier changes.
9. Weapon reload rate changes.

When I say they can’t be done with a formula I mean that the differences are so dynamic from one version to the next that there is no formula I can think of that would mimic the changes.

Using the example of the engines again. You may be able to write a single component that will phase out (in our example the Ion Engine) when another comes along (once again in our example the new one was the Nuclear Engine) however you can not phase the Nuclear Engine out when the Chity-Chity Bang-Bang Engine is developed unless you make a new component; which by definition means you have just made a generational component.

Now remember what I said at the start? This is only one example. Now imagine a mod that has absolutely nothing in common with Stock. All new tech areas, new vehicles, new vehicle types, new governments, no intelligence, new economy, and I think that about covers it. The example Force Projector and Force Beam are generational components. A generational component is one that can not be developed using a formula stuck in a few key places because there are too many changes from one version to the next. If it could be done with a clever formula or two it would be a progressive component.

Edited in: Also note that the Force Beam is not the final component in the Force Weapons line. Each new version phases out the one before.

Phoenix-D November 16th, 2006 08:24 PM

Re: Unit Launch options
 
On 2 and 3: you realize you can use iff statements in all formulas, right? I haven't tested it in components.txt yet, but it works in techareas.txt.

President_Elect_Shang November 16th, 2006 09:03 PM

Re: Unit Launch options
 
I have iif statements set in a few formulas but have not reached those techs in the testing yet. I will let you know what happens when I get there. I did say that I could use iif statements, I was saying that I could not use formulas.

Edited In: Oh I see what you’re saying. I could have used iif statements for all the fields that take formulas, right! I could have but there a few places such as weapon to hit and damage that I already have formulas in and that still wouldn’t help the many other places I can’t use formulas or iif statements. For example how do I tell the game the Force Beam can be put on bases if I am using the Force Projector in progressive style? It would have to be generational style or nothing.

Elsemeravin November 17th, 2006 03:19 AM

Re: Unit Launch options
 
I see, the first example was a bad one http://forum.shrapnelgames.com/image...ies/tongue.gif
Of course if the two generation of components are so different then you are stuck in the well. http://forum.shrapnelgames.com/images/smilies/smirk.gif

Like I am for my big spreadsheet defining 5/6 types of cloaking/sensors on different levels with interaction (like camo, gravity, invisibility, system wide code security) from se4 or my sets of plague levels, or my battery system for electric weapon (whose power depends on the number of battery onboard), or like the possibility to make requirement level-dependent for techs...

SO I can add one more and wait with you for correction ! http://forum.shrapnelgames.com/image...es/biggrin.gif

President_Elect_Shang November 17th, 2006 09:59 AM

Re: Unit Launch options
 
I agree that was a really poor example for me to pick. Funny enough the only reason I did is that I thought using a component from the stock files was the best bet. Oh well! Anyway let me take a look at your spreadsheet, I can imagine several of the elements you are trying to make coming together; however, without a look or detailed understanding of some kind I can’t really help.


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

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