Runboard.com
You're welcome.

runboard.com       Sign up (learn about it) | Sign in (lost password?)

Page:  1  2  3 

 
starz2far Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 104
Karma: -3 (+2/-5)
Reply | Quote
Re: Idea for Solar Vengeance 5


make an AI that only builds shields, nothing else, and not with its own resources but with sheild generators. Then give it E20 generators and see if it actually generates shields.

As far as I know, it does not work. If you can make it work, post the code here.
3/3/2005, 12:16 am Link to this post Send Email to starz2far   Send PM to starz2far
 
beat2k Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 500
Karma: 5 (+12/-7)
Reply | Quote
Re: Idea for Solar Vengeance 5


{Here's the correct ShieldGenerator code}


If (Getstarshiptype(i) = Shieldgenerator) then begin
x := GetStarShipX( i );
y := GetStarShipY( i );
TFstar := findcloseststarsystem(x,y,32000,true,false);
theSG := -1;
sg := '';
for s := 0 to stars -1 do
if getstarsystemowner(s) = Me then begin
sg := GetBrainData( 'SG' + IntToStr( s ) );
if sg <> '' then
begin
sgShip := FindStarShipCode( sg );
if sgShip = -1 then begin
sg := '';
end; end; end;
if sg = '' then begin
Star := TFStar;
sysX := Getstarsystemx(TFstar);
sysY := Getstarsystemy(TFstar);
if Distance( x, y, sysX, sysY ) <= 2 then
theSG := i;
if theSG >= 0 then begin
OrderGenerateShields( theSG, star );
Setbraindata('SG'+inttostr(TFstar),getstarshipcode(theSG));
end;
if Distance( x, y, sysX, sysY ) > 2 then begin
OrderGenerateShields( i, tfstar );
Setbraindata('SG'+inttostr(TFstar),getstarshipcode(i));
end; end; end;

I have tested it out and all ShieldGenerators should generate shields on any star. This code is also used by my Infinity player 2.
3/3/2005, 11:24 am Link to this post Send Email to beat2k   Send PM to beat2k
 
starz2far Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 104
Karma: -3 (+2/-5)
Reply | Quote
Re: Idea for Solar Vengeance 5


This is a brain. Copy and paste this code, call it whatever you want, and then run this brain as both of the brains in an AI duel. Then watch how many shields the capitals have. They will remain the same. Meaning that it does NOT build shields, regardless of what you would like to think. This is called a "controlled experiment" or something to that effect.

for s := 0 to getstarsystemcount() - 1 do for z := 1 to 8 do buildstarship(s,10,20,0,false);
for i := 0 to -1 do begin
If (Getstarshiptype(i) = 10) then begin
x := GetStarShipX( i );
y := GetStarShipY( i );
TFstar := findcloseststarsystem(x,y,32000,true,false);
theSG := -1;
sg := '';
for s := 0 to stars -1 do
if getstarsystemowner(s) = Me then begin
sg := GetBrainData( 'SG' + IntToStr( s ) );
if sg <> '' then
begin
sgShip := FindStarShipCode( sg );
if sgShip = -1 then begin
sg := '';
end; end; end;
if sg = '' then begin
Star := TFStar;
sysX := Getstarsystemx(TFstar);
sysY := Getstarsystemy(TFstar);
if Distance( x, y, sysX, sysY ) <= 2 then
theSG := i;
if theSG >= 0 then begin
OrderGenerateShields( theSG, star );
Setbraindata('SG'+inttostr(TFstar),getstarshipcode(theSG));
end;
if Distance( x, y, sysX, sysY ) > 2 then begin
OrderGenerateShields( i, tfstar );
Setbraindata('SG'+inttostr(TFstar),getstarshipcode(i));
end; end; end;
end
3/3/2005, 8:46 pm Link to this post Send Email to starz2far   Send PM to starz2far
 
beat2k Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 500
Karma: 5 (+12/-7)
Reply | Quote
Re: Idea for Solar Vengeance 5


I know why the SGs don't work.

for i := 0 to -1 do Begin
it should be:
for i := 0 to getstarshipcount() - 1 do begin

For Loops cannot count down. It only counts up. When the 2nd value is < the 1st value the loop is terminated.
3/3/2005, 9:26 pm Link to this post Send Email to beat2k   Send PM to beat2k
 
starz2far Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 104
Karma: -3 (+2/-5)
Reply | Quote
Re: Idea for Solar Vengeance 5


Lol. You must be the stupidiest mother effer to ever step into these forums. I will not waste my time explaining why you are retarded.
3/24/2005, 11:27 pm Link to this post Send Email to starz2far   Send PM to starz2far
 
beat2k Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 500
Karma: 5 (+12/-7)
Reply | Quote
Re: Idea for Solar Vengeance 5


Did you change that one line of code I posted? If you accuse me of mother effing then you know little about me.
3/25/2005, 8:08 am Link to this post Send Email to beat2k   Send PM to beat2k
 
starz2far Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 104
Karma: -3 (+2/-5)
Reply | Quote
Re: Idea for Solar Vengeance 5


Can you please re-read your post?

Do you know what proofreading is, have you ever watched what you were saying before actually saying it? Do you think twice before speaking in an affirmative as a matter of fact tone and then looking like a stupid mother effer?

Read your post over again. Please.
3/27/2005, 12:10 am Link to this post Send Email to starz2far   Send PM to starz2far
 
vulcan146 Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 121
Karma: 3 (+5/-2)
Reply | Quote
Re: Idea for Solar Vengeance 5


Important Clarification: For loops can only count upwards in the SV scripting language. They can in every full-formed language I've seen.

Last edited by vulcan146, 4/3/2005, 10:21 pm
4/3/2005, 10:17 pm Link to this post Send Email to vulcan146   Send PM to vulcan146
 
beat2k Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 500
Karma: 5 (+12/-7)
Reply | Quote
Re: Idea for Solar Vengeance 5


By the way, that was a old post. My grammar has improved since the time of that post.

Thanks for the correcting. At least I'm learning something here.
4/3/2005, 10:24 pm Link to this post Send Email to beat2k   Send PM to beat2k
 
CyberTiger Profile
Live feed
Blog
Friends
Miscellaneous info

Registered user

Registered: 01-2005
Posts: 370
Karma: 5 (+5/-0)
Reply | Quote
Re: Idea for Solar Vengeance 5


Ok, let's forget all above 'cuz it's offtopic. Now let's go to the main discuss.

The only thing I would like on SV5 is a error test that show the bugs of the code before I put it to play. I'm tired to do "Error test completed" and put it to run and it show a error on 2nd impulse. AAAAARRGH! This happen 99% of times for me!
10/23/2005, 9:03 pm Link to this post Send Email to CyberTiger   Send PM to CyberTiger
 


Add a reply

Page:  1  2  3 





You are not logged in (login)