Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Bar » ActiveX object model for Stars files
Re: ActiveX object model for Stars files Thu, 21 February 2008 18:17 Go to previous messageGo to next message
PaulCr

 
Chief Warrant Officer 3
Stars! V.I.P

Messages: 187
Registered: February 2007
Location: An Island that kinda look...
It appears to be X,Y coordinates from the ships current location, with it's current location being considered to be 127,127. I've only had time to do a very quick test with ships heading N,S,E,W,NE,SW,NW & SE 1 light year at a time. When heading N and S the first figure was always 127 and the second being higher when heading north and lower when heading South, on the E-W axis it was the same except this time the 2nd figure stayed at 127, when heading NE the figures where identical but higher than 127, when heading SW they were identical but lower than 127, on the SE-NW Axis they differed by the same amount from 127 but in different directions. What I've not been able to work out so far is how it choose how far to move from 127,127 for which more testing will be needed, it also probably needs more testing to make sure it continues to work for other angles.

If your interested in the raw data the figures I got where

N - 127.240 followed by 127.239 the following year
S - 127.31 followed by 127.32
E - 162.127
W - 86.127
NE - 160.160
SW - 102.102
SE - 138.116 +11,-11
NW - 108.146 -19,+19

So when heading East the X figure is greater than 127 and less when heading West. When heading North the Y figure is positive and negative when heading South. I've not tested it but I would expect if heading at an angle of 30 degrees the N figure difference would be twice the East figure difference, ie 2 lys north for every 1ly East.

Report message to a moderator

Re: ActiveX object model for Stars files Thu, 21 February 2008 23:09 Go to previous messageGo to next message
gible

 
Commander

Messages: 1343
Registered: November 2002
Location: Wellington, New Zealand

PaulCr wrote on Fri, 22 February 2008 12:17

I've not tested it but I would expect if heading at an angle of 30 degrees the N figure difference would be twice the East figure difference, ie 2 lys north for every 1ly East.


Mathematically this is incorrect, 30º east of north is 0.86(2dp) north for every 1 east. I imagine the differences from 127 would be a multiple of the x/y deltas to its destination.

Unless speed is stored elsewhere, is the delta magnitude is likely related to it?


[Updated on: Thu, 21 February 2008 23:10]

Report message to a moderator

Re: ActiveX object model for Stars files Fri, 22 February 2008 05:55 Go to previous messageGo to next message
PaulCr

 
Chief Warrant Officer 3
Stars! V.I.P

Messages: 187
Registered: February 2007
Location: An Island that kinda look...
I probably should have worked it out properly rather than guestimating before giving figures, assuming 0 degrees is north I get 7 LYs East for every 12 LYs North so I would expect to get figures of 134.139, 141.151, 148.163 and so on etc although I don't know which it would choose from the possible options.
Unless I'm misunderstanding your post I get the figures you mention of 86 East for every 100 North to to be an angle of 40 degrees.

Only the Warp Speed is stored, not how far it has travelled, if you check the stars interface that shows up since quite often if someone intercepts your fleet from a planet since the fleet will appear to have come from before the planet if it doesn't travel the full 81ly at warp 9 for example.

Report message to a moderator

Re: ActiveX object model for Stars files Fri, 22 February 2008 11:33 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Well, I always thought it was some kind of delta, but it still doesn't fit. Here's the data from a short test I did, sorted by "angle" (angles other than 0 and 45 degrees from the coord axis are only approximate):

As you can see, the "dest" column seems to follow a definite curve, but I hesitate to guess which one. The "sum" column is just the addition of both "parts" in the "Dest" column. It too promises a trend of some kind. Sherlock

