The Feudal States
Moderators: winston, another_commander
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
What about some megaclass ships serving as house HQ's?
A super-weapon called plasma catapult?
A super-weapon called plasma catapult?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Thanks for the ideas - all good stuff. Back to scripting, unfortunately I'm away from my mac for a bit and am trying to do some work on a rather old PC, without any of the cool debug tools I'm used to. It's all very frustrating!!
From earlier on,
The system.shipsWithRole part is working fine but I'm not sure about the rest. Also, are there any tips for debugging OXPs on a PC?
From earlier on,
What's the correct syntax for sending a reactToAIMessage to a ship's target? I have the following in the ship script of a tournament target that the player has to destroy.Thargoid wrote:
2) Do a scan for the ships within range, filter as necessary and then step through the produced array and for each use <ship>.AIState or <ship>.reactToAIMessage to either change the AI state of the ship or send the given AI state a message - depending on how you want to do it.
Code: Select all
this.shipDied = function()
{var buoy = system.shipsWithRole("feudal-buoy")
this.ship.target = buoy
this.ship.target.reactToAIMessage("CHECK_DISTANCE")}
Download Resistance Commander plus many other exciting OXPs HERE
Code: Select all
this.shipDied = function()
{var buoy = system.shipsWithRole("feudal-buoy")[0]; // <- Its an array and using [0] takes the first entry
this.ship.target = buoy
this.ship.target.reactToAIMessage("CHECK_DISTANCE")}
Wot he sed
As for debugging OXPs on a PC, install debug OXP and have the JS debug console running. You can then access probably a fair amount of what you're missing from your Mac. It's a separate window, but from my understanding does most (but not all) of what the built-in one on Mac does.
You can grab the console from Berlios, and the debug OXP to link it with Oolite from the wiki.
As for your code, if you're sending it to the buoy, then I would just use buoy.reactToAIMessage("CHECK_DISTANCE"). No need to mess around with targets and such (especially given the ship is technically dead at this point).
Of course having checked that the buoy actually exists as Svengali correctly says, as don't forget this.shipDied will fire no matter who/what killed the ship, and when it happened.
As for debugging OXPs on a PC, install debug OXP and have the JS debug console running. You can then access probably a fair amount of what you're missing from your Mac. It's a separate window, but from my understanding does most (but not all) of what the built-in one on Mac does.
You can grab the console from Berlios, and the debug OXP to link it with Oolite from the wiki.
As for your code, if you're sending it to the buoy, then I would just use buoy.reactToAIMessage("CHECK_DISTANCE"). No need to mess around with targets and such (especially given the ship is technically dead at this point).
Of course having checked that the buoy actually exists as Svengali correctly says, as don't forget this.shipDied will fire no matter who/what killed the ship, and when it happened.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Back to the familiar ground of the mac. Still haven't got the buoy.reactToAIMessage("CHECK_DISTANCE") thing to work. For the moment I'm using a workaround:
where a temporary AI does the necessary distance check before returning to the normal buoyAI.plist. I'll look into it again to see if I'm still missing something.
Anyway, while I crack on with the tournament events I've packaged up the progress so far - this includes the new shaders plus some various other tweaks:
Feudal States WIP v0.3
Code: Select all
var buoy = system.shipsWithRole("feudal-buoy")[0]
this.ship.target.setAI("feudal-buoy-checkAI.plist")
Anyway, while I crack on with the tournament events I've packaged up the progress so far - this includes the new shaders plus some various other tweaks:
Feudal States WIP v0.3
Download Resistance Commander plus many other exciting OXPs HERE
In this thread there was mention of using awardEquipment("EQ_MISSILE_REMOVAL") to clear a player's weapon pylons. However this doesn't work - it actually adds the 'remove pyon-mounted weapons' option to the player's F3 screen.
I know that under 1.73, removeEquipment now works for pylon-mounted items, but I'd like to clear a player's pylons without knowing exactly what kind of missiles are fitted. Is there way of doing this?
I know that under 1.73, removeEquipment now works for pylon-mounted items, but I'd like to clear a player's pylons without knowing exactly what kind of missiles are fitted. Is there way of doing this?
Download Resistance Commander plus many other exciting OXPs HERE
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Not that I know of, but one of the coders may be more knowledgeable here.
However, you could test for all missiles and remove them if present. Something like:
EDIT: Hmmm. Looks like missiles is no JS-property, so we cannot actually test how many missiles the player has. Seems you have to devise something different then.
However, you could test for all missiles and remove them if present. Something like:
Code: Select all
for(var i; i==0; i<player.ship.missiles)
{
if(player.ship.hasEquipment("EQ_MISSILE")) player.ship.removeEquipment("EQ_MISSILE")
if(player.ship.hasEquipment("EQ_HARDENED_MISSILE")) player.ship.removeEquipment("EQ_HARDENED_MISSILE")
.
.
.
}
There's the isExternalStore property that applies to mines, missiles, external fuel tanks, and whatever else uses the missiles slots
You can check through all your equipped items and remove the ones that have isExternalStore == true
You can check through all your equipped items and remove the ones that have isExternalStore == true
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Interesting. Hadn't come across it yet.
But how would you check through all items? AFAIK you would need the infoForKey-method, so you would still have to know the keys for all possible missiles beforehand. And how often would you run the routine, because the player could have multiple missiles/mines of one type? Seems all not very elegant to me.
But how would you check through all items? AFAIK you would need the infoForKey-method, so you would still have to know the keys for all possible missiles beforehand. And how often would you run the routine, because the player could have multiple missiles/mines of one type? Seems all not very elegant to me.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
"Any other things people can think of that might be the subject of a sneaky recon mission?"
what about something like the Constrictor? ie, there's apparently a new and dangerous ship by xxx faction and someone wants more info, so you need pics. of course, the script could trigger and attack by this deadly vessel as soon as it realises it's been photographed.
what about something like the Constrictor? ie, there's apparently a new and dangerous ship by xxx faction and someone wants more info, so you need pics. of course, the script could trigger and attack by this deadly vessel as soon as it realises it's been photographed.
Ok, awardEquipment("EQ_MISSILE_REMOVAL") now works in trunk, and will be added to maintenance asap.Ramirez wrote:there was mention of using awardEquipment("EQ_MISSILE_REMOVAL") to clear a player's weapon pylons. However this doesn't work - it actually adds the 'remove pyon-mounted weapons' option to the player's F3 screen.
There might be a 1.73.4 release in the not too distant future.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
That would come in very handy indeed! For the tournament I've got around this by deploying minesweepers to deal with missiles launched by both the player and NPCs. These have finite range though and I want to make sure the player can't cheat by loading up with weapons.Kaks wrote:Ok, awardEquipment("EQ_MISSILE_REMOVAL") now works in trunk, and will be added to maintenance asap.
I've just finished the third event - Quartet - where you have to compete against three other nobles to capture a target drone. Sounds easy but even I got wiped out one or two times. I might re-use some of the AI and script to do a capture the flag event, which should be quite fun.
Download Resistance Commander plus many other exciting OXPs HERE
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Yes Nice ones.
Also include SpaceCastle(TM) attacks. Events where the player has to bomb the base of another house in a coordinated attack.
Also include SpaceCastle(TM) attacks. Events where the player has to bomb the base of another house in a coordinated attack.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Rustybolts
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jun 07, 2009 6:22 pm
- Location: UK
Sounding very cool.
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871