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

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 1 utilisateur et 69 invités en ligne.

Utilisateurs en ligne

  • Isopsyco

Languages

  • English English
  • French French

Parcourir les archives

« December 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        
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Question about abilities and formulas

Soumis par Sinapus le Mer, 2006-10-25 08:03 SE:V MODs

Is it possible to use Get_Empire_Tech_Level as a variable in an ability calculation?

What I'm thinking of doing is trying to bring in something like the Cultural Centers from the SE:IV Proportions mod, give them a variety of abilities, and make the abilities increase based on different tech levels. Like, say, the mineral extraction value gets a bonus based on the mineral extraction tech and the research point value going up with the research tech level.

I guess what I'm looking for is something like:
Ability 1 Type := Mined Resource Generation - Minerals
Ability 1 Description := Mines [%Amount1%] minerals each turn.
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := 3000 + ([%Get_Empire_Tech_Level("Minerals Extraction")%] * 100)
Ability 1 Amount 2 Formula := 0

So my "cultural center" would have only one level but its resource production and abilities would hopefully grow as you gained techs in other areas. I'm also hoping I can create the entry for the cultural center, but give it an impossible tech level and have it only appear on homeworlds via the HomeworldStartingFacilities file.

Wondered if anyone tried this and if it worked for them before I go breaking things in my game. Eye-wink

‹ Helper Application Release - Space Empires V DesignTypes Editor v0.1.8 Planet conditions... ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.
Image de ekolis
Mod Designer

Yes, I believe Suicide

Soumis par ekolis le Mer, 2006-10-25 08:29

Yes, I believe Suicide Junkie and Captain Kwok have used both the concepts you want to use in their respective mods - it should work Smiling

~~~
Mr. Flibble says...
Game over, boys! Laughing out loud

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

GETL works good in formulae!

Soumis par Captain Kwok le Mer, 2006-10-25 09:00

It will work. It has been used for example to allow armor advances to improve missile damage resistance etc.

-----

Space Empires Depot | Space Food Empires!

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Ooh GETL? *IDEA* Your lord

Soumis par LordHavoc le Mer, 2006-10-25 10:30

Ooh GETL? *IDEA*

Your lord and master (below Foamy) LordHavoc

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Rilbur

GETL

Soumis par Rilbur le Mer, 2006-10-25 11:20

For ship designs, the result of "GETL" saved to the design, so advancing tech / trading ships won't change its value? Seems like it should be, but before I base a mod on it I"d like to be sure.

There are 10 types of people in the world:

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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Another question.

Soumis par Sinapus le Jeu, 2006-10-26 08:47

Is there a way to give a facility the ability to increase the maximum population of a planet? Like, say, a facility that increases the population by 100M so a large planet goes from 4000M to 4100M?

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Rilbur

Another another question....

Soumis par Rilbur le Jeu, 2006-10-26 11:24

When modding weapons, how do the formulas work? Looking at them, I can't make heads or tails of them.

There are 10 types of people in the world:

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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Stock Damage Formula

Soumis par Captain Kwok le Jeu, 2006-10-26 14:56

The stock formula falls into 3 pieces. The first part of the formula is the damage amount minus the second term which is the damage decrease at range, and lastly if IIF statement at the end tells the game if the range is more than X, subtract -10000 (ie make damage zero) and that's the maximum range.

-----

Space Empires Depot | Space Food Empires!

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Rilbur

Ok...

Soumis par Rilbur le Jeu, 2006-10-26 16:13

Just to check, here's a formula from the game:

(20 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 0.00) - iif([%Range%] > Min(80, (([%Level%] - 1) * 10) + 40), 10000, 0)

It breaks down into two parts:

20 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 0.00)

The first half of this controls the damage done by a given level, and teh second half adjusts for range. However, this is the "default" formula and I can change it to something like...

(20+(([%Level%]-1)*5)/(2^([%Range%]/10)))

and have a weapon which halves in damage every 10 units of range.

The second half:

