Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 2      1   2   Next
dwainedwibly

Registered:
Posts: 43
Reply with quote  #1 
Hi,

Can you script ships to only respond to one other ship? So making computer fleets in PvP?
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,666
Reply with quote  #2 
You can make AI ships only respond to a side value. This will work in PVP as long as you only have two player ships: the first ship has side_value = 1 and its opponent has side_value = 2. If you add any more player ships on either side then all the Comms officers with the same side_value will have exactly the same powers.
__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
ryleyra

Registered:
Posts: 2,419
Reply with quote  #3 
Doesn't side_value work with values of 3 or above?

It may not work with Comms specifically, though. It would be a problem in PvP missions if the allied fleets didn't respond to the proper side. But the scripting commands may not properly emulate this.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,666
Reply with quote  #4 
Quote:
Originally Posted by ryleyra
Doesn't side_value work with values of 3 or above?

It may not work with Comms specifically, though. It would be a problem in PvP missions if the allied fleets didn't respond to the proper side. But the scripting commands may not properly emulate this.


Yes, you can have 3 or more sides. This does allow you to make different Comms buttons for the different ships, but the game will treat them all as enemies of each other.

The exception is that the "fog of war" mechanism for limited sensor range seems to be broken. In the Armada III LARP I had player ships on side_value = 1 and side_value = 2. I spawned another ship on side_value = 3 and discovered it was impossible to hide that ship from the other two ships. For sensor purposes, the server treated side_value = 1 and side_value = 3 as if they were on the same side. They could see through each other's sensors. You won't notice this if you play with unlimited sensor range, but the Armada III LARP called for the shortest possible sensor range and this problem spoiled the story. The players could see through enemy sensors and observe objects that were supposed to be too far away.

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

Registered:
Posts: 2,419
Reply with quote  #5 
Quote:
Originally Posted by Mike Substelny

Yes, you can have 3 or more sides. This does allow you to make different Comms buttons for the different ships, but the game will treat them all as enemies of each other.


Ah, I see. I assumed the OP was referring to three or more sides. Basically, in PvP you can make your allies respond to only your team (and respond to taunts and surrender requests from all enemy teams) but you can't make them respond to only one Fleet Commander.

I wonder what would happen if you added Comms buttons to a console, and then changed the side_value of the player ship...

Quote:

The exception is that the "fog of war" mechanism for limited sensor range seems to be broken. In the Armada III LARP I had player ships on side_value = 1 and side_value = 2. I spawned another ship on side_value = 3 and discovered it was impossible to hide that ship from the other two ships. For sensor purposes, the server treated side_value = 1 and side_value = 3 as if they were on the same side. They could see through each other's sensors. You won't notice this if you play with unlimited sensor range, but the Armada III LARP called for the shortest possible sensor range and this problem spoiled the story. The players could see through enemy sensors and observe objects that were supposed to be too far away.


Interesting. I wonder if this is also true in PvP. Looks like I've got some things I can experiment with. [biggrin] (Edit: I am referring to PvP mode, not mission scripts)

dwainedwibly

Registered:
Posts: 43
Reply with quote  #6 
Thanks for that, just writing a PvP scenario and making sure its going to work. [smile] Perfect.
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,666
Reply with quote  #7 
Quote:
Originally Posted by ryleyra
Interesting. I wonder if this is also true in PvP. Looks like I've got some things I can experiment with. [biggrin]


The Armada III LARP was a PvP game with sensor range limited to 7k. We had a Pirate ship on side_value = 1 and a TSN ship on side_value = 2. Both teams were searching for derelict TSN ship on side_value = 3. Unfortunately it was not much of a search. No matter where I put the derelict ship the players could see it. Interestingly, the players could not see each other unless they were within 7k, but they could see the derelict on the other side of the map.

In summary:
  • Two-sided PvP does work for mission scripts, even with limited sensor range.
  • Three or more sided PvP does work for mission scripts with unlimited sensor range.
  • The problem comes when you want to have PvP with three or more sides and limited sensor range whereby all sides remain hidden from each other. In this case weird, glitchy things may happen. Now and then a Science Officer on side_value = 1 may see through the sensors of an enemy Science Officer with side_value = 3 (for example).

