[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

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

Post by ezra-r » Thu, 5. Nov 15, 13: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: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Thu, 5. Nov 15, 13: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: 13088
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Thu, 5. Nov 15, 13: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: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Thu, 5. Nov 15, 13: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: 3420
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Sat, 7. Nov 15, 22: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: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Sun, 8. Nov 15, 01: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: 2055
Joined: Sat, 7. Feb 04, 20:42
x4

Post by birdtable » Fri, 13. Nov 15, 17: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: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 13. Nov 15, 18: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: 2055
Joined: Sat, 7. Feb 04, 20:42
x4

Post by birdtable » Fri, 13. Nov 15, 19: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: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 13. Nov 15, 19: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.

birdtable
Posts: 2055
Joined: Sat, 7. Feb 04, 20:42
x4

Post by birdtable » Fri, 13. Nov 15, 19:42

Ah well the price of ignorance will cost me new start ,,, the upside is I can check out the new beta patch.... thanks to Sparky's save will not have to go back allllllllll the way.
Ooooooo and there's XML to screw around with ...

Keep working on the mods, most people find it hard to give Kudos but quick to complain .... Good Kudos Good Kudos ....and thanks for the patience.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

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

You shouldn't have to start a new game. Just reinstall the mod.

If there seems to be a problem with your save, you could send it over and I'll take a look. (Just upload somewhere and send me a link in PM.)

birdtable
Posts: 2055
Joined: Sat, 7. Feb 04, 20:42
x4

Post by birdtable » Fri, 13. Nov 15, 19:59

No hassles...Already downloading beta,,, to be honest Rebirth just a sequence of scenarios all to be enjoyed from which ever stage in the game,, Trade or Build or Fight or even Think...
Plus have tried reinstalling/restoring from bin and what ever came to mind, always ended up with same fault.... I shall return with new challenges for you.... but not "soon". :thumb:

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 12. Dec 15, 21:11

12.December.2015 - Miscellaneous OOZ Combat Tweaks updated to v0.28

- Return of the UniBar! Thank you again to UniTrader for the code that led to this, and to Egosoft for making it so that (ab)using these characters to print the UniBar no longer corrupts the save file.
- An internal change in the X:R 4.0 Beta that allows searching for class.null broke the filter that was filtering out alerts from pilots of player-owned small ships and drones that get in trouble OOZ. This has been fixed.
- Captains of player-owned capships and managers of player-owned stations that are destroyed OOZ have now set automated messages to send you the moment that they die. Unlike other alerts, these will be printed to your logbook.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 22. Jan 16, 19:34

Miscellaneous OOZ Combat Tweaks is unfortunately broken as of X Rebirth 4.0 Beta 6 due to extensive changes in the vanilla AI scripts.

I do not know when I will be able to find the time to fix it. When I do (and I fully intend to), I will announce it on this thread.

In the meantime, if you are running the beta, you can simply safely uninstall this mod. If you think you still might be interested in it in the future, simply stay subscribed to this thread so that you don't miss the announcement.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 27. Feb 16, 17:51

27.February 2016 - Miscellaneous OOZ Combat Tweaks updated to v0.29

Fixed a compatibility issue with XR 4.0

Dricks2222
Posts: 78
Joined: Sat, 12. Apr 08, 18:19
x3tc

Post by Dricks2222 » Sat, 12. Mar 16, 04:02

w.evans wrote:27.February 2016 - Miscellaneous OOZ Combat Tweaks updated to v0.29

Fixed a compatibility issue with XR 4.0
Thank you for this update :)

Great mod, but while i find your choice about comparing speed of the opposing ships to compute damage (because of hit %) interesting, i think you should also use weapon's bullet velocity.
I mean, if i put capital ship weapons on my capship, i will have hard time killing small and fast fighters.
But if i put quick lasers, will it still be hard ? No.
Something like 30% of the speed advantages/disadvantages comes from the ship's speed, but the 70% others come from the weapon's bullets velocity...

Also, you wrote on the first post
" it looks like Egosoft just wrote THE OOZ mod"
What do you mean ?
Which mod ?

Thanks again for your great mod :)

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 12. Mar 16, 07:27

Dricks2222 wrote:Also, you wrote on the first post
" it looks like Egosoft just wrote THE OOZ mod"
What do you mean ?
Which mod ?
In the early days of this mod's development, I kept talking about how great it would be if someone wrote a better OOZ mod than what this was in the beginning so that I could use that and stop developing this one. Not very long after, there was a pretty significant change done to OOZ combat with an official patch, and in the excitement of the moment, I wrote that.
Dricks2222 wrote:i think you should also use weapon's bullet velocity.
Possible, but a bit complicated script-side. There's very little control to how capital ships fire turrets in general, and how anything fires at all in low attention. Basically we access what damage a ship would do against a given target in certain situations (get_attackstrength), then apply that damage (apply_attackstrength). How that damage is actually calculated isn's available in the exported xmls, and is done code-side. It actually takes a fair amount of stuff into account, and we can modify a lot of those via parameters.xml, but individual bullet speed isn't one of them.

Altering damage done by ship speed and crew skill was fairly simple: simply look up the ship's speed at that moment vs the opponent's speed, look up the ship's crew's skill vs the opponent's, and apply modifiers onto that number between get_attackstrength and apply_attackstrength. Only way I can see for altering by bullet speed would be to make a list of a ship's actual weapon load-out per quadrant, and apply modifiers depending on what weapons are there. Still not a big deal, but then we'd have to do that for every single ship, in every single battle in low attention, possibly multiple times per battle to account for battle damage.

I found that modifying by ship speed and skill is a good enough improvement.

I do agree that individual weapon accuracy might be one of the main differences between high attention and low attention combat. Been thinking about that lately though, and when I reviewed my logs, noticed that some attacks fizzle and do no damage. I'm starting to think that maybe that is an abstraction of weapon accuracy. Haven't looked deep enough to see if there's a correlation between frequency of doing zero damage with having weapons with slow-moving bullets yet though.

.......
edit: just thought of something. Most (all, I think?) capital ships have HIT/MA turrets, and those are their primary anti-fighter weapons. Could simply apply a flat penalty on capital ships and stations vs small ships if beyond HIT/MA range. Really don't know how much better, if at all, that will be though, especially if it turns out that a way of abstracting that is already taken care of code-side.

Post Reply

Return to “X Rebirth - Scripts and Modding”