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 1 user and 244 guests online.

Online users

  • Apple Juice Overload

Languages

  • English English
  • French French

Browse archives

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

Random number generator?

bearclaw's picture
Submitted by bearclaw on Wed, 2006-11-08 19:26. SE:V MODs

Does anyone know if there is a value that can be used in formulas to generate a random number in a specific range? I looked through the MainStrings.txt but could have easily missed something.

‹ Weapon Mounts More racial/government modifiers ›
» 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

Hrm...

Submitted by Rilbur on Thu, 2006-11-09 01:06.

I don't think yo'ure going to find that. What do you want it for? Most places I can think of where it might be useful, the game isn't exactly set up very well to use it.

There are 10 types of people in the world:

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

» login or register to post comments
Kamog's picture

Random number generation

Submitted by Kamog on Thu, 2006-11-09 01:12.

There is a Random(A, B) function that returns a random number between A and B. To see an example, take a look at Formulas.txt where it generates the values for a planet's gravity, temperature and radiation.

» login or register to post comments
Rilbur's picture

Careful

Submitted by Rilbur on Thu, 2006-11-09 01:46.

Just be careful where you use it, I don't think components/vehicle sizes are good places for example. (I'd love it if there were some way to incorporate it into weapon damage, but ATM it looks like the game processes the random command once and once only, probably during the game creation, and we know that it only reads and calculates formulas as save game load/game creation).

edit:

If what you need is a WEIGHTED random roll, just set it to a large range and give the higher weights more "values" with an iif statement.

There are 10 types of people in the world:

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

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

I'm trying out something

Submitted by bearclaw on Fri, 2006-11-10 13:34.

I'm trying out something that I always wanted to create for SEIV but couldn't. I'm creating a mod where (hopfully, if the ability works) all warp points flucuate. all existing warp points close and open at random intervals. I'm also hoping to put in open/close events that create/destroy random warp points as well.

WarpEx Mod. I want to have random values so that you wouldn't know that X warp point opens every 2nd turn.

Actually, now that I think about it... I think I will have some warp points predictable. yeah, that's a good idea.

My hope is that there will be some warp points that will be random to the same locations, some that are predictable to the same locations and some totally random in their locations and durations.

Nick (bearclaw)

"You don't know the Power of the Dark Side. I must obey my Master"

» login or register to post comments
Rilo57's picture

I noticed that there is a

Submitted by Rilo57 on Mon, 2006-11-13 19:43.

I noticed that there is a tonnage notation on the warp points, I haven't checked yet, but it seems to me that this indicates some warp points could have a max ship size it would let through. You might be able to have this max tonnage fluctuate also... cool.

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

  • A question about weapon mounts
  • Space Empires V 1.74
  • Gritty Galaxy Fleet Clash
  • Simultaneous Movement FAQ?
  • Babylon 5 Space Empires V mod?

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:

  • The Daily WTF
  • Space Empires V 1.74
  • My suggestions for the game.
  • Self destruct on satellites
  • "Could not load combat replay"
(c) Strategy First, Inc. All rights reserved.