.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
World Supremacy- Save $9.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old July 15th, 2011, 11:12 PM

Pyrrhic Pyrrhic is offline
Private
 
Join Date: Mar 2011
Posts: 10
Thanks: 3
Thanked 1 Time in 1 Post
Pyrrhic is on a distinguished road
Default rules question: turn resolution

i've got this here situation and need an expert:

- i want to nail a unit with seeking arrows
- i suspect the unit is going to teleport
- the unit has a lower ID than any of my casters

do the seeking arrows arrive in the unit's current province before the teleport takes effect?

the teleport will presumably be to an unfriendly province and cause a magic battle -> after the ritual phase. dunno if that matters.

at any rate, the question is: where is the unit when i cast my rituals?

thank you very much for your help.
Reply With Quote
  #2  
Old July 16th, 2011, 08:38 AM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: rules question: turn resolution

Ritual happen in either id order or reverse id order.

So, you can't tell. It's essentially random.
Reply With Quote
The Following User Says Thank You to thejeff For This Useful Post:
  #3  
Old July 16th, 2011, 09:49 AM

JonBrave JonBrave is offline
Second Lieutenant
 
Join Date: Aug 2010
Posts: 546
Thanks: 100
Thanked 10 Times in 8 Posts
JonBrave is on a distinguished road
Default Re: rules question: turn resolution

Excuse me for saying the bleedin' obvious, then, but if Mr (or Ms) Pyrrhic could find just one caster with a lower ID than the opponent he could be sure to "surround" him?

As for "It's essentially random.", randomness is a bit of a hobby of mine, here the overall order is not at all random, though I suppose it is for the purpose of which direction it goes Assuming that thejeff is correct (and I would not doubt it!), if that is the definition of the manual's "in a random order", I wouldn't go basing an encryption algorithm on it
Reply With Quote
  #4  
Old July 16th, 2011, 02:25 PM

Pyrrhic Pyrrhic is offline
Private
 
Join Date: Mar 2011
Posts: 10
Thanks: 3
Thanked 1 Time in 1 Post
Pyrrhic is on a distinguished road
Default Re: rules question: turn resolution

Quote:
Originally Posted by JonBrave View Post
Excuse me for saying the bleedin' obvious, then, but if Mr (or Ms) Pyrrhic could find just one caster with a lower ID than the opponent he could be sure to "surround" him?
No can do. The target in question is a bunch of Benim with ID 106. As I said in the OP, lower than any of my casters.

Quote:
Originally Posted by JonBrave View Post
As for "It's essentially random.", randomness is a bit of a hobby of mine, here the overall order is not at all random, though I suppose it is for the purpose of which direction it goes Assuming that thejeff is correct (and I would not doubt it!), if that is the definition of the manual's "in a random order", I wouldn't go basing an encryption algorithm on it
I think the fine point here is the difference between in random order and in a random order. And what do you have against 1-bit encryption?
Reply With Quote
  #5  
Old July 16th, 2011, 06:58 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: rules question: turn resolution

Yes, you have it exactly right.
All I meant by 'random' is that which order (high-to-low or low-to-high) it goes in is chosen randomly. Or pseudo randomly, if you want to be precise.
Obviously not encryption algorithm worthy, but I think it's a clever trick. It really covers about 95% of what you'd get out of completely randomizing action order, at a much lower cost. There are a handful of edge cases where you can abuse it, like using high and low id casters, but mostly all that's important is that you don't know who's going first. Not doing more work than you have to is elegant.

However, I think you may be confused, Pyrrhic. It uses unit ID, which as far as I know isn't displayed, not Monster Number, which I think is what you're referring to. Units are displayed in the main window or the Army Orders screen in ID order. That's the only way I know to determine relative order. Monster Number is shown with .
So if you use casters at the top and bottom of your screen, you'll most likely hit him with some of them. Of course, you have to use twice as many casters and gems, so it's not always worth it.
Reply With Quote
  #6  
Old July 16th, 2011, 08:34 PM
Deathblob's Avatar

Deathblob Deathblob is offline
Corporal
 
Join Date: May 2011
Posts: 103
Thanks: 17
Thanked 24 Times in 17 Posts
Deathblob is on a distinguished road
Default Re: rules question: turn resolution

The unit ID numbers (friendly and enemy) are displayed in the debug output of battles.
Reply With Quote
  #7  
Old July 16th, 2011, 10:39 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: rules question: turn resolution

True enough. I should have remembered that.
Reply With Quote
  #8  
Old July 17th, 2011, 05:05 PM

JonBrave JonBrave is offline
Second Lieutenant
 
Join Date: Aug 2010
Posts: 546
Thanks: 100
Thanked 10 Times in 8 Posts
JonBrave is on a distinguished road
Default Re: rules question: turn resolution

Quote:
Originally Posted by Pyrrhic View Post
And what do you have against 1-bit encryption?
Limited applicability
Reply With Quote
  #9  
Old July 17th, 2011, 05:12 PM

JonBrave JonBrave is offline
Second Lieutenant
 
Join Date: Aug 2010
Posts: 546
Thanks: 100
Thanked 10 Times in 8 Posts
JonBrave is on a distinguished road
Default Re: rules question: turn resolution

Quote:
Originally Posted by thejeff View Post
Yes, you have it exactly right.
All I meant by 'random' is that which order (high-to-low or low-to-high) it goes in is chosen randomly. Or pseudo randomly, if you want to be precise.
Obviously not encryption algorithm worthy, but I think it's a clever trick. It really covers about 95% of what you'd get out of completely randomizing action order, at a much lower cost. There are a handful of edge cases where you can abuse it, like using high and low id casters, but mostly all that's important is that you don't know who's going first. Not doing more work than you have to is elegant.
I'm completely bemused by this explanation. This is all in order to draw a single random number (bit) rather than a bunch of random numbers to mix the order??? fgs, randomize the order. We don't need a "clever trick" to be "elegant", be really daring and use an extra CPU cycle
Reply With Quote
  #10  
Old July 17th, 2011, 06:00 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: rules question: turn resolution

Why?
What does it gain you?

It's potentially thousands* of units that have to be put in a random order. And then you have to iterate over them. Which probably requires a new structure to hold the order that has to be created every time. Sure, you could do it. It probably wouldn't even take that much longer. There's a lot going on in each turn. Still, large games already take a long time to process.

Maybe I've just been working with slow, low memory chips too long.

*The way it's set up now, it's probably 10s of thousands since each unit commander or not, has a unit id. If you were going to do this, you'd probably want to treat troops and commanders separately to simplify the sort.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.