Home Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 4 users and 195 guests online.

Online users

  • Captain Kwok
  • Astorax
  • Shrike
  • Firzen_Zero

Languages

  • English English
  • French French

Browse archives

« July 2008  
Mo Tu We Th Fr Sa Su
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Home » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Coding Questions

Rilbur's picture
Submitted by Rilbur on Tue, 2006-10-24 10:37. SE:V MODs

I'm geting ready to make my own mod, and I have a few questions...

What does the stuff in "EmpireGainedAbilities" do? Or is it a null-file of some kind?

What does "morale" (in the shipexpeiance file) do for ships?

How do I re-script the AI to deal with changes I make (AKA: where can I find a tutorial on the AI scripts, assuming someone has written one already).

Does the following code (taken from techareas.txt) do what I think it does?

Requirements Evaluation Availability := AND Controls which combination you need: AND means both, OR would mean either of them, and I"m guess there are other combinations?

Requirements Evaluation Allows Placement := AND "If you have these requirements, you can place this tech"??? (Maybe meant for components, so you can place them even if you don't know them?) Looking at Vehicle Sizes, this looks like it might be used to differentiate between the stuff you have to have to finish the ship, and what you need to see the ship size as an option?

Requirements Evaluation Allows Usage := AND I'm thinking this is used for somethign similar to the above?

Is it possible to have a component / vehicle scale with two tech levels? For example, I might have an organic frigate with armor regenerating and maintenence reduction capacity (see balance mod). Could I have the ship construction techs scale its size/cost, while organic technology scales its armor regen and maintenance reduction? Or can I have a weapon where one line of research increases damage, another increases range / travel rate, and a third increases durability (a seeker, obviously).

I'll probably come up with more ideas as time passes...

‹ Honorverse Mod Finite Resources ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Captain Kwok's picture
Mod Designer

Responses

Submitted by Captain Kwok on Tue, 2006-10-24 10:46.

EmpireGainAbilities.txt is implemented at this time. I think at one point Technological/Organic/Crystalline ships were going to use all unique components but it never happened that way. I'm still hoping it might be able to implemented in that researching certain levels of theoretical sciences might open up the racial trait areas...

Morale is not implemented.

There are no tutorials available on the AI Scripts at this time. Some of the scripts contain in-line documentation though. The Script_AI_DesignCreation.txt probably has the most.

If there are two or more requirements, "AND" means you need both and "OR" means you needs either. By default it seems everything has "AND" regardless if it has 1 requirement etc.

-----

Space Empires Depot | Space Food Empires!

» login or register to post comments
Rilbur's picture

deleteme

Submitted by Rilbur on Tue, 2006-10-24 10:56.

deleteme, someone

» login or register to post comments
Rilbur's picture

Fook

Submitted by Rilbur on Tue, 2006-10-24 10:57.

How do I get the server to NOT truncate my darned post?

Lets see if I can copy and paste into this reply...

Nope, can't -- still truncates Sad

Edit: Kwok, if you hit "quote" you'll see that less than half my questions displayed for some reason.

d'oh, it was trying to parse my <-- stuff. Fixed.

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Rilbur's picture

As seen...

Submitted by Rilbur on Tue, 2006-10-24 22:32.

http://www.spaceempires5.com/en-US/node/862

As you can see in the thread I linked to above, I have a reason other than idle curiosity for a lot of these questions. My "Missile Mod" idea came about primarily as a result of deciding that there was probably not a (useful) way to do what I wanted to do with the weapons as-coded. The closest I came to was to use the "getempiretechlevel" thing (don't remember the exact text) inside the weapon's formula code, but I think that'd act unpredictably if the weapon changed hands. Is the "empire level" code stuff saved to the design when its made, or will it go and read it anew each time?

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Rilbur's picture

VehicleUnitTypes

Submitted by Rilbur on Wed, 2006-10-25 23:34.

If I understand it right, "vehicleUnitTypes" let me custom-define my own vehicle types... for example, clone the "drones" selections and have a half dozen different types of drones (all of which can be renamed to various types of missiles, each following their own rules?).

I just wish I saw a similar section applying to ships/bases!

To that point, I want to know what a lot of the following values mean:

.Can Communicate
Guess: This item allows the unit to act as a first contact event.
.Can Be Launched Into Space
.Can Be Recovered From Space
I'm reasonably certian this lets you launch/recover units.
.Has Spaceyard Capability
Lets you add spaceyard components?
. Can Be Sector Obscured
.Can Obscure Sectors
No clue on these two.
. Can Be Scrapped
. Can Be Mothballed
. Can Be Unmothballed
. Can Be Deconstructed And Analyzed
. Can Be Retrofitted
I'm guessing these do what they say, allow for scrapping, mothbolling, etc etc.
. Detonates When Enemy Near
I'm guessing this is what lets the mine's kill enemy ships?
. Has Facing
No clue.
. Can Use Warp Points
. Can Be In Fleet
. Shares Supplies In Fleet
I'm guessing these are also what they say.
. Can Fire Into Space From Planet Surface
. Can Fire Into Space From Ship Cargo
I'm not sure about these... do they let something inside cargo act on somethign outside the ship/planet?
. Takes Part in Ground Combat
. Can Self-Destruct
. Can Be Fired On And Destroyed By Owner
Again, I think these are fairly obvious...
. Can Be Transferred While In Cargo
Not sure what this does though.
. Cannot Be Controlled By Player Once Launched
. Seeks Towards Target And Rams
Drone controls?
. Cannot Move And Tracks Target
I think this makes sattelites capable of firing.
. Can Be Dropped For Ground Combat
. Can Be Boarded And Captured
I hope this is obvious...
. Hidden in Combat
. Abilities Added To Parent When In Cargo
What're these though?
. Does Not Require Supplies
. Cannot Be Hit By Mines
I think these do what they say.

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Mod Designer

Those lot do what they say

Submitted by LordHavoc on Thu, 2006-10-26 16:15.

Those lot do what they say on the tin. The two marker

Quote:
. Hidden in Combat . Abilities Added To Parent When In Cargo

Hidden in Combat means it hidden in combat. For example mines are hidden in combat.
Abilities Added to Parent When In Cargo. I'm not sure this is implemented yet, but what it does means you can apply bonuses to cargo and they transfer to the ship or base they're stored on. Example, satillites with shield regenerators would in theory help regenerate the ship they're stored on.

Your lord and master (below Foamy) LordHavoc

» login or register to post comments

Abilities added to parent when in Cargo

Submitted by Sinapus on Thu, 2006-10-26 17:57.

LordHavoc wrote:
Abilities Added to Parent When In Cargo. I'm not sure this is implemented yet, but what it does means you can apply bonuses to cargo and they transfer to the ship or base they're stored on. Example, satillites with shield regenerators would in theory help regenerate the ship they're stored on.

In VehicleUnitTypes that ability shows up for Weapons Platforms only, so I'm guessing it's for when they're on a planet. Though it would be amusing to have it work while being carried by a colony ship or transport.

Imagine:
Lone transport jumped by frigate and frigate finds out transport is carrying 10 WPs loaded with capital ship missiles and enough ordnance to fire a few volleys. Eye-wink

» login or register to post comments
Rilbur's picture

Probobably not

Submitted by Rilbur on Thu, 2006-10-26 18:00.

Sinapus wrote:
LordHavoc wrote:
Abilities Added to Parent When In Cargo. I'm not sure this is implemented yet, but what it does means you can apply bonuses to cargo and they transfer to the ship or base they're stored on. Example, satillites with shield regenerators would in theory help regenerate the ship they're stored on.

In VehicleUnitTypes that ability shows up for Weapons Platforms only, so I'm guessing it's for when they're on a planet. Though it would be amusing to have it work while being carried by a colony ship or transport.

Imagine:
Lone transport jumped by frigate and frigate finds out transport is carrying 10 WPs loaded with capital ship missiles and enough ordnance to fire a few volleys. ;)

I think thats to allow the combat sensors to work, you'd need "Can Fire Into Space From Planet Surface/Can Fire Into Space From Ship Cargo" to fire from a planet/from cargo.

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Mod Designer

I never thought of weapons

Submitted by LordHavoc on Thu, 2006-10-26 18:01.

I never thought of weapons being added. I've usually only thought of combat bonuses and stuff.

There must be something coded that only makes them effective on planets. Because I've never seen a transport laden with WP's have that kind of firepower. Shame though, it would have been amusing.

Your lord and master (below Foamy) LordHavoc

» login or register to post comments
Mod Designer

Abilities aren't weapons

Submitted by Phoenix-D on Thu, 2006-10-26 18:05.

Abilities is stuff like combat bonuses, movement, etc. Weapons are covered seperately with the lines:
Can Fire Into Space From Planet Surface
Can Fire Into Space From Ship Cargo

Note: not everything listed in the date files works! Make sure to test it before basing any part of a mod on it. Smiling

» login or register to post comments
Rilbur's picture

Tonnage Structure

Submitted by Rilbur on Thu, 2006-10-26 18:48.

Tonnage Space Formula := 10 + (([%Level%] - 1) * 0)
Tonnage Structure Formula := 15 + (([%Level%] - 1) * 0)

Obviously the first one gives the space available on the vehicle size, but the second one seems odd. Do vehicle "hulls" actually have tonnage now or something?

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Mod Designer

Doesn't do anything

Submitted by Phoenix-D on Thu, 2006-10-26 19:18.

As far as I can tell tonnage structure on hulls has no effect.

» login or register to post comments
Thy Reaper's picture
Mod Designer

Tonnage Structure

Submitted by Thy Reaper on Thu, 2006-10-26 19:40.

The hull tonnage structure may be a base amount of health a hull has without any components. All components could be destroyed, but the ship would live until that last bit is removed.

-----
With all these people, you would expect one of them to carry an iguana around...

» login or register to post comments
Rilbur's picture

Supply Drain in Combat

Submitted by Rilbur on Thu, 2006-10-26 19:50.

Can anyone think of any way to make an engine drain supplies while in combat? Specifically, a unit engine. In a pinch, i'd willing accept having some other component do it, so long as it did it constantly (i. e. shield regenerators would only drain supplies while regenerating, so thats out).

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Rilbur's picture

Fractional division and also....

Submitted by Rilbur on Thu, 2006-10-26 20:21.

How does the engine handle fractional division and decimals in formulas? I. E. can I put in a *2.5 and have it come out as 5 every 2 levels? And if I want to integer divide the level so that you get a boost to an attribute every three levels, is that possible?

Also,


Requirement 2 Description                       := This vehicle must have 1 Missile Control Core.
Requirement 2 Formula                           := Get_Design_Specific_Component_Count("Missile Control Core") = 1

The "missile Control Core" doesnt' work,b ecause I want to be able to have several components, with differen't names, all holding that same requirement (some will have bonuses attached to them, some won't, etc etc). Can anyone else think of a good way to handle that?

edit:

n/m, the destroyer size held the clue: (Get_Design_Ability_Component_Count("Control Center") = 1) or (Get_Design_Ability_Component_Count("Master Computer") >= 1)

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Rilbur's picture

Warhead Equation

Submitted by Rilbur on Thu, 2006-10-26 21:41.

(200 + (([%Level%] - 1) * 200)) - (([%Range%] / 10) * 0.00) - iif([%Range%] > Min(30, (([%Level%] - 1) * 0) + 10), 10000, 0)

I'm trying to understand this equation from the standard warhead component. It doesn't seem to add up!

First off, the range for a warhead HAS to be 0, since it only impacts on ramming, so why is it bother to check by range (especially when it then multiplys by 0!) and then checking to see if its outside the max range (when again that has to be 0!)?

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Rilbur's picture

Levels From Tech

Submitted by Rilbur on Thu, 2006-10-26 22:10.

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 Capital Missiles.
Requirement 1 Formula                           := Get_Empire_Tech_Level("Capital Missiles") >= 1
Requirement 2 Description                       := Empire must have at least tech level 1 in Warheads.
Requirement 2 Formula                           := Get_Empire_Tech_Level("Warheads") >= (1 + ([%Level%] - 1))

That comes from the code for anti-planet warheads. I thought levels were linked to the first tech in the list, but the warhead goes to 100, exactly as if levels are linked to warheads, the second in the list.

Anyone have a clue how that might be happening?

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Mod Designer

2

Submitted by Phoenix-D on Thu, 2006-10-26 22:19.

That would because the second item has the [%Level%] variable and the first does not.

» login or register to post comments
Rilbur's picture

Nice, so...

Submitted by Rilbur on Thu, 2006-10-26 23:13.

Phoenix-D wrote:
That would because the second item has the [%Level%] variable and the first does not.

D'oh! Thanks!


Name                                            := Counter Missile
Description                                     := Tiny missiles which seek out and destroy enemy missiles.
Picture Number                                  := 167
Maximum Level                                   := 95
Tonnage Space Taken Formula                     := 30
Tonnage Structure Formula                       := 30
Cost Minerals Formula                           := 100 + (([%Level%] - 1) * 5)
Cost Organics Formula                           := 0
Cost Radioactives Formula                       := 20 + (([%Level%] - 1) * 5)
Supply Amount Used Formula                      := 0
Ordnance Amount Used Formula                    := 10
Can Be Placed On Vehicle Types                  := Ship, Base, Satellite, Weapon Platform
Can Be Placed In Ship Sections                  := Inner Hull, Outer Hull
Component Type List                             := Technological
General Group                                   := Weapons
Custom Group                                    := 0
Number Of Requirements                          := 1
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 Point - Defense Weapons.
Requirement 1 Formula                           := Get_Empire_Tech_Level("Point - Defense Weapons") >= (1 + ([%Level%] - 1))
Number Of Abilities                             := 2
Ability 1 Type                                  := Ordnance Storage
Ability 1 Description                           := Provides storage for [%Amount1%] units of ordnance.
Ability 1 Scope                                 := Space Object
Ability 1 Range Formula                         := 0
Ability 1 Amount 1 Formula                      := 500
Ability 1 Amount 2 Formula                      := 0
Ability 2 Type                                  := Point-Defense
Ability 2 Description                           :=
Ability 2 Scope                                 := Space Object
Ability 2 Range Formula                         := 0
Ability 2 Amount 1 Formula                      := 0
Ability 2 Amount 2 Formula                      := 0
Weapon Type                                     := Seeking
Weapon Delivery Type                            := Missile
Weapon Target Type List                         := Missile
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%] &lt= (250 + (([%Level%] - 1)* 2.5)), (300 + (([%Level%] - 1) * 5)), 0)
Weapon Space Max Damage Modifier Formula        := iif([%Range%] &lt= (250 + (([%Level%] - 1)* 2.5)), (300 + (([%Level%] - 1) * 5)), 0)
Weapon Space To Hit Modifier Formula            := 50 - [%Range%]
Weapon Reload Rate MS Formula                   := 3000
Weapon Display Type                             := Directed Torpedo
Weapon Space Display Effect Name                := Missile 7
Weapon Ground Display Effect Name               := Missile 7
Weapon Explosion Effect Name                    := [Random Specific Type] Weapon Explosion
Weapon Sound Effect Name                        := Capital Ship Missile
Weapon Seeker Speed Formula                     := 0.05
Weapon Seeker Turn Rate                         := 0.01
Weapon Seeker Tonnage Structure Formula         := 30 + (([%Level%] - 1) * 2) 
Weapon Seeker Defense Modifier Formula          := 40

