Page 7 of 11

Posted: Thu Apr 12, 2007 12:12 pm
by JensAyton
LittleBear wrote:
I suspect though it may have somthing to do with the fact that the ship is being launched from a station. I had the same problem with the 3 lasered Black Monk Gun ships. When spawned in space with a customAI, they fired. But if I set them as defence ships, they would turn red on the scanner but refused to fire. Cannot think of a reason why they should do this, but there it is!
Noted. Please to be providing test-case OXP.

Posted: Thu Apr 12, 2007 12:31 pm
by CaptKev
If I change WEAPON_NONE to WEAPON_BEAM_LASER in the main entity they start blasting the moment they leave the Galactica or space station. I've tried nullAI and dumbAI with no luck, change the main AI to everything under the sun, but nothing seems to work. :cry:

No luck with the suggestions above, but thanks all the same.

Posted: Thu Apr 12, 2007 1:04 pm
by LittleBear
@Arhuman.

I've put a monktest.oxp on this box link http://www.box.net/shared/gqoehmv2sp

The script just adds a Monk Station, some monk patrol ships and some debtors near the w/s beacon on exiting hyperspace.

The two versions of the monk gunships are identical (except for the AI). So you can tell them apart i've added (patrol version) and (defence version) after the names. The Monk Station has the defence version as its defence ship.

The AI for the patrol version, just tells it to kill debtors and head for the planet when they're all dead. This works fine and they fire their three lasers and turrett.

The Defence ship has interceptAI. If you bother the station it launches its defence ships (best do this from the side as it has a load of plasma cannons near the docking port!). They turn red but don't use their lasers.

@CaptKev.

Think its a bug in Oolite, as I've got the same problem!

Posted: Fri Apr 13, 2007 5:47 am
by Commander McLane
If the problem is along the lines LittleBear is pointing at, perhaps giving the vipers a custom AI would work?

The Hacker Outposts in Anarchies.oxp have a clone of the Renegade Viper as defense-ships, but with a custom defendStationAI instead of the usual interceptAI. They fire at me (almost) every time when they're launched. However they don't have multiple lasers. So if that's the real source of the problem then this solution wouldn't work.

Anyway you can try it. Here's the defendStationAI:

Code: Select all

{
    "ATTACK_SHIP" = {
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", "setStateTo: ATTACK_SHIP"); 
        "ENERGY_LOW" = ("setStateTo: FLEE"); 
        ENTER = (performAttack); 
        EXIT = (); 
        "INCOMING_MISSILE" = ("messageMother: ATTACKED", fightOrFleeMissile, "setStateTo: FLEE"); 
        "TARGET_DESTROYED" = ("setStateTo: DOCK_WITH_STATION"); 
        "TARGET_LOST" = ("setStateTo: DOCK_WITH_STATION"); 
        UPDATE = (); 
    }; 
    FLEE = {
        ENTER = ("setDesiredRangeTo: 25600", performFlee); 
        "ENERGY_FULL" = (performIdle, "setStateTo: ATTACK_SHIP"); 
        "TARGET_LOST" = (performIdle, "setStateTo: DOCK_WITH_STATION"); 
        "DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: DOCK_WITH_STATION"); 
        "INCOMING_MISSILE" = ("messageMother: ATTACKED", fightOrFleeMissile, "setStateTo: FLEE"); 
        "REACHED_SAFETY" = ("setSpeedTo: 0.0", performIdle, "pauseAI: 10.0"); 
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", fightOrFleeHostiles, "setStateTo: FLEE"); 
        UPDATE = (); 
        EXIT = (); 
    }; 
    GLOBAL = { ENTER = ("setStateTo: ATTACK_SHIP"); EXIT = (); UPDATE = (); }; 
    "DOCK_WITH_STATION" = {
        ATTACKED = (setTargetToPrimaryAggressor, "messageMother: ATTACKED", "setStateTo: ATTACK_SHIP"); 
		ENTER = (checkForMotherStation);
		"NOTHING_FOUND" = ("setAITo: route1traderAI.plist");
		"STATION_FOUND" = (setTargetToStation, "setDesiredRangeTo: 5000.0", performIntercept);
		"DESIRED_RANGE_ACHIEVED" = ("setAITo: dockingAI.plist");
		EXIT = ();
        "INCOMING_MISSILE" = ("messageMother: ATTACKED", fightOrFleeMissile, "setStateTo: FLEE"); 
		UPDATE = ();
	}; 
}
Feel free to use the AI if you want. But please remember to rename it if you modify it.