I didn't set the same speed for all ships, which may have obscured the underlying trends. Confused But it also shows, as in the case with Scouts #02 and #22, that less movement doesn't get you a lower "delta", while Scout #23 shows that "delta" changes despite its X coord being the same as for #22. Shocked
Fleet Name	X	Y	Warp	Destination	Sum	Comments
Scout #01	1252	1262	0	0.0	0	didn't move	(Origin Coords)
Scout #02	1301	1262	7	244.127	371	East	
Scout #22	1277	1263	5	246.134	380	NE 5	guessed angle
Scout #23	1277	1266	5	242.145	387	NE 10	
Scout #24	1276	1268	5	237.153	390	NE 15	
Scout #25	1276	1270	5	235.164	399	NE 20	
Scout #14	1297	1282	7	237.176	413	NE (30)	
Scout #10	1287	1297	7	227.227	454	NE (45)	exact angle
Scout #15	1266	1295	6	168.222	390	NE (60)	
Scout #07	1252	1311	7	127.244	371	North	
Scout #16	1238	1295	6	84.226	310	NW30	
Scout #11	1217	1297	7	27.227	254	NW45	
Scout #17	1219	1276	6	21.173	194	NW60	
Scout #08	1203	1262	7	7.127	134	West	
Scout #18	1229	1253	5	20.86	106	SW30	
Scout #12	1217	1227	7	27.27	54	SW45
Scout #19	1226	1204	8	79.19	98	SW60
Scout #09	1252	1213	7	127.12	139	South
Scout #20	1278	1203	8	174.19	193	SE30
Scout #13	1287	1227	7	227.27	254	SE45
Scout #21	1267	1255	4	239.77	316	SE60

I think I'll need more data, but my head already hurts. Wall Bash



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: ActiveX object model for Stars files Fri, 22 February 2008 11:55 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Well, indeed it turns out subtracting 127 to the whole list yields improved clarity: Teleport

Now it seems warp does indeed change things, though I'm not sure how. Rolling Eyes

It also seems all "45 degree" movements are related, and "30" and "60" degrees movements mirror each other. Very Happy
DestX	DestY	DeltaX	DeltaY
244	127	117	0	(due East)
246	134	119	7
242	145	115	18
237	153	110	26
235	164	108	37
237	176	110	49	(NE at close to 30 degrees)
227	227	100	100	(NE at 45 degrees)
168	222	41	95	(NE at close to 60 degrees)
127	244	0	117	(due North)
84	226	-43	99
27	227	-100	100	(NW at 45 degrees)
21	173	-106	46
7	127	-120	0	(due West)
20	86	-107	-41
27	27	-100	-100	(SW at 45 degrees)
79	19	-48	-108
127	12	0	-115	(due South)
174	19	47	-108
227	27	100	-100	(SE at 45 degrees)
239	77	112	-50

So the "sum" column I made up will not be relevant. Also, these don't seem "deltas" at all, but rather "angle ratios" or somesuch.

Now if only someone could come up with the exact math... (though we know the "angles" drawn in the map can be notoriously inaccurate) Twisted Evil


[Updated on: Fri, 22 February 2008 12:12]




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: ActiveX object model for Stars files Fri, 22 February 2008 12:16 Go to previous messageGo to next message
PaulCr

 
Chief Warrant Officer 3
Stars! V.I.P

Messages: 187
Registered: February 2007
Location: An Island that kinda look...
Going into Paint and drawing lines from 127,127 to the points you give does seem to have them moving approximately correctly, Given you have estimated the angle and if I remember reading correctly the angles stars gives are only approximate anyway it seems close enough to me for me to believe it is correct.

Rather than guessing angles it would seem to be better moving at gradients of 1 to x directly, ie, say the origin is 1400,1400 then move to
1500,1500 for 1/1
1500,1600 for 1/2
1500,1700 for 1/3
1500,1800 for 1/4 etc

Have them travelling at w9 and completely in range of the scanners of the person who is scanning them so you would have seen as much of it's path as possible and then subtract 127 from the value it gives and see if the resulting values do match

