BCU main page Bridge Commander Universe
...welcome to the new world.
 
 FAQFAQ  RanksRanks  RulesRules   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  Staff SiteStaff Site    RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Giving a ship a new AI in quickbattle?

 
Post new topic   Reply to topic    Bridge Commander Universe Forum Index -> BC Scripting
View previous topic :: View next topic  
Author Message

Mongooser

Cadet 4th Class
Cadet 4th Class




Joined: 20 Aug 2006
Posts: 14

Offline

 

 



Reply with quote

Post Posted: 09-07-2006 12:24 AM Post subject: Giving a ship a new AI in quickbattle?

Hello i was wondering how you would add a new AI for a ship loaded into quickbattle. I tried changing the "AIstring" In the ship hardpoint but it did not load up the new AI, it stuck with normal fedattack. Help is appreciated, thanks; )

Back to top
View user's profile Send private message

Sim Rex

Moderator
Moderator


Age: 26
Zodiac: Capricorn
Joined: 11 Apr 2002
Posts: 1714

Offline

 

 



Reply with quote

Post Posted: 09-07-2006 06:38 AM Post subject:

You could set up some kind of trigger, and then apply the new AI to the ship much as one would apply it for a ship in a mission... The only difficulty there is in finding an appropriate trigger Wink


_________________
"Could it be it's the end of our world? All the things that we cherish and love
Nothing left but to face this all on my own, cause I am the chosen one!"

-- The Fallen Angel - Iron Maiden(Smith/Harris)

For beginner scripters - The BCU Mission Scripting Lessons

Back to top
View user's profile Send private message Send e-mail

Mongooser

Cadet 4th Class
Cadet 4th Class




Joined: 20 Aug 2006
Posts: 14

Offline

 

 



Reply with quote

Post Posted: 09-07-2006 01:36 PM Post subject:

I heard there was a way of doing it through foundation, any ideas?

Back to top
View user's profile Send private message

MLeo

Fleet Admiral
Fleet Admiral


Age: 22
Zodiac: Aquarius
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands
Offline

 

 



Reply with quote

Post Posted: 09-07-2006 06:58 PM Post subject:

You will have to change the 3rd field of the "friendlyDetails" and the "enemyDetails" of your ship plugin.

Look at the last lines of your ship plugin and you will see what I mean.


_________________

How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"

Back to top
View user's profile Send private message Send e-mail MSN Messenger

Mongooser

Cadet 4th Class
Cadet 4th Class




Joined: 20 Aug 2006
Posts: 14

Offline

 

 



Reply with quote

Post Posted: 09-07-2006 09:03 PM Post subject:

I am not 100% sure what you mean... do you mean the ship.py file in the custom/scripts/ships folder?

Back to top
View user's profile Send private message

MLeo

Fleet Admiral
Fleet Admiral


Age: 22
Zodiac: Aquarius
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands
Offline

 

 



Reply with quote

Post Posted: 09-07-2006 09:44 PM Post subject:

scripts/Custom/Ships yeah.

That's where the ship plugins usually are.


_________________

How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"

Back to top
View user's profile Send private message Send e-mail MSN Messenger

Mongooser

Cadet 4th Class
Cadet 4th Class




Joined: 20 Aug 2006
Posts: 14

Offline

 

 



Reply with quote

Post Posted: 09-08-2006 01:48 AM Post subject:

I am unsure of how i could use these lines to tie the ship to a particular ai when quickbattle is loaded up =(

Back to top
View user's profile Send private message

MLeo

Fleet Admiral
Fleet Admiral


Age: 22
Zodiac: Aquarius
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands
Offline

 

 



Reply with quote

Post Posted: 09-08-2006 05:51 PM Post subject:

Ok, say you want to give the Sovereign an ai called "UTurnAI" then you do this:
Code:
Foundation.ShipDef.Sovereign.friendlyDetails[2] = "UTurnAI"
Foundation.ShipDef.Sovereign.enemyDetails[2] = "UTurnAI"


Atleast, this should do the trick as far as Foundation is concerned, I'll have to follow it through the scripts when I find the time.


_________________

How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"

Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic

All times are GMT

Page 1 of 1
   Bridge Commander Universe Forum Index -> BC Scripting
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group
Bridge Commander Universe is a Nightsoft company. All rights reserved.