iif([%Range%] > Min(80, (([%Level%] - 1) * 10) + 40), 10000, 0

still leaves me a little confused. I get that "if range is greater than the min" but the entire min value leaves me confused. Where's the 80 come from? How does it figure in (or not in) to the "(([%Level%] - 1) * 10) + 40)" part? And what does the zero at the end control?

There are 10 types of people in the world:

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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

More Dmg formula stuffs

Soumis par Captain Kwok le Jeu, 2006-10-26 16:25

The Min function returns the lower of two items, min(a, b). In this case what's lower 80 or the weapon level * 10? In this case the 80 represents the maximum allowed range of the weapon.

The IIF function than looks at the condition, which in this case is the range value more than what Min returns? If yes, then the value to subtract is 10000, and if false its 0.

-----

Space Empires Depot | Space Food Empires!

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Weapon range

Soumis par Sinapus le Jeu, 2006-10-26 16:26

The iif statement, is that how it increases range via tech level?

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Rilbur

I think

Soumis par Rilbur le Jeu, 2006-10-26 16:38

Sinapus wrote:
The iif statement, is that how it increases range via tech level?

I think so, it would certianly allow it. I wonder how we could get it to return the HIGHER of two values, though...

And Kwok, if I read this right, if the damage reduces to 0 naturally (say because the diminising damage formula reduced that much) it would range cap that way, instead of needing the iif, right?

There are 10 types of people in the world:

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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Nope

Soumis par LordHavoc le Jeu, 2006-10-26 16:47

Sinapus wrote:
The iif statement, is that how it increases range via tech level?

The line
Weapon Space At Range Distance Increment := 10.0
is what causes the range to increase up to a maximum of 300

However, the IIF is what is used to determin a weapons 'maximum' range. It does this by checking to see if a weapon has fired "x" distance, if it has gone beyond it, it reduces the damage by 10000.
You can see it in this code

Weapon Space Min Damage Modifier Formula := (20 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 1.67) - iif([%Range%] > Min(90, (([%Level%] - 1) * 10) + 30), 10000, 0) Your lord and master (below Foamy) LordHavoc

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Yep

Soumis par Phoenix-D le Jeu, 2006-10-26 16:53

The iif statement is what determines maximum range. I have no idea what the Distance Incriment field does; changing doesn't seem to have an effect.

Foamy: in your example, that's not fixed at all. It uses the either 90, OR the result from ([%Level%] - 1) * 10) + 30). That means the gun starts at 30 range and goes up by 10 per level until it reaches 90.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

I didn't say fixed.

Soumis par LordHavoc le Jeu, 2006-10-26 17:05

Phoenix-D wrote:
Foamy: in your example, that's not fixed at all.

I never said it was fixed. And i'm not Foamy, he's the TRUE lord and master. I can't measure up to him...no one can.
Your lord and master (below Foamy) LordHavoc

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Rilbur

So....

Soumis par Rilbur le Jeu, 2006-10-26 17:11

Quote:
The line Weapon Space At Range Distance Increment := 10.0 is what causes the range to increase up to a maximum of 300

So if I increase that value, will it be possible to increase teh relative maximum range of thigns? (One of the reasons I'm modding missiles onto drone bodies is I DETEST how short range weapons are ATM -- you can go through the long-ranged weapons "fire zone" very quickly to get to point blank, especially if both sides are going head on).

There are 10 types of people in the world:

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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Not sure about that one.

Soumis par LordHavoc le Jeu, 2006-10-26 17:12

Not sure about that one. Could be hard-coded. The interface only goes up to 300.

Your lord and master (below Foamy) LordHavoc

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Rilbur

Poking around some more...

Soumis par Rilbur le Jeu, 2006-10-26 17:23

OK, poking around in the files a little more, I've realised that "iif" is actually an if/else combination statement. iff([condition],[if true do this],[else do this]).

Things are starting to make a LOT more sense, yay!

There are 10 types of people in the world:

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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Max range

Soumis par Phoenix-D le Jeu, 2006-10-26 17:25

The max range is 500 ls. The stock CSM gets to about 160 LS max, so you've got plenty of room to play with.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Give yourself a pat on the

Soumis par LordHavoc le Jeu, 2006-10-26 17:25

Give yourself a pat on the back. You've taken the first step into becoming a modder.

Now you've got to make something and release it.

Your lord and master (below Foamy) LordHavoc

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Rilbur

O RLY

Soumis par Rilbur le Jeu, 2006-10-26 17:36

LordHavoc wrote:
Give yourself a pat on the back. You've taken the first step into becoming a modder.

Now you've got to make something and release it.

Your lord and master (below Foamy) LordHavoc

And here I was, thinking the first step was waaaaay back when I first started modding SEIV (OK, so I started out on MoO3... don't kill me!)Sticking out tongue

There are 10 types of people in the world:

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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Oh goodie.

Soumis par Sinapus le Lun, 2006-10-30 22:44

Phoenix-D wrote:
The max range is 500 ls. The stock CSM gets to about 160 LS max, so you've got plenty of room to play with.

Muahaha. SBMs and HBMs, here we come. Smiling

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

IT'S ALIVE!! MUAHAHAHA!!!

Soumis par Sinapus le Jeu, 2006-11-09 23:03

Got it to work so far!

It can:
1. Place the facility on the homeworld but it can't be built anywhere else. (Gave it a tech level requirement that can't be met.) So the HomeworldStartingFacilities.txt file will force placement of a facility.
2. Set the variable for 3000 Minerals + 100 per Mineral Extraction level. Started a test game, it was 3100 minerals per turn. Put all my research into Mineral extraction, ended the turn, got up to lvl 8 in mineral extraction and the facility was producing 3800 minerals per turn!

(Oh, and don't use the formula I showed above. Game can't parse it unless you take away the bracket-% parts and then it reads it fine.)

Now to see if I can add Ordnance/Supply Storage variables to a facility and then see if it will increase a planet's capacity.

EDIT: Nope. Though I think someone mentioned that elsewhere. Oh well. Guess I'll have to use dedicated space stations as depots if I want a ton of supplies/ordnance stockpiled.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

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

Contenu populaire

Aujourd'hui :

  • Is the Patch Process Dead, and Other Thoughts...
  • Research By Percentage SUCKS
  • Known SE5 v1.74 Bugs
  • Space Empires V 1.74
  • Babylon 5 Wars SEV Mod Update

Depuis toujours :

  • 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

Dernier accès :

  • Cargo Transfer
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Is Space Empires the most complex 4x game ever?
  • How to (possibly) reduce mouse lag in SE5 for NVIDIA users!
  • Is the Patch Process Dead, and Other Thoughts...
(c) Strategy First, Inc. All rights reserved.