Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
eurobusker

Registered:
Posts: 108
Reply with quote  #1 
In my first mission I have sent the Artemis to do an ecological mission, to round up and escort the whales to the safety of a refuge.
The problem is by the time artemis arrives, they've all wandered off!
How do I make them either keep still until we arrive or even better, make them wander around a small area?
ryleyra

Registered:
Posts: 3,007
Reply with quote  #2 
Drop them in a singularity? [biggrin]

No, seriously I don't think you can effect the AI of whales or other "monsters". Your best bet would be to test if the whales are outside of a boundary, and if they are, relocate them to the boundary. You may need some complicated code to figure out what side of the "pen" they are on and relocate them accordingly, but they would then congregate on the boundary until their internal AI turned them around and made them go back the other way.

You can use the same logic to hold them in the refuge, or keep them near the ship as it "leads" them there. Of course, the whales will have to be named so you can reference them in the script.

I honestly don't know how whales react to threats like black holes and mines, but if they try to avoid them, you might build the "pen" out of such objects. If you could make it out of asteroids that would be even better.

On the other hand, whales might respond to AI commands. One way to find out if they do might be to press F7 to bring up the brainstack, and then click on a whale. If it displays AI, you can probably clear it and reprogram it.
cxfAtheus

Registered:
Posts: 322
Reply with quote  #3 
I've watched whales fly directly through minefields and not detonate or run into them. I haven't watched how they behave around other objects, though.
eurobusker

Registered:
Posts: 108
Reply with quote  #4 
I cant find a way of changing their speed, then at least they could just stay still [frown]
ryleyra

Registered:
Posts: 3,007
Reply with quote  #5 
Quote:
Originally Posted by eurobusker
I cant find a way of changing their speed, then at least they could just stay still [frown]


I think monsters have a hardcoded topspeed value. Generic meshes, too.

It's possible 2.2 will change that, since monsters have been made much more complex.

Have you tried the direct command? You can direct them to a point, or a target with "targetName". (If it works, anyway)

Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,404
Reply with quote  #6 
I had this problem in one of the canonical battles for Artemis Armada. My (short term) solution was to create a named object (could be a generic that looks like an asteroid or it could be a real anomaly). I constantly set_relative_position of the whale. That way it could rotate and appear to "swim" but it never really went anywhere.

As an alternative you could check the distance of the whale from the named object and if it gets too far away then use set_relative_position to put the whale back near the object.

The long term solution is that Artemis 2.2 should include a brain stack for monsters so they can be controlled in a way similar to ships. That's what Thom is working on now. Of course the new version may cause all existing mission scripts that use monsters, whales, and BioMechs to malfunction. No guarantees.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
eurobusker

Registered:
Posts: 108
Reply with quote  #7 
looks like I might have to change a few thing in my scenario.
Will whales follow ships? If so I can have a guard ship which can be controlled [smile]
ryleyra

Registered:
Posts: 3,007
Reply with quote  #8 
Quote:
Originally Posted by Mike Substelny
I had this problem in one of the canonical battles for Artemis Armada. My (short term) solution was to create a named object (could be a generic that looks like an asteroid or it could be a real anomaly). I constantly set_relative_position of the whale. That way it could rotate and appear to "swim" but it never really went anywhere.


I assume that means "direct" doesn't work on whales. I guess they could be directed to go somewhere, but their internal AI would just make them wander off anyway.

Quote:
As an alternative you could check the distance of the whale from the named object and if it gets too far away then use set_relative_position to put the whale back near the object.


I wanted to avoid having the whale "jump" back to the starting point, which is why I suggested calculating where it is on the boundary and putting it back on it. Alternately, though, you could make the whale "wrap around", like it's caught in a Negative Space Wedgie. [biggrin]

Quote:
The long term solution is that Artemis 2.2 should include a brain stack for monsters so they can be controlled in a way similar to ships. That's what Thom is working on now. Of course the new version may cause all existing mission scripts that use monsters, whales, and BioMechs to malfunction. No guarantees.


I thought as much. Don't BioMechs use the existing ship AI? I've never tried to "program" one, so I guess I just assumed they did.

BioMechs are kind of between monsters and enemies, though. They are defined as enemies in the vesselData, but use the "biomech" tag to identify their unique behavior. I wonder if the new monsters will be defined in vesselData, and if the old monsters like whales might get definitions as well. They may get a new interface for scripts, too. (A new "creature" create command, instead of "monster", "whale" and so forth being separate)

That would make it easy to add new monsters, the same way we can add new enemy ships. Or customize them.

Arrew

Avatar / Picture

Registered:
Posts: 2,737
Reply with quote  #9 
Well I know you can edit Top speed of biomechs.

As to space whales if you don't want to make an object to do a distance check make an if object is outside of area check. That should look better on sensors and stuff.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,404
Reply with quote  #10 
As far as I know whales will not really follow ships, but you could simulate that.

Under certain circumstances (e.g. Artemis came close to the whale) spawn an invisible generic object and use the DIRECT command to have that object follow the ship. Then pin the whale to that object by copying X and Z or using set_relative_position.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
eurobusker

Registered:
Posts: 108
Reply with quote  #11 
Mike, your'e a genius!!!

Whales do not follow ships, they run away from them [smile]

I think I've got an idea how to pen them into a ranch, if I put the artemis behind them, the swim in the opposite direction just like cows in a cowboy film. (serenity)
all I need to do is put a simple condition which sees if the whales are in a certain place and the job's done.
Thanks for the feedback, it's worth it. I've learnt so much.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.