[MOD] Miscellaneous OOZ Combat Tweaks

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7927
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Sun, 20. Sep 15, 10:58

super duper :)

Thanks for confirming the fix worked.

I Love It When A Plan Comes Together etc.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7927
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Sun, 18. Oct 15, 02:57

Hi there,

It may be widely know but it is new to me so mentioning the following just in case. Observed in vanilla 3.61 HT1 TO.

If we are in the same Sector as a guidance target (e.g. ship or station; could be a mission target or a manually-designated target) in a different Zone and the guidance is to the object* and we press F3, that remote Zone becomes rendered. We can rotate the view and see ships etc. doing their thing (e.g. flying, using weapons, controlling drones).

The view around the zone looks the same when the Skunk is OOZ as when the Skunk is in-zone. With saving and reloading with/without 3rd person view on ships, it allows for what should be the same starting test conditions for comparing scripts that differ when IZ and OOZ (e.g. combat, mining etc.).

I think the Skunk remains in-zone too since test missiles I fired remained in flight after switching to other-Zone-view and back again. Similarly, when I watched a Mining ship use drones remotely, then cycled to 1st person view and back to the view of the other Zone, the mining ship's drones seemed to be following the same courses so I guess the game continues to do IZ calculations for a while after the Skunk or 3rd person view leaves a zone.

So if also useful, I think two rendered zones would be available for parallel testing with some flipping back and forth. Wasn't able to test for changes in GPU load but CPU and RAM seemed unchanged whether the 3rd person target was IZ or OOZ.

*E.g. The direct route is not via a highway; normal in Serpentine Haze Sector and arrangeable via use of nearby temp Zones elsewhere.

Regards,
Sparks


Edit: Extra info added.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sun, 18. Oct 15, 09:31

Hm. I wonder if attention level as pertains to ai scripts is still defined via IS/OOS rather than IZ/OOZ.

There are several attention levels, but ai scripts use either attention min="visible" or attention min="unknown". I always just assumed that "visible" refers to in-zone while "unknown" refers to everything else but, come to think of it, there is an attention level called "inzone" that is a level up from "visible". Maybe "visible" is defined by rendering distance without regard to whether something is within a zone or not?

The attention levels as documented in common.xsd are:

Code: Select all

      <xs:enumeration value="unknown"/>
      <xs:enumeration value="ingalaxy"/>
      <xs:enumeration value="incluster"/>
      <xs:enumeration value="insector"/>
      <xs:enumeration value="visible"/>
      <xs:enumeration value="inzone"/>
      <xs:enumeration value="nearby"/>

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7927
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Sun, 18. Oct 15, 13:51

Interesting, thanks. Didn't have a clue it was so nuanced!

Thinking about it now, I suspect visible will be how you suggest. Like for example, how DHA stations can be seen from nearby temporary zones.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sun, 1. Nov 15, 09:16

1.November.2015 - Miscellaneous OOZ Combat Tweaks updated to v0.27

Fighters and other small ships under attack OOZ will no longer send reports.

Thanks to Monster for the feedback leading to this change.

User avatar
ezra-r
Posts: 3314
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Thu, 5. Nov 15, 14:05

Since I added this, just the basic functionality, no extras, performance is kind of degradated in some parts.

For instance, when switching weapons, the animation is more erratic, is this well known? or maybe an effect of adding a certain number of scripts/mod in Rebirth. Along with this I have WWX mod and others which like npc in your stations, mission computer and the likes.

Thanks in advance.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Thu, 5. Nov 15, 14:20

Hi ezra-r,

Thanks for your feedback.

The base mod shouldn't affect performance much, certainly not the animations. Exactly two new calculations are added, and those aren't very taxing. Just straightforward arithmetic which the engine should be able to handle without any problems. No searches through extensive lists or anything like that which can add considerable load. Also been playing a bit the past couple of days, and haven't noticed performance degradation with MOCT, and my specs kind of suck so if the game ran any slower, the game wouldn't be playable at all.

That said, I'll certainly give the code a once-over just to be sure there aren't any never-ending loops, paradoxes, or other logic problems. I don't expect to find anything, though, because base MOCT is actually very simple.

One thing that could help narrow it down: could you please move the folder we.moc-t\aiscripts to somewhere outside of the game structure (say, to your desktop) to see if that helps?

EDIT: one thing I just though of: one change is to slow OOZ combat down to give the player time to react. A side-effect of this is an increase in number of simultaneous OOZ battles happening. You could try MOC-T v0.25.1x (in Miscellaneous Files at the Nexus). 0.25.1x speeds up OOZ combat back to vanilla levels, and might address the problem if that is indeed the cause.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 11406
Joined: Sat, 9. Nov 02, 12:45
x4

Post by Xenon_Slayer » Thu, 5. Nov 15, 14:24

w.evans wrote:There are several attention levels, but ai scripts use either attention min="visible" or attention min="unknown". I always just assumed that "visible" refers to in-zone while "unknown" refers to everything else but, come to think of it, there is an attention level called "inzone" that is a level up from "visible". Maybe "visible" is defined by rendering distance without regard to whether something is within a zone or not?
Objects can have the visible attention level when in adjacent zones. It's not really based on rendering so it doesn't mean whether the object is on screen, just that it could potentially become seen.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Thu, 5. Nov 15, 14:32

Xenon_Slayer wrote:
w.evans wrote:There are several attention levels, but ai scripts use either attention min="visible" or attention min="unknown". I always just assumed that "visible" refers to in-zone while "unknown" refers to everything else but, come to think of it, there is an attention level called "inzone" that is a level up from "visible". Maybe "visible" is defined by rendering distance without regard to whether something is within a zone or not?
Objects can have the visible attention level when in adjacent zones. It's not really based on rendering so it doesn't mean whether the object is on screen, just that it could potentially become seen.
Thanks for the clarification!

