Page 14 of 118
Posted: Thu Jul 10, 2008 8:05 pm
by Ebi
I've finished my OXP "Orbits". Can I just upload it to the wiki?
Posted: Thu Jul 10, 2008 11:25 pm
by Disembodied
@ Ebi: if you don't have an account already you can PM
Winston and ask him to set one up for you.
Posted: Fri Jul 11, 2008 11:53 am
by Amen Brick
Disembodied wrote:@ Ebi: if you don't have an account already you can PM
Winston and ask him to set one up for you.
Actually he sends you a link to do it yourself, I'll see if I can rustle it up.
Edit: Here she blows.
http://wiki.alioth.net/index.php?title= ... =Main_Page
Posted: Fri Jul 11, 2008 7:19 pm
by Ebi
Cool, thanks! I've uploaded the OXP
...
Posted: Fri Jul 11, 2008 7:37 pm
by Lestradae
Hi Ebi,
I might be blind or something, but where is it?
Posted: Fri Jul 11, 2008 11:07 pm
by Ebi
Hm, Lestradae, you can see in the logs that i've uploaded a zipped file. I thought, some administrator would take it out of the queue and place it on the main page. Am I wrong with that? That's my first encounter with Wiki as non-reader.
Posted: Fri Jul 11, 2008 11:52 pm
by JensAyton
There is no queue. You can refer to the uploaded file in wiki markup as [[Media:Foo.zip]] (or [[Image:Foo.zip]] to link to the information page for the file). You can go to the information page with an URL of the form
http://wiki.alioth.net/index.php/Image:Foo . The first letter in the name must be uppercase, and any spaces in the name are replaced with underscores (_).
Posted: Sat Jul 12, 2008 12:49 am
by Ebi
Done, finally. Thanks Ahruman!
Posted: Fri Jul 25, 2008 5:43 pm
by Thargoid
Quick question, is it possible to control or set which ship a station launches if attacked?
I've looked over the various AI's, and can see the "RED_ALERT" = (launchDefenseShip); action, but I'm pondering a scenario where I'd want a particular station to launch a particular ship model.
Is it possible?
Posted: Fri Jul 25, 2008 6:28 pm
by JensAyton
Yes, using defense_ship_role (default is interceptor or police depending on tech level and randomness). It’s also possible to use defense_ship to specify a ship by key instead of role, but roles are preferred for flexibility.
Posted: Fri Jul 25, 2008 6:31 pm
by LittleBear
Yep you want to specify it the stations shipdata with:-
Code: Select all
<key>defense_ship_role</key>
<string>my_defense_ship</string> (or a standard game role like thargoid)
You can also set the maxium number it has in it's hangers with:-
Code: Select all
<key>max_defense_ships</key>
<integer>10</integer>
<key>max_police</key>
<integer>0</integer>
<key>max_scavengers</key>
<integer>0</integer>
For an Alien Carrier or station you might want to set it's savengers, traders, shuttles and police to zero to stop it launching human ships.
[/code]
Posted: Fri Jul 25, 2008 7:30 pm
by Thargoid
Thank you both...
Almost all the ship designs are done (one more to do), then ship roles etc to do, then the dreaded AI's to tackle. I hope it's worth it all in the end (and RL doesn't get in the way again too much).
Posted: Wed Jul 30, 2008 12:24 pm
by Eric Walch
How does one detect a killed ship in a list entities? At first I copied the code used by Kaks. He just tested for false, but that does not work, it is always true. When I dump the killed entity to the console, I get "[object Ship]"
At first I have an array of existing entities. During gameplay some get killed and to detect them I used folowing code:
Code: Select all
for (let i=0; i<salvageList.length;i++)
{
if(this.salvageList[i] =="[object Ship]")
player.commsMessage(expandDescription(" [salvage_drone_killed] "), 6);
}
It is working, but I just think this is the not right way to check for a killed ship. But after the ship is killed, all properties are gone and just replaced by the string "[object Ship]" as far I can see.
Posted: Thu Aug 07, 2008 8:51 pm
by Thargoid
Another question, as I'm now playing with code again (the thing to do in a thunderstorm when the TV's been knocked out)...
Is there any way to control or stimulate missile launches (or in this case Thargon launches)? I'm working on a "ship" which will be a thargon controller, my thought being that it acts kinda like an ambush. Player flies in, it detects them and launches 5 or 10 thargons and it's a firefight until either the thargons, the controller or the player are dead.
I'm having to use the thargons as missiles like the normal thargoid ships as if I do it with spawn or escort they either don't get the correct target (and just wander off) in the spawn case, or they live on after the controller has been destroyed in the escort case (although I'm not sure why, as there's nothing with role "thargoid-mothership" around to keep them functional).
As I want them to keep their normal "go inactive and become cargo" when the controller is nuked then I can't use escort or defense ship roles, and I'd rather not have to write whole new variants on the ships and AIs to make them scan for targets on spawning.
Doing it as a normal missile works, except that the controller either doesn't generate them at all, or at best you have to shoot several shades of circuits out of it before it decides to missile (thargon) launch. So is there any easy way to change the ship's AI (currently just the standard thargoidAI.plist) to fire them off when it scans and finds a non-thargoid target in range?
I think the above makes some kinda sense, but as we've been having said storm for the last couple of hours it's rather distracting
Posted: Thu Aug 07, 2008 9:03 pm
by LittleBear
a fireMissile command in AI will do it. You need to set the conditions under which it launches. This ship carries remote controled Worm fighters which it launches for its aft-hatch. (done by setting its missile role to a custom one in shipdata). It will allways launch a Worm as a distraction when running and launches further ones (until its runs out of them) if attacked whilst running. In gameplay this causes it to fire one Worm, followed by another if attacked whilst running and then switch to another state.
Code: Select all
"FOUND_PLAYER_FLEE_PLAYER" = {
ENTER = (fireMissile, "commsMessage: [mark-fleeing]", "addFuel: 2", "setSpeedFactorTo: 2.0", "setDesiredRangeTo: 25600", performFlee);
"ENERGY_LOW" = (fireMissile);
"INCOMING_MISSILE" = (fireMissile, setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: REACT_TO_PLAYER_ATTACK");
ATTACKED = (fireMissile, setTargetToPrimaryAggressor, "setStateTo: REACT_TO_PLAYER_ATTACK");
"TARGET_LOST" = (performIdle, "addFuel: -2", "setStateTo: DECIDE_COURSE");
"TARGET_DESTROYED" = (performIdle, "addFuel: -2", "setStateTo: DECIDE_COURSE");
EXIT = ();
"REACHED_SAFETY" = (performIdle, "addFuel: -2", "setStateTo: DECIDE_COURSE");
UPDATE = (); };
To get th drones to shut down on the death of the mother you'd need to give them a custom AI, but tweaking the normal thargonAI would do it. Copy the AI to your AI folder and rename it. Then assine this AI to your drones. The normal thargonAI scans for Thargoids every so often and if it doesn't find them shuts down. Just change your version to scan for the role you've given their mother.
An AI to get the mother launching would be faily simple. Just:-
Code: Select all
{
"GLOBAL" = {
"ATTACKED" = (setTargetToFoundTarget, "setStateTo: SCRAMBLE");
"INCOMING_MISSILE" = (setTargetToFoundTarget, fireECM, "setStateTo: SCRAMBLE");
ENTER = ();
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: SCRAMBLE");
"NOTHING_FOUND" = ();
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: player"); };
"SCRAMBLE" = {
ENTER = (fireMissile);
EXIT = ();
"TARGET_LOST" = ("setStateTo: SCRAMBLE"");
UPDATE = ("pauseAI: 2.0", fireMissile); };
}
That'd cause mum to spew out a drone every 2 seconds (until she runs out or the target is lost) whenever she is attacked or spots the player.