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 3 users and 130 guests online.

Online users

  • p3 d
  • noxxle
  • Isopsyco

Languages

  • English English
  • French French

Browse archives

« Mai 2008  
Lu Ma Me Je Ve Sa Di
      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

Modding weapon accuracy.

Submitted by Fallen Haven on Wed, 2006-11-22 09:17. SE:V MODs

Lately, i have been trying to mod how weapons works. One neat idea i was trying to implement was to have an optimal range for each weapons. In practice, i mean a range at wich the weapon would be at it's most accurate/damaging. Right now, it's linear, either it drops or it increase, not both. What i want is the weapon accuracy/damage to rise up to a point then drop (an idea taken from EVE Online). I tryied several formulas but it seem the engine don't support it, or at least, if it does, it won't display it properly when you look at the weapons stats.

Here an exemple of what i mean

Range : 10 20 30 40 50 60 70 80 90
Damage : 5 10 15 20 15 10 5 0 0
Accuracy :-20 -10 0 -10 -20 -30 -40 -50 -60

But i just can't make it works Sad. The game don't seem to be able to to make it rise then drop, it either rise or it drops...

‹ Modding Manual? Balance Mod v0.98 Available! ›
» 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.
Rilbur's picture

Math formulas

Submitted by Rilbur on Wed, 2006-11-22 10:14.

What formulas did you try and use to get it to rise adn drop? The one that comes to mind for that is a power formula, though I don't think you can do linear shifts with it. Either that, or use a combination of IIF conditionals to have two seperate formulas.
_______________________
There are 10 types of people in the world:

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

» login or register to post comments

I tryied a few things, like

Submitted by Fallen Haven on Wed, 2006-11-22 10:40.

I tryied a few things, like using a negative number instead of 0 as the starting point and trying equations with the range. But the game don't seem to be able to make it start from a negative, reaching 0 and dropping again, the best i could pull was a linear increase instead. I don't understand how to use the iff yet, if you can explain it to me...

» login or register to post comments
Rilo57's picture

Parabolic shaped formula is what your looking for.

Submitted by Rilo57 on Wed, 2006-11-22 12:03.

You need to make a parabolic formula y=-1*(x^2)/8 or something like that... but It's been too long from any math class I've taken... I can't figure out how to displace the curve on the X axis. Right now that curve places the high point of the curve at 0,0 and you want the high point at about 3 or 4.

As a side note I kind of like the parabolic drop off of the chance to hit, rather that a liner drop off.

» login or register to post comments
Rilo57's picture

I've got something that

Submitted by Rilo57 on Wed, 2006-11-22 12:32.

I've got something that might work...

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

This produces at parabola with it's peak at about 2, right now it actually peaks and would be giving you a 12% bonus at range 2. You can play around at fine tune the numbers. I'm using devnull's editor with that formula wizard it has. it's pretty cool.

» login or register to post comments
Mod Designer

Negative

Submitted by Phoenix-D on Wed, 2006-11-22 12:35.
First thing to keep in mind is that 0 = no modifier, you using the base chance to hit. In stock, that's 100%. Here's how iif statements work: iif(This, then, else). If This is true, it does Then. Otherwise it does Else. So: iif([%Range%] < 20, -20, -10) will make a weapon that has a -20% modifier at ranges less than 20, and a -10% at all other ranges. he dropoff you posted above could be done like so: iif([%Range%] < 30, (-30 + [%Range%]), (0 - ([%Range%] - 30))) What this does: if the range is less than 30, it uses the forumla -30 + the range. At or above 30 it uses the formula 0 - the range - 30. the tricky part is this: you can refer to other iif statements inside an iff! That gets really confusing, really fast so you want to avoid doing it where possible.
» login or register to post comments
Rilo57's picture

apparently SEV can't "parse"

Submitted by Rilo57 on Wed, 2006-11-22 12:52.

apparently SEV can't "parse" my formula. I'm not sure what exactly that means. I guess it means the formula is too complicated??? Does anyone else have any thoughts?

Why have the ability to input formulas if there's a point where the formula is too complicated?

» login or register to post comments
Rilo57's picture

(-1 *(([%Range%] ^2)/ 50)+ (1.5 * [%Range%])) - 27.88

Submitted by Rilo57 on Wed, 2006-11-22 13:44.

The "parse"ing problem was acutally due to the SEV needing spaces in the formula. You can do complex formulas. I suppose you could do iif statements also but this formula produces what your looking for:

(-1 *(([%Range%] ^2)/ 50)+ (1.5 * [%Range%])) - 27.88

this produces a:

10 20 30 40 50 60 70 80 90 100 110 distance
-15 -6 -1 0 -3 -10 -21 -36 -55 -78 -105 accuracy%

» login or register to post comments
Rilbur's picture

Parsing

Submitted by Rilbur on Wed, 2006-11-22 18:46.

Rilo57 wrote:
apparently SEV can't "parse" my formula. I'm not sure what exactly that means. I guess it means the formula is too complicated??? Does anyone else have any thoughts?

Why have the ability to input formulas if there's a point where the formula is too complicated?

SEV is really piicky about formulas. Add extra spaces wehver they could POSSIBLY fit and it generally fixes the problem... generally.
_______________________
There are 10 types of people in the world:

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

» login or register to post comments

Great work!

Submitted by Fallen Haven on Thu, 2006-11-23 02:27.

Rilo57 wrote:
The "parse"ing problem was acutally due to the SEV needing spaces in the formula. You can do complex formulas. I suppose you could do iif statements also but this formula produces what your looking for:

(-1 *(([%Range%] ^2)/ 50)+ (1.5 * [%Range%])) - 27.88

this produces a:

10 20 30 40 50 60 70 80 90 100 110 distance
-15 -6 -1 0 -3 -10 -21 -36 -55 -78 -105 accuracy%

Nice, i'm going to try that later, seem promising. But right now i'm stuck editing scripts for my mod Smiling.

» login or register to post comments
Rilbur's picture

Try Forcing the math

Submitted by Rilbur on Thu, 2006-11-23 10:41.

Try "forcing" an absolute value based equation.

(("x"^2)^(1/2)) where X is range-40 for example, would produce a linear form of the above equation.
_______________________
There are 10 types of people in the world:

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

» login or register to post comments

Hum...

Submitted by Fallen Haven on Thu, 2006-11-23 23:52.

Thanks again, i never got that far in mathematics, i would never have found this.

/cranking the empire mathematics slider

» 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:

  • Defence vs. Attack and other Combat related questions...
  • Sphärenwelt
  • Why Retrofit is limited to +50% per order?
  • Babylon 5 Wars SEV Mod Update
  • Balance Mod Neutral Races

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:

  • atmosphere won't change and wepaon question.
  • Question about shipsets/new races
  • Cloaking Problem
  • dangrous wormholes
  • Sollar Collector vs Quantum Reactor
(c) Strategy First, Inc. All rights reserved.