So, can you figure out why this won't open fire on incoming missiles?

edit: Someone told me you could safely go up to 500 on the range, apparently they were wrong, capping it at 300 appears to work.

Edit edit:

Thats not right, capping it at 300 still doesn't fix the problem, an alltech game shows them not working... Anyone have any ideas? Maybe something is broken in my test game...

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Mod Designer

Target type list

Submitted by Phoenix-D on Thu, 2006-10-26 23:34.

"Missile" isn't a valid target. You want "seeker".

Going to 500 has no effect on that. Smiling

» login or register to post comments
Rilbur's picture

Wrong

Submitted by Rilbur on Thu, 2006-10-26 23:51.

Phoenix-D wrote:
"Missile" isn't a valid target. You want "seeker".

Going to 500 has no effect on that. :)

No... I want missile. Seeker would make it target seekers, which there are darned few in my mod at the moment. There are, however, missiles (I modified the unit types to make drones into missiles).

It was actually some kind of artifact in the test game, probably because it had been ported over about 5 "working" versions. Now, it will fire about 1 test in 5 O.o

edit:

Whats really fun, is my warheads (on the missiles) are doing WAY too much dmg. About 3x what they should be, and I can't figure out why.

Edit edit:

I'm going to have to give pu on this mod, there is somethign SERIOUSLY screwey going on with the calculation of drone impact damage.

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments
Mod Designer