I was under a lot of time pressure during the LARP so I didn't get to analyze the problem fully. What I know for certain is that there was no place on the map I could put my derelict where it remained hidden from both the Pirates and the TSN yet visible to the Game Master. It's possible there was a bug in my script. It's also possible that three-sided PvP with limited sensors is such an oddball way to play Artemis no one else will ever experience this bug.

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

Avatar / Picture

Administrator
Registered:
Posts: 1,666
Reply with quote  #8 
Quote:
Originally Posted by ryleyra
I wonder what would happen if you added Comms buttons to a console, and then changed the side_value of the player ship...


Suppose you want to make a TSN vs Ximni battle like this:
  • TSN Light Cruiser Artemis is escorted by three destroyers which obey Artemis's orders.
  • TSN Battleship Intrepid is escorted by four Escorts which obey Intrepid's oders.
  • Ximni Light Cruiser Jump Chump is escorted by two Scouts which obey Jump Chump's orders.
  • Ximni Battleship Grog Hog is escorted by two Scouts which obey Grog Hog's orders.

As the software is now, if Ximni are side_value = 1 and TSN are side_value = 2 then all the TSN ships will take orders from either Artemis or Intrepid, and the same goes for the Ximni.

You could set it up like this:
  • Artemis side_value = 1
  • Intrepid side_value = 2
  • Jump Chump side_value = 3
  • Grog Hog side_value = 4
This would allow your mission script to make AI escorts that only obey orders from one ship. Furthermore, you could spawn Comms buttons that would be specific to one ship. Sure, half of your allies would appear red on your screen, but you could simply tell the players to be careful and not to target their red allies.

The problem would be with the AI ships. Artemis's AI escorts will try to kill Intrepid and its escorts. The same would go for all of the AI ships. The only solution I can offer is to limit the number of ships on each side to about 8 (including player ships) and give each Comms officer special buttons ordering specific allies to target specific enemies. For example, suppose Artemis has three destroyers named Chicago, Tokyo and Paris. Comms could have buttons that say:

  • Attack orders for Chicago
  • Attack orders for Tokyo
  • Attack orders for Paris
After clicking [Attack orders for Chicago], the Artemis Comms officer might see buttons that say:

  • Chicago attack Jump Chump
  • Chicago attack Grog Hog
  • Chicago attack (other Ximni ship)
  • Chicago attack (other Ximni ship)
  • Chicago attack (other Ximni ship)
Clicking one of those buttons would change Chicago's brain stack so it would attack a specific ship, and only that ship, side_value notwithstanding. In this mission every Comms officer must never use the "Attack Nearest Enemy" command because the nearest enemy will often be friendly!

You can put a lot of buttons on the Comms screen, but realistically there is only room to see about 8 at a time. This means you should build such a mission to use a few powerful ships instead of a lot of weak ships.

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

Registered:
Posts: 978
Reply with quote  #9 
Quick question. Can comms buttons use the player_slot to specify which ship they are on? If not, perhaps that could be a future development. Another question, all the different side values always enemies to one-another? Are there any to side values that are allied to each other? Again, if not this could be another possible development e.g. side values 20-29 are allied, but not on the same side, 30-39 allied but enemies to all others, 40-49 same again...
__________________
Captain Xavier Wise TSN Raven (BC-014)
Link to TSN RP Community website
Link to TSN Sandbox
Link to Blog
ryleyra

Registered:
Posts: 2,419
Reply with quote  #10 
Quote:
Originally Posted by Xavier Wise
Quick question. Can comms buttons use the player_slot to specify which ship they are on? If not, perhaps that could be a future development. Another question, all the different side values always enemies to one-another? Are there any to side values that are allied to each other? Again, if not this could be another possible development e.g. side values 20-29 are allied, but not on the same side, 30-39 allied but enemies to all others, 40-49 same again...


I'm not sure if you are asking this, but from what Mike's saying, I assume player_slot cannot be specified with Comms buttons. Neither can you assign them to a ship by name. It's either all or nothing.

I suppose side values could be allied with each other, but that would pretty much invalidate the purpose of having side value. Side value basically affects which ships the AI considers enemy and ally, whether the Comms menu puts a ship in the enemy or friendly submenu, and (if working properly) whether friendly ships can share info and scanning range. Having two sides on the same side would basically be "ignore the fact that you're a different side value", it wouldn't add anything. (Other than the ability to add Comms buttons to an individual ship)