Should probably take another look at my high attention stuff. Seem to remember that some of it was written assuming attention.visible == inzone.

User avatar
ezra-r
Posts: 3314
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Sat, 7. Nov 15, 23:46

w.evans wrote:Hi ezra-r,

Thanks for your feedback.

The base mod shouldn't affect performance much, certainly not the animations. Exactly two new calculations are added, and those aren't very taxing. Just straightforward arithmetic which the engine should be able to handle without any problems. No searches through extensive lists or anything like that which can add considerable load. Also been playing a bit the past couple of days, and haven't noticed performance degradation with MOCT, and my specs kind of suck so if the game ran any slower, the game wouldn't be playable at all.

That said, I'll certainly give the code a once-over just to be sure there aren't any never-ending loops, paradoxes, or other logic problems. I don't expect to find anything, though, because base MOCT is actually very simple.

One thing that could help narrow it down: could you please move the folder we.moc-t\aiscripts to somewhere outside of the game structure (say, to your desktop) to see if that helps?

EDIT: one thing I just though of: one change is to slow OOZ combat down to give the player time to react. A side-effect of this is an increase in number of simultaneous OOZ battles happening. You could try MOC-T v0.25.1x (in Miscellaneous Files at the Nexus). 0.25.1x speeds up OOZ combat back to vanilla levels, and might address the problem if that is indeed the cause.
Thanks a lot for the advice.

Truth to be told the little issue I mentioned went away when 4.0beta2 was installed, with the improved performance of this version I am now inclined to believe it was just the accumulation of mods rather than this one specifically the one giving me that slow response with weapon switching animation and the moving bar when smalltalking, etc.

I am enjoying your mod a lot and Ive got to say you are doing and awesome job. Definetly a MUST HAVE mod if Ego does not tweak OOS.

Cheers and thanks for the response.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7927
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Sun, 8. Nov 15, 02:11

I've had a go at writing a guide to explain the IS/OOS and Attention thing.

If anyone can fix erroneous simplifications and/or add to it, that would be great.

https://www.egosoft.com:8444/confluence ... d=36602128

birdtable
Posts: 1692
Joined: Sat, 7. Feb 04, 21:42
x4

Post by birdtable » Fri, 13. Nov 15, 18:14

Hi W.E ...
Is there any way to extend display time for " reports via the cockpit display when they come under-fire while OOZ"
As if by some surreal coincidence these reports only appear when I am in the middle of some intense gunfight/boarding adventure and just get a flick from the eyeball then gradually (well quite quickly fade from memory, this could be an age thing) dissipate....
I am then left thinking ...what was that and where ...a few seconds more or until overwritten would help.....or am I missing something.

Cheers.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Fri, 13. Nov 15, 19:30

Hi birdtable,

Is the problem too much information, or is it displayed for just too short a time?

It is possible to extend the time in which notifications are displayed. I am hesitant to do so, though, because your in-cockpit display might not be useful for anything else anymore, particularly if you have a lot of ships.

If you're comfortable working with xml files, you could simply edit the "timeout" attribute to a higher number in the lines that begin:

Code: Select all

<show_notification caption="{97523, 2000}"
in the following files:

w.e_moc-t\aiscripts\fight.attack.object.capital.xml
w.e_moc-t\aiscripts\fight.attack.object.fighter.xml
w.e_moc-t\aiscripts\fight.attack.object.station.xml
w.e_mict\aiscripts\MICT.fight.attack.object.capital.xml

Right now, it's set to 10 seconds (written "10s"). You could increase that number to have the messages display for longer.

However, in your case, where you're simply too busy doing something else to be bothered by these messages (a situation I could well understand), a better solution might be to write the messages to your logbook. Reason I didn't do this however is because it will add lots of lines to your logbook, and increase the size of your save file. I do have it set to do this in my personal version, but I make sure to periodically clear my logbook to keep my save file size down. (Noticed that a bigger save file takes longer to load, and it takes longer to save such a file.)

In that case, you could add the following line:

Code: Select all

<write_to_logbook category="general" text="({97523, 2100} + {97523, 2121}).[this.defensible.knownname, $target.knownname, this.zone.knownname, $MOCT_ThreatReport, $target.shieldpercentage, $target.hullpercentage]"/>
right under the line I mentioned above in the four files listed above.

If enough people want this, I could, of course, add it in. Have heard more complaints than kudos about this feature, though. I think that it's useful, so I'm not taking it out. But I've been thinking of ways of minimizing the intrusiveness of the messages rather than making them more intrusive.

birdtable
Posts: 1692
Joined: Sat, 7. Feb 04, 21:42
x4

Post by birdtable » Fri, 13. Nov 15, 20:03

Hi W.E .....Thanks for the quick response
First of all many Kudos from me for the feature....love the extra features adds depth...
Will hesitantly experiment with XML files, time I moved into 21st century...
As an example of the problems I may face with XML I have just updated your mict to 0.54 (don't ask my method) and I get....

Incompatible Version
-w.e_mict (w.e-0.01) missing

Wot have I dun .... screwed me game.... Help!!!!

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Fri, 13. Nov 15, 20:19

birdtable wrote:Incompatible Version
-w.e_mict (w.e-0.01) missing
Oof! I have no idea what w.e-0.01 might be!

Sorry, can't troubleshoot without knowing what you did. Safest would be to delete the whole folder w.e_mict and reinstall. Hope you kept the zips?

...
And remember when editing the xml files, do NOT use microsoft notepad. It sometimes adds formatting stuff that screws the file up. A lot of people use notepad++, rumored to be a free download.

Post Reply

Return to “X Rebirth - Scripts and Modding”