Unitypes

Submitted by Phoenix-D on Fri, 2006-10-27 00:25.

Ah, ok. Forgot about the custom unit types.

all I can say there is make sure you've got the spelling exactly the same, down to the capitaliztion.

» login or register to post comments
Rilbur's picture

Wierd Behaviour

Submitted by Rilbur on Fri, 2006-10-27 09:13.

Phoenix-D wrote:
Ah, ok. Forgot about the custom unit types.

all I can say there is make sure you've got the spelling exactly the same, down to the capitaliztion.

Actually, I did get to fire, just not predictably. It'll target and fire about 1 time in 5 for some reason, even when there's plenty of ordance and dozens of launchers per vessel.

There are 10 types of people in the world:

Those that understand binary, and those that don't.

» login or register to post comments

ai files

Submitted by Shayvaan on Sun, 2006-10-29 05:45.

what program do I need to open these silly ai files? Smiling

» login or register to post comments

se5/utilities/scriptparser/

Submitted by damador on Sun, 2006-10-29 05:57.

se5/utilities/scriptparser/

» login or register to post comments

thanks :)

Submitted by Shayvaan on Sun, 2006-10-29 06:39.

Very definately Smiling

» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Popular content

Today's:

  • Research By Percentage SUCKS
  • Space Empires V 1.74
  • Governmet mod/patch/addon
  • Tweaking the planet art without going all the way to FQM
  • Shipsets, Empires, and dead AIs

All time:

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Last viewed:

  • Location of armor and shields
  • complete hang if windows locks desktop due to inactivity
  • Mouse refuses to click through on Event report screen
  • Balance Game
  • Balance Mod v1.13 Available!
(c) Strategy First, Inc. All rights reserved.