ryleyra

Registered:
Posts: 2,419
Reply with quote  #11 
I found out my suggestion above did work. [biggrin] See my post "How to add Comms Buttons to a specific ship".
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,666
Reply with quote  #12 
You have a very creative idea there, Ryley! I will try to make use of it in the Pheonix Comic Con mission script. I may also re-write "The Hexaplex Vortex" to use your trick.
__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Fish Evans

Registered:
Posts: 347
Reply with quote  #13 
Quote:
Originally Posted by ryleyra

I suppose side values could be allied with each other, but that would pretty much invalidate the purpose of having side value.


Yes... and no I can see a few uses for haveing some sides allied to each other but not others in a web of factional standings. Shame though that player slot/Name cant currently be used as a control point. meh sounds like there is a crafty work around for the moment.
ryleyra

Registered:
Posts: 2,419
Reply with quote  #14 
Quote:
Originally Posted by Fish Evans

Yes... and no I can see a few uses for haveing some sides allied to each other but not others in a web of factional standings. Shame though that player slot/Name cant currently be used as a control point. meh sounds like there is a crafty work around for the moment.


Heh. That brings up some ideas that could be a MAJOR headache. Just as an example, let's say we have the TSN, the Ximni, and the Arvonians on one side, and the Kraliens and Torgoth on the other. The Pirates and Skaraans are a third side. Halfway through the battle, the Kraliens hire the Skaraans, but the Torgoth won't pay the price. The Kraliens and Skaraans split off in their own group, starting off neutral to the Torgoth, but those warmongering elephant-heads attack them anyway.

Soon after that the Ximni join the Torgoth, but the Torgoth want to join the Pirates. The Arvonians quit the battle and don't want to team with anybody. The TSN decide they would rather fight the Pirates than the Kraliens.

The only way I can see this not working is if any side wants to be neutral to another side. Each side is the enemy of every other side, there are no shades of grey. This really doesn't matter when it comes to players, because whatever side you are on, it is your decision whether you open fire on any other ship, even an ally. The distinction comes when you have AI who have to decide who they regard as ally and who they regard as enemy.

Maybe there should be a "no side". IIRC, it is illegal to set sideValue to 0. You can set it for a command in which you don't care which side the command affects, but you can't set it on an actual ship. The closest you could come to that is to use the biomech key to give the AI the biomech behavior. Biomechs completely ignore sideValue. (Technically they should be an additional side, or "no side")

Again, though, which menu does Comms use to communicate with "no side"? Biomechs aren't aggressive, but you communicate with them through the enemy menu, not the ally menu. So a "neutral" is just an enemy whose AI isn't programmed to attack you.


Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,666
Reply with quote  #15 
Quote:
Originally Posted by ryleyra
The only way I can see this not working is if any side wants to be neutral to another side. Each side is the enemy of every other side, there are no shades of grey. This really doesn't matter when it comes to players, because whatever side you are on, it is your decision whether you open fire on any other ship, even an ally. The distinction comes when you have AI who have to decide who they regard as ally and who they regard as enemy.


I think you could solve this problem, as always, with a shipload of code.

When you build your AI brainstacks, never use the following brain elements:
CHASE_PLAYER
CHASE_NEUTRAL
CHASE_ENEMY
CHASE_STATION
CHASE_FLEET
DEFEND

The problem with these brain elements is that they rely on side_value. Instead, build every brain stack with a ton of TARGET_THROTTLE statements. The brain stacks must name every ship the AI could possibly want to target under the given circumstances. TARGET_THROTTLE will work because it doesn't care about side_value.

Every time alliances change you must rebuild all of the brain stacks for all of the AI ships with a whole new set of TARGET_THROTTLE commands.

You might still use the FOLLOW_COMMS_ORDERS brain element, but that will be a problem for the players. If Comms says to "Attack nearest enemy" the AI ship will use side_value to judge friendly vs enemy. Instead you should give Comms a large set of custom buttons that can be used to direct every possible friendly ship to attack every possible enemy target. Of course your code must change all of these buttons every time alliances change.

Sure, it may mean writing tens of thousands of lines of code. But this will achieve what you want. [cool]

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Previous Topic | Next Topic
Print
Reply

Quick Navigation: