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 2 users and 196 guests online.

Online users

  • GambitUK
  • Randallw

Languages

  • English English
  • French French

Browse archives

« Septembre 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          
Home » news » blogs » Gideon's blog

Under the hood: Gidmod Intel (or "...this world was being watched closely by intelligences greater than man's...")

Submitted by Gideon on Fri, 2007-11-09 14:01.

It has occured to me that it is rather unfair of me to change how intel defense works, and then not post details on the system. The following information is current as of 4.9.0-beta, with a game version of 1.58. Hopefully this helps you to better understand how intel defense success is calculated in my mod.

The first thing you should know is how intel and intel defense works.

Basically, an attack type is chosen. Then, the game accumulates points for that type (the ammount varies by type) until it has enough to launch the project. How much the attack project costs goes up by an ammount based on how many total attack points you are spending.

When defending, all your defense points are applied. The cost to defend against a particular attack is equal to one half the adjusted cost of the attack. So far, everything above here is the same as it is in stock. Though I did do one change, I changed how it calculates the cost modifier to the attack project.

Stock formula is:

      if (atk_spending > 1000000) then
        set this_cost := this_cost * 200  
      else
        if (atk_spending > 500000) then
          set this_cost := this_cost * 100  
        else 
          if (atk_spending > 100000) then
            set this_cost := this_cost * 20
          else 
            if (atk_spending > 50000) then
              set this_cost := this_cost * 10 
            endif
          endif
       endif
      endif

I have replaced it with:

      set this_cost := this_cost * Sys_Max_Long(Sys_Min_Long(Sys_Trunc(atk_spending / 5000), 200), 1)

This allows the modifier from attack points to grow gradually rather than in abrupt jumps. The maximum and minimum modifiers are still the same.

Here is what happens in stock after this point:

If you have more defense spending than the cost to defend against an attack, the attack fails, and your defense points go down by an ammount equal to the cost to defend. Its a pretty straight forward system, but one that allows you to make yourself completely immune to enemy intel actions. Chance has no effect, as it is a pure game of who has the most numbers.

Now, here is where the real modifications come in. I'm not going to bore you with specific details, but I am going to give you a detailed idea of how each modifier works, how the chance to defend is calculated, and what the results on the defender's points are.

Firstly, some stats about the defending empire are accumulated. These are:

1 - The number of races in an empire. Each race BEYOND THE FIRST gives a defense chance modifier of -5%. I figured that the more diverse your population is, the more likely people can infiltrate un-noticed. NOTE: I am unsure this particular modifier works yet, as the game does not correctly report the number of races in an empire in the empire information screen in-game.

