![]() |
Re: Modding SEV Thread Questions
I need another formula help. What if I want to create a damage formula with the following values:
Range: 0 – 10 – 20 – 30 – 40 – 50 – 60 – 70 – 80 – 90 – 100 – 110 – 120 Damage inflicted: 30 – 30 – 20 – 20 – 20 – 10 – 10 – 10 – 10 – 10 – 10 – 10 – 10 How would I do this? I know that I only need to do the formula once as I want a flat damage rate so the min and max formula would be the same. Apologies but the formatting isn’t coming out and I don’t want to make it into columns. |
Re: Modding SEV Thread Questions
AI colonies...
-Main script calls function to give ship orders. -If its a colony ship, it calls the colony minister function. -The minister looks for a planet to colonize (doesn't seem to care about any details, just if it can). The AI has a function to pick a colony type, what calls that? It also seems to base what colony type based off of how many other colonies of the same type there are? |
Re: Modding SEV Thread Questions
I may have asked these before but I don't think I got an answer:
What does Base Model Radius in mpire_ships_xfileclasses.txt do? The scale setting in each xfileclass seems to affect both the display of ships in the system display as well as in the combat engine. I want a different scale for each. For example, I would scale ships so they are all approximately the size of a hex in the system screen (making them clearly visible but not overly large), but I don't want every ship to be the same size in tactical combat. Is this possible now, or is it something I need to ask Aaron to add? It's essentially two seperate scale settings for strategic/tactical views as opposed to the one setting we have now. |
Re: Modding SEV Thread Questions
Why don't you use the exact same formula as for accuracy (below) but changing the weight and limits ?
kind of : iff %range% <=10 ,30,iff %range% <=40 , 20,iff %range% <=120,10,0 |
Re: Modding SEV Thread Questions
Quote:
>=121, 10000, 0 The >= is for the cut off point. The 10000 is to change all damage to 0 past that point. I have no idea why the last 0 is in there(?). |
Re: Modding SEV Thread Questions
You don't want 10000 damage; that would be huge.
Give me 10 minutes, and I'll tweak my equation parser program to show values at range. |
Re: Modding SEV Thread Questions
|
Re: Modding SEV Thread Questions
http://imagemodserver.mine.nu/other/...angeLister.zip
The one thing to keep in mind is that SE5's formula parser is not as flexible as this one. SE5 demands whitespace everywhere, for example. Note: If you're not sure what is causing an error condition, press the "verbose" button, and it will tell you what it thinks is wrong with your formula. |
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
|
Re: Modding SEV Thread Questions
It displays the value AT ten.
As for the forumla.. iff %range% <=10 ,30,iff %range% <=40 , 20,iff %range% <=120,10,0 aside from the formating, that should work. The spaces have to be in the proper spot and you're missing ( and ) marks as well as the [ around %range% iff([%range%] <= 10, 30, iff([%range%] <= 40, 20, iff( [%range%] <= 120, 10, 0))) should work. EDIT: >=121, 10000, 0 The >= is for the cut off point. The 10000 is to change all damage to 0 past that point. I have no idea why the last 0 is in there(?). You set the range limit in the DAMAGE forumla, not the to hit formula. EDIT2: and that's what you did. Oops. Anyway, despite SJ's protest 10000 works fine in that role. Even if the to-hit is -99999, a ship will still fire and waste supplies, and the "max range" strategy will use that to determine its range. The second 0 is the ELSE part of the statement; its what the formula uses if the range isn't above 120. |
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
Kwok: Nice, Ill have to check that out.
What I was looking for is what actually calls the Pick_ColonyType function. Or is it event driven, so the internal engine calls that function onColonize() or something. |
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
If I remember right, it is just the first in it's list. That could be another useful place to mod, so they colonize more intelligently.
|
Re: Modding SEV Thread Questions
Next few questions:
1. Can small craft (i.e. fighters or “shuttles”) be given the ability to make warp transits now? 2. Can the same small craft be given the cargo ability to transport troops or other goodies? 3. If they can transport troops can they be set to land troops? |
Re: Modding SEV Thread Questions
1. Take a look at VehicleUnitTypes.txt and weep with joy.
2. They can act like troops and participate in ground combat. Dunno about actually carrying other units though. There isn't anything in VehicleUnitTypes.txt about it, but it would be really easy to test. Somehow, I doubt that units would be able to carry units, however, due to circular capacities and infinite storage space. |
Re: Modding SEV Thread Questions
I'm looking at the AI setup scripts and wondering how the Racial Traits section is used...
Do the "random empires" that get added if you select "Generate random computer controlled players" use this to determine their racial traits? If so, I would assume that they do so in order as listed in the script, until the point limit of the game is reached. However, you can select 2000, 3000 or 5000 point limits and I've checked 4 races so far and they don't add up. For the Abbidon, Amonkrie & Cue Cappa it comes evenly to 2000 and 3000 if you add them in order, but the total list in the script is less than 5000. For the Drushocka, adding them in order jumps you from 1500 to 2500, and the point total of all the traits listed in the script is 6000. So how does this work - In a 5000 point game, would the Abbidon, Amonkrie & Cue Cappa take additional traits based on something else (what?)to get to 5000? Or would they just soldier on with <5000 in a 5000 point game? Do they get something else for their unused racial points? In a 2000 point game, would the Drushocka skip over that 1000 pt trait at 1500 to get to the next 500 pt trait on the list, or act as if the list didn't contain enough traits to reach the game point total. Similarly, do I assume correctly the neutral players use the "default" script? In that, the raciat trait section actually contains formulas - a list of if statements in the form... if (Sys_Get_Random_Long(1, 4) = 1) then call Add_Racial_Trait("Advanced Storage Techniques") endif How does this work - Does it go down the list until it fills the point total for the game? Again what if it is 500 points under the limit and the next one it gets is a 1000 pt trait? What if it gets through the whole list without hitting the limit? Do the regular races default to this when their list contains fewer pts worth of traits than the game limit? Also, I haven't seen any negative point trait being called out in the scripts... |
Re: Modding SEV Thread Questions
Quote:
Has anyone tested to see if it works though? |
Re: Modding SEV Thread Questions
Are we able to build or mod in a certain structure that can only be built once?
|
Re: Modding SEV Thread Questions
What if I have a ship component and I want the first version of it to be open for development at tech level x1 and tech level y1. However, I do not want the second version to be developed till tech level x12 and tech level y3. Can that be coded? Put another way:
I want to make a ship component “Funky Monkey 1” and “Funky Monkey 2”. Funky Monkey 1 can be developed at tech level x =1 and tech level y =1. Funky Monkey 2 can be developed at tech level x=12 and tech level y=3. I want this to be generational (one component) so I can write the component Maximum Level as 2. At this time I have them written as two components with Funky Monkey 1 set to disappear when research for Funky Monkey 2 has been completed. |
Re: Modding SEV Thread Questions
Possible.
requirement 1: Get_Empire_Tech_Level("x") >= (1 + ([%Level%] - 12)) requirement 2: Get_Empire_Tech_Level("y") >= (1 + ([%Level%] - 3)) should do it.. |
Re: Modding SEV Thread Questions
I think you meant to put multiplication instead of subtraction.
This should work better: requirement 1: Get_Empire_Tech_Level("x") >= ([%Level%] * 11 - 10) requirement 2: Get_Empire_Tech_Level("y") >= ([%Level%] * 2 - 1) Level 1 requires X >= (11-10 = 1) and Y >= (2-1 = 1) Level 2 requires X >= (22-10 = 12) and Y >= (4-1 = 3) |
Re: Modding SEV Thread Questions
Apologies gentlemen; however, I am just too slow to follow those examples. I have decided to leave them as separate components that phase out. Now how about something a little less complex, how would I tackle this one?
I have the component “Bottomless Fiend Grinder” [BFG] and I want another generation to come available every other level. So for example: At tech level 1 you get BFG 1. At tech level 3 you get BFG 2. At tech level, ya Ok you get the idea… How would I do that? |
Re: Modding SEV Thread Questions
Requirement:
GETL("x") > [%Level%] * 2 |
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
Ok; now I understand this and the other formula (1st and 12th tech level)! I was way over thinking the whole thing. Thanks guys, back to the grind till the next question.
|
Re: Modding SEV Thread Questions
If I use a formula that generates a fraction what will SE do? Choke and die, round up, round down, or ignore all fractions?
|
Re: Modding SEV Thread Questions
Most formulas can do decimal entries and the result is either rounded off or used as is depending on what it is affecting. For example, damage is rounded to whole number, while population reproduction or sight level is not. Formula fields that don't use decimals usually return a value of 0.
|
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
If space yards are in space why were they given the ability to repair facilities?
|
Re: Modding SEV Thread Questions
Are you asking about the Space Yard component or Space Yard facility?
For gameplay resasons it's probably a good idea to keep it that way since there is no inherent repair rate for a planet. I requested that some lines be added to settings.txt that allow you set a repair rate for a planet without a SY... |
Re: Modding SEV Thread Questions
The component; how does a space yard in space fix a facility on a planet? You do have a good point though!
|
Re: Modding SEV Thread Questions
Construction crews shuttle down to the planet and repair the facilities using supplies from the planet?
|
Re: Modding SEV Thread Questions
A basic repair for colonies is essential IMO. Otherwise damaged facilities will never be repaired and it is quite unlogical that you can build new facilities, upgrade facilities but not repair them!
|
Re: Modding SEV Thread Questions
Is there a way to build a component which has a restriction that limits the total number that can be carried? For example:
The Mega Toaster The mega toaster can toast all bread in the blink of an eye; however, due to the power draw only 1 per 100 hull spaces can be used. *Mega Toaster Inc. is not responsible for burnt slices or charring of crust. http://forum.shrapnelgames.com/image...ies/tongue.gif |
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
Quote:
Now if you could just restrict based on component NAME that would be much easier... but I never tried that and don't have the function list handy, so it might already be possible http://forum.shrapnelgames.com/image...ies/tongue.gif |
Re: Modding SEV Thread Questions
Note: depending on where you use it, Get_Vehicle_Hull_Tonnage has a tendancy to return 0.
It works in the weapon enhancement file, but I've yet to have it work in components.txt. |
Re: Modding SEV Thread Questions
Quote:
http://www.shrapnelcommunity.com/thr...;Number=447917 |
Re: Modding SEV Thread Questions
Quote:
|
Re: Modding SEV Thread Questions
If you know the size of the hull, (which you do) then you know how many are allowed simply by doing the X per 100kt math.
Limit to that many. Done. Restrictions are each an equation. If the equation evaluates to false, then the design is illegal. If it is true, the design is OK. |
Re: Modding SEV Thread Questions
President_Elect_Shang said:
I did miss that thread and after scanning it I can see where you made 50% of the hull dedicated to fighter bays; however, as I mentioned this is not the type of restriction I want. Well good, cause that is not at all what the thread is talking about. http://forum.shrapnelgames.com/images/smilies/happy.gif The 50% fighter bay requirement is already a part of SE5. The thread is about how to set up a max number or percentage of space you can use for specific types (or groups) of components (eg: weapons); it is in fact exactly what you want to do. You can't do it from the component itself, it has to be a restriction on each hull. |
Re: Modding SEV Thread Questions
So you are saying give the component say “tag 1” then each ship size the restriction 1 tag 1 per 100 hull spaces. Won’t this cause the ship to NEED that component or else it will warn of an illegal design? Your light cruiser needs 50% fighter bays or it can’t be created correct?
From your thread: Requirement 7 Description := This vehicle must have at least 50% of its hull dedicated to Fighter Bays Making a ship take a certain number of a component is an old trick I know well. If I code something along this lines I will be forcing the player to take the component or else. Is there something else that I am missing? The Ultra-Toaster component MUST be purely optional. I managed a very dirty way to do this in SE4 but with SE5 it is another creature. I am trying to learn to mod all over again. On another question is Aaron going to release a detail of the abilities that can be used for components, et-el? |
Re: Modding SEV Thread Questions
Huh? The example is a carrier, so it has a fighter bay requirement as the source vehicle from the data file does. That is not what the thread is about though; look at the last requirement (the one the post tells you to add). It is a max space for AI Tag 01. There is no requirement to have any AI Tag 01 abilities present to have a legal design, just a maximum.
Aaron is working on some modding docs. |
Re: Modding SEV Thread Questions
You can put whatever you like for the formulae; plug math and comparisons and boolean logic together like legos, and you can make whatever you want.
What is the source of confusion? |
Re: Modding SEV Thread Questions
Shang, you're taking the example too literally.
First, the design requires LESS than 1 per 100; 0 is perfectly fine. Look at the engines for a stock example- every ship has a requirement that limits the amount of Standard Move you can have. Second, the design linked is for a *carrier*. That is why it has the Fighter Bay requirement. Ignore that part, it isn't even relevent. |
Re: Modding SEV Thread Questions
Now that question I can answer. The source of my confusion is in the Boolean and SE5. Specifically my experience with either is limited to what; three or four days now? I am learning as I go. My tech skills end at the tips of my fingers so-to-speak.
Ok now I have my focus on requirement 8. So you give all weapons AI Tag 01 and now the AI will only add three weapons. And this restriction will pass on to the player as well? They will only be able to add three weapons? Excellent! That is much better than my solution. This misunderstanding/confusion is my fault, I’m so conditioned to looking at the “Requirement” list that I stopped reading when I reached the break between 7 and 8. As for it being a carrier I only noticed the post title “SE5 - Mod Out LCX as Early Warship”. LC to me is Light Cruiser and X means Experimental. What I will do now is read the thread in its entirety. As I said below I only scanned the thread. |
Re: Modding SEV Thread Questions
SE4/5 make the Carrier's abbreviation be "CX", so I just appended a L to it. But I see that SE5 has just "LX" for light carrier. Sorry for the confusion.
|
All times are GMT -4. The time now is 07:53 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.