Posted: Fri Apr 13, 2007 9:22 am
by CaptKev
@Cmdr McLane, no luck I'm afraid but thanks for taking the time to post the AI code. Just hope Arhuman can locate the bug in the main app.

Posted: Wed Apr 18, 2007 7:24 am
by CaptKev
Here's my replacement for the GalCop Viper, if anyone wants to try to get the twin lasers working just rename WEAPON_BEAM_LASER to WEAPON_NONE in the shipdata.plist

Posted: Thu Apr 26, 2007 9:38 pm
by CaptKev
I've created a new gun turret for the Galactica with the barrel pointing towards the +Z axis, but it's displayed lopsided when viewed in-game, anyone got any idea what the problem might be?

Maybe it's time to give up on this project, there's too many problems getting in my way! :(

Posted: Thu Apr 26, 2007 10:36 pm
by LittleBear
Nah don't give up! Sticking turrets on things is pretty do-able. Suspect Griff or Ramon could explain it, but have a look at their sub-entry numbers in the Assassins.oxp shipdata entries for "victim5", "victim9" or "victim10" (to name but a few!). These ships have 4 to 12 turrets pointing the right way! :wink:

When I did the renegades OXP, to be honest I didn't really know what the numbers meant so I just played about with the numbers until it pointed the right way! Its one of the numbers that decides the way it points, but I can't now rember which one it is.

Posted: Fri Apr 27, 2007 8:43 am
by Griff
I've seen this error happen too when i've tried to add subentities to models CaptKev, i'm pretty sure i've made it go away by re-exporting the problem obj. file into a new .dat try it out, see if it works. When you get the model done it'll be a great one for us to try adding shaders too, can't quite remember what the battlestar looked like in the tv series - does it have lots of little "window lights" along it?

Posted: Fri Apr 27, 2007 9:58 am
by CaptKev
Thanks LB and Griff, I'll try your suggestions.

If I exclude the setup action initialiseTurret everything gets displayed correctly, which implies this routine isn't rotating the turret on the Z axis alone. :?

Griff, don't think the original Galactica had many lights along the side, but mine has (I had the shaders in mind when I put them there), the engine glow and docking tubes are other areas that should benifit from the shaders.

Things that need to be done before release:

1) Two docking tubes fully working
2) Twin lasers working on the colonial vipers
3) Turrets displaying correctly
4) Texturing finished
5) Glow maps
6) Write a mission script around the Galactica and colonial vipers

Should be released about the same time as Elite IV :cry:

Posted: Fri Apr 27, 2007 12:08 pm
by TGHC
CaptKev wrote:
Should be released about the same time as Elite IV :cry:
I hope not, I'll be pushing up the daisies by then!

Posted: Wed Aug 29, 2007 2:41 am
by hwtan
CaptKev,

How is the progress? I am really excited about what you are doing. Since I am not a programmer, I am sorry that I cannot help you in the coding. I suppose you can take a look at the other OXP on how they attained the effect that you are looking for. Or perhaps, release it as a beta and seek for help from the community.

I hope that that helps.

Keep up the good job.

:D

Posted: Fri Aug 31, 2007 9:41 am
by CaptKev
Hi hwtan, I'm very busy with work at the moment but I hope to continue working on this soon.

Posted: Tue Sep 04, 2007 1:13 am
by hwtan
Hi CaptKev,

That is the reality in life isn't it? :)

Do take care and wish that you enjoy your work as much as coding for Oolite.

Blessing.

hwtan

Posted: Tue Sep 04, 2007 1:51 am
by nijineko
any chance of a test oxp that we could all play around with?