Cool Pog Tricks
20 years 8 months ago #9210
by MajorTom
Replied by MajorTom on topic Cool Pog Tricks
I'm glad you figured those things out and let us know about them.
There are many relationships and priorities in the game that we don't know about and understand yet. We'll have to learn by trial and error much as you described.
About the SDK, please note:
It is/was a personal initiative of Steve Robertson. It wasn't done by the whole Particle Systems team so it's not complete to the finest detail. Steve did most of (all?) the work on it in his free time. We have to thank him and his dedication for what we do have, which is a great help. [^]
For many games you only get some of the script sources and the headers and are left on your own to figure it out[V]
Iwar2 Multiplayer Fan Site
There are many relationships and priorities in the game that we don't know about and understand yet. We'll have to learn by trial and error much as you described.
About the SDK, please note:
It is/was a personal initiative of Steve Robertson. It wasn't done by the whole Particle Systems team so it's not complete to the finest detail. Steve did most of (all?) the work on it in his free time. We have to thank him and his dedication for what we do have, which is a great help. [^]
For many games you only get some of the script sources and the headers and are left on your own to figure it out[V]
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
20 years 8 months ago #9215
by Qi Qi
Life is half spent before we know what it is...
Replied by Qi Qi on topic Cool Pog Tricks
About rebellion problem.
Even though the AI ship shared same faction with player, it would take player as hostile if player fired at it whatever with or without intention. The phenomena of rebellion often took place especially when your ship was equipped with many auto-fire turrets. Mistaken friendly fires are hard to avoid. However the rebellion would be stoutly unbearable.
I have already made some efforts to avoid this sort of rebellion. I replaced the default fight function for AI ship with a alternative in which friendly fires can be identified. But then I found that there were very few script interfaces in SDK which could be used to clear the hostility. The iSim.SetHostile() seemed to fail to work itself.
So how to cope with this kind of rebellion ? How to remove the allies from the AI ship's hostile target list ?
Life is half spent before we know what it is...
Even though the AI ship shared same faction with player, it would take player as hostile if player fired at it whatever with or without intention. The phenomena of rebellion often took place especially when your ship was equipped with many auto-fire turrets. Mistaken friendly fires are hard to avoid. However the rebellion would be stoutly unbearable.
I have already made some efforts to avoid this sort of rebellion. I replaced the default fight function for AI ship with a alternative in which friendly fires can be identified. But then I found that there were very few script interfaces in SDK which could be used to clear the hostility. The iSim.SetHostile() seemed to fail to work itself.
So how to cope with this kind of rebellion ? How to remove the allies from the AI ship's hostile target list ?
Life is half spent before we know what it is...
Life is half spent before we know what it is...
Please Log in or Create an account to join the conversation.
20 years 8 months ago #9216
by MajorTom
Replied by MajorTom on topic Cool Pog Tricks
Yes, I can confirm that iSim.SetHostile() doesn't work in this case. You may have some luck with iShip.Attacked or iSim.Attacked which, according to the SDK, resets the attacked flag.
If all else fails you could perhaps work around the problem, as you can identify friendly fire: destroy the hostile wingman and replace him with a new one using the same name in your alternative fight function (or one of the other alternative functions)
Iwar2 Multiplayer Fan Site
If all else fails you could perhaps work around the problem, as you can identify friendly fire: destroy the hostile wingman and replace him with a new one using the same name in your alternative fight function (or one of the other alternative functions)
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
20 years 8 months ago #9217
by Qi Qi
Life is half spent before we know what it is...
Replied by Qi Qi on topic Cool Pog Tricks
The part about iShip.Attacked in SDK helper is not very clear to me.
If that means the attacked flag would be reset after you once checked it? But i can't see any helps from it to remove the AI ship's hostility over my ship. My currently alternative fight function is like that,
FightFef( hship ship )
{
if ( iFaction.Allegiance( iSim.Faction( iShip.LastAttacker( ship ) ) ) == Global.Int("ss_my") )
{
iComms.Shout(ship, "", "friendly fire" );
// iFaction.SetFeeling( iSim.Faction( iShip.FindPlayerShip()), iSim.Faction( iSim.Cast( ship)), 0.9 );
iSim.SetHostile( iSim.Cast( ship) , false );
// iSim.SetFaction(ship, iSim.Faction( iShip.FindPlayerShip()));
}
else
{
iHUD.Print ("FightFunc 2");
iShip.WeaponTargetsFromContactList( ship );
}
}
Next, I plan to reinstall a Ai pilot to see if that would be helpful.
Life is half spent before we know what it is...
If that means the attacked flag would be reset after you once checked it? But i can't see any helps from it to remove the AI ship's hostility over my ship. My currently alternative fight function is like that,
FightFef( hship ship )
{
if ( iFaction.Allegiance( iSim.Faction( iShip.LastAttacker( ship ) ) ) == Global.Int("ss_my") )
{
iComms.Shout(ship, "", "friendly fire" );
// iFaction.SetFeeling( iSim.Faction( iShip.FindPlayerShip()), iSim.Faction( iSim.Cast( ship)), 0.9 );
iSim.SetHostile( iSim.Cast( ship) , false );
// iSim.SetFaction(ship, iSim.Faction( iShip.FindPlayerShip()));
}
else
{
iHUD.Print ("FightFunc 2");
iShip.WeaponTargetsFromContactList( ship );
}
}
Next, I plan to reinstall a Ai pilot to see if that would be helpful.
Life is half spent before we know what it is...
Life is half spent before we know what it is...
Please Log in or Create an account to join the conversation.
20 years 8 months ago #9222
by MajorTom
Replied by MajorTom on topic Cool Pog Tricks
Ok, I admit I'm guessing but: Resetting the faction and the hostility doesn't work, as we both know. Feelings are set by faction in general, so a single ship can't have different feelings than the rest of his faction.
Still, friendly fire causes apparent hostility (he turns red) but he doesn't shoot back at you. I'm guessing that it has something to do with the attacked flag which prompts the wingman to take on his hostile "attitude".
So if you reset the attacked flag it just might make him "forget" the hostility and set him back to friendly (blue). (I've sucessfully used the attacked flag on stations to set them visually hostile or friendly)
It's only one line to add to your script, so you might as well try it out and see what happens.
Iwar2 Multiplayer Fan Site
Still, friendly fire causes apparent hostility (he turns red) but he doesn't shoot back at you. I'm guessing that it has something to do with the attacked flag which prompts the wingman to take on his hostile "attitude".
So if you reset the attacked flag it just might make him "forget" the hostility and set him back to friendly (blue). (I've sucessfully used the attacked flag on stations to set them visually hostile or friendly)
It's only one line to add to your script, so you might as well try it out and see what happens.
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
20 years 8 months ago #9223
by Qi Qi
Life is half spent before we know what it is...
Replied by Qi Qi on topic Cool Pog Tricks
How did you use the attacked flag on stations to set them visually hostile or friendly? I added the iShip.Attacked , but it seemed to has no effect, for the Ai ship still in red.
How to reset the attacked flag? To add only a iShip.Attacked(ship), it is like that?
Life is half spent before we know what it is...
How to reset the attacked flag? To add only a iShip.Attacked(ship), it is like that?
Life is half spent before we know what it is...
Life is half spent before we know what it is...
Please Log in or Create an account to join the conversation.