Using integer gradients like that should avoid rounding errors complicating things and it's also a more accurate and easier to work out a destination point than estimating angles. I won't have time to do it myself tonight but I'll probably give it ago tomorrow.

Report message to a moderator

Re: ActiveX object model for Stars files Fri, 22 February 2008 12:27 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Well, as usual when the solution is at hand, a new search yields the exact threads where the masters of old already solved the whole mess. There's nothing like knowing the answer before asking! Hit Computer

At the Academy:
http://starsautohost.org/sahforum/index.php?t=msg&th=283 &rid=625&S=135dc6bb0b22e6ef0ad71e9d3b41fc8a#msg_2083

At rgcs:
http://groups.google.com/group/rec.games.computer.stars/brow se_thread/thread/9a14f328e2e21dbd/b483c41a2d7e6da5



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: ActiveX object model for Stars files Fri, 22 February 2008 12:31 Go to previous messageGo to next message
PaulCr

 
Chief Warrant Officer 3
Stars! V.I.P

Messages: 187
Registered: February 2007
Location: An Island that kinda look...
It's not surprising that 30 and 60 degrees mirror each other, the amount travlled north and east are the same except the x and y amounts are switched

5 and 85, 10 and 80 etc should match on a 1 to X basis when reversed
5 and 355, 10 and 350 etc should match exactly except the x figure will be negative for the ones heading west and positive for those going East

Rather than thinking in terms of angles, its better to think in terms of them being coordinates with it's current position being 127,127 and the value it gives being a point somewhere on the ships path if it continued in the same direction for ever.

Report message to a moderator

Re: ActiveX object model for Stars files Fri, 22 February 2008 12:34 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
PaulCr wrote on Fri, 22 February 2008 18:31

It's not surprising that 30 and 60 degrees mirror each other, the amount travlled north and east are the same except the x and y amounts are switched

5 and 85, 10 and 80 etc should match on a 1 to X basis when reversed
5 and 355, 10 and 350 etc should match exactly except the x figure will be negative for the ones heading west and positive for those going East

It is surprising when all I had previously was a long column of numbers where nothing made sense (before subtracting your magical 127) Rolling Eyes

Quote:

Rather than thinking in terms of angles, its better to think in terms of them being coordinates with it's current position being 127,127 and the value it gives being a point somewhere on the ships path if it continued in the same direction for ever.

Yup. Seems just the thing the Jeffs would do. Twisted Evil

Now we only need to unravel the finer points, such as how does Stars! make up those numbers (and not others of the same ratio) and what the next predicted waypoint for the fleet would be. Sherlock


[Updated on: Fri, 22 February 2008 14:27]




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: ActiveX object model for Stars files Sun, 04 May 2008 13:23 Go to previous message
wumpus

 
Master Chief Petty Officer
Stars! V.I.P
Created tools and utilities to help the Stars! community
Past Weekly Puzzle Master

Messages: 114
Registered: September 2004
PaulCr wrote on Sat, 09 February 2008 01:02

...
Homeworld - The .hst file seems to ignore changes, the m files do see an effect but will lose it when the host generates
...



In case you haven't noticed in the meantime: there are actually *two* places you need to change in order to change a world from normal to HW (or vice-versa); the thing in the planets data "chunk" seems to be the one you found, as it appears to effect display only. IIRC, you also need to update the homeworld listed in the race "chunk" (of the HST file). Then it should work properly. (This probably goes in the "I doubt I want to see the stars! code that leads to this effect" category Razz)

A consequence is of course that you are limited in the number of homeworlds in a universe (although there are, I believe, ways of going beyond the obvious number of players).


[Updated on: Sun, 04 May 2008 13:24]




Michael "Wumpus" Zinn
» Apply magic glue here «

Report message to a moderator

Previous Topic: stars!.ini location in Vista
Next Topic: GAME CONCEPT: Mauryan Campaign [Very Long]
Goto Forum:
  


Current Time: Sun May 05 15:04:02 EDT 2024