2 - The average happyness level of your empire. This is calculated by averaging the happyness of all your planets across your empire. This modifier ranges from -10% to +9%, depending on the outcome. Planets which are populated by an emotionless race are assumed to have a happyness level of 85% (agreeing all the time is actuallly NOT logical). This means an empire with an all emotionless population will have a modifier of +7%. All other planets provide a maximum happyness level of 95% (you can't make everyone happy all the time).

3 - The number of rioting planets. Riots are a major drag on intel defense. All the chaos makes it much easier for enemy agents to slip in your empire and do damage/steal information. Because of this, there is a modifier of -10% to defense for EACH RIOTING PLANET. This also means that if you can cause a few riots in a target empire, you can use that as cover to launch even more devistating attacks. The lesson: if you are defending against intel, make sure you have some sort of planetary garrison.

4 - The number of colonies you have. Your ability to secure your empire always decreases as the area it occupies increases. The modifier from this is -1% for every 20 colonies beyond the first. Domed colonies count as 2/3rds of a colony, not a whole colony. This is because a domed colony's enclosed environment is easier to secure than one that isn't domed.

5 - The density of population. It is generally easier to blend in with a crowd than when you are alone, and higher density population areas tend to have more sensitive information available due to the nature of communications. Every 10% of an empire's total population capacity gives a -1% modifier to defense, with a maximum modifier of -10% at 100% capacity filled.

All of these are totaled up, to give a modifier to your percent chance to defend. Now, we have to find the base chance to defend against an attack.

I use the same two base numbers that the stock game does (how much defense you are spending, and how much it costs to defend against a particular attack) but I used these numbers in very different ways. Firstly, the ammount of defense you are spending is modified by what kind of attack you are defending against. Defense spending is 125% effective against espionage attacks (which just gather info), but is 225% effective against sabotage attacks (which actually do damage, and so are riskier to pull off). It is assumed that performing intel against an empire involves bribing/coercing someone in that empire (usually several someones), and it is generally harder to get people to participate in inflicting damage than just giving up information. The bonus of 25% represents defensive systems which cannot, for whatever reason, be co-opted. Maybe its an unbreakable security algorythm, or maybe its a fanatical defending agent.

This modified defense spending ammount is then divided by the cost to defend against an attack. This gives a percentage from 0% on up to...well...to wherever it happens to stop. At this point, it could be well over a 100% chance to defend, or it could be less than 1%. Now, the modifier that was calculated off of our 5 empire statistics is added. This could very well push the defense number in to the negatives, or it could still be over 100%.

After the modified defense chance is calculated, it is constrained. There is a minimum defense success chance of 5%, as you could get lucky. Also, there is a maximum defense success chance of 95%, as failure is always an option. The game then generates a random number from 0 to 100, and compairs it to our defense success chance. If it comes in over our defense success chance, then the intel attack was successful, otherwise it fails.

After success or failure is determined, the other change I've made is to how your defense points are reduced. Unlike stock, there are many shades of grey here for how strong your defenses are.

If you succeed in defending, your total defense points go down by a percentage of the cost to defend against an attack. That percentage is equal to the random number that was generated against the defense success chance, with a maximum of 95%. An illustration would be, Empire A conducts a sabotage attack against Empire B. Empire B has an 85% chance to stop Empire A. Empire A's attack generated an 80, and so fails (85 is greater than 80). Empire B has its defense points go down by an ammount equal to 80% of the cost to stop the attack. In this example, if Empire B had succeeded in stopping the attack with a 25, then its points would have gone down by an ammount equal to 25% the cost to stop the attack. Because of this system, the more points you have sunk in to defense, the more you lose on successful defense, because it is more likely you will succeed at stopping attacks which a high chance to succeed.

Another change is that if you FAIL to stop an attack, your points STILL go down. In stock there is no change in defense points, however, I assume that your intel organization spent some sort of effort (represented by points) to stop the attack. Your defense points go down by an ammount equal to a percentage of the cost to defend against the attack (the percentage is the random number generated for success), divided by between 2 and 6 (an average of 4 is returned). Example: Empire B conducts a sabotage attack against Empire A. Empire A has a 70% chance to stop the attack. Empire B's attack generates a 75, and so succeeds (75 is greater than 70). In addition to suffering the effects of the attack, Empire A's defense points go down by an ammount equal to 75% of the cost to defend the attack, divided by 4. You lose less points on a failed defense, because it is assumed that your intel services stop spending resources to defend against a particular attack at the point that the attack succeeds.

Regardless of whether you succeed or fail in defense, your defense points cannot go below zero.

This is, of course, a work in progress. The values presented here may be tweaked at a later date. I would like to incorporate at least one other statistic, Population Loyalty, but there seems to be no way currently to look that up from inside the AI scripting language. Perhaps at a later date.

Anyways, I hope this helps you in dealing with Intel in my mod.


---Permission is granted to duplicate, whole or in part, and/or modify any of the code here for any purposes that does not violate Malfador Machination's intellectual property rights. Credit to the author of the specific code here is not required.---

» Gideon's blog | 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.
Reiver's picture

Re: Under the hood: Gidmod Intel (or "...this world was being w

Submitted by Reiver on Sat, 2007-11-10 22:00.

Hmm. That's a fascinating system.

The only bit that makes me hesitate is the loss of points in the case of an unsuccessful bid - it means that while small amounts of attack have a chance to succeed, small amounts of defense are essentially worthless, because they'll be constantly sucked dry on failed operations. Is this intentional, to give the balance of power to agressive intel use?

» login or register to post comments
Mod Designer

Re: Under the hood: Gidmod Intel (or "...this world was being w

Submitted by Gideon on Sat, 2007-12-01 12:30.

Reiver wrote:
Hmm. That's a fascinating system.

The only bit that makes me hesitate is the loss of points in the case of an unsuccessful bid - it means that while small amounts of attack have a chance to succeed, small amounts of defense are essentially worthless, because they'll be constantly sucked dry on failed operations. Is this intentional, to give the balance of power to agressive intel use?

That is correct. I dislike stalemates, and one of the things that happens in stock is that you can eliminate the entire Intel system from effective play by just haveing a boatload of defense, creating a stalemate. I wanted to set it up with the idea that, no matter what, something will eventually get through, and it may be something disasterous, so you might as well spend some of your points on offense, and get the high ground as quickly as possible.

Testing and comments are welcome, as the system is in no way set in stone. I'm happy to adjust/tweak/redesign.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» login or register to post comments
Reiver's picture

Re: Under the hood: Gidmod Intel (or "...this world was being w

Submitted by Reiver on Mon, 2007-12-03 04:17.

So what's to encourage small players from bothering with defense at all? You've effectively got offensive hammers and defensive eggshells - it quickly starts to get tempting to just not bother with defense at all, and thus really screw the other guy up. Afterall, if they're likely to punch through no matter what you do...

» login or register to post comments
Mod Designer

Re: Under the hood: Gidmod Intel (or "...this world was being w

Submitted by Gideon on Thu, 2008-05-29 17:37.

Ahh, I see what you mean.

Yes, defense DOES matter. Sure things will get through occasionally. However, if you don't invest in some decent defense, then you will be torn to SHREDS by enemy intel. I tried a game with spending no defense...it was ugly.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

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

  • Ship Capture Issues
  • Space Empires V
  • Hows the current AI?
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • SE5 Multimedia Pack

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:

  • Mouse freezes every 3 seconds - help please!
  • Ring/Sphere world as homeworld
  • Migrating SV5 to another PC
  • Weapon Mounts
  • Star Trek Mod?
(c) Strategy First, Inc. All rights reserved.