Page 1 of 1

Join the Navy ...

Posted: Wed Nov 12, 2008 8:01 pm
by Lestradae
So, how does the military actually work? In Oolite`s code, I mean.

How do I make a ship part of the military, so that it appears as such?

It`s not the role "military", as I found out some time ago, that does nothing. Is it like the police role, that is actually activated by "scan class police"? Is there a "scan class military"?

I would like to know how it works, as for the RS successor, I want to utilise all those new Navy ships (would be bizarre if I wouldn`t, ingame) but don`t want to create some mayhem with the roles :wink:

Explanations will be very much appreciated :D

L

Posted: Wed Nov 12, 2008 8:43 pm
by LittleBear
You can give a ship the scan class of Military, but I don't think military is an inbuilt role. So giving a ship the role military won't do anything of itself. You could give a custom role to the military ships in RS by like_shiping clones, setting their scan class to military, set their AI to a custom one, giving them a custom role like RS_Military, set the smaller ships as escorts to the larger and then add the larger ships with script using random chances based perhaps on govenment / techlevel. Should probabley also script some extra pirates and bugs though to keep things in balance.

Posted: Thu Nov 13, 2008 11:18 am
by Commander McLane
The truth is that--as far as the game engine is concerned--military simply doesn't exist. It's just a sub-class of police, with no properties whatsoever of its own.

(There is one tiny exception to this: ships with both scan classes CLASS_POLICE and CLASS_MILITARY will attack and kill you if you're committing an offence, but only vessels with CLASS_POLICE can give you a fine together with (or instead of) killing you. Vessels with CLASS_MILITARY only kill you.)

The bottom line is: If you want military to work in any other way than police-minus-one-feature, you have to script it yourself (see matt634's Galactic Navy.oxp).

...

Posted: Thu Nov 13, 2008 12:44 pm
by Lestradae
Thanks, guys, for the helpful answers!

Will have a look into the matter if it makes any sort of sense to implement the tiny exception with the two scan classes at some point, while keeping the in-game balance between NPC pirates and -police under control.

:idea:

L