targeting ROM question

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

What criteria determine if a space object will be targeted by the ships targeting computer?

I'm trying to get some planets targetable, but I cannot seem to get it to work

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
User avatar
sun1404
Militia Captain
Militia Captain
Posts: 527
Joined: Thu Nov 03, 2011 10:32 am
Location: Heretic. (Finally!)

I think we can only target ships and stations? So maybe you must make a virtual station for every planet, placed in the center of the planet, and use the planet's image.
Yes, look at my avatar, I have a wyvera type ship.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

I planet is just a station with the scale="world" attribute added. Removing this extra attribute does not make a difference. (I also tried various other options, but I can't get it to work).
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
User avatar
sun1404
Militia Captain
Militia Captain
Posts: 527
Joined: Thu Nov 03, 2011 10:32 am
Location: Heretic. (Finally!)

Hmmmmmmmmm..........

Try copying a station's code and exchange it's image with a planet's. There must be something else different between them.

Docking ports?

Sovereign?

What else? :?
Yes, look at my avatar, I have a wyvera type ship.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

It turns out it is controlled by docking port availability (at least 1) + scale="structure|ship".
The 'problem' is that the scale="world|structure|ship" at the same time controls what icon is used in the small 'radar' screen.

I'll just have to work around it I guess :)
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

pixelfck wrote:It turns out it is controlled by docking port availability (at least 1) + scale="structure|ship".
The 'problem' is that the scale="world|structure|ship" at the same time controls what icon is used in the small 'radar' screen.

I'll just have to work around it I guess :)
Let me know what you're trying to do and I can make the appropriate fix. Why do you want the player to target a planet? Do you have an extension to target asteroids with ore (e.g.) or is there a special planet that players need to target? Depending on your needs there are different ways to fix it (on my end).
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

I'm making a micro adventure, that has no real business shooting anything, the targeting is just to help you not get lost.

Having said that, being able to target asteroids would open up a nice set of opportunities.
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

There are a few ways to handle this:

The easiest is to add a hard-coded option to target worlds. Imagine something like this:

Code: Select all

...
(objChangeEquipmentStatus gPlayerShip 'TargetingWorlds 'install)
...
You could then override the targeting ROM item to set that (or create a brand new ROM). Essentially this is defining a new engine capability for ships and allowing you to programmatically set it. This is something that I could do for 1.2.

A harder path, but slightly more flexible, is to allow you to define the properties of the targeting computer on a ship class. Imagine something like this:

Code: Select all

<ShipClass ...
   <PlayerSettings ...
      <TargetingComputer>
         <TargetSelection type="friend" criteria="t +isPlayer:true;"/>
         <TargetSelection type="friend" criteria="TF"/>
         ...
      </TargetingComputer>
...
This is probably too hard for 1.2, but depending on how useful it is we should consider it for the future. Note that an obvious alternative (or enhancement) to this would be to allow the selection to be done via code:

Code: Select all

<ShipClass ...
   <Events>
      <GetTargetComputerList>
         ; return list of objects in target list.
      </GetTargetComputerList>
...
Lastly, the most generally flexible enhancement would be to allow the adventure to override the UI keys:

Code: Select all

<AdventureDesc>
   ...
   <UIAction key="TargetNextFriendly">
      ; code to select the next friendly target
   </UIAction>
   ...
</AdventureDesc>
These ideas are not mutually exclusive, of course.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

george moromisato wrote:Lastly, the most generally flexible enhancement would be to allow the adventure to override the UI keys:

Code: Select all

<AdventureDesc>
   ...
   <UIAction key="TargetNextFriendly">
      ; code to select the next friendly target
   </UIAction>
   ...
</AdventureDesc>
These ideas are not mutually exclusive, of course.
This is amazing ! Custom UI buttons would allow incredible flexibility to ambitious mods such as total conversions and different game mechanics like tower defense.
Maybe for 1.3 ? :D
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

I think the event based suggestion offers the most flixibility, it also fits nicely with other functions that have the same sort of event (GetMaxHP on shield devices for example).

However, I can see the second suggestion having multiple items (different targeting ROMs) add/stack to what your ship can target. It may also be a clearer syntax for entry level modders, without limiting the options all that much. So I would vote for the second suggestion, if it would allow for stacked targeting rules.

And, as digdug already mentioned, the final suggestion would allow for a lot of nice mods, so I would also vote for that one.

